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 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 62 | Line 62 | namespace OpenMD {
62  
63      
64    RealType NPTxyz::calcConservedQuantity(){
65 <
66 <    chi= currentSnapshot_->getChi();
67 <    integralOfChidt = currentSnapshot_->getIntegralOfChiDt();
65 >    thermostat = snap->getThermostat();
66      loadEta();
67  
68      // We need NkBT a lot, so just set it here: This is the RAW number
# Line 85 | 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 167 | 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