ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NPT.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/NPT.cpp (file contents):
Revision 1097 by gezelter, Mon Apr 12 20:32:20 2004 UTC vs.
Revision 1129 by tim, Thu Apr 22 03:29:30 2004 UTC

# Line 65 | Line 65 | template<typename T> NPT<T>::NPT ( SimInfo *theInfo, F
65    oldPos = new double[3*integrableObjects.size()];
66    oldVel = new double[3*integrableObjects.size()];
67    oldJi = new double[3*integrableObjects.size()];
68 #ifdef IS_MPI
69  Nparticles = mpiSim->getTotAtoms();
70 #else
71  Nparticles = theInfo->n_atoms;
72 #endif
68  
69   }
70  
# Line 356 | Line 351 | template<typename T> int NPT<T>::readyCheck() {
351    }
352  
353    // We need NkBT a lot, so just set it here: This is the RAW number
354 <  // of particles, so no subtraction or addition of constraints or
354 >  // of integrableObjects, so no subtraction or addition of constraints or
355    // orientational degrees of freedom:
356  
357 <  NkBT = (double)Nparticles * kB * targetTemp;
357 >  NkBT = (double)(info->getTotIntegrableObjects()) * kB * targetTemp;
358  
359    // fkBT is used because the thermostat operates on more degrees of freedom
360    // than the barostat (when there are particles with orientational degrees
361 <  // of freedom).  ndf = 3 * (n_atoms + n_oriented -1) - n_constraint - nZcons
361 >  // of freedom).  
362  
363 <  fkBT = (double)info->ndf * kB * targetTemp;
363 >  fkBT = (double)(info->getNDF()) * kB * targetTemp;
364  
365    tt2 = tauThermostat * tauThermostat;
366    tb2 = tauBarostat * tauBarostat;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines