--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/09/16 20:02:11 767 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/09/19 14:55:41 770 @@ -493,13 +493,11 @@ void SimInfo::checkCutOffs( void ){ void SimInfo::checkCutOffs( void ){ int cutChanged = 0; - - - + if( boxIsInit ){ //we need to check cutOffs against the box - + if(( maxCutoff > rCut )&&(usePBC)){ if( rCut < origRcut ){ rCut = origRcut; @@ -507,13 +505,13 @@ void SimInfo::checkCutOffs( void ){ sprintf( painCave.errMsg, "New Box size is setting the long range cutoff radius " - "to %lf\n", - rCut ); + "to %lf at time %lf\n", + rCut, currentTime ); painCave.isFatal = 0; simError(); } } - + if( maxCutoff > ecr ){ if( ecr < origEcr ){ ecr = origEcr; @@ -521,37 +519,36 @@ void SimInfo::checkCutOffs( void ){ sprintf( painCave.errMsg, "New Box size is setting the electrostaticCutoffRadius " - "to %lf\n", - ecr ); + "to %lf at time %lf\n", + ecr, currentTime ); painCave.isFatal = 0; simError(); } } - - + + if ((rCut > maxCutoff)&&(usePBC)) { sprintf( painCave.errMsg, "New Box size is setting the long range cutoff radius " - "to %lf\n", - maxCutoff ); + "to %lf at time %lf\n", + maxCutoff, currentTime ); painCave.isFatal = 0; simError(); rCut = maxCutoff; } - + if( ecr > maxCutoff){ sprintf( painCave.errMsg, "New Box size is setting the electrostaticCutoffRadius " - "to %lf\n", - maxCutoff ); + "to %lf at time %lf\n", + maxCutoff, currentTime ); painCave.isFatal = 0; simError(); ecr = maxCutoff; } - if( (oldEcr != ecr) || ( oldRcut != rCut ) ) cutChanged = 1; - + // rlist is the 1.0 plus max( rcut, ecr ) ( rCut > ecr )? rList = rCut + 1.0: rList = ecr + 1.0; @@ -563,15 +560,15 @@ void SimInfo::checkCutOffs( void ){ oldEcr = ecr; oldRcut = rCut; - + } else { // initialize this stuff before using it, OK? - sprintf( painCave.errMsg, - "Trying to check cutoffs without a box. Be smarter.\n" ); - painCave.isFatal = 1; - simError(); + sprintf( painCave.errMsg, + "Trying to check cutoffs without a box. Be smarter.\n" ); + painCave.isFatal = 1; + simError(); } - + } void SimInfo::addProperty(GenericData* prop){