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 600 by gezelter, Mon Jul 14 22:38:13 2003 UTC vs.
Revision 611 by gezelter, Tue Jul 15 17:10:50 2003 UTC

# Line 42 | Line 42 | void NPTi::moveA() {
42  
43    double rj[3];
44    double instaTemp, instaPress, instaVol;
45 <  double tt2, tb2;
45 >  double tt2, tb2, scaleFactor;
46  
47    tt2 = tauThermostat * tauThermostat;
48    tb2 = tauBarostat * tauBarostat;
# Line 127 | Line 127 | void NPTi::moveA() {
127      }                
128  
129    }
130 +
131    // Scale the box after all the positions have been moved:
132    
133 <  cerr << "eta = " << eta
134 <       << "; exp(dt*eta) = " << exp(eta*dt) << "\n";
135 <  
136 <  info->scaleBox(exp(dt*eta));  
133 >  scaleFactor = exp(dt*eta);
134 >
135 >  if (scaleFactor > 1.1 || scaleFactor < 0.9) {
136 >    sprintf( painCave.errMsg,
137 >             "NPTi error: Attempting a Box scaling of more than 10 percent"
138 >             " check your tauBarostat, as it is probably too small!\n"
139 >             " eta = %lf, scaleFactor = %lf\n", eta, scaleFactor
140 >             );
141 >    painCave.isFatal = 1;
142 >    simError();
143 >  } else {        
144 >    info->scaleBox(exp(dt*eta));      
145 >  }
146   }
147  
148   void NPTi::moveB( void ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines