--- trunk/OOPSE/libmdtools/ForceFields.cpp 2003/04/09 13:59:35 484 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2003/10/28 16:03:37 829 @@ -1,5 +1,10 @@ -#include +#include +using namespace std; + + +#include + #ifdef IS_MPI #include #endif // is_mpi @@ -21,16 +26,8 @@ void ForceFields::calcRcut( void ){ //calc rCut and rList - entry_plug->rCut = 2.5 * bigSigma; - if(entry_plug->rCut > (entry_plug->box_x / 2.0)) - entry_plug->rCut = entry_plug->box_x / 2.0; - if(entry_plug->rCut > (entry_plug->box_y / 2.0)) - entry_plug->rCut = entry_plug->box_y / 2.0; - if(entry_plug->rCut > (entry_plug->box_z / 2.0)) - entry_plug->rCut = entry_plug->box_z / 2.0; - - entry_plug->rList = entry_plug->rCut + 1.0; - + entry_plug->setRcut( 2.5 * bigSigma ); + } void ForceFields::doForces( int calcPot, int calcStress ){ @@ -41,7 +38,7 @@ void ForceFields::doForces( int calcPot, int calcStres double* trq; double* A; double* u_l;; - DirectionalAtom* dAtom; + SimState* config; short int passedCalcPot = (short int)calcPot; short int passedCalcStress = (short int)calcStress; @@ -57,12 +54,14 @@ void ForceFields::doForces( int calcPot, int calcStres entry_plug->molecules[i].calcForces(); } - frc = Atom::getFrcArray(); - pos = Atom::getPosArray(); - trq = Atom::getTrqArray(); - A = Atom::getAmatArray(); - u_l = Atom::getUlArray(); + config = entry_plug->getConfiguration(); + frc = config->getFrcArray(); + pos = config->getPosArray(); + trq = config->getTrqArray(); + A = config->getAmatArray(); + u_l = config->getUlArray(); + isError = 0; entry_plug->lrPot = 0.0; @@ -93,6 +92,7 @@ void ForceFields::doForces( int calcPot, int calcStres "returned from the force calculation.\n" ); MPIcheckPoint(); #endif // is_mpi + }