--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/09/19 20:00:27 778 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/09/24 19:34:39 784 @@ -25,8 +25,7 @@ template Integrator::Integrator(SimInfo if (info->the_integrator != NULL){ delete info->the_integrator; } - info->the_integrator = this; - + nAtoms = info->n_atoms; // check for constraints @@ -174,9 +173,18 @@ template void Integrator::integrate(voi dt = info->dt; dt2 = 0.5 * dt; + readyCheck(); + // initialize the forces before the first step calcForce(1, 1); + + if (nConstrained){ + preMove(); + constrainA(); + calcForce(1, 1); + constrainB(); + } if (info->setTemp){ thermalize(); @@ -192,7 +200,7 @@ template void Integrator::integrate(voi dumpOut->writeDump(info->getTime()); statOut->writeStat(info->getTime()); - readyCheck(); + #ifdef IS_MPI strcpy(checkPointMsg, "The integrator is ready to go.");