--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/08/27 19:23:29 733 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/09/09 20:35:25 755 @@ -153,11 +153,14 @@ template void Integrator::integrate(voi double sampleTime = info->sampleTime; double statusTime = info->statusTime; double thermalTime = info->thermalTime; + double resetTime = info->resetTime; + double currSample; double currThermal; double currStatus; - + double currReset; + int calcPot, calcStress; int isError; @@ -179,17 +182,12 @@ template void Integrator::integrate(voi thermalize(); } - calcPot = 0; - calcStress = 0; - currSample = sampleTime; - currThermal = thermalTime; - currStatus = statusTime; - calcPot = 0; calcStress = 0; currSample = sampleTime + info->getTime(); currThermal = thermalTime+ info->getTime(); currStatus = statusTime + info->getTime(); + currReset = resetTime + info->getTime(); dumpOut->writeDump(info->getTime()); statOut->writeStat(info->getTime()); @@ -230,6 +228,13 @@ template void Integrator::integrate(voi currStatus += statusTime; } + if (info->resetIntegrator){ + if (info->getTime() >= currReset){ + this->resetIntegrator(); + currReset += resetTime; + } + } + #ifdef IS_MPI strcpy(checkPointMsg, "successfully took a time step."); MPIcheckPoint(); @@ -352,7 +357,6 @@ template void Integrator::moveA(void){ angle = dt2 * ji[0] / I[0][0]; this->rotate(1, 2, angle, ji, A); - dAtom->setJ(ji); dAtom->setA(A); }