5 |
|
#include "forcerCmd.h" |
6 |
|
#include "PDBReader.hpp" |
7 |
|
#include "RigidBody.hpp" |
8 |
+ |
#include "GridBuilder.hpp" |
9 |
|
|
10 |
|
#define MK_STR(s) # s |
11 |
|
#define STR_DEFINE(t, s) t = MK_STR(s) |
53 |
|
vector<VDWAtom*> theAtoms; |
54 |
|
vector<VDWAtom*>::iterator j; |
55 |
|
VDWAtom* atom; |
56 |
< |
|
56 |
> |
GridBuilder* gb; |
57 |
> |
vector<double> sigmaGrid; |
58 |
> |
vector<double> epsGrid; |
59 |
> |
vector<double> sGrid; |
60 |
> |
|
61 |
|
double mass, rpar, eps; |
62 |
+ |
double xyz3[3]; |
63 |
|
string fileName; |
64 |
|
char vdwFileName[2002]; |
65 |
|
char structureFileName[2002]; |
66 |
|
char temp[200]; |
67 |
|
char readLine[500]; |
68 |
+ |
char xyzFile[200]; |
69 |
|
FILE *vdwFile, *structureFile; |
70 |
|
char* ffPath_env = "VDW_PATH"; |
71 |
|
char* ffPath; |
73 |
|
char* foo; |
74 |
|
char* myType; |
75 |
|
char* vType; |
76 |
+ |
char *token; |
77 |
+ |
const char *file; |
78 |
+ |
const char *period = "."; |
79 |
+ |
int k; |
80 |
|
int lineNum; |
81 |
|
int nTokens; |
82 |
|
int FF; |
95 |
|
exit(1); |
96 |
|
} |
97 |
|
|
98 |
< |
//the bandwidth has a default value (default=8), so it is always given |
98 |
> |
file = fileName.c_str(); |
99 |
> |
strcpy(xyzFile, file); |
100 |
> |
token = strtok(xyzFile, period); |
101 |
> |
strcpy(xyzFile, token); |
102 |
> |
strcat(xyzFile, "ref.xyz"); |
103 |
> |
ofstream xfiles(xyzFile); |
104 |
> |
|
105 |
> |
//the bandwidth has a default value (default=16), so it is always given |
106 |
|
bandwidth = args_info.bandwidth_arg; |
107 |
|
|
108 |
|
if (args_info.charmm_given) { |
254 |
|
for( j = theAtoms.begin(); j != theAtoms.end(); ++j){ |
255 |
|
rb->addAtom(*j); |
256 |
|
} |
257 |
+ |
|
258 |
+ |
rb->calcRefCoords(); |
259 |
|
|
260 |
< |
//GridBuilder gb = new GridBuilder(rb); |
260 |
> |
//print a reference coordinate xyz file |
261 |
> |
xfiles << rb->getNumAtoms() << "\n\n"; |
262 |
> |
for (k=0; k<rb->getNumAtoms(); k++){ |
263 |
> |
rb->getAtomRefCoor(xyz3, k); |
264 |
> |
xfiles << rb->getAtomType(k) << "\t" << |
265 |
> |
xyz3[0] << "\t" << xyz3[1] << "\t" << |
266 |
> |
xyz3[2] << "\n"; |
267 |
> |
} |
268 |
> |
|
269 |
> |
gb = new GridBuilder(rb, bandwidth*2); |
270 |
|
|
271 |
< |
//gb->launchProbe(FF, sigmaGrid, sGrid, epsGrid); |
272 |
< |
|
273 |
< |
|
271 |
> |
cout << "Doing GridBuilder calculations...\n"; |
272 |
> |
gb->launchProbe(FF, sigmaGrid, sGrid, epsGrid); |
273 |
> |
|
274 |
> |
//write out the grid files |
275 |
|
} |
276 |
|
|
277 |
|
int count_tokens(char *line, char *delimiters) { |