--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/09/25 19:27:15 787 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/10/29 17:55:28 841 @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include using namespace std; @@ -408,7 +408,7 @@ int SimInfo::getNDF(){ int SimInfo::getNDF(){ - int ndf_local, ndf; + int ndf_local; ndf_local = 3 * n_atoms + 3 * n_oriented - n_constraints; @@ -424,7 +424,7 @@ int SimInfo::getNDFraw() { } int SimInfo::getNDFraw() { - int ndfRaw_local, ndfRaw; + int ndfRaw_local; // Raw degrees of freedom that we have to set ndfRaw_local = 3 * n_atoms + 3 * n_oriented; @@ -439,7 +439,7 @@ int SimInfo::getNDFtranslational() { } int SimInfo::getNDFtranslational() { - int ndfTrans_local, ndfTrans; + int ndfTrans_local; ndfTrans_local = 3 * n_atoms - n_constraints; @@ -515,33 +515,44 @@ void SimInfo::setRcut( double theRcut ){ void SimInfo::setRcut( double theRcut ){ - if( !haveOrigRcut ){ - haveOrigRcut = 1; - origRcut = theRcut; - } - rCut = theRcut; checkCutOffs(); } -void SimInfo::setEcr( double theEcr ){ - - if( !haveOrigEcr ){ - haveOrigEcr = 1; - origEcr = theEcr; - } +void SimInfo::setDefaultRcut( double theRcut ){ + haveOrigRcut = 1; + origRcut = theRcut; + rCut = theRcut; +} + +void SimInfo::setEcr( double theEcr ){ + ecr = theEcr; checkCutOffs(); } +void SimInfo::setDefaultEcr( double theEcr ){ + + haveOrigEcr = 1; + origEcr = theEcr; + + ecr = theEcr; +} + void SimInfo::setEcr( double theEcr, double theEst ){ est = theEst; setEcr( theEcr ); } +void SimInfo::setDefaultEcr( double theEcr, double theEst ){ + est = theEst; + setDefaultEcr( theEcr ); +} + + void SimInfo::checkCutOffs( void ){ int cutChanged = 0;