--- trunk/OOPSE/libmdtools/NPTi.cpp 2003/09/16 20:02:11 767 +++ trunk/OOPSE/libmdtools/NPTi.cpp 2003/09/17 14:22:15 768 @@ -173,9 +173,11 @@ template void NPTi::moveA() { pos[j] = oldPos[i*3 + j] + dt*(vel[j] + eta*rj[j]); atoms[i]->setPos( pos ); - } - + + if (nConstrained){ + constrainA(); + } } @@ -287,8 +289,13 @@ template void NPTi::moveB( void ){ dAtom->setJ( ji ); } } - - if (fabs(prevChi - chi) <= chiTolerance && fabs(preEta -eta) <= etaTolerance) + + if (nConstrained){ + constrainB(); + } + + if (fabs(prevChi - chi) <= + chiTolerance && fabs(preEta -eta) <= etaTolerance) break; } @@ -407,14 +414,14 @@ template double NPTi::getConservedQuant cout.precision(8); - cout << info->getTime() << "\t" - << chi << "\t" - << eta << "\t" - << U << "\t" - << TS << "\t" - << PV << "\t" - << extra << "\t" - << U+TS+PV+extra << endl; +// cout << info->getTime() << "\t" +// << chi << "\t" +// << eta << "\t" +// << U << "\t" +// << TS << "\t" +// << PV << "\t" +// << extra << "\t" +// << U+TS+PV+extra << endl; conservedQuantity = U+TS+PV+extra; return conservedQuantity;