Class Scine::Utils::MDIntegrator¶
-
class
MDIntegrator
¶ Subclassed by Scine::Utils::EulerMD, Scine::Utils::LeapFrogMD, Scine::Utils::VelocityVerletMD
Public Functions
-
MDIntegrator
()¶ Constructor that sets the default time step of 1 fs.
-
virtual Utils::DisplacementCollection
calculateDisplacements
(const Utils::GradientCollection &gradients) = 0¶ Calculates the displacements from the gradients.
-
void
setElementTypes
(const Utils::ElementTypeCollection &elements)¶ Sets the masses, initializes the velocities and accelerations to zero.
- Parameters
elements
: The element types of the molecular system.
-
void
resetVelocities
()¶ Resets velocities to zero.
-
void
setVelocities
(const Utils::DisplacementCollection &velocities)¶ Setter for the velocities.
-
Utils::DisplacementCollection
getVelocities
() const¶ Getter for the velocities.
-
void
setTimeStepInFemtoseconds
(double fs)¶ Sets the time step in the unit femtoseconds.
-
void
setRelaxationTimeFactor
(double factor)¶ The temperature bath relaxation time in units of the chosen time step.
-
void
setTargetTemperatureInKelvin
(double T)¶ Sets the target temperature in Kelvin.
-
void
setSeed
(int seed)¶ Sets a seed for the random initial velocities.
-
void
removeCenterOfMassLinearMomentum
(const Eigen::MatrixX3d &positions)¶ Removes the center of mass motion.
-
void
removeCenterOfMassAngularMomentum
(const Eigen::MatrixX3d &positions)¶ Removes the center of mass motion.
Protected Functions
-
void
calculateAccelerationsFromGradients
(const Utils::GradientCollection &gradients)¶ Updates the accelerations according to the given gradients.
-
void
rescaleVelocitiesForTemperatureBath
()¶ Berendsen thermostat.
-
void
sampleVelocitiesFromBoltzmannDistribution
()¶ Method to sample initial velocities from a Maxwell-Boltzmann distribution.
-