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" |
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 |
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(); |
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 |
|
} |