OpenMD 3.1
Molecular Dynamics in the Open
|
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). | |
Velocity-modifying routines.
Definition at line 62 of file Velocitizer.hpp.
OpenMD::Velocitizer::Velocitizer | ( | SimInfo * | info | ) |
Definition at line 61 of file Velocitizer.cpp.
void OpenMD::Velocitizer::randomize | ( | RealType | ct | ) |
Resamples velocities and angular momenta Resamples velocities and angular momenta from a Maxwell-Boltzmann distribution.
t | : Temperature of the new distribution. |
Definition at line 96 of file Velocitizer.cpp.
References OpenMD::SimInfo::beginMolecule(), OpenMD::StuntDouble::getI(), OpenMD::StuntDouble::getMass(), OpenMD::SimInfo::getNdf(), OpenMD::SimInfo::getNdfRaw(), OpenMD::StuntDouble::isDirectional(), OpenMD::StuntDouble::isLinear(), OpenMD::StuntDouble::linearAxis(), OpenMD::SimInfo::nextMolecule(), removeAngularDrift(), removeComDrift(), OpenMD::StuntDouble::setJ(), and OpenMD::StuntDouble::setVel().
void OpenMD::Velocitizer::randomizeChargeVelocity | ( | RealType | ct | ) |
Resamples charge velocities Resamples charge velocities from a Maxwell-Boltzmann distribution.
ct | : Charge temperature of the new distribution. |
Definition at line 166 of file Velocitizer.cpp.
References OpenMD::SimInfo::beginMolecule(), OpenMD::RigidBody::getAtoms(), OpenMD::Atom::getAtomType(), OpenMD::StuntDouble::isAtom(), OpenMD::StuntDouble::isRigidBody(), OpenMD::SimInfo::nextMolecule(), and OpenMD::StuntDouble::setFlucQVel().
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().
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().
void OpenMD::Velocitizer::scale | ( | RealType | lambda | ) |
Scales velocities and angular momenta by a scaling factor Rescales velocity (and angular momenta) by a scaling factor.
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().