43 |
|
int main(int argc, char* argv[]){ |
44 |
|
|
45 |
|
gengetopt_args_info args_info; |
46 |
< |
vector<Atype*> vdwAtypes; |
47 |
< |
vector<Atype*>::iterator iter; |
46 |
> |
|
47 |
> |
vector<Atype*> vdwAtypes; |
48 |
> |
vector<Atype*>::iterator i; |
49 |
> |
Atype* at; |
50 |
> |
vector<VDWAtom*> theAtoms; |
51 |
> |
vector<VDWAtom*>::iterator j; |
52 |
> |
VDWAtom* atom; |
53 |
> |
|
54 |
|
double mass, rpar, eps; |
55 |
|
string fileName; |
56 |
|
char vdwFileName[2002]; |
62 |
|
char* ffPath; |
63 |
|
char* eof_test; |
64 |
|
char* foo; |
65 |
+ |
char* myType; |
66 |
+ |
char* vType; |
67 |
|
int lineNum; |
68 |
|
int nTokens; |
61 |
– |
Atype* at; |
69 |
|
int FF; |
70 |
< |
vector <VDWAtom*> theAtoms; |
70 |
> |
short int gotMatch; |
71 |
|
|
72 |
|
//parse the command line options |
73 |
|
if (cmdline_parser (argc, argv, &args_info) != 0) |
184 |
|
PDBread->setPDBfile(structureFileName); |
185 |
|
theAtoms = PDBread->getAtomList(); |
186 |
|
printf("Found %d atoms\n", theAtoms.size()); |
187 |
< |
|
187 |
> |
|
188 |
> |
for( j = theAtoms.begin(); j != theAtoms.end(); ++j){ |
189 |
> |
atom = *j; |
190 |
> |
myType = atom->getType(); |
191 |
> |
gotMatch = 0; |
192 |
> |
|
193 |
> |
for( i = vdwAtypes.begin(); i != vdwAtypes.end(); ++i){ |
194 |
> |
at = *i; |
195 |
> |
vType = at->getType(); |
196 |
> |
|
197 |
> |
if (!strcasecmp(myType, vType)) { |
198 |
> |
atom->setMass(at->getMass()); |
199 |
> |
atom->setRpar(at->getRpar()); |
200 |
> |
atom->setEps(at->getEps()); |
201 |
> |
gotMatch = 1; |
202 |
> |
} |
203 |
> |
} |
204 |
> |
if (!gotMatch) { |
205 |
> |
printf("No matches found for %s, ", myType); |
206 |
> |
myType = atom->getBase(); |
207 |
> |
printf("trying with BaseType %s\n", myType); |
208 |
> |
for( i = vdwAtypes.begin(); i != vdwAtypes.end(); ++i){ |
209 |
> |
at = *i; |
210 |
> |
vType = at->getType(); |
211 |
> |
if (!strcasecmp(myType, vType)) { |
212 |
> |
atom->setMass(at->getMass()); |
213 |
> |
atom->setRpar(at->getRpar()); |
214 |
> |
atom->setEps(at->getEps()); |
215 |
> |
gotMatch = 1; |
216 |
> |
} |
217 |
> |
} |
218 |
> |
} |
219 |
> |
|
220 |
> |
if (!gotMatch) { |
221 |
> |
printf("No matches found with BaseType!\n"); |
222 |
> |
} |
223 |
> |
} |
224 |
> |
|
225 |
> |
//GridBuilder gb = new GridBuilder(); |
226 |
> |
//gb->findAxesAndOrigin(theAtoms); |
227 |
> |
//gb->launchProbe(FF, sigmaGrid, sGrid, epsGrid); |
228 |
> |
|
229 |
> |
|
230 |
|
} |
231 |
|
|
232 |
|
int count_tokens(char *line, char *delimiters) { |