class DriverDynamics

angular_momentum   angular_velocity   com_shift   dt=   generate_maxwell_velocities   generate_maxwell_velocity   generate_zero_velocities   initialize   integrator   integrator   integrator   integrator   integrator   integrator_verlet   kinetic_and_temperature   kinetic_energy   moment_of_inertia   prepare   rand_gauss   remove_com_rotation   remove_com_translation   rescale_velocities   rescale_velocity   reset_com   run   temperature   thermostat   thermostat   thermostat   thermostat   thermostat   thermostat_setup   thermostat_setup   thermostat_setup   thermostat_setup   thermostat_setup  

Initialization

initialize(geometry, settings)

Access to attributes

dt=(value)

Sets the timestep, updating attribute dt2 (dt^2) as well.

Generation of random velocities

rand_gauss # => float

Generator of random numbers with gaussian distribution. Currently, we use quick n' dirty algorithm, better one can be found in module mod_extend_math.

generate_maxwell_velocity(atom, temperature)

Generates random velocity for one atom from Maxwell distribution at given temperature

generate_maxwell_velocities(temperature)

Generates random velocity for all atoms in the geometry from Maxwell distribution at given temperature

generate_zero_velocities

Sets atom velocities to zero

Velocities manipulation

rescale_velocity(atom,factor)

rescale_velocities(factor)

Thermodynamic variables

kinetic_energy # => Float

temperature # => Float

kinetic_and_temperature # => Array [kinetic_energy, temperature]

Center of mass motion removal

reset_com # => nil

Set center of mass to zero

com_shift # => [Coordinate, Coordinate]

Returns centers of mass in this and previous step

remove_com_translation

Translational velocity of the whole system is subtracted from atomic velocities.

angular_momentum # => Coordinate

Calculates angular momentum of the system, providing its center of mass is in origin of coordinates

moment_of_inertia # => [[ixx,ixy,ixz],[ixy,iyy,iyz],[ixz,iyz,izz]]

Calculates moment of inertia of the system, providing its center of mass is in origin of coordinates

Returns array, not Matrix (for more efficiency)

angular_velocity # => Coordinate

Calculates angular ivelocity of the system, providing its center of mass is in origin of coordinates

remove_com_rotation # => nil

Removes rotational motion of the system.

Integrators

integrator_verlet

Basic Verlet algorithm updating coordinates and velocities of all atoms in the system.

Main methods

prepare

run

module Thermostat

No thermostat, plain nve

module None

thermostat_setup

integrator

thermostat(t)

Berendsen thermostat

module Berendsen

thermostat_setup

integrator

thermostat(t = temperature)

Andersen thermostat

module Andersen

thermostat_setup

integrator

thermostat(t = nil)

Nose-hoover thermostat

Formulation from Gromacs manual

module NoseHoover

thermostat_setup