--- trunk/OOPSE/libmdtools/ForceFields.cpp 2003/03/24 18:33:51 393 +++ trunk/OOPSE/libmdtools/ForceFields.cpp 2003/03/27 17:32:03 420 @@ -11,6 +11,27 @@ void ForceFields::doForces( int calcPot, int calcStres #include "fortranWrappers.hpp" +void ForceFields::calcRcut( void ){ + +#ifdef IS_MPI + double tempBig = bigSigma; + MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); +#endif //is_mpi + + //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; + +} + void ForceFields::doForces( int calcPot, int calcStress ){ int i, isError;