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

Comparing branches/development/src/integrators/NPTxyz.cpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 36 | Line 36
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).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   #include "brains/SimInfo.hpp"
# Line 61 | Line 62 | namespace OpenMD {
62  
63      
64    RealType NPTxyz::calcConservedQuantity(){
65 +    thermostat = snap->getThermostat();
66 +    loadEta();
67  
68      // We need NkBT a lot, so just set it here: This is the RAW number
69      // of integrableObjects, so no subtraction or addition of constraints or
# Line 80 | Line 83 | namespace OpenMD {
83      RealType barostat_potential;
84      RealType trEta;
85  
86 <    totalEnergy = thermo.getTotalE();
86 >    totalEnergy = thermo.getTotalEnergy();
87  
88 <    thermostat_kinetic = fkBT * tt2 * chi * chi /(2.0 * PhysicalConstants::energyConvert);
88 >    thermostat_kinetic = fkBT * tt2 * thermostat.first * thermostat.first
89 >      / (2.0 * PhysicalConstants::energyConvert);
90  
91 <    thermostat_potential = fkBT* integralOfChidt / PhysicalConstants::energyConvert;
91 >    thermostat_potential = fkBT* thermostat.second
92 >      / PhysicalConstants::energyConvert;
93  
94      SquareMatrix<RealType, 3> tmp = eta.transpose() * eta;
95      trEta = tmp.trace();
# Line 162 | Line 167 | namespace OpenMD {
167        simError();
168      } else {
169  
170 <      Mat3x3d hmat = currentSnapshot_->getHmat();
170 >      Mat3x3d hmat = snap->getHmat();
171        hmat = hmat *scaleMat;
172 <      currentSnapshot_->setHmat(hmat);
172 >      snap->setHmat(hmat);
173      }
174    }
175  
176    void NPTxyz::loadEta() {
177 <    eta= currentSnapshot_->getEta();
177 >    eta= snap->getBarostat();
178    }
179  
180   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines