--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/08/26 20:37:30 726 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/09/15 16:52:02 763 @@ -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; \ No newline at end of file @@ -174,23 +177,17 @@ template void Integrator::integrate(voi // initialize the forces before the first step calcForce(1, 1); - // myFF->doForces(1,1); - + if (info->setTemp){ 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()); \ No newline at end of file @@ -231,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(); \ No newline at end of file @@ -353,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); } \ No newline at end of file @@ -750,3 +753,7 @@ template void Integrator::thermalize(){ template void Integrator::thermalize(){ tStats->velocitize(); } + +template double Integrator::getConservedQuantity(void){ + return tStats->getTotalE(); +} \ No newline at end of file