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

Comparing trunk/OOPSE/libmdtools/NPTi.cpp (file contents):
Revision 578 by gezelter, Wed Jul 9 02:15:29 2003 UTC vs.
Revision 586 by mmeineke, Wed Jul 9 22:14:06 2003 UTC

# Line 43 | Line 43 | void NPTi::moveA() {
43    double tt2, tb2;
44    double angle;
45  
46 +
47    tt2 = tauThermostat * tauThermostat;
48    tb2 = tauBarostat * tauBarostat;
49  
# Line 50 | Line 51 | void NPTi::moveA() {
51    instaPress = tStats->getPressure();
52    instaVol = tStats->getVolume();
53    
54 <  // first evolve chi a half step
54 >   // first evolve chi a half step
55    
56    chi += dt2 * ( instaTemp / targetTemp - 1.0) / tt2;
57 <  eta += dt2 * ( instaVol * (instaPress - targetPressure) / (NkBT*tb2));
57 >  eta += dt2 * ( instaVol * (instaPress - targetPressure) /
58 >                 (p_convert*NkBT*tb2));
59  
60    for( i=0; i<nAtoms; i++ ){
61      atomIndex = i * 3;
# Line 129 | Line 131 | void NPTi::moveA() {
131    }
132    // Scale the box after all the positions have been moved:
133  
134 +  cerr << "eta = " << eta
135 +       << "; exp(dt*eta) = " << exp(eta*dt) << "\n";
136 +
137    info->scaleBox(exp(dt*eta));
138  
139   }
# Line 150 | Line 155 | void NPTi::moveB( void ){
155    instaVol = tStats->getVolume();
156  
157    chi += dt2 * ( instaTemp / targetTemp - 1.0) / tt2;
158 <  eta += dt2 * ( instaVol * (instaPress - targetPressure) / (NkBT*tb2));
158 >  eta += dt2 * ( instaVol * (instaPress - targetPressure) /
159 >                 (p_convert*NkBT*tb2));
160    
161    for( i=0; i<nAtoms; i++ ){
162      atomIndex = i * 3;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines