ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Snapshot.cpp
(Generate patch)

Comparing branches/development/src/brains/Snapshot.cpp (file contents):
Revision 1808 by gezelter, Mon Oct 22 20:42:10 2012 UTC vs.
Revision 1858 by gezelter, Wed Apr 3 21:32:13 2013 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 94 | Line 94 | namespace OpenMD {
94      frameData.id = -1;                  
95      frameData.currentTime = 0;    
96      frameData.hmat = Mat3x3d(0.0);            
97 <    frameData.invHmat = Mat3x3d(0.0);          
97 >    frameData.invHmat = Mat3x3d(0.0);      
98 >    frameData.bBox = Mat3x3d(0.0);            
99 >    frameData.invBbox = Mat3x3d(0.0);
100      frameData.orthoRhombic = false;        
101      frameData.bondPotential = 0.0;      
102      frameData.bendPotential = 0.0;      
# Line 131 | Line 133 | namespace OpenMD {
133      frameData.electronicTemperature = 0.0;
134      frameData.COM = V3Zero;            
135      frameData.COMvel = V3Zero;          
136 <    frameData.COMw = V3Zero;            
136 >    frameData.COMw = V3Zero;  
137  
138      hasTotalEnergy = false;        
139      hasTranslationalKineticEnergy = false;      
# Line 220 | Line 222 | namespace OpenMD {
222      
223      if( oldOrthoRhombic != frameData.orthoRhombic){
224        
225 <      if( frameData.orthoRhombic ) {
226 <        sprintf( painCave.errMsg,
227 <                 "OpenMD is switching from the default Non-Orthorhombic\n"
228 <                 "\tto the faster Orthorhombic periodic boundary computations.\n"
229 <                 "\tThis is usually a good thing, but if you want the\n"
230 <                 "\tNon-Orthorhombic computations, make the orthoBoxTolerance\n"
231 <                 "\tvariable ( currently set to %G ) smaller.\n",
232 <                 orthoTolerance_);
233 <        painCave.severity = OPENMD_INFO;
234 <        simError();
235 <      }
236 <      else {
237 <        sprintf( painCave.errMsg,
238 <                 "OpenMD is switching from the faster Orthorhombic to the more\n"
239 <                 "\tflexible Non-Orthorhombic periodic boundary computations.\n"
240 <                 "\tThis is usually because the box has deformed under\n"
241 <                 "\tNPTf integration. If you want to live on the edge with\n"
242 <                 "\tthe Orthorhombic computations, make the orthoBoxTolerance\n"
243 <                 "\tvariable ( currently set to %G ) larger.\n",
244 <                 orthoTolerance_);
245 <        painCave.severity = OPENMD_WARNING;
246 <        simError();
247 <      }
225 >      // It is finally time to suppress these warnings once and for
226 >      // all.  They were annoying and not very informative.
227 >
228 >      // if( frameData.orthoRhombic ) {
229 >      //   sprintf( painCave.errMsg,
230 >      //         "OpenMD is switching from the default Non-Orthorhombic\n"
231 >      //         "\tto the faster Orthorhombic periodic boundary computations.\n"
232 >      //         "\tThis is usually a good thing, but if you want the\n"
233 >      //         "\tNon-Orthorhombic computations, make the orthoBoxTolerance\n"
234 >      //         "\tvariable ( currently set to %G ) smaller.\n",
235 >      //         orthoTolerance_);
236 >      //   painCave.severity = OPENMD_INFO;
237 >      //   simError();
238 >      // }
239 >      // else {
240 >      //   sprintf( painCave.errMsg,
241 >      //         "OpenMD is switching from the faster Orthorhombic to the more\n"
242 >      //         "\tflexible Non-Orthorhombic periodic boundary computations.\n"
243 >      //         "\tThis is usually because the box has deformed under\n"
244 >      //         "\tNPTf integration. If you want to live on the edge with\n"
245 >      //         "\tthe Orthorhombic computations, make the orthoBoxTolerance\n"
246 >      //         "\tvariable ( currently set to %G ) larger.\n",
247 >      //         orthoTolerance_);
248 >      //   painCave.severity = OPENMD_WARNING;
249 >      //   simError();
250 >      // }
251      }    
252    }
253    
# Line 251 | Line 256 | namespace OpenMD {
256      return frameData.invHmat;
257    }
258  
259 +  /** Returns the Bounding Box */
260 +  Mat3x3d Snapshot::getBoundingBox() {
261 +    return frameData.bBox;
262 +  }
263 +
264 +  /** Sets the Bounding Box */  
265 +  void Snapshot::setBoundingBox(const Mat3x3d& m) {
266 +    frameData.bBox = m;
267 +    frameData.invBbox = frameData.bBox.inverse();
268 +  }
269 +
270 +  /** Returns the inverse Bounding Box */
271 +  Mat3x3d Snapshot::getInvBoundingBox() {
272 +    return frameData.invBbox;
273 +  }
274 +
275    RealType Snapshot::getXYarea() {
276      if (!hasXYarea) {
277        Vector3d x = frameData.hmat.getColumn(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines