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

Comparing trunk/OOPSE/libmdtools/NPTim.cpp (file contents):
Revision 605 by gezelter, Tue Jul 15 03:27:24 2003 UTC vs.
Revision 611 by gezelter, Tue Jul 15 17:10:50 2003 UTC

# Line 46 | Line 46 | void NPTim::moveA() {
46  
47    double rj[3];
48    double instaTemp, instaPress, instaVol;
49 <  double tt2, tb2;
49 >  double tt2, tb2, scaleFactor;
50  
51    int nInMol;
52    double rc[3];
# Line 146 | Line 146 | void NPTim::moveA() {
146        }
147      }
148    }
149 +
150    // Scale the box after all the positions have been moved:
151    
152 <  cerr << "eta = " << eta
153 <       << "; exp(dt*eta) = " << exp(eta*dt) << "\n";
154 <  
155 <  info->scaleBox(exp(dt*eta));
152 >  scaleFactor = exp(dt*eta);
153 >
154 >  if (scaleFactor > 1.1 || scaleFactor < 0.9) {
155 >    sprintf( painCave.errMsg,
156 >             "NPTi error: Attempting a Box scaling of more than 10 percent"
157 >             " check your tauBarostat, as it is probably too small!\n"
158 >             " eta = %lf, scaleFactor = %lf\n", eta, scaleFactor
159 >             );
160 >    painCave.isFatal = 1;
161 >    simError();
162 >  } else {        
163 >    info->scaleBox(exp(dt*eta));      
164 >  }
165   }
166  
167   void NPTim::moveB( void ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines