# NVTNoseHoover¶

class NVTNoseHoover(initial_velocity=None, time_step=None, reservoir_temperature=None, heating_rate=None, thermostat_timescale=None, chain_length=None)

The NVT Nose-Hoover integrator class.

Parameters: initial_velocity (ConfigurationVelocities | ZeroVelocities | MaxwellBoltzmannDistribution) – A class that implements a distribution of initial velocities for the particles in the MD simulation. Default: ZeroVelocities time_step (PhysicalQuantity of type time) – The time-step interval used in the MD simulation. Default: 1.0 * fs reservoir_temperature (PhysicalQuantity of type temperature | list) – The reservoir temperature in the simulation. The temperature can be given as a single temperature value for the entire system, or as a list of 2-tuples of str and PhysicalQuantity of type temperature, applying local thermostats to the tagged groups of atoms. E.g. [('group1', 280.0 * Kelvin), ('group2', 320.0 * Kelvin)]. Default: 300.0 * Kelvin heating_rate (PhysicalQuantity of type temperature/time | None) – The heating rate of the target temperature. A value of None disables the heating of the system. Default: 0.0 * Kelvin / fs thermostat_timescale (PhysicalQuantity of type time) – The time constant for Berendsen temperature coupling. Default: 100.0 * fs chain_length (int) – The number of subsequent Nose-Hoover thermostats. Zero means no thermostat is invoked. Default: 3
kineticEnergy(configuration)
Parameters: configuration (DistributedConfiguration) – The current configuration to calculate the kinetic energy of. The kinetic energy of the current configuration. PhysicalQuantity of type energy
thermostats()
Returns: The list of thermostats. list
timeStep()
Returns: The time step. PhysicalQuantity of type time

## Usage Example¶

Perform a molecular dynamics run of 50 steps on FCC Si, using the Nose-Hoover thermostat:

# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
elements=[Silicon, Silicon],
fractional_coordinates=[[0.0, 0.0, 0.0], [0.25, 0.25, 0.25]]
)

# Set calculator
calculator = TremoloXCalculator(parameters=Tersoff_Si_1988b())
bulk_configuration.setCalculator(calculator)

# Set up MD method
method = NVTNoseHoover(
time_step=1*femtoSecond,
reservoir_temperature=300*Kelvin,
thermostat_timescale=100*femtoSecond,
heating_rate=0*Kelvin/picoSecond,
chain_length=3,
initial_velocity=None
)

# Run MD simulation
md_trajectory = MolecularDynamics(
bulk_configuration,
constraints=[],
trajectory_filename='trajectory.nc',
steps=50,
log_interval=10,
method=method
)


nvtnosehoover.py

Apply two thermostats to tagged groups of atoms of the configuration:

# Set up MD method with two thermostats on tagged groups of atoms.
method = NVTNoseHoover(
time_step=1*femtoSecond,
reservoir_temperature=[('region1', 300*Kelvin), ('region2', 600.0*Kelvin)],
thermostat_timescale=100*femtoSecond,
heating_rate=0*Kelvin/picoSecond,
chain_length=3,
initial_velocity=None
)


nvtnosehoover2.py

## Notes¶

• The Nose-Hoover-thermostat uses several subsequent thermostats to reproduce a canonical ensemble. For more details regarding the Nose-Hoover chain method, please consult Martyna et al. [MKT92].
• You can specify one or more thermostats acting on tagged sub-groups of atoms of the configuration, by giving a list of (tag-name, temperature)-tuples in stead of a single, global reservoir_temperature value.
• If a non-zero heating_rate is specified, the reservoir temperature will be changed linearly during the simulation, according to the specified heating rate.

 [MKT92] G. J. Martyna, M. L. Klein, and M. Tuckerman. Nosé–hoover chains: The canonical ensemble via continuous dynamics. J. Chem. Phys., 97(4):2635–2643, 1992. doi:10.1063/1.463940.