--- trunk/OOPSE/libmdtools/SimSetup.cpp 2004/05/11 20:33:41 1157 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2004/05/12 14:30:12 1163 @@ -484,7 +484,7 @@ void SimSetup::makeMolecules(void){ } - //creat cutoff group for molecule + //create cutoff group for molecule molInfo.myCutoffGroups.clear(); for (j = 0; j < molInfo.nCutoffGroups; j++){ @@ -563,19 +563,7 @@ void SimSetup::makeMolecules(void){ sprintf(checkPointMsg, "all molecules initialized succesfully"); MPIcheckPoint(); #endif // is_mpi - - // clean up the forcefield - - if (!globals->haveRcut()){ - the_ff->calcRcut(); - - } else { - - the_ff->setRcut( globals->getRcut() ); - } - - the_ff->cleanMe(); } void SimSetup::initFromBass(void){ @@ -1016,10 +1004,33 @@ void SimSetup::finalInfoCheck(void){ #endif //is_mpi double theRcut, theRsw; + + if (globals->haveRcut()) { + theRcut = globals->getRcut(); + + if (globals->haveRsw()) + theRsw = globals->getRsw(); + else + theRsw = theRcut; + + info[i].setDefaultRcut(theRcut, theRsw); + + } else { + + the_ff->calcRcut(); + theRcut = info[i].getRcut(); + + if (globals->haveRsw()) + theRsw = globals->getRsw(); + else + theRsw = theRcut; + + info[i].setDefaultRcut(theRcut, theRsw); + } if (globals->getUseRF()){ info[i].useReactionField = 1; - + if (!globals->haveRcut()){ sprintf(painCave.errMsg, "SimSetup Warning: No value was set for the cutoffRadius.\n" @@ -1096,6 +1107,9 @@ void SimSetup::finalInfoCheck(void){ strcpy(checkPointMsg, "post processing checks out"); MPIcheckPoint(); #endif // is_mpi + + // clean up the forcefield + the_ff->cleanMe(); } void SimSetup::initSystemCoords(void){