| 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" |
| 114 |
|
vScale(i, j) = eta(i, j); |
| 115 |
|
|
| 116 |
|
if (i == j) { |
| 117 |
< |
vScale(i, j) += chi; |
| 117 |
> |
vScale(i, j) += thermostat.first; |
| 118 |
|
} |
| 119 |
|
} |
| 120 |
|
} |
| 222 |
|
simError(); |
| 223 |
|
} else { |
| 224 |
|
|
| 225 |
< |
Mat3x3d hmat = currentSnapshot_->getHmat(); |
| 225 |
> |
Mat3x3d hmat = snap->getHmat(); |
| 226 |
|
hmat = hmat *scaleMat; |
| 227 |
< |
currentSnapshot_->setHmat(hmat); |
| 227 |
> |
snap->setHmat(hmat); |
| 228 |
|
|
| 229 |
|
} |
| 230 |
|
} |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
RealType NPTf::calcConservedQuantity(){ |
| 247 |
< |
|
| 248 |
< |
chi= currentSnapshot_->getChi(); |
| 248 |
< |
integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); |
| 247 |
> |
|
| 248 |
> |
thermostat = snap->getThermostat(); |
| 249 |
|
loadEta(); |
| 250 |
|
|
| 251 |
|
// We need NkBT a lot, so just set it here: This is the RAW number |
| 266 |
|
RealType barostat_potential; |
| 267 |
|
RealType trEta; |
| 268 |
|
|
| 269 |
< |
totalEnergy = thermo.getTotalE(); |
| 269 |
> |
totalEnergy = thermo.getTotalEnergy(); |
| 270 |
> |
|
| 271 |
> |
thermostat_kinetic = fkBT * tt2 * thermostat.first * |
| 272 |
> |
thermostat.first /(2.0 * PhysicalConstants::energyConvert); |
| 273 |
|
|
| 274 |
< |
thermostat_kinetic = fkBT * tt2 * chi * chi /(2.0 * PhysicalConstants::energyConvert); |
| 274 |
> |
thermostat_potential = fkBT* thermostat.second / PhysicalConstants::energyConvert; |
| 275 |
|
|
| 273 |
– |
thermostat_potential = fkBT* integralOfChidt / PhysicalConstants::energyConvert; |
| 274 |
– |
|
| 276 |
|
SquareMatrix<RealType, 3> tmp = eta.transpose() * eta; |
| 277 |
|
trEta = tmp.trace(); |
| 278 |
|
|
| 288 |
|
} |
| 289 |
|
|
| 290 |
|
void NPTf::loadEta() { |
| 291 |
< |
eta= currentSnapshot_->getEta(); |
| 291 |
> |
eta= snap->getBarostat(); |
| 292 |
|
|
| 293 |
|
//if (!eta.isDiagonal()) { |
| 294 |
|
// sprintf( painCave.errMsg, |
| 299 |
|
} |
| 300 |
|
|
| 301 |
|
void NPTf::saveEta() { |
| 302 |
< |
currentSnapshot_->setEta(eta); |
| 302 |
> |
snap->setBarostat(eta); |
| 303 |
|
} |
| 304 |
|
|
| 305 |
|
} |