Constructor for the MD method implementing Velocity Verlet dynamics.
A class that implements a distribution of initial velocities for the particles in the MD simulation.
Type: An instance of a class that defines the initial momenta - e.g. MaxwellBoltzmannDistribution.
Default:
MaxwellBoltzmannDistribution()
The time-step interval used in the MD simulation.
Type: A unit of type Time.
Default:
1.0e-15 seconds (1 femtosecond)
Perform a micro-canonical molecular dynamics run of 10 steps on a water molecule, using the Verlet Velocity MD method:
# Define elements
elements = [Oxygen, Hydrogen, Hydrogen]
# Define coordinates
cartesian_coordinates = [[ 0.0, -1.70000000e-05, 1.20198000e-01],
[ 0.0, 7.59572000e-01, -4.86714000e-01],
[ 0.0, -7.59606000e-01, -4.86721000e-01]]*Angstrom
# Set up configuration
molecule_configuration = MoleculeConfiguration(
elements=elements,
cartesian_coordinates=cartesian_coordinates
)
# Define a calculator
molecule_configuration.setCalculator(LCAOCalculator())
# Perform MD
md_configuration = MolecularDynamics(molecule_configuration,
log_filename='velocityverlet.nc',
method=VelocityVerlet(),
steps=10)
# Save the final configuration
nlsave('velocityverlet.nc', md_configuration)