OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::Velocitizer Class Reference

Velocity-modifying routines. More...

#include <Velocitizer.hpp>

Public Member Functions

 Velocitizer (SimInfo *info)
void randomize (RealType ct)
 Resamples velocities and angular momenta Resamples velocities and angular momenta from a Maxwell-Boltzmann distribution.
void randomizeChargeVelocity (RealType ct)
 Resamples charge velocities Resamples charge velocities from a Maxwell-Boltzmann distribution.
void scale (RealType lambda)
 Scales velocities and angular momenta by a scaling factor Rescales velocity (and angular momenta) by a scaling factor.
void removeComDrift ()
 Removes Center of Mass Drift Velocity Removes the center of mass drift velocity (required for accurate calculations of diffusion).
void removeAngularDrift ()
 Removes Center of Mass Angular momentum Removes the center of mass angular momentum (particularly useful in non-periodic simulations).

Detailed Description

Velocity-modifying routines.

Definition at line 65 of file Velocitizer.hpp.

Constructor & Destructor Documentation

◆ Velocitizer()

OpenMD::Velocitizer::Velocitizer ( SimInfo * info)

Definition at line 64 of file Velocitizer.cpp.

Member Function Documentation

◆ randomize()

void OpenMD::Velocitizer::randomize ( RealType ct)

Resamples velocities and angular momenta Resamples velocities and angular momenta from a Maxwell-Boltzmann distribution.

Parameters
t: Temperature of the new distribution.

Definition at line 102 of file Velocitizer.cpp.

References OpenMD::StuntDouble::getI(), OpenMD::StuntDouble::getMass(), OpenMD::StuntDouble::isDirectional(), OpenMD::StuntDouble::isLinear(), OpenMD::StuntDouble::linearAxis(), randomize(), removeAngularDrift(), removeComDrift(), OpenMD::StuntDouble::setJ(), and OpenMD::StuntDouble::setVel().

Referenced by randomize().

◆ randomizeChargeVelocity()

void OpenMD::Velocitizer::randomizeChargeVelocity ( RealType ct)

Resamples charge velocities Resamples charge velocities from a Maxwell-Boltzmann distribution.

Parameters
ct: Charge temperature of the new distribution.

Definition at line 176 of file Velocitizer.cpp.

References OpenMD::RigidBody::getAtoms(), OpenMD::Atom::getAtomType(), OpenMD::StuntDouble::isAtom(), OpenMD::StuntDouble::isRigidBody(), randomizeChargeVelocity(), and OpenMD::StuntDouble::setFlucQVel().

Referenced by randomizeChargeVelocity().

◆ removeAngularDrift()

void OpenMD::Velocitizer::removeAngularDrift ( )

Removes Center of Mass Angular momentum Removes the center of mass angular momentum (particularly useful in non-periodic simulations).

Definition at line 273 of file Velocitizer.cpp.

References OpenMD::cross(), OpenMD::StuntDouble::getPos(), OpenMD::StuntDouble::getVel(), OpenMD::SquareMatrix3< Real >::inverse(), removeAngularDrift(), and OpenMD::StuntDouble::setVel().

Referenced by randomize(), removeAngularDrift(), and scale().

◆ removeComDrift()

void OpenMD::Velocitizer::removeComDrift ( )

Removes Center of Mass Drift Velocity Removes the center of mass drift velocity (required for accurate calculations of diffusion).

Definition at line 249 of file Velocitizer.cpp.

References OpenMD::StuntDouble::getVel(), removeComDrift(), and OpenMD::StuntDouble::setVel().

Referenced by randomize(), removeComDrift(), and scale().

◆ scale()

void OpenMD::Velocitizer::scale ( RealType lambda)

Scales velocities and angular momenta by a scaling factor Rescales velocity (and angular momenta) by a scaling factor.

Parameters
lambda: Scaling factor (must be >= 0)

Definition at line 68 of file Velocitizer.cpp.

References OpenMD::StuntDouble::getJ(), OpenMD::StuntDouble::getVel(), OpenMD::StuntDouble::isDirectional(), removeAngularDrift(), removeComDrift(), scale(), OpenMD::StuntDouble::setJ(), and OpenMD::StuntDouble::setVel().

Referenced by scale().


The documentation for this class was generated from the following files: