ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Molecular dynamics integrator for rotational motion. More...
#include "rotation.hpp"
#include <utils/Vector.hpp>
#include <utils/mask.hpp>
#include <cassert>
#include <cmath>
Go to the source code of this file.
Functions | |
static void | define_Qdd (Particle const &p, Utils::Quaternion< double > &Qd, Utils::Quaternion< double > &Qdd, Utils::Vector3d &S, Utils::Vector3d &Wd) |
Calculate the derivatives of the quaternion and angular acceleration for a given particle. | |
void | propagate_omega_quat_particle (Particle &p, double time_step) |
See [31]. | |
void | convert_torque_propagate_omega (Particle &p, double time_step) |
void | convert_initial_torques (const ParticleRange &particles) |
Convert torques to the body-fixed frame before the integration loop. | |
Molecular dynamics integrator for rotational motion.
A velocity Verlet algorithm using quaternions is implemented to tackle rotational motion. See [27] for the method and [3] for the quaternion components indexing used here. A random torque and a friction term are added to provide the constant NVT conditions. Due to this feature all particles are treated as 3D objects with 3 translational and 3 rotational degrees of freedom if ROTATION is compiled in.
Definition in file rotation.cpp.
void convert_initial_torques | ( | const ParticleRange & | particles | ) |
Convert torques to the body-fixed frame before the integration loop.
Definition at line 188 of file rotation.cpp.
References convert_torque_to_body_frame_apply_fix().
Referenced by System::System::integrate().
void convert_torque_propagate_omega | ( | Particle & | p, |
double | time_step | ||
) |
Definition at line 159 of file rotation.cpp.
References Particle::can_rotate(), convert_torque_to_body_frame_apply_fix(), Particle::omega(), Particle::rinertia(), and Particle::torque().
Referenced by velocity_verlet_rotator_2().
|
static |
Calculate the derivatives of the quaternion and angular acceleration for a given particle.
See [39]. Please note that ESPResSo uses scalar-first notation for quaternions, while [39] uses scalar-last notation.
[in] | p | Particle |
[out] | Qd | First derivative of the particle quaternion |
[out] | Qdd | Second derivative of the particle quaternion |
[out] | S | Function of Qd and Qdd , used to evaluate the Lagrange parameter lambda |
[out] | Wd | Angular acceleration of the particle |
Definition at line 56 of file rotation.cpp.
References Particle::can_rotate_around(), Utils::Quaternion< T >::norm2(), Particle::omega(), Particle::quat(), Particle::rinertia(), and Particle::torque().
Referenced by propagate_omega_quat_particle().
void propagate_omega_quat_particle | ( | Particle & | p, |
double | time_step | ||
) |
See [31].
Propagate angular velocities and update quaternions on a particle.
Please note that ESPResSo uses scalar-first notation for quaternions, while [31] uses scalar-last notation.
For very high angular velocities (e.g. if the product of time_step
with the largest component of p.omega() is superior to ~2.0) and for time_step
superior or equal to unity, the calculation might fail.
Definition at line 125 of file rotation.cpp.
References Particle::can_rotate(), define_Qdd(), Utils::Quaternion< T >::identity(), Utils::mask(), Particle::omega(), Particle::quat(), and Particle::rotation().
Referenced by velocity_verlet_rotator_1().