--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/07/14 21:28:54 597 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/07/15 22:22:41 619 @@ -34,6 +34,8 @@ SimInfo::SimInfo(){ setTemp = 0; thermalTime = 0.0; rCut = 0.0; + ecr = 0.0; + est = 0.0; usePBC = 0; useLJ = 0; @@ -77,11 +79,11 @@ void SimInfo::setBoxM( double theBox[3][3] ){ for(i=0; i < 3; i++) for (j=0; j < 3; j++) Hmat[i][j] = theBox[i][j]; - cerr - << "setting Hmat ->\n" - << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n" - << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n" - << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n"; + // cerr + // << "setting Hmat ->\n" + // << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n" + // << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n" + // << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n"; calcBoxL(); calcHmatInv(); @@ -122,22 +124,21 @@ void SimInfo::setBoxM( double theBox[3][3] ){ refreshSim(); } - if (rCut > maxCutoff) { + if( ecr > maxCutoff ){ + sprintf( painCave.errMsg, - "New Box size is forcing cutoff radius down to %lf\n", + "New Box size is forcing electrostatic cutoff radius " + "down to %lf\n", maxCutoff ); painCave.isFatal = 0; simError(); - status = 0; - LJ_new_rcut(&rCut, &status); - if (status != 0) { - sprintf( painCave.errMsg, - "Error in recomputing LJ shifts based on new rcut\n"); - painCave.isFatal = 1; - simError(); - } + ecr = maxCutoff; + est = 0.05 * ecr; + + refreshSim(); } + } @@ -153,7 +154,7 @@ void SimInfo::scaleBox(double scale) { double theBox[3][3]; int i, j; - cerr << "Scaling box by " << scale << "\n"; + // cerr << "Scaling box by " << scale << "\n"; for(i=0; i<3; i++) for (j=0; j<3; j++) theBox[i][j] = Hmat[i][j]*scale;