25 std::normal_distribution<double> normal_distribution;
29 : normal_distribution(mean, stddev) {};
31 template <
typename random_engine>
Point operator()(random_engine& engine)
33 return {normal_distribution(engine), normal_distribution(engine),
34 normal_distribution(engine)};
62 virtual void from_json(
const json& j) = 0;
63 virtual void to_json(
json& j)
const = 0;
77 double friction_coefficient;
80 [[nodiscard]]
inline Point positionIncrement(
81 const Point& velocity)
const;
82 [[nodiscard]]
inline Point 83 velocityIncrement(
const Point& force,
85 inline Point velocityFluctuationDissipation(
const Point& velocity,
double mass);
92 double friction_coefficient);
95 void from_json(
const json& j)
override;
96 void to_json(
json& j)
const override;
111 std::shared_ptr<IntegratorBase> integrator;
117 size_t resizeForcesAndVelocities();
118 void generateVelocities();
120 void _to_json(
json& j)
const override;
121 void _from_json(
const json& j)
override;
122 void _move(
Change& change)
override;
123 ForceMove(
Space& spc,
const std::string& name,
const std::string& cite,
124 std::shared_ptr<IntegratorBase> integrator,
unsigned int nsteps);
128 double bias(
Change&,
double,
double)
override;
129 [[nodiscard]]
const PointVector& getForces()
const;
130 [[nodiscard]]
const PointVector& getVelocities()
const;
140 std::shared_ptr<IntegratorBase> integrator,
unsigned int nsteps);
146 void _to_json(
json& j)
const override;
147 void _from_json(
const json& j)
override;
nlohmann::json json
JSON object.
Definition: json_support.h:10
Eigen::Vector3d Point
3D vector used for positions, velocities, forces etc.
Definition: coordinates.h:7
std::vector< Point > PointVector
Vector of 3D vectors.
Definition: core.h:24
PointVector velocities
Vector of velocities matching each active particle in Space.
Definition: forcemove.h:114
Base class for all moves (MC, Langevin, ...)
Definition: move.h:38
Definition: chainmove.cpp:6
unsigned int number_of_steps
number of integration steps to perform during a single MC move
Definition: forcemove.h:113
Base class for dynamics integrators.
Definition: forcemove.h:45
Langevin dynamics move using Langevin equation of motion.
Definition: forcemove.h:136
All energies inherit from this class.
Definition: externalpotential.h:21
Specify changes made to a system.
Definition: space.h:29
Generate a random 3d vector from the normal distribution.
Definition: forcemove.h:23
Placeholder for atoms and molecules.
Definition: space.h:92
Symmetric Langevin velocity-Verlet method (BAOAB)
Definition: forcemove.h:74
Base class for force moves, e.g., molecular dynamics or Langevin dynamics.
Definition: forcemove.h:108
PointVector forces
Vector of forces matching each active particle in Space.
Definition: forcemove.h:115