--- trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/28 22:16:55 252 +++ trunk/mdtools/interface_implementation/LJ_FF.cpp 2003/01/30 20:03:37 254 @@ -9,7 +9,6 @@ using namespace std; #include "SRI.hpp" #include "simError.h" - // Declare the structures that will be passed by the parser and MPI typedef struct{ @@ -25,7 +24,6 @@ int parseAtomLJ( char *lineBuffer, int lineNum, atomSt int parseAtomLJ( char *lineBuffer, int lineNum, atomStruct &info ); #ifdef IS_MPI - #include "mpiForceField.h" MPI_Datatype mpiAtomStructType; @@ -73,6 +71,7 @@ LJ_FF::LJ_FF(){ // begins the actual forcefield stuff. //**************************************************************** + LJ_FF::LJ_FF(){ char fileName[200]; @@ -438,7 +437,7 @@ void LJ_FF::initializeAtoms( void ){ #ifdef IS_MPI double tempBig = bigSigma; - MPI::COMM_WORLD::Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); + MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); #endif //is_mpi //calc rCut and rList @@ -605,12 +604,12 @@ void LJ_FF::doForces( void ){ } -void LJ_FF::doForces( void ){ +void LJ_FF::doForces( int calcPot ){ int i; double* frc; double* pos; - short int calcPot = 1; + short int passedCalcPot = (short int)calcPot; // forces are zeroed here, before any are acumulated. // NOTE: do not rezero the forces in Fortran. @@ -622,7 +621,13 @@ void LJ_FF::doForces( void ){ frc = Atom::getFrcArray(); pos = Atom::getPosArray(); - doLJfortran( pos, frc, &(entry_plug->lrPot), &calcPot ); +// entry_plug->lrPot = -1; + doLJfortran( pos, frc, &(entry_plug->lrPot), &passedCalcPot ); + + + // fprintf( stderr, +// "lrPot = %lf\n", entry_plug->lrPot ); + } void LJ_FF::initFortran( void ){