# Module MMTK.Dynamics

See also the Molecular Dynamics example applications.

## Class VelocityVerletIntegrator: Velocity-Verlet molecular dynamics integrator

The integrator can handle fixed atoms, distance constraints, a thermostat, and a barostat, as well as any combination. It is fully thread-safe.

Constructor: VelocityVerletIntegrator(universe, **options)

universe

  the universe on which the integrator acts

options

  keyword options:

  - steps: the number of integration steps (default is 100)

  - delta_t: the time step (default is 1 fs)

  - actions: a list of actions to be executed periodically (default is none)

  - threads: the number of threads to use in energy evaluation (default set by MMTK_ENERGY_THREADS)

  - background: if true, the integration is executed as a separate thread (default: 0)

  - mpi_communicator: an MPI communicator object, or None, meaning no parallelization (default: None)

The integration is started by calling the integrator object. All the keyword options listed above can be specified either when creating the integrator or when calling it.

The following data categories and variables are available for output:

- category "time": time

- category "configuration": configuration and box size (for periodic universes)

- category "velocities": atomic velocities

- category "gradients": energy gradients for each atom

- category "energy": potential and kinetic energy, plus extended-system energy terms if a thermostat and/or barostat are used

- category "thermodynamic": temperature, volume (if a barostat is used) and pressure

- category "auxiliary": extended-system coordinates if a thermostat and/or barostat are used

## Class VelocityScaler: Periodic velocity scaling action

A VelocityScaler object is used in the action list of a VelocityVerletIntegrator. It rescales all atomic velocities by a common factor to make the temperature of the system equal to a predefined value.

Constructor: VelocityScaler(temperature, temperature_window=0., first=0, last=None, skip=1)

temperature

  the temperature value to which the velocities should be scaled

temperature_window

  the deviation from the ideal temperature that is tolerated in either direction before rescaling takes place

first

  the number of the first step at which the action is executed

last

  the number of the last step at which the action is executed. A value of `None` indicates that the action should be executed indefinitely.

skip

  the number of steps to skip between two applications of the action

## Class Heater: Periodic heating action

A Heater object us used in the action list of a VelocityVerletIntegrator. It scales the velocities to a temperature that increases with time.

Constructor: Heater(temperature1, temperature2, gradient, first=0, last=None, skip=1)

temperature1

  the temperature value to which the velocities should be scaled initially

temperature2

  the final temperature value to which the velocities should be scaled

gradient

  the temperature gradient (in K/ps)

first

  the number of the first step at which the action is executed

last

  the number of the last step at which the action is executed. A value of `None` indicates that the action should be executed indefinitely.

skip

  the number of steps to skip between two applications of the action

## Class BarostatReset: Barostat reset action

A BarostatReset object is used in the action list of a VelocityVerletIntegrator. It resets the barostat coordinate to zero.

Constructor: BarostatReset(first=0, last=None, skip=1)

first

  the number of the first step at which the action is executed

last

  the number of the last step at which the action is executed. A value of `None` indicates that the action should be executed indefinitely.

skip

  the number of steps to skip between two applications of the action

## Class TranslationRemover: Action that eliminates global translation

A TranslationRemover object is used in the action list of a VelocityVerletIntegrator. It subtracts the total velocity from the system from each atomic velocity.

Constructor: TranslationRemover(first=0, last=None, skip=1)

first

  the number of the first step at which the action is executed

last

  the number of the last step at which the action is executed. A value of `None` indicates that the action should be executed indefinitely.

skip

  the number of steps to skip between two applications of the action

## Class RotationRemover: Action that eliminates global rotation

A RotationRemover object is used in the action list of a VelocityVerletIntegrator. It adjusts the atomic velocities such that the total angular momentum is zero.

Constructor: RotationRemover(first=0, last=None, skip=1)

first

  the number of the first step at which the action is executed

last

  the number of the last step at which the action is executed. A value of `None` indicates that the action should be executed indefinitely.

skip

  the number of steps to skip between two applications of the action