--- trunk/OOPSE/libmdtools/Integrator.cpp 2004/05/01 18:52:38 1144 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2004/05/20 20:24:07 1180 @@ -32,7 +32,7 @@ template Integrator::Integrator(SimInfo nAtoms = info->n_atoms; integrableObjects = info->integrableObjects; - + // check for constraints constrainedA = NULL; @@ -45,6 +45,9 @@ template Integrator::Integrator(SimInfo nConstrained = 0; checkConstraints(); + + for (i=0; i Integrator::~Integrator(){ @@ -160,7 +163,7 @@ template void Integrator::integrate(voi double thermalTime = info->thermalTime; double resetTime = info->resetTime; - + double difference; double currSample; double currThermal; double currStatus; @@ -183,6 +186,11 @@ template void Integrator::integrate(voi // that was drifting tStats->removeCOMdrift(); + // initialize the retraints if necessary + if (info->useThermInt) { + myFF->initRestraints(); + } + // initialize the forces before the first step calcForce(1, 1); @@ -215,7 +223,8 @@ template void Integrator::integrate(voi #endif // is_mpi while (info->getTime() < runTime && !stopIntegrator()){ - if ((info->getTime() + dt) >= currStatus){ + difference = info->getTime() + dt - currStatus; + if (difference > 0 || fabs(difference) < 1e-4 ){ calcPot = 1; calcStress = 1; } @@ -248,6 +257,7 @@ template void Integrator::integrate(voi if (info->getTime() >= currStatus){ statOut->writeStat(info->getTime()); + statOut->writeRaw(info->getTime()); calcPot = 0; calcStress = 0; currStatus += statusTime; @@ -270,6 +280,11 @@ template void Integrator::integrate(voi #endif // is_mpi } + // dump out a file containing the omega values for the final configuration + if (info->useThermInt) + myFF->dumpzAngle(); + + delete dumpOut; delete statOut; } @@ -346,8 +361,6 @@ template void Integrator::moveA(void){ integrableObjects[i]->getVel(vel); integrableObjects[i]->getPos(pos); integrableObjects[i]->getFrc(frc); - - std::cerr << "i =\t" << i << "\t" << frc[0] << "\t" << frc[1]<< "\t" << frc[2] << "\n"; mass = integrableObjects[i]->getMass();