1 |
|
#include <math.h> |
2 |
|
|
3 |
< |
#include "MatVec3.h" |
4 |
< |
#include "Atom.hpp" |
5 |
< |
#include "SRI.hpp" |
6 |
< |
#include "AbstractClasses.hpp" |
7 |
< |
#include "SimInfo.hpp" |
8 |
< |
#include "ForceFields.hpp" |
9 |
< |
#include "Thermo.hpp" |
10 |
< |
#include "ReadWrite.hpp" |
11 |
< |
#include "Integrator.hpp" |
12 |
< |
#include "simError.h" |
3 |
> |
#include "math/MatVec3.h" |
4 |
> |
#include "primitives/Atom.hpp" |
5 |
> |
#include "primitives/SRI.hpp" |
6 |
> |
#include "primitives/AbstractClasses.hpp" |
7 |
> |
#include "brains/SimInfo.hpp" |
8 |
> |
#include "UseTheForce/ForceFields.hpp" |
9 |
> |
#include "brains/Thermo.hpp" |
10 |
> |
#include "io/ReadWrite.hpp" |
11 |
> |
#include "integrators/Integrator.hpp" |
12 |
> |
#include "utils/simError.h" |
13 |
|
|
14 |
|
#ifdef IS_MPI |
15 |
< |
#include "mpiSimulation.hpp" |
15 |
> |
#include "brains/mpiSimulation.hpp" |
16 |
|
#endif |
17 |
|
|
18 |
|
// Basic non-isotropic thermostating and barostating via the Melchionna |
29 |
|
T( theInfo, the_ff ) |
30 |
|
{ |
31 |
|
GenericData* data; |
32 |
< |
DoubleArrayData * etaValue; |
33 |
< |
vector<double> etaArray; |
32 |
> |
DoubleVectorGenericData * etaValue; |
33 |
|
int i,j; |
34 |
|
|
35 |
|
for(i = 0; i < 3; i++){ |
43 |
|
|
44 |
|
if( theInfo->useInitXSstate ){ |
45 |
|
// retrieve eta array from simInfo if it exists |
46 |
< |
data = info->getProperty(ETAVALUE_ID); |
46 |
> |
data = info->getPropertyByName(ETAVALUE_ID); |
47 |
|
if(data){ |
48 |
< |
etaValue = dynamic_cast<DoubleArrayData*>(data); |
48 |
> |
etaValue = dynamic_cast<DoubleVectorGenericData*>(data); |
49 |
|
|
50 |
|
if(etaValue){ |
52 |
– |
etaArray = etaValue->getData(); |
51 |
|
|
52 |
|
for(i = 0; i < 3; i++){ |
53 |
|
for (j = 0; j < 3; j++){ |
54 |
< |
eta[i][j] = etaArray[3*i+j]; |
54 |
> |
eta[i][j] = (*etaValue)[3*i+j]; |
55 |
|
oldEta[i][j] = eta[i][j]; |
56 |
|
} |
57 |
|
} |