52 |
|
} |
53 |
|
~LinkedAtomType(){ if( next != NULL ) delete next; } |
54 |
|
|
55 |
< |
LinkedAtomType* find(char* key){ |
55 |
> |
LinkedAtomType* find(const char* key){ |
56 |
|
if( !strcmp(name, key) ) return this; |
57 |
|
if( next != NULL ) return next->find(key); |
58 |
|
return NULL; |
118 |
|
//**************************************************************** |
119 |
|
|
120 |
|
|
121 |
< |
LJFF::LJFF(){ |
121 |
> |
LJFF::LJFF() : ForceFields() { |
122 |
|
|
123 |
|
string fileName; |
124 |
|
string tempString; |
157 |
|
|
158 |
|
if( worldRank == 0 ){ |
159 |
|
#endif |
160 |
– |
|
161 |
– |
// generate the force file name |
160 |
|
|
161 |
+ |
// generate the force file name |
162 |
+ |
|
163 |
|
fileName = "LJFF.frc"; |
164 |
|
// fprintf( stderr,"Trying to open %s\n", fileName ); |
165 |
|
|
396 |
|
|
397 |
|
for( i=0; i<nAtoms; i++ ){ |
398 |
|
|
399 |
< |
currentAtomType = headAtomType->find( the_atoms[i]->getType() ); |
399 |
> |
currentAtomType = headAtomType->find(the_atoms[i]->getType().c_str() ); |
400 |
|
if( currentAtomType == NULL ){ |
401 |
|
sprintf( painCave.errMsg, |
402 |
|
"AtomType error, %s not found in force file.\n", |
403 |
< |
the_atoms[i]->getType() ); |
403 |
> |
the_atoms[i]->getType().c_str() ); |
404 |
|
painCave.isFatal = 1; |
405 |
|
simError(); |
406 |
|
} |