--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/09/22 21:23:25 780 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/09/23 20:34:31 782 @@ -1340,6 +1340,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 +1350,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 +1378,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNVT; break; case NPTi_ENS: @@ -1415,6 +1421,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNPTi; break; case NPTf_ENS: @@ -1456,6 +1464,8 @@ void SimSetup::makeIntegrator(void){ painCave.isFatal = 1; simError(); } + + info->the_integrator = myNPTf; break; default: