--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/08/07 00:47:33 669 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/09/15 16:52:02 763 @@ -26,16 +26,20 @@ SimInfo::SimInfo(){ SimInfo::SimInfo(){ excludes = NULL; n_constraints = 0; + nZconstraints = 0; n_oriented = 0; n_dipoles = 0; ndf = 0; ndfRaw = 0; + nZconstraints = 0; the_integrator = NULL; setTemp = 0; thermalTime = 0.0; currentTime = 0.0; rCut = 0.0; + origRcut = -1.0; ecr = 0.0; + origEcr = -1.0; est = 0.0; oldEcr = 0.0; oldRcut = 0.0; @@ -54,17 +58,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]) { @@ -358,7 +366,7 @@ int SimInfo::getNDF(){ ndf = ndf_local; #endif - ndf = ndf - 3; + ndf = ndf - 3 - nZconstraints; return ndf; } @@ -591,4 +599,9 @@ vector SimInfo::getProperties(){ return result; } +double SimInfo::matTrace3(double m[3][3]){ + double trace; + trace = m[0][0] + m[1][1] + m[2][2]; + return trace; +}