--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/07/16 02:11:02 621 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/07/16 21:30:56 626 @@ -762,6 +762,7 @@ void SimSetup::finalInfoCheck( void ){ MPI_Allreduce( &myUse, &usesDipoles, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD ); #endif //is_mpi + double theEcr, theEst; if (globals->getUseRF() ) { info->useReactionField = 1; @@ -777,9 +778,9 @@ void SimSetup::finalInfoCheck( void ){ smallest = info->boxL[0]; if (info->boxL[1] <= smallest) smallest = info->boxL[1]; if (info->boxL[2] <= smallest) smallest = info->boxL[2]; - info->ecr = 0.5 * smallest; + theEcr = 0.5 * smallest; } else { - info->ecr = globals->getECR(); + theEcr = globals->getECR(); } if( !globals->haveEST() ){ @@ -789,10 +790,12 @@ void SimSetup::finalInfoCheck( void ){ ); painCave.isFatal = 0; simError(); - info->est = 0.05 * info->ecr; - } else { - info->est = globals->getEST(); + theEst = 0.05 * theEcr; + } else { + theEst= globals->getEST(); } + + info->setEcr( theEcr, theEst ); if(!globals->haveDielectric() ){ sprintf( painCave.errMsg, @@ -808,33 +811,35 @@ void SimSetup::finalInfoCheck( void ){ if (usesDipoles) { if( !globals->haveECR() ){ - sprintf( painCave.errMsg, - "SimSetup Warning: using default value of 1/2 the smallest " - "box length for the electrostaticCutoffRadius.\n" - "I hope you have a very fast processor!\n"); - painCave.isFatal = 0; - simError(); - double smallest; - smallest = info->boxL[0]; - if (info->boxL[1] <= smallest) smallest = info->boxL[1]; - if (info->boxL[2] <= smallest) smallest = info->boxL[2]; - info->ecr = 0.5 * smallest; + sprintf( painCave.errMsg, + "SimSetup Warning: using default value of 1/2 the smallest " + "box length for the electrostaticCutoffRadius.\n" + "I hope you have a very fast processor!\n"); + painCave.isFatal = 0; + simError(); + double smallest; + smallest = info->boxL[0]; + if (info->boxL[1] <= smallest) smallest = info->boxL[1]; + if (info->boxL[2] <= smallest) smallest = info->boxL[2]; + theEcr = 0.5 * smallest; } else { - info->ecr = globals->getECR(); + theEcr = globals->getECR(); } if( !globals->haveEST() ){ - sprintf( painCave.errMsg, - "SimSetup Warning: using default value of 5%% of the " - "electrostaticCutoffRadius for the " - "electrostaticSkinThickness\n" - ); - painCave.isFatal = 0; - simError(); - info->est = 0.05 * info->ecr; - } else { - info->est = globals->getEST(); + sprintf( painCave.errMsg, + "SimSetup Warning: using default value of 0.05 * the " + "electrostaticCutoffRadius for the " + "electrostaticSkinThickness\n" + ); + painCave.isFatal = 0; + simError(); + theEst = 0.05 * theEcr; + } else { + theEst= globals->getEST(); } + + info->setEcr( theEcr, theEst ); } }