| 93 |
|
atoms = entry_plug->atoms; |
| 94 |
|
|
| 95 |
|
p_ext = targetPressure * p_units; |
| 96 |
< |
p_mol = p_int; |
| 96 |
> |
p_mol = p_int * p_units; |
| 97 |
|
|
| 98 |
|
entry_plug->getBox(oldBox); |
| 99 |
|
volume = oldBox[0]*oldBox[1]*oldBox[2]; |
| 106 |
|
epsilonDot += dt * ((p_mol - p_ext) * volume / |
| 107 |
|
(tauRelax*tauRelax * kB * targetTemp) ); |
| 108 |
|
|
| 109 |
– |
|
| 110 |
– |
std::cerr << "dt = " << dt << " tauRelax = " << tauRelax << " kB = " << kB << "targetTemp = " << targetTemp << "\n"; |
| 111 |
– |
|
| 109 |
|
// determine the change in cell volume |
| 110 |
|
scale = pow( (1.0 + dt * 3.0 * epsilonDot), (1.0 / 3.0)); |
| 111 |
|
|
| 115 |
– |
std::cerr << "p_mol = " << p_mol << " p_ext = " << p_ext << " scale = " << scale << "\n"; |
| 116 |
– |
|
| 117 |
– |
|
| 112 |
|
newBox[0] = oldBox[0] * scale; |
| 113 |
|
newBox[1] = oldBox[1] * scale; |
| 114 |
|
newBox[2] = oldBox[2] * scale; |
| 127 |
|
zeta += dt * ( (ke_temp*2.0 - NkBT) / qmass ); |
| 128 |
|
zetaScale = zeta * dt; |
| 129 |
|
|
| 130 |
< |
std::cerr << "zetaScale = " << zetaScale << "epsilonScale = " << epsilonScale << "\n"; |
| 130 |
> |
std::cerr << "zetaScale = " << zetaScale << " epsilonScale = " << epsilonScale << "\n"; |
| 131 |
|
|
| 132 |
|
// apply barostating and thermostating to velocities and angular momenta |
| 133 |
|
for(i = 0; i < entry_plug->n_atoms; i++){ |