--- trunk/OOPSE/libmdtools/ZConstraint.cpp 2003/08/20 14:34:04 701 +++ trunk/OOPSE/libmdtools/ZConstraint.cpp 2003/08/20 14:50:32 702 @@ -525,6 +525,7 @@ template void ZConstraint::calcForce(in double zsys; double COM[3]; double force[3]; + double zSysCOMVel; T::calcForce(calcPot, calcStress); @@ -532,14 +533,20 @@ template void ZConstraint::calcForce(in zeroOutVel(); forcePolicy->update(); } + zsys = calcZSys(); - cout << "---------------------------------------------------------------------" <getTime() << endl; - cout << "center of mass at z: " << zsys << endl; - //cout << "before calcForce, the COMVel of moving molecules is " << calcMovingMolsCOMVel() <getTime() << endl; + cout << "center of mass at z: " << zsys << endl; + cout << "before calcForce, the COMVel of system is " << zSysCOMVel < void ZConstraint::calcForce(in if (haveMovingZMols()) this->doHarmonic(); - //cout << "after doHarmonic, totalForce is " << calcTotalForce() << endl; - //write out forces and current positions of z-constraint molecules if(info->getTime() >= curZconsTime){ for(int i = 0; i < zconsMols.size(); i++){ @@ -571,9 +576,16 @@ template void ZConstraint::calcForce(in fzOut->writeFZ(info->getTime(), zconsMols.size(), indexOfZConsMols, fz, curZPos); curZconsTime += zconsTime; } - - //cout << "after calcForce, the COMVel of moving molecules is " << calcMovingMolsCOMVel() < void ZConstraint::doZconstrain } totalFZ_local += fz[i]; - cout << "Fixed Molecule --\tindex: " << indexOfZConsMols[i] + cout << "Fixed Molecule\tindex: " << indexOfZConsMols[i] <<"\tcurrent zpos: " << COM[whichDirection] << "\tcurrent fz: " < void ZConstraint::doHarmonic() if (states[i] == zcsMoving){ zconsMols[i]->getCOM(COM); - cout << "Moving Molecule --\tindex: " << indexOfZConsMols[i] <<"\tcurrent zpos: " << COM[whichDirection] << endl; + cout << "Moving Molecule\tindex: " << indexOfZConsMols[i] <<"\tcurrent zpos: " << COM[whichDirection] << endl; diff = COM[whichDirection] -zPos[i];