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). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
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 |
|
*/ |
42 |
|
|
43 |
|
#include "brains/SimInfo.hpp" |
57 |
|
*/ |
58 |
|
RealType NPTsz::calcConservedQuantity(){ |
59 |
|
|
60 |
< |
chi= currentSnapshot_->getChi(); |
60 |
< |
integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); |
60 |
> |
thermostat = snap->getThermostat(); |
61 |
|
loadEta(); |
62 |
|
|
63 |
|
// We need NkBT a lot, so just set it here: This is the RAW number |
79 |
|
RealType barostat_potential; |
80 |
|
RealType trEta; |
81 |
|
|
82 |
< |
totalEnergy = thermo.getTotalE(); |
82 |
> |
totalEnergy = thermo.getTotalEnergy(); |
83 |
|
|
84 |
< |
thermostat_kinetic = fkBT * tt2 * chi * chi / |
84 |
> |
thermostat_kinetic = fkBT * tt2 * thermostat.first * thermostat.first / |
85 |
|
(2.0 * PhysicalConstants::energyConvert); |
86 |
|
|
87 |
< |
thermostat_potential = fkBT* integralOfChidt / |
87 |
> |
thermostat_potential = fkBT* thermostat.second / |
88 |
|
PhysicalConstants::energyConvert; |
89 |
|
|
90 |
|
SquareMatrix<RealType, 3> tmp = eta.transpose() * eta; |
106 |
|
|
107 |
|
void NPTsz::scaleSimBox(){ |
108 |
|
|
109 |
< |
int i,j,k; |
109 |
> |
int i, j; |
110 |
|
Mat3x3d scaleMat; |
111 |
< |
RealType eta2ij, scaleFactor; |
112 |
< |
RealType bigScale, smallScale, offDiagMax; |
111 |
> |
RealType scaleFactor; |
112 |
> |
RealType bigScale, smallScale; |
113 |
|
Mat3x3d hm; |
114 |
|
Mat3x3d hmnew; |
115 |
|
|
121 |
|
|
122 |
|
bigScale = 1.0; |
123 |
|
smallScale = 1.0; |
124 |
– |
offDiagMax = 0.0; |
124 |
|
|
125 |
|
for(i=0; i<3; i++){ |
126 |
|
for(j=0; j<3; j++){ |
160 |
|
simError(); |
161 |
|
} else { |
162 |
|
|
163 |
< |
Mat3x3d hmat = currentSnapshot_->getHmat(); |
163 |
> |
Mat3x3d hmat = snap->getHmat(); |
164 |
|
hmat = hmat *scaleMat; |
165 |
< |
currentSnapshot_->setHmat(hmat); |
165 |
> |
snap->setHmat(hmat); |
166 |
|
} |
167 |
|
} |
168 |
|
|
169 |
|
void NPTsz::loadEta() { |
170 |
< |
eta= currentSnapshot_->getEta(); |
170 |
> |
eta= snap->getBarostat(); |
171 |
|
} |
172 |
|
} |