--- trunk/OOPSE/libmdtools/ForceFields.cpp 2003/06/20 20:29:36 561 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2003/10/28 16:03:37 829 @@ -3,7 +3,7 @@ using namespace std; using namespace std; -#include +#include #ifdef IS_MPI #include @@ -26,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 ){ @@ -46,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; @@ -62,11 +54,13 @@ 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; @@ -98,6 +92,7 @@ void ForceFields::doForces( int calcPot, int calcStres "returned from the force calculation.\n" ); MPIcheckPoint(); #endif // is_mpi + }