| 1 | 
  | 
#include <math.h> | 
| 2 | 
  | 
 | 
| 3 | 
< | 
#include "Atom.hpp" | 
| 4 | 
< | 
#include "SRI.hpp" | 
| 5 | 
< | 
#include "AbstractClasses.hpp" | 
| 6 | 
< | 
#include "SimInfo.hpp" | 
| 7 | 
< | 
#include "ForceFields.hpp" | 
| 8 | 
< | 
#include "Thermo.hpp" | 
| 9 | 
< | 
#include "ReadWrite.hpp" | 
| 10 | 
< | 
#include "Integrator.hpp" | 
| 11 | 
< | 
#include "simError.h" | 
| 3 | 
> | 
#include "primitives/Atom.hpp" | 
| 4 | 
> | 
#include "primitives/SRI.hpp" | 
| 5 | 
> | 
#include "primitives/AbstractClasses.hpp" | 
| 6 | 
> | 
#include "brains/SimInfo.hpp" | 
| 7 | 
> | 
#include "UseTheForce/ForceFields.hpp" | 
| 8 | 
> | 
#include "brains/Thermo.hpp" | 
| 9 | 
> | 
#include "io/ReadWrite.hpp" | 
| 10 | 
> | 
#include "integrators/Integrator.hpp" | 
| 11 | 
> | 
#include "utils/simError.h" | 
| 12 | 
  | 
 | 
| 13 | 
  | 
 | 
| 14 | 
  | 
// Basic thermostating via Hoover, Phys.Rev.A, 1985, Vol. 31 (5) 1695-1697 | 
| 17 | 
  | 
  T( theInfo, the_ff ) | 
| 18 | 
  | 
{ | 
| 19 | 
  | 
  GenericData* data; | 
| 20 | 
< | 
  DoubleData * chiValue; | 
| 21 | 
< | 
  DoubleData * integralOfChidtValue; | 
| 20 | 
> | 
  DoubleGenericData * chiValue; | 
| 21 | 
> | 
  DoubleGenericData * integralOfChidtValue; | 
| 22 | 
  | 
 | 
| 23 | 
  | 
  chiValue = NULL; | 
| 24 | 
  | 
  integralOfChidtValue = NULL; | 
| 35 | 
  | 
    // retrieve chi and integralOfChidt from simInfo | 
| 36 | 
  | 
    data = info->getProperty(CHIVALUE_ID); | 
| 37 | 
  | 
    if(data){ | 
| 38 | 
< | 
      chiValue = dynamic_cast<DoubleData*>(data); | 
| 38 | 
> | 
      chiValue = dynamic_cast<DoubleGenericData*>(data); | 
| 39 | 
  | 
    } | 
| 40 | 
  | 
     | 
| 41 | 
  | 
    data = info->getProperty(INTEGRALOFCHIDT_ID); | 
| 42 | 
  | 
    if(data){ | 
| 43 | 
< | 
      integralOfChidtValue = dynamic_cast<DoubleData*>(data); | 
| 43 | 
> | 
      integralOfChidtValue = dynamic_cast<DoubleGenericData*>(data); | 
| 44 | 
  | 
    } | 
| 45 | 
  | 
     | 
| 46 | 
  | 
    // chi and integralOfChidt should appear by pair |