--- trunk/OOPSE/libmdtools/ZConstraint.cpp 2003/08/26 20:37:30 726 +++ trunk/OOPSE/libmdtools/ZConstraint.cpp 2003/08/27 19:23:29 733 @@ -578,7 +578,7 @@ template void ZConstraint::calcForce(in //do zconstraint force; if (haveFixedZMols()) this->doZconstraintForce(); - + //use harmonical poteintial to move the molecules to the specified positions if (haveMovingZMols()) this->doHarmonic(); @@ -612,7 +612,6 @@ template void ZConstraint::calcForce(in #ifdef IS_MPI } #endif - } @@ -801,8 +800,6 @@ template void ZConstraint::doZconstrain double COMvel[3]; double COM[3]; double force[3]; - - //constrain the molecules which do not reach the specified positions @@ -867,22 +864,6 @@ template void ZConstraint::doZconstrain // cout << "after zero out z-constraint force on fixed z-constraint molecuels " // << "total force is " << calcTotalForce() << endl; - //calculate the number of atoms of moving z-constrained molecules - int nMovingZAtoms_local; - int nMovingZAtoms; - - nMovingZAtoms_local = 0; - for(int i = 0; i < zconsMols.size(); i++) - if(states[i] == zcsMoving) - nMovingZAtoms_local += zconsMols[i]->getNAtoms(); - -#ifdef IS_MPI - MPI_Allreduce(&nMovingZAtoms_local, &nMovingZAtoms, 1, - MPI_DOUBLE,MPI_SUM, MPI_COMM_WORLD); -#else - nMovingZAtoms = nMovingZAtoms_local; -#endif - force[0]= 0; force[1]= 0; force[2]= 0;