ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/UseTheForce/EAM_FF.cpp
(Generate patch)

Comparing:
trunk/OOPSE-3.0/src/UseTheForce/EAM_FF.cpp (file contents), Revision 1654 by gezelter, Wed Oct 27 02:16:34 2004 UTC vs.
branches/new_design/OOPSE-3.0/src/UseTheForce/EAM_FF.cpp (file contents), Revision 1702 by tim, Wed Nov 3 18:00:36 2004 UTC

# Line 43 | Line 43 | namespace EAM_NS{
43    } atomStruct;
44  
45    int parseAtom( char *lineBuffer, int lineNum, atomStruct &info, string eamPotFile );
46 <  int parseEAM( atomStruct &info, string eamPotFile, double **eam_rvals,
47 <                double **eam_rhovals, double **eam_Frhovals);
46 >  int parseEAM( atomStruct &info, string ffPath, string eamPotFile,
47 >                double **eam_rvals, double **eam_rhovals,
48 >                double **eam_Frhovals);
49   #ifdef IS_MPI
50    
51    MPI_Datatype mpiAtomStructType;
# Line 68 | Line 69 | namespace EAM_NS{
69        if( eam_Frhovals != NULL ) delete[] eam_Frhovals;
70      }
71  
72 <    LinkedAtomType* find(char* key){
72 >    LinkedAtomType* find(const char* key){
73        if( !strcmp(name, key) ) return this;
74        if( next != NULL ) return next->find(key);
75        return NULL;
# Line 157 | Line 158 | EAM_FF::EAM_FF() {
158   // begins the actual forcefield stuff.  
159   //****************************************************************
160  
161 < EAM_FF::EAM_FF() {
161 > EAM_FF::EAM_FF(){
162    EAM_FF("");
163   }
164  
165 < EAM_FF::EAM_FF(string the_variant){
165 > EAM_FF::EAM_FF(const string &the_variant) : ForceFields(the_variant) {
166  
167    string fileName;
168    string tempString;
# Line 357 | Line 358 | void EAM_FF::readParams( void ){
358          
359          // the parser returns 0 if the line was blank
360          if( parseAtom( readLine, lineNum, info, eamPotFile ) ){
361 <          parseEAM(info,eamPotFile, &eam_rvals,
361 >          parseEAM(info, ffPath, eamPotFile, &eam_rvals,
362                     &eam_rhovals, &eam_Frhovals);
363            info.ident = identNum;
364            headAtomType->add( info, eam_rvals,
# Line 526 | Line 527 | void EAM_FF::initializeAtoms( int nAtoms, Atom** the_a
527    
528    for( i=0; i<nAtoms; i++ ){
529      
530 <    currentAtomType = headAtomType->find( the_atoms[i]->getType() );
530 >    currentAtomType = headAtomType->find(the_atoms[i]->getType().c_str() );
531      if( currentAtomType == NULL ){
532        sprintf( painCave.errMsg,
533                 "AtomType error, %s not found in force file.\n",
534 <               the_atoms[i]->getType() );
534 >               the_atoms[i]->getType().c_str() );
535        painCave.isFatal = 1;
536        simError();
537      }
# Line 664 | Line 665 | int EAM_NS::parseEAM(atomStruct &info, string eamPotFi
665    else return 0;
666   }
667  
668 < int EAM_NS::parseEAM(atomStruct &info, string eamPotFile,
668 > int EAM_NS::parseEAM(atomStruct &info, string ffPath, string eamPotFile,
669                       double **eam_rvals,
670                       double **eam_rhovals,
671                       double **eam_Frhovals){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines