--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/10/27 22:07:48 823 +++ branches/new-templateless/OOPSE/libmdtools/SimSetup.cpp 2003/10/31 21:06:47 849 @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include #include #include #include "SimSetup.hpp" @@ -102,10 +102,6 @@ void SimSetup::createSim(void){ // creation of complex system objects sysObjectsCreation(); - - // check on the post processing info - - finalInfoCheck(); // initialize the system coordinates @@ -115,6 +111,10 @@ void SimSetup::createSim(void){ if( !(globals->getUseInitTime()) ) info[0].currentTime = 0.0; } + + // check on the post processing info + + finalInfoCheck(); // make the output filenames @@ -696,58 +696,12 @@ void SimSetup::gatherInfo(void){ } // check for the temperature set flag - + if (globals->haveTempSet()) info[i].setTemp = globals->getTempSet(); - - // get some of the tricky things that may still be in the globals - - double boxVector[3]; - if (globals->haveBox()){ - boxVector[0] = globals->getBox(); - boxVector[1] = globals->getBox(); - boxVector[2] = globals->getBox(); - - info[i].setBox(boxVector); - } - else if (globals->haveDensity()){ - double vol; - vol = (double) tot_nmol / globals->getDensity(); - boxVector[0] = pow(vol, (1.0 / 3.0)); - boxVector[1] = boxVector[0]; - boxVector[2] = boxVector[0]; - - info[i].setBox(boxVector); - } - else{ - if (!globals->haveBoxX()){ - sprintf(painCave.errMsg, - "SimSetup error, no periodic BoxX size given.\n"); - painCave.isFatal = 1; - simError(); - } - boxVector[0] = globals->getBoxX(); - - if (!globals->haveBoxY()){ - sprintf(painCave.errMsg, - "SimSetup error, no periodic BoxY size given.\n"); - painCave.isFatal = 1; - simError(); - } - boxVector[1] = globals->getBoxY(); - - if (!globals->haveBoxZ()){ - sprintf(painCave.errMsg, - "SimSetup error, no periodic BoxZ size given.\n"); - painCave.isFatal = 1; - simError(); - } - boxVector[2] = globals->getBoxZ(); - - info[i].setBox(boxVector); - } + } - + //setup seed for random number generator int seedValue; @@ -851,7 +805,7 @@ void SimSetup::finalInfoCheck(void){ theEst = globals->getEST(); } - info[i].setEcr(theEcr, theEst); + info[i].setDefaultEcr(theEcr, theEst); if (!globals->haveDielectric()){ sprintf(painCave.errMsg, @@ -896,9 +850,10 @@ void SimSetup::finalInfoCheck(void){ theEst = globals->getEST(); } - info[i].setEcr(theEcr, theEst); + info[i].setDefaultEcr(theEcr, theEst); } } + info[i].checkCutOffs(); } #ifdef IS_MPI @@ -1352,31 +1307,38 @@ void SimSetup::makeIntegrator(void){ void SimSetup::makeIntegrator(void){ int k; - NVE* myNVE = NULL; - NVT* myNVT = NULL; - NPTi >* myNPTi = NULL; - NPTf >* myNPTf = NULL; - NPTxyz >* myNPTxyz = NULL; + NVE* myNVE = NULL; + NVT* myNVT = NULL; + NPTi* myNPTi = NULL; + NPTf* myNPTf = NULL; + NPTxyz* myNPTxyz = NULL; for (k = 0; k < nInfo; k++){ switch (ensembleCase){ - case NVE_ENS: - if (globals->haveZconstraints()){ - setupZConstraint(info[k]); - myNVE = new ZConstraint >(&(info[k]), the_ff); - } - else{ - myNVE = new NVE(&(info[k]), the_ff); - } + case NVE_ENS: + if (globals->haveZconstraints()){ + std::cerr << "ZConstraint is temporarily disabled\n"; + + // setupZConstraint(info[k]); + // myNVE = new ZConstraint >(&(info[k]), the_ff); + } + +// else{ + myNVE = new NVE(&(info[k]), the_ff); +// } + info->the_integrator = myNVE; break; + + case NVT_ENS: + if (globals->haveZconstraints()){ - case NVT_ENS: - if (globals->haveZconstraints()){ - setupZConstraint(info[k]); - myNVT = new ZConstraint >(&(info[k]), the_ff); - } + std::cerr << "ZConstraint is temporarily disabled\n"; + +// setupZConstraint(info[k]); +// myNVT = new ZConstraint >(&(info[k]), the_ff); + } else myNVT = new NVT(&(info[k]), the_ff); @@ -1460,6 +1422,7 @@ void SimSetup::makeIntegrator(void){ if (globals->haveTauThermostat()) myNPTf->setTauThermostat(globals->getTauThermostat()); + else{ sprintf(painCave.errMsg, "SimSetup error: If you use an NPT\n" @@ -1470,6 +1433,7 @@ void SimSetup::makeIntegrator(void){ if (globals->haveTauBarostat()) myNPTf->setTauBarostat(globals->getTauBarostat()); + else{ sprintf(painCave.errMsg, "SimSetup error: If you use an NPT\n"