OpenMD 3.0
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 62 of file Velocitizer.hpp.

Constructor & Destructor Documentation

◆ Velocitizer()

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

Definition at line 61 of file Velocitizer.cpp.

Member Function Documentation

◆ randomize()

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

◆ 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 166 of file Velocitizer.cpp.

References OpenMD::SimInfo::beginMolecule(), OpenMD::RigidBody::getAtoms(), OpenMD::StuntDouble::isAtom(), OpenMD::StuntDouble::isRigidBody(), and OpenMD::SimInfo::nextMolecule().

◆ 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 259 of file Velocitizer.cpp.

References OpenMD::SimInfo::beginMolecule(), OpenMD::cross(), OpenMD::Thermo::getComAll(), OpenMD::Thermo::getInertiaTensor(), OpenMD::StuntDouble::getPos(), OpenMD::StuntDouble::getVel(), OpenMD::SquareMatrix3< Real >::inverse(), OpenMD::SimInfo::nextMolecule(), and OpenMD::StuntDouble::setVel().

Referenced by randomize(), 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 239 of file Velocitizer.cpp.

References OpenMD::SimInfo::beginMolecule(), OpenMD::Thermo::getComVel(), OpenMD::StuntDouble::getVel(), OpenMD::SimInfo::nextMolecule(), and OpenMD::StuntDouble::setVel().

Referenced by randomize(), 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 65 of file Velocitizer.cpp.

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


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