--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/07/31 19:59:34 660 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/08/11 18:29:46 674 @@ -30,6 +30,7 @@ SimInfo::SimInfo(){ n_dipoles = 0; ndf = 0; ndfRaw = 0; + nZconstraints = 0; the_integrator = NULL; setTemp = 0; thermalTime = 0.0; @@ -54,17 +55,21 @@ SimInfo::SimInfo(){ useGB = 0; useEAM = 0; + myConfiguration = new SimState(); + wrapMeSimInfo( this ); } + SimInfo::~SimInfo(){ + delete myConfiguration; + map::iterator i; for(i = properties.begin(); i != properties.end(); i++) delete (*i).second; - - + } void SimInfo::setBox(double newBox[3]) { @@ -302,6 +307,8 @@ void SimInfo::calcBoxL( void ){ dsq = dx*dx + dy*dy + dz*dz; boxL[2] = sqrt( dsq ); if( (0.5 * boxL[2]) < maxCutoff ) maxCutoff = 0.5 * boxL[2]; + + checkCutOffs(); } @@ -356,7 +363,7 @@ int SimInfo::getNDF(){ ndf = ndf_local; #endif - ndf = ndf - 3; + ndf = ndf - 3 - nZconstraints; return ndf; } @@ -468,11 +475,13 @@ void SimInfo::checkCutOffs( void ){ int cutChanged = 0; + + if( boxIsInit ){ //we need to check cutOffs against the box - - if( maxCutoff > rCut ){ + + if(( maxCutoff > rCut )&&(usePBC)){ if( rCut < origRcut ){ rCut = origRcut; if (rCut > maxCutoff) rCut = maxCutoff; @@ -501,7 +510,7 @@ void SimInfo::checkCutOffs( void ){ } - if (rCut > maxCutoff) { + if ((rCut > maxCutoff)&&(usePBC)) { sprintf( painCave.errMsg, "New Box size is setting the long range cutoff radius " "to %lf\n",