--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/09/22 21:23:25 780 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/09/25 19:27:15 787 @@ -90,7 +90,6 @@ void SimSetup::createSim(void){ #endif // is_mpi void SimSetup::createSim(void){ - int i, j, k, globalAtomIndex; // gather all of the information from the Bass file @@ -129,7 +128,7 @@ void SimSetup::makeMolecules(void){ void SimSetup::makeMolecules(void){ - int k, l; + int k; int i, j, exI, exJ, tempEx, stampID, atomOffset, excludeOffset; molInit molInfo; DirectionalAtom* dAtom; @@ -551,7 +550,7 @@ void SimSetup::gatherInfo(void){ void SimSetup::gatherInfo(void){ - int i, j, k; + int i; ensembleCase = -1; ffCase = -1; @@ -914,7 +913,6 @@ void SimSetup::initSystemCoords(void){ if (worldRank == 0){ #endif //is_mpi inName = globals->getInitialConfig(); - double* tempDouble = new double[1000000]; fileInit = new InitializeFromFile(inName); #ifdef IS_MPI } @@ -932,7 +930,7 @@ void SimSetup::initSystemCoords(void){ sprintf(painCave.errMsg, "Cannot intialize a parallel simulation without an initial configuration file.\n"); - painCave.isFatal; + painCave.isFatal = 1;; simError(); #else @@ -1158,7 +1156,7 @@ void SimSetup::calcSysValues(void){ } void SimSetup::calcSysValues(void){ - int i, j, k; + int i; int* molMembershipArray; @@ -1257,7 +1255,11 @@ void SimSetup::makeSysArrays(void){ void SimSetup::makeSysArrays(void){ - int i, j, k, l; + +#ifndef IS_MPI + int k, j; +#endif // is_mpi + int i, l; Atom** the_atoms; Molecule* the_molecules; @@ -1340,6 +1342,7 @@ void SimSetup::makeIntegrator(void){ void SimSetup::makeIntegrator(void){ int k; + NVE* myNVE = NULL; NVT* myNVT = NULL; NPTi >* myNPTi = NULL; NPTf >* myNPTf = NULL; @@ -1349,10 +1352,13 @@ void SimSetup::makeIntegrator(void){ case NVE_ENS: if (globals->haveZconstraints()){ setupZConstraint(info[k]); - new ZConstraint >(&(info[k]), the_ff); + myNVE = new ZConstraint >(&(info[k]), the_ff); } - else - new NVE(&(info[k]), the_ff); + else{ + myNVE = new NVE(&(info[k]), the_ff); + } + + info->the_integrator = myNVE; break; case NVT_ENS: @@ -1374,6 +1380,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNVT; break; case NPTi_ENS: @@ -1415,6 +1423,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNPTi; break; case NPTf_ENS: @@ -1456,6 +1466,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNPTf; break; default: