ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/interface_implementation/LJ_FF.cpp
(Generate patch)

Comparing trunk/mdtools/interface_implementation/LJ_FF.cpp (file contents):
Revision 248 by chuckv, Mon Jan 27 19:28:21 2003 UTC vs.
Revision 253 by chuckv, Thu Jan 30 15:20:21 2003 UTC

# Line 64 | Line 64 | void (*initLJfortran) ( int *nLocal, int *identArray,
64   void (*newLJtype)( int* ident, double* mass, double* epslon, double* sigma,
65                     int* status );
66  
67 < void (*initLJfortran) ( int *nLocal, int *identArray, int *isError )
67 > void (*initLJfortran) ( int *nLocal, int *identArray, int *isError );
68  
69   LJ_FF* currentLJwrap;
70  
# Line 207 | Line 207 | void LJfunctionWrapper( void (*p1)( int* ident, double
207  
208   void LJfunctionWrapper( void (*p1)( int* ident, double* mass, double* epslon,
209                                     double* sigma, int* status ),
210 <                        void (*p2)( void ),
210 >                        void (*p2)( int*, int*, int* ),
211                          void (*p3)( double* positionArray,double* forceArray,
212                                      double* potentialEnergy,
213                                      short int* doPotentialCalc ) ){
214    
215    
216 <  p1 = newLJtype;
217 <  p2 = initLJfortran;
218 <  this->setLJfortran( p3 );
216 >  newLJtype = p1;
217 >  initLJfortran = p2;
218 >  currentLJwrap->setLJfortran( p3 );
219   }
220  
221  
# Line 242 | Line 242 | void LJ_FF::initializeAtoms( void ){
242        // check for duplicates
243        
244        if( !strcmp( info.name, name ) ){
245 <        sprintf( simError.painCave,
245 >        sprintf( painCave.errMsg,
246                   "Duplicate LJ atom type \"%s\" found in "
247                   "the LJ_FF param file./n",
248                   name );
# Line 307 | Line 307 | void LJ_FF::initializeAtoms( void ){
307  
308      headAtomType = new LinkedType;
309      
310 <    fastFoward( "AtomTypes", "initializeAtoms" );
310 >    fastForward( "AtomTypes", "initializeAtoms" );
311  
312      // we are now at the AtomTypes section.
313      
# Line 386 | Line 386 | void LJ_FF::initializeAtoms( void ){
386      
387      if( currentAtomType->name[0] != '\0' ){
388        isError = 0;
389 <      newLJtype( &(currentAtomType->ident),
389 >          newLJtype( &(currentAtomType->ident),
390                   &(currentAtomType->mass),
391                   &(currentAtomType->epslon),
392                   &(currentAtomType->sigma),
# Line 605 | Line 605 | void LJ_FF::doForces( void ){
605   }
606  
607  
608 < void LJ_FF::doForces( void ){
608 > void LJ_FF::doForces( int calcPot ){
609  
610    int i;
611    double* frc;
612    double* pos;
613 <  double potE;
614 <  short int calcPot = 0;
613 >  short int passedCalcPot = (short int)calcPot;
614  
615    // forces are zeroed here, before any are acumulated.
616    // NOTE: do not rezero the forces in Fortran.
# Line 623 | Line 622 | void LJ_FF::doForces( void ){
622    frc = Atom::getFrcArray();
623    pos = Atom::getPosArray();
624  
625 <  doLJfortran( pos, frc, potE, calcPot );
625 > //   entry_plug->lrPot = -1;
626 >  doLJfortran( pos, frc, &(entry_plug->lrPot), &passedCalcPot );
627 >
628 >
629 > //  fprintf( stderr,
630 > //         "lrPot =  %lf\n", entry_plug->lrPot );
631 >  
632   }
633    
634   void LJ_FF::initFortran( void ){
# Line 636 | Line 641 | void LJ_FF::initFortran( void ){
641    ident = new int[nLocal];
642  
643    for(i=0; i<nLocal; i++){
644 <    ident[i] = entryplug->atoms[i]->getIdent();
644 >    ident[i] = entry_plug->atoms[i]->getIdent();
645    }
646  
647    isError = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines