Function for performing a molecular dynamics simulation. Returns: The MDTrajectory object.
Type: A BulkConfiguration, MoleculeConfiguration, or DeviceConfiguration.
Default:
None
The indices of the atom with fixed positions.
Type: A list of integers.
Default:
[]
The filename of the file to be used for storing the trajectory.
Type: A string.
Default:
None
The number of time-steps to undertake in simulation.
Type: An integer.
Default:
50
The resolution used in saving steps to a trajectory file, where a value of 1 results in all steps being saved, and e.g. a value of 2 resulting in every other step being discarded.
Type: An integer.
Default:
1
The molecular dynamics method used for the simulation.
Type: An instance of either a VelocityVerlet or NVTBerendsen object.
Default:
VelocityVerlet
The name of the file to be used for storing the xyz trajectory.
Type: A string.
Default:
None
Perform a molecular dynamics run of 10 steps on a water molecule, using the default settings:
# 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='md_h2o.nc',
steps=10)
# Save the final configuration
nlsave('md_h2o.nc', md_configuration)