81 |
|
} |
82 |
|
~LinkedAtomType(){ if( next != NULL ) delete next; } |
83 |
|
|
84 |
< |
LinkedAtomType* find(char* key){ |
84 |
> |
LinkedAtomType* find(const char* key){ |
85 |
|
if( !strcmp(name, key) ) return this; |
86 |
|
if( next != NULL ) return next->find(key); |
87 |
|
return NULL; |
153 |
|
} |
154 |
|
~LinkedDirectionalType(){ if( next != NULL ) delete next; } |
155 |
|
|
156 |
< |
LinkedDirectionalType* find(char* key){ |
156 |
> |
LinkedDirectionalType* find(const char* key){ |
157 |
|
if( !strcmp(name, key) ) return this; |
158 |
|
if( next != NULL ) return next->find(key); |
159 |
|
return NULL; |
652 |
|
double inertialMat[3][3]; |
653 |
|
|
654 |
|
for( i=0; i<nAtoms; i++ ){ |
655 |
< |
currentAtomType = headAtomType->find( the_atoms[i]->getType() ); |
655 |
> |
currentAtomType = headAtomType->find(the_atoms[i]->getType().c_str() ); |
656 |
|
if( currentAtomType == NULL ){ |
657 |
|
sprintf( painCave.errMsg, |
658 |
|
"AtomType error, %s not found in force file.\n", |
659 |
< |
the_atoms[i]->getType() ); |
659 |
> |
the_atoms[i]->getType().c_str() ); |
660 |
|
painCave.isFatal = 1; |
661 |
|
simError(); |
662 |
|
} |
669 |
|
|
670 |
|
if( currentAtomType->isDirectional ){ |
671 |
|
currentDirectionalType = |
672 |
< |
headDirectionalType->find( the_atoms[i]->getType() ); |
672 |
> |
headDirectionalType->find(the_atoms[i]->getType().c_str() ); |
673 |
|
if( currentDirectionalType == NULL ){ |
674 |
|
sprintf( painCave.errMsg, |
675 |
|
"DirectionalType error, %s not found in force file.\n", |
676 |
< |
the_atoms[i]->getType() ); |
676 |
> |
the_atoms[i]->getType().c_str() ); |
677 |
|
painCave.isFatal = 1; |
678 |
|
simError(); |
679 |
|
} |