/* * Langevin.hpp * * Created on: Aug 20, 2010 * Author: crueger */ #ifndef LANGEVIN_HPP_ #define LANGEVIN_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Thermostats/Thermostat.hpp" #include #include class Langevin : public Thermostat { public: Langevin(double,double); Langevin(); virtual ~Langevin(); virtual double scaleAtoms(unsigned int step,double ActualTemp,ATOMSET(std::list) atoms); virtual double scaleAtoms(unsigned int step,double ActualTemp,ATOMSET(std::vector) atoms); virtual double scaleAtoms(unsigned int step,double ActualTemp,ATOMSET(std::set) atoms); virtual std::string name(); virtual std::string writeParams(); private: template double doScaleAtoms(unsigned int step,double ActualTemp,ForwardIterator begin, ForwardIterator end); double TempFrequency; double alpha; boost::mt19937 *rng_engine; boost::normal_distribution<> *rng_distribution; }; template <> struct ThermostatTraits : public ThermostatTraits { virtual Thermostat *make(class ConfigFileBuffer * const fb); virtual std::string getName(); static const char* name; }; #endif /* LANGEVIN_HPP_ */