See also the Molecular Dynamics example applications.
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)
the universe on which the integrator acts
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
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)
the temperature value to which the velocities should be scaled
the deviation from the ideal temperature that is tolerated in either direction before rescaling takes place
the number of the first step at which the action is executed
the number of the last step at which the action is executed. A value of None indicates that the action should be executed indefinitely.
the number of steps to skip between two applications of the 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)
the temperature value to which the velocities should be scaled initially
the final temperature value to which the velocities should be scaled
the temperature gradient (in K/ps)
the number of the first step at which the action is executed
the number of the last step at which the action is executed. A value of None indicates that the action should be executed indefinitely.
the number of steps to skip between two applications of the 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)
the number of the first step at which the action is executed
the number of the last step at which the action is executed. A value of None indicates that the action should be executed indefinitely.
the number of steps to skip between two applications of the action
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)
the number of the first step at which the action is executed
the number of the last step at which the action is executed. A value of None indicates that the action should be executed indefinitely.
the number of steps to skip between two applications of the action
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)
the number of the first step at which the action is executed
the number of the last step at which the action is executed. A value of None indicates that the action should be executed indefinitely.
the number of steps to skip between two applications of the action