1 |
|
#include "brains/SimInfo.hpp" |
2 |
|
#include "brains/Thermo.hpp" |
3 |
+ |
#include "integrators/IntegratorCreator.hpp" |
4 |
|
#include "integrators/NPTf.hpp" |
5 |
|
#include "primitives/Molecule.hpp" |
6 |
|
#include "utils/OOPSEConstant.hpp" |
7 |
|
#include "utils/simError.h" |
8 |
|
|
9 |
+ |
namespace oopse { |
10 |
+ |
|
11 |
+ |
static IntegratorBuilder<NPTf>* NPTfCreator = new IntegratorBuilder<NPTf>("NPTf"); |
12 |
+ |
|
13 |
|
// Basic non-isotropic thermostating and barostating via the Melchionna |
14 |
|
// modification of the Hoover algorithm: |
15 |
|
// |
20 |
|
// |
21 |
|
// Hoover, W. G., 1986, Phys. Rev. A, 34, 2499. |
22 |
|
|
18 |
– |
NPTf::NPTf (SimInfo* info): NPT(info){ |
19 |
– |
|
20 |
– |
} |
21 |
– |
|
22 |
– |
|
23 |
|
void NPTf::evolveEtaA() { |
24 |
|
|
25 |
|
int i, j; |
233 |
|
|
234 |
|
} |
235 |
|
|
236 |
+ |
void NPTf::loadEta() { |
237 |
+ |
eta= currentSnapshot_->getEta(); |
238 |
+ |
|
239 |
+ |
if (!eta.isDiagonal()) { |
240 |
+ |
sprintf( painCave.errMsg, |
241 |
+ |
"NPTi error: the diagonal elements of are eta matrix is not same or etaMat is not a diagonal matrix"); |
242 |
+ |
painCave.isFatal = 1; |
243 |
+ |
simError(); |
244 |
+ |
} |
245 |
+ |
} |
246 |
+ |
|
247 |
+ |
void NPTf::saveEta() { |
248 |
+ |
currentSnapshot_->setEta(eta); |
249 |
+ |
} |
250 |
+ |
|
251 |
+ |
} |