| 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 |
< |
|
| 257 |
> |
|
| 258 |
|
rb->calcRefCoords(); |
| 259 |
|
|
| 260 |
< |
gb = new GridBuilder(rb, bandwidth); |
| 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 |
+ |
cout << "Doing GridBuilder calculations...\n"; |
| 272 |
|
gb->launchProbe(FF, sigmaGrid, sGrid, epsGrid); |
| 273 |
< |
|
| 274 |
< |
|
| 273 |
> |
|
| 274 |
> |
//write out the grid files |
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
int count_tokens(char *line, char *delimiters) { |