23 |
|
// |
24 |
|
// Hoover, W. G., 1986, Phys. Rev. A, 34, 2499. |
25 |
|
|
26 |
< |
template<typename T> NPTf<T>::NPTf ( SimInfo *theInfo, ForceFields* the_ff): |
27 |
< |
T( theInfo, the_ff ) |
26 |
> |
NPTf::NPTf ( SimInfo *theInfo, ForceFields* the_ff): |
27 |
> |
Integrator( theInfo, the_ff ) |
28 |
|
{ |
29 |
|
GenericData* data; |
30 |
|
DoubleArrayData * etaValue; |
59 |
|
|
60 |
|
} |
61 |
|
|
62 |
< |
template<typename T> NPTf<T>::~NPTf() { |
62 |
> |
NPTf::~NPTf() { |
63 |
|
|
64 |
|
// empty for now |
65 |
|
} |
66 |
|
|
67 |
< |
template<typename T> void NPTf<T>::resetIntegrator() { |
67 |
> |
void NPTf::resetIntegrator() { |
68 |
|
|
69 |
|
int i, j; |
70 |
|
|
72 |
|
for (j = 0; j < 3; j++) |
73 |
|
eta[i][j] = 0.0; |
74 |
|
|
75 |
< |
T::resetIntegrator(); |
75 |
> |
Integrator::resetIntegrator(); |
76 |
|
} |
77 |
|
|
78 |
< |
template<typename T> void NPTf<T>::evolveEtaA() { |
78 |
> |
void NPTf::evolveEtaA() { |
79 |
|
|
80 |
|
int i, j; |
81 |
|
|
94 |
|
oldEta[i][j] = eta[i][j]; |
95 |
|
} |
96 |
|
|
97 |
< |
template<typename T> void NPTf<T>::evolveEtaB() { |
97 |
> |
void NPTf::evolveEtaB() { |
98 |
|
|
99 |
|
int i,j; |
100 |
|
|
114 |
|
} |
115 |
|
} |
116 |
|
|
117 |
< |
template<typename T> void NPTf<T>::getVelScaleA(double sc[3], double vel[3]) { |
117 |
> |
void NPTf::getVelScaleA(double sc[3], double vel[3]) { |
118 |
|
int i,j; |
119 |
|
double vScale[3][3]; |
120 |
|
|
131 |
|
info->matVecMul3( vScale, vel, sc ); |
132 |
|
} |
133 |
|
|
134 |
< |
template<typename T> void NPTf<T>::getVelScaleB(double sc[3], int index ){ |
134 |
> |
void NPTf::getVelScaleB(double sc[3], int index ){ |
135 |
|
int i,j; |
136 |
|
double myVel[3]; |
137 |
|
double vScale[3][3]; |
152 |
|
info->matVecMul3( vScale, myVel, sc ); |
153 |
|
} |
154 |
|
|
155 |
< |
template<typename T> void NPTf<T>::getPosScale(double pos[3], double COM[3], |
155 |
> |
void NPTf::getPosScale(double pos[3], double COM[3], |
156 |
|
int index, double sc[3]){ |
157 |
|
int j; |
158 |
|
double rj[3]; |
163 |
|
info->matVecMul3( eta, rj, sc ); |
164 |
|
} |
165 |
|
|
166 |
< |
template<typename T> void NPTf<T>::scaleSimBox( void ){ |
166 |
> |
void NPTf::scaleSimBox( void ){ |
167 |
|
|
168 |
|
int i,j,k; |
169 |
|
double scaleMat[3][3]; |
239 |
|
} |
240 |
|
} |
241 |
|
|
242 |
< |
template<typename T> bool NPTf<T>::etaConverged() { |
242 |
> |
bool NPTf::etaConverged() { |
243 |
|
int i; |
244 |
|
double diffEta, sumEta; |
245 |
|
|
252 |
|
return ( diffEta <= etaTolerance ); |
253 |
|
} |
254 |
|
|
255 |
< |
template<typename T> double NPTf<T>::getConservedQuantity(void){ |
255 |
> |
double NPTf::getConservedQuantity(void){ |
256 |
|
|
257 |
|
double conservedQuantity; |
258 |
|
double totalEnergy; |
294 |
|
|
295 |
|
} |
296 |
|
|
297 |
< |
template<typename T> string NPTf<T>::getAdditionalParameters(void){ |
297 |
> |
string NPTf::getAdditionalParameters(void){ |
298 |
|
string parameters; |
299 |
|
const int BUFFERSIZE = 2000; // size of the read buffer |
300 |
|
char buffer[BUFFERSIZE]; |