1 |
+ |
#include <cmath> |
2 |
|
#include "Atom.hpp" |
3 |
|
#include "SRI.hpp" |
4 |
|
#include "AbstractClasses.hpp" |
43 |
|
double tt2, tb2; |
44 |
|
double angle; |
45 |
|
|
46 |
+ |
|
47 |
|
tt2 = tauThermostat * tauThermostat; |
48 |
|
tb2 = tauBarostat * tauBarostat; |
49 |
|
|
51 |
|
instaPress = tStats->getPressure(); |
52 |
|
instaVol = tStats->getVolume(); |
53 |
|
|
54 |
< |
// first evolve chi a half step |
54 |
> |
// first evolve chi a half step |
55 |
|
|
56 |
|
chi += dt2 * ( instaTemp / targetTemp - 1.0) / tt2; |
57 |
< |
eta += dt2 * ( instaVol * (instaPress - targetPressure) / (NkBT*tb2)); |
57 |
> |
eta += dt2 * ( instaVol * (instaPress - targetPressure) / |
58 |
> |
(p_convert*NkBT*tb2)); |
59 |
|
|
60 |
|
for( i=0; i<nAtoms; i++ ){ |
61 |
|
atomIndex = i * 3; |
131 |
|
} |
132 |
|
// Scale the box after all the positions have been moved: |
133 |
|
|
134 |
+ |
cerr << "eta = " << eta |
135 |
+ |
<< "; exp(dt*eta) = " << exp(eta*dt) << "\n"; |
136 |
+ |
|
137 |
|
info->scaleBox(exp(dt*eta)); |
138 |
|
|
139 |
|
} |
155 |
|
instaVol = tStats->getVolume(); |
156 |
|
|
157 |
|
chi += dt2 * ( instaTemp / targetTemp - 1.0) / tt2; |
158 |
< |
eta += dt2 * ( instaVol * (instaPress - targetPressure) / (NkBT*tb2)); |
158 |
> |
eta += dt2 * ( instaVol * (instaPress - targetPressure) / |
159 |
> |
(p_convert*NkBT*tb2)); |
160 |
|
|
161 |
|
for( i=0; i<nAtoms; i++ ){ |
162 |
|
atomIndex = i * 3; |