ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/LJFF.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/LJFF.cpp (file contents):
Revision 559 by mmeineke, Thu Jun 19 22:02:44 2003 UTC vs.
Revision 787 by mmeineke, Thu Sep 25 19:27:15 2003 UTC

# Line 65 | Line 65 | namespace LJ_NS{
65        if( !strcmp( info.name, name ) ){
66          sprintf( painCave.errMsg,
67                   "Duplicate LJ atom type \"%s\" found in "
68 <                 "the LJ_FF param file./n",
68 >                 "the LJFF param file./n",
69                   name );
70          painCave.isFatal = 1;
71          simError();
# Line 117 | Line 117 | LJ_FF::LJ_FF(){
117   //****************************************************************
118  
119  
120 < LJ_FF::LJ_FF(){
120 > LJFF::LJFF(){
121  
122    char fileName[200];
123    char* ffPath_env = "FORCE_PARAM_PATH";
124    char* ffPath;
125    char temp[200];
126  char errMsg[1000];
126  
127    headAtomType = NULL;
128    currentAtomType = NULL;
# Line 162 | Line 161 | LJ_FF::LJ_FF(){
161      
162      // generate the force file name
163      
164 <    strcpy( fileName, "LJ_FF.frc" );
165 <    //    fprintf( stderr,"Trying to open %s\n", fileName );
164 >    strcpy( fileName, "LJFF.frc" );
165 >    fprintf( stderr,"Trying to open %s\n", fileName );
166      
167      // attempt to open the file in the current directory first.
168      
# Line 201 | Line 200 | LJ_FF::LJ_FF(){
200   #ifdef IS_MPI
201    }
202    
203 <  sprintf( checkPointMsg, "LJ_FF file opened sucessfully." );
203 >  sprintf( checkPointMsg, "LJFF file opened sucessfully." );
204    MPIcheckPoint();
205    
206   #endif // is_mpi
207   }
208  
209  
210 < LJ_FF::~LJ_FF(){
210 > LJFF::~LJFF(){
211  
212    if( headAtomType != NULL ) delete headAtomType;
213  
# Line 223 | Line 222 | void LJ_FF::initForceField( int ljMixRule ){
222   #endif // is_mpi
223   }
224  
225 < void LJ_FF::initForceField( int ljMixRule ){
225 > void LJFF::initForceField( int ljMixRule ){
226    
227    initFortran( ljMixRule, 0 );
228   }
229  
230 < void LJ_FF::cleanMe( void ){
230 > void LJFF::cleanMe( void ){
231  
232   #ifdef IS_MPI
233    
# Line 243 | Line 242 | void LJ_FF::readParams( void ){
242   #endif // is_mpi
243   }
244  
245 < void LJ_FF::readParams( void ){
245 > void LJFF::readParams( void ){
246  
247    atomStruct info;
248    info.last = 1; // initialize last to have the last set.
249                   // if things go well, last will be set to 0
250  
252  int i;
251    int identNum;
252    
253  
# Line 303 | Line 301 | void LJ_FF::readParams( void ){
301      // send out the linked list to all the other processes
302  
303      sprintf( checkPointMsg,
304 <             "LJ_FF atom structures read successfully." );
304 >             "LJFF atom structures read successfully." );
305      MPIcheckPoint();
306  
307      currentAtomType = headAtomType->next; //skip the first element who is a place holder.
# Line 357 | Line 355 | void LJ_FF::readParams( void ){
355    int isDipole = 0;
356    int isSSD = 0;
357    int isGB = 0;
358 +  int isEAM = 0;
359    double dipole = 0.0;
360    
361    currentAtomType = headAtomType;
# Line 369 | Line 368 | void LJ_FF::readParams( void ){
368                   &isSSD,
369                   &isDipole,
370                   &isGB,
371 +                 &isEAM,
372                   &(currentAtomType->epslon),
373                   &(currentAtomType->sigma),
374                   &dipole,
# Line 388 | Line 388 | void LJ_FF::readParams( void ){
388  
389   #ifdef IS_MPI
390    sprintf( checkPointMsg,
391 <           "LJ_FF atom structures successfully sent to fortran\n" );
391 >           "LJFF atom structures successfully sent to fortran\n" );
392    MPIcheckPoint();
393   #endif // is_mpi
394  
395   }
396  
397  
398 < void LJ_FF::initializeAtoms( int nAtoms, Atom** the_atoms ){
398 > void LJFF::initializeAtoms( int nAtoms, Atom** the_atoms ){
399    
400    int i;
401  
402    // initialize the atoms
403    
404  
405  Atom* thisAtom;
406
405    for( i=0; i<nAtoms; i++ ){
406      
407      currentAtomType = headAtomType->find( the_atoms[i]->getType() );
# Line 425 | Line 423 | void LJ_FF::initializeBonds( int nBonds, Bond** BondAr
423    }
424   }
425  
426 < void LJ_FF::initializeBonds( int nBonds, Bond** BondArray,
426 > void LJFF::initializeBonds( int nBonds, Bond** BondArray,
427                               bond_pair* the_bonds ){
428    
429      if( nBonds ){
430        sprintf( painCave.errMsg,
431 <               "LJ_FF does not support bonds.\n" );
431 >               "LJFF does not support bonds.\n" );
432        painCave.isFatal = 1;
433        simError();
434      }
435   }
436  
437 < void LJ_FF::initializeBends( int nBends, Bend** bendArray,
437 > void LJFF::initializeBends( int nBends, Bend** bendArray,
438                               bend_set* the_bends ){
439  
440      if( nBends ){
441        sprintf( painCave.errMsg,
442 <               "LJ_FF does not support bends.\n" );
442 >               "LJFF does not support bends.\n" );
443        painCave.isFatal = 1;
444        simError();
445      }
446   }
447  
448 < void LJ_FF::initializeTorsions( int nTorsions, Torsion** torsionArray,
448 > void LJFF::initializeTorsions( int nTorsions, Torsion** torsionArray,
449                                  torsion_set* the_torsions ){
450  
451      if( nTorsions ){
452        sprintf( painCave.errMsg,
453 <               "LJ_FF does not support torsions.\n" );
453 >               "LJFF does not support torsions.\n" );
454        painCave.isFatal = 1;
455        simError();
456      }
457   }
458  
459 < void LJ_FF::fastForward( char* stopText, char* searchOwner ){
459 > void LJFF::fastForward( char* stopText, char* searchOwner ){
460  
461    int foundText = 0;
462    char* the_token;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines