--- trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/27 19:28:21 248 +++ trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/28 22:16:55 252 @@ -64,7 +64,7 @@ void (*initLJfortran) ( int *nLocal, int *identArray, void (*newLJtype)( int* ident, double* mass, double* epslon, double* sigma, int* status ); -void (*initLJfortran) ( int *nLocal, int *identArray, int *isError ) +void (*initLJfortran) ( int *nLocal, int *identArray, int *isError ); LJ_FF* currentLJwrap; @@ -207,15 +207,15 @@ void LJfunctionWrapper( void (*p1)( int* ident, double void LJfunctionWrapper( void (*p1)( int* ident, double* mass, double* epslon, double* sigma, int* status ), - void (*p2)( void ), + void (*p2)( int*, int*, int* ), void (*p3)( double* positionArray,double* forceArray, double* potentialEnergy, short int* doPotentialCalc ) ){ - p1 = newLJtype; - p2 = initLJfortran; - this->setLJfortran( p3 ); + newLJtype = p1; + initLJfortran = p2; + currentLJwrap->setLJfortran( p3 ); } @@ -242,7 +242,7 @@ void LJ_FF::initializeAtoms( void ){ // check for duplicates if( !strcmp( info.name, name ) ){ - sprintf( simError.painCave, + sprintf( painCave.errMsg, "Duplicate LJ atom type \"%s\" found in " "the LJ_FF param file./n", name ); @@ -307,7 +307,7 @@ void LJ_FF::initializeAtoms( void ){ headAtomType = new LinkedType; - fastFoward( "AtomTypes", "initializeAtoms" ); + fastForward( "AtomTypes", "initializeAtoms" ); // we are now at the AtomTypes section. @@ -386,7 +386,7 @@ void LJ_FF::initializeAtoms( void ){ if( currentAtomType->name[0] != '\0' ){ isError = 0; - newLJtype( &(currentAtomType->ident), + newLJtype( &(currentAtomType->ident), &(currentAtomType->mass), &(currentAtomType->epslon), &(currentAtomType->sigma), @@ -610,8 +610,7 @@ void LJ_FF::doForces( void ){ int i; double* frc; double* pos; - double potE; - short int calcPot = 0; + short int calcPot = 1; // forces are zeroed here, before any are acumulated. // NOTE: do not rezero the forces in Fortran. @@ -623,7 +622,7 @@ void LJ_FF::doForces( void ){ frc = Atom::getFrcArray(); pos = Atom::getPosArray(); - doLJfortran( pos, frc, potE, calcPot ); + doLJfortran( pos, frc, &(entry_plug->lrPot), &calcPot ); } void LJ_FF::initFortran( void ){ @@ -636,7 +635,7 @@ void LJ_FF::initFortran( void ){ ident = new int[nLocal]; for(i=0; iatoms[i]->getIdent(); + ident[i] = entry_plug->atoms[i]->getIdent(); } isError = 0;