55#include "integrators/LangevinDynamics.hpp"
58#include "utils/Constants.hpp"
62 LangevinDynamics::LangevinDynamics(
SimInfo* info) :
65 void LangevinDynamics::moveA() {
66 SimInfo::MoleculeIterator i;
67 Molecule::IntegrableObjectIterator j;
77 for (mol = info_->beginMolecule(i); mol != NULL;
78 mol = info_->nextMolecule(i)) {
79 for (sd = mol->beginIntegrableObject(j); sd != NULL;
80 sd = mol->nextIntegrableObject(j)) {
87 vel += (dt2 / mass * Constants::energyConvert) * frc;
95 if (sd->isDirectional()) {
98 Tb = sd->lab2Body(sd->getTrq());
104 ji += (dt2 * Constants::energyConvert) * Tb;
106 rotAlgo_->rotate(sd, ji, dt);
114 rattle_->constraintA();
117 void LangevinDynamics::moveB() {
118 SimInfo::MoleculeIterator i;
119 Molecule::IntegrableObjectIterator j;
128 for (mol = info_->beginMolecule(i); mol != NULL;
129 mol = info_->nextMolecule(i)) {
130 for (sd = mol->beginIntegrableObject(j); sd != NULL;
131 sd = mol->nextIntegrableObject(j)) {
134 mass = sd->getMass();
137 vel += (dt2 / mass * Constants::energyConvert) * frc;
141 if (sd->isDirectional()) {
144 Tb = sd->lab2Body(sd->getTrq());
150 ji += (dt2 * Constants::energyConvert) * Tb;
158 rattle_->constraintB();
161 RealType LangevinDynamics::calcConservedQuantity() {
return 0.0; }
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.