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

Comparing trunk/OOPSE-4/src/UseTheForce/LJFF.cpp (file contents):
Revision 1628 by gezelter, Thu Oct 21 20:15:31 2004 UTC vs.
Revision 1636 by chrisfen, Fri Oct 22 22:54:01 2004 UTC

# Line 12 | Line 12 | using namespace std;
12   #include "UseTheForce/ForceFields.hpp"
13   #include "primitives/SRI.hpp"
14   #include "utils/simError.h"
15 < #include "UseTheForce/DarkSide/atype_interface.h"
15 > #include "types/AtomType.hpp"
16 > #include "UseTheForce/DarkSide/lj_interface.h"
17  
17 //#include "UseTheForce/fortranWrappers.hpp"
18  
19   #ifdef IS_MPI
20   #include "UseTheForce/mpiForceField.h"
# Line 252 | Line 252 | void LJFF::readParams( void ){
252                   // if things go well, last will be set to 0
253  
254    int identNum;
255 <  
255 >  int isError;
256  
257    bigSigma = 0.0;
258   #ifdef IS_MPI
# Line 348 | Line 348 | void LJFF::readParams( void ){
348      }
349    }
350   #endif // is_mpi
351
352  // call new A_types in fortran
351    
352 <  int isError;
352 >  currentAtomType = headAtomType;
353 >  while( currentAtomType != NULL ){
354 >    
355 >    if( currentAtomType->name[0] != '\0' ){
356  
357 <  // dummy variables
358 <  int isLJ = 1;
359 <  int isDipole = 0;
360 <  int isSSD = 0;
361 <  int isGB = 0;
362 <  int isEAM = 0;
363 <  int isCharge = 0;
364 <  double charge = 0.0;
365 <  double dipole = 0.0;
366 <  
357 >      AtomType* at = new AtomType();
358 >      at->setIdent(currentAtomType->ident);
359 >      printf ("currentName = %s\n", currentAtomType->name);
360 >      at->setName(currentAtomType->name);    
361 >      at->setLennardJones();
362 >      at->complete();
363 >      
364 >    }
365 >    currentAtomType = currentAtomType->next;
366 >  }
367 >
368    currentAtomType = headAtomType;
369    while( currentAtomType != NULL ){
370      
371      if( currentAtomType->name[0] != '\0' ){
372        isError = 0;
373 <      makeAtype( &(currentAtomType->ident),
374 <                 &isLJ,
373 <                 &isSSD,
374 <                 &isDipole,
375 <                 &isGB,
376 <                 &isEAM,
377 <                 &isCharge,
378 <                 &(currentAtomType->epslon),
379 <                 &(currentAtomType->sigma),
380 <                 &charge,
381 <                 &dipole,
382 <                 &isError );
373 >      newLJtype( &(currentAtomType->ident), &(currentAtomType->sigma),
374 >                 &(currentAtomType->epslon), &isError);
375        if( isError ){
376 <        sprintf( painCave.errMsg,
377 <                 "Error initializing the \"%s\" atom type in fortran\n",
378 <                 currentAtomType->name );
379 <        painCave.isFatal = 1;
380 <        simError();
376 >        sprintf( painCave.errMsg,
377 >                 "Error initializing the \"%s\" LJ type in fortran\n",
378 >                 currentAtomType->name );
379 >        painCave.isFatal = 1;
380 >        simError();
381        }
382      }
383 +    
384      currentAtomType = currentAtomType->next;
385    }
386 <      
387 <  entry_plug->useLJ = 1;
386 >  
387 >  entry_plug->useLennardJones = 1;
388  
389   #ifdef IS_MPI
390    sprintf( checkPointMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines