--- trunk/OOPSE/libmdtools/ForceFields.cpp 2003/04/08 15:20:44 479 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2003/07/02 21:26:55 572 @@ -1,3 +1,8 @@ +#include + +using namespace std; + + #include #ifdef IS_MPI @@ -22,12 +27,12 @@ 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; + if(entry_plug->rCut > (entry_plug->boxLx / 2.0)) + entry_plug->rCut = entry_plug->boxLx / 2.0; + if(entry_plug->rCut > (entry_plug->boxLy / 2.0)) + entry_plug->rCut = entry_plug->boxLy / 2.0; + if(entry_plug->rCut > (entry_plug->boxLz / 2.0)) + entry_plug->rCut = entry_plug->boxLz / 2.0; entry_plug->rList = entry_plug->rCut + 1.0; @@ -43,31 +48,14 @@ void ForceFields::doForces( int calcPot, int calcStres double* u_l;; DirectionalAtom* dAtom; - double ut[3]; - - //u_l = new double[entry_plug->n_atoms]; - short int passedCalcPot = (short int)calcPot; short int passedCalcStress = (short int)calcStress; - // forces are zeroed here, before any are acumulated. + // forces are zeroed here, before any are accumulated. // NOTE: do not rezero the forces in Fortran. - for(i=0; in_atoms; i++){ - entry_plug->atoms[i]->zeroForces(); - -// if( entry_plug->atoms[i]->isDirectional() ){ -// dAtom = (DirectionalAtom *)entry_plug->atoms[i]; -// dAtom->getU(ut); - - -// if(dAtom->getIndex()== 1){ -// std::cerr << "atom 2's u_l = " << ut[0] << ", " << ut[1] -// << ", " << ut[2] << "\n"; -// } -// } - + entry_plug->atoms[i]->zeroForces(); } for(i=0; in_mol; i++ ){ @@ -80,7 +68,6 @@ void ForceFields::doForces( int calcPot, int calcStres A = Atom::getAmatArray(); u_l = Atom::getUlArray(); - isError = 0; entry_plug->lrPot = 0.0; @@ -99,8 +86,6 @@ void ForceFields::doForces( int calcPot, int calcStres &passedCalcStress, &isError ); - // delete[] u_l; - if( isError ){ sprintf( painCave.errMsg, "Error returned from the fortran force calculation.\n" );