6 |
|
#include "LRI.hpp" |
7 |
|
#include "Integrator.hpp" |
8 |
|
|
9 |
+ |
#define BASE_SEED 123456789 |
10 |
|
|
11 |
+ |
Thermo::Thermo( SimInfo* the_entry_plug ) { |
12 |
+ |
entry_plug = the_entry_plug; |
13 |
+ |
baseSeed = BASE_SEED; |
14 |
+ |
gaussStream = new gaussianSPRNG( baseSeed ); |
15 |
+ |
} |
16 |
+ |
|
17 |
+ |
Thermo::~Thermo(){ |
18 |
+ |
delete gaussStream; |
19 |
+ |
} |
20 |
+ |
|
21 |
|
double Thermo::getKinetic(){ |
22 |
|
|
23 |
|
const double e_convert = 4.184E-4; // convert kcal/mol -> (amu A^2)/fs^2 |
197 |
|
#endif |
198 |
|
|
199 |
|
#ifdef USE_SPRNG |
200 |
< |
vx = vbar * entry_plug->gaussStream->getGaussian(); |
201 |
< |
vy = vbar * entry_plug->gaussStream->getGaussian(); |
202 |
< |
vz = vbar * entry_plug->gaussStream->getGaussian(); |
200 |
> |
vx = vbar * gaussStream->getGaussian(); |
201 |
> |
vy = vbar * gaussStream->getGaussian(); |
202 |
> |
vz = vbar * gaussStream->getGaussian(); |
203 |
|
#endif |
204 |
|
|
205 |
|
atoms[vr]->set_vx( vx ); |
272 |
|
#endif |
273 |
|
#ifdef USE_SPRNG |
274 |
|
vbar = sqrt( 2.0 * kebar * dAtom->getIxx() ); |
275 |
< |
jx = vbar * entry_plug->gaussStream->getGaussian(); |
275 |
> |
jx = vbar * gaussStream->getGaussian(); |
276 |
|
|
277 |
|
vbar = sqrt( 2.0 * kebar * dAtom->getIyy() ); |
278 |
< |
jy = vbar * entry_plug->gaussStream->getGaussian(); |
278 |
> |
jy = vbar * gaussStream->getGaussian(); |
279 |
|
|
280 |
|
vbar = sqrt( 2.0 * kebar * dAtom->getIzz() ); |
281 |
< |
jz = vbar * entry_plug->gaussStream->getGaussian(); |
281 |
> |
jz = vbar * gaussStream->getGaussian(); |
282 |
|
#endif |
283 |
|
|
284 |
|
dAtom->setJx( jx ); |