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 1234 by tim, Fri Jun 4 03:15:31 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 170 | Line 165 | template<typename T> void NPT<T>::moveA() {
165        integrableObjects[i]->setPos( pos );
166      }
167  
168 <    if (nConstrained){
174 <      constrainA();
175 <    }
168 >    rattle->doRattleA();
169    }
170  
171  
# Line 252 | Line 245 | template<typename T> void NPT<T>::moveB( void ){
245        }
246      }
247  
248 <    if (nConstrained){
256 <      constrainB();
257 <    }
248 >    rattle->doRattleB();
249  
250      if ( this->chiConverged() && this->etaConverged() ) break;
251    }
# Line 356 | Line 347 | template<typename T> int NPT<T>::readyCheck() {
347    }
348  
349    // We need NkBT a lot, so just set it here: This is the RAW number
350 <  // of particles, so no subtraction or addition of constraints or
350 >  // of integrableObjects, so no subtraction or addition of constraints or
351    // orientational degrees of freedom:
352  
353 <  NkBT = (double)Nparticles * kB * targetTemp;
353 >  NkBT = (double)(info->getTotIntegrableObjects()) * kB * targetTemp;
354  
355    // fkBT is used because the thermostat operates on more degrees of freedom
356    // than the barostat (when there are particles with orientational degrees
357 <  // of freedom).  ndf = 3 * (n_atoms + n_oriented -1) - n_constraint - nZcons
357 >  // of freedom).  
358  
359 <  fkBT = (double)info->ndf * kB * targetTemp;
359 >  fkBT = (double)(info->getNDF()) * kB * targetTemp;
360  
361    tt2 = tauThermostat * tauThermostat;
362    tb2 = tauBarostat * tauBarostat;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines