| 1 |
+ |
#include <math.h> |
| 2 |
+ |
|
| 3 |
|
#include "Atom.hpp" |
| 4 |
|
#include "SRI.hpp" |
| 5 |
|
#include "AbstractClasses.hpp" |
| 17 |
|
Integrator( theInfo, the_ff ) |
| 18 |
|
{ |
| 19 |
|
GenericData* data; |
| 18 |
– |
DoubleData * chiValue; |
| 19 |
– |
DoubleData * integralOfChidtValue; |
| 20 |
|
|
| 21 |
– |
chiValue = NULL; |
| 22 |
– |
integralOfChidtValue = NULL; |
| 23 |
– |
|
| 21 |
|
chi = 0.0; |
| 22 |
|
have_tau_thermostat = 0; |
| 23 |
|
have_target_temp = 0; |
| 26 |
|
|
| 27 |
|
// retrieve chi and integralOfChidt from simInfo |
| 28 |
|
data = info->getProperty(CHIVALUE_ID); |
| 29 |
< |
if(data){ |
| 30 |
< |
chiValue = dynamic_cast<DoubleData*>(data); |
| 29 |
> |
if(data != NULL ){ |
| 30 |
> |
chi = data->getDval(); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
data = info->getProperty(INTEGRALOFCHIDT_ID); |
| 34 |
< |
if(data){ |
| 35 |
< |
integralOfChidtValue = dynamic_cast<DoubleData*>(data); |
| 34 |
> |
if(data != NULL ){ |
| 35 |
> |
integralOfChidt = data->getDval(); |
| 36 |
|
} |
| 37 |
|
|
| 41 |
– |
// chi and integralOfChidt should appear by pair |
| 42 |
– |
if(chiValue && integralOfChidtValue){ |
| 43 |
– |
chi = chiValue->getData(); |
| 44 |
– |
integralOfChidt = integralOfChidtValue->getData(); |
| 45 |
– |
} |
| 46 |
– |
|
| 38 |
|
oldVel = new double[3*nAtoms]; |
| 39 |
|
oldJi = new double[3*nAtoms]; |
| 40 |
|
} |