--- trunk/OOPSE/libmdtools/NPT.cpp 2004/04/12 20:32:20 1097 +++ trunk/OOPSE/libmdtools/NPT.cpp 2004/04/22 03:29:30 1129 @@ -65,11 +65,6 @@ template NPT::NPT ( SimInfo *theInfo, F oldPos = new double[3*integrableObjects.size()]; oldVel = new double[3*integrableObjects.size()]; oldJi = new double[3*integrableObjects.size()]; -#ifdef IS_MPI - Nparticles = mpiSim->getTotAtoms(); -#else - Nparticles = theInfo->n_atoms; -#endif } @@ -356,16 +351,16 @@ template int NPT::readyCheck() { } // We need NkBT a lot, so just set it here: This is the RAW number - // of particles, so no subtraction or addition of constraints or + // of integrableObjects, so no subtraction or addition of constraints or // orientational degrees of freedom: - NkBT = (double)Nparticles * kB * targetTemp; + NkBT = (double)(info->getTotIntegrableObjects()) * kB * targetTemp; // fkBT is used because the thermostat operates on more degrees of freedom // than the barostat (when there are particles with orientational degrees - // of freedom). ndf = 3 * (n_atoms + n_oriented -1) - n_constraint - nZcons + // of freedom). - fkBT = (double)info->ndf * kB * targetTemp; + fkBT = (double)(info->getNDF()) * kB * targetTemp; tt2 = tauThermostat * tauThermostat; tb2 = tauBarostat * tauBarostat;