Constructor for the molecular dynamics method implementing Berendsen NVT 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)
The reservoir temperature in the simulation.
Type: A physical quantity of temperature type - e.g. Units.Kelvin
Default:
300 * Units.Kelvin
The time constant for Berendsen temperature coupling.
Type: A unit of type time.
Default:
500.0e-15 seconds (500 femtoseconds)
Perform a canonical molecular dynamics run of 10 steps on a water molecule, using the NVT Berendsen 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='nvtberendsen.nc',
method=NVTBerendsen(),
steps=10)
# Save the final configuration
nlsave('nvtberendsen.nc', md_configuration)