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

Comparing trunk/src/brains/Snapshot.cpp (file contents):
Revision 1878 by gezelter, Wed Aug 22 02:28:28 2012 UTC vs.
Revision 1879 by gezelter, Sun Jun 16 15:15:42 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 44 | Line 44
44   * @file Snapshot.cpp
45   * @author tlin
46   * @date 11/11/2004
47 * @time 10:56am
47   * @version 1.0
48   */
49  
# Line 95 | 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 132 | 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 156 | Line 157 | namespace OpenMD {
157      hasGyrationalVolume = false;  
158      hasHullVolume = false;
159      hasConservedQuantity = false;
160 +    hasBoundingBox = false;
161    }
162  
163    /** Returns the id of this Snapshot */
# Line 221 | Line 223 | namespace OpenMD {
223      
224      if( oldOrthoRhombic != frameData.orthoRhombic){
225        
226 <      if( frameData.orthoRhombic ) {
227 <        sprintf( painCave.errMsg,
228 <                 "OpenMD is switching from the default Non-Orthorhombic\n"
229 <                 "\tto the faster Orthorhombic periodic boundary computations.\n"
230 <                 "\tThis is usually a good thing, but if you want the\n"
231 <                 "\tNon-Orthorhombic computations, make the orthoBoxTolerance\n"
232 <                 "\tvariable ( currently set to %G ) smaller.\n",
233 <                 orthoTolerance_);
234 <        painCave.severity = OPENMD_INFO;
235 <        simError();
236 <      }
237 <      else {
238 <        sprintf( painCave.errMsg,
239 <                 "OpenMD is switching from the faster Orthorhombic to the more\n"
240 <                 "\tflexible Non-Orthorhombic periodic boundary computations.\n"
241 <                 "\tThis is usually because the box has deformed under\n"
242 <                 "\tNPTf integration. If you want to live on the edge with\n"
243 <                 "\tthe Orthorhombic computations, make the orthoBoxTolerance\n"
244 <                 "\tvariable ( currently set to %G ) larger.\n",
245 <                 orthoTolerance_);
246 <        painCave.severity = OPENMD_WARNING;
247 <        simError();
248 <      }
226 >      // It is finally time to suppress these warnings once and for
227 >      // all.  They were annoying and not very informative.
228 >
229 >      // if( frameData.orthoRhombic ) {
230 >      //   sprintf( painCave.errMsg,
231 >      //         "OpenMD is switching from the default Non-Orthorhombic\n"
232 >      //         "\tto the faster Orthorhombic periodic boundary computations.\n"
233 >      //         "\tThis is usually a good thing, but if you want the\n"
234 >      //         "\tNon-Orthorhombic computations, make the orthoBoxTolerance\n"
235 >      //         "\tvariable ( currently set to %G ) smaller.\n",
236 >      //         orthoTolerance_);
237 >      //   painCave.severity = OPENMD_INFO;
238 >      //   simError();
239 >      // }
240 >      // else {
241 >      //   sprintf( painCave.errMsg,
242 >      //         "OpenMD is switching from the faster Orthorhombic to the more\n"
243 >      //         "\tflexible Non-Orthorhombic periodic boundary computations.\n"
244 >      //         "\tThis is usually because the box has deformed under\n"
245 >      //         "\tNPTf integration. If you want to live on the edge with\n"
246 >      //         "\tthe Orthorhombic computations, make the orthoBoxTolerance\n"
247 >      //         "\tvariable ( currently set to %G ) larger.\n",
248 >      //         orthoTolerance_);
249 >      //   painCave.severity = OPENMD_WARNING;
250 >      //   simError();
251 >      // }
252      }    
253    }
254    
255    /** Returns the inverse H-Matrix */
256    Mat3x3d Snapshot::getInvHmat() {
257      return frameData.invHmat;
258 +  }
259 +
260 +  /** Returns the Bounding Box */
261 +  Mat3x3d Snapshot::getBoundingBox() {
262 +    return frameData.bBox;
263 +  }
264 +
265 +  /** Sets the Bounding Box */  
266 +  void Snapshot::setBoundingBox(const Mat3x3d& m) {
267 +    frameData.bBox = m;
268 +    frameData.invBbox = frameData.bBox.inverse();
269 +    hasBoundingBox = true;
270 +  }
271 +
272 +  /** Returns the inverse Bounding Box */
273 +  Mat3x3d Snapshot::getInvBoundingBox() {
274 +    return frameData.invBbox;
275    }
276  
277    RealType Snapshot::getXYarea() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines