Controlling Temperature

Overview

Teaching: 20 min
Exercises: 0 min
Questions
  • What is temperature on the molecular level?

  • Why do we want to control the temperature of our MD-simulations?

  • What temperature control algorithms are commonly used?

  • What are the strengths and weaknesses of these common thermostats?

Objectives
  • Remind us how Maxwell-Boltzmann distributions relate to temperature.

  • Quickly review thermodynamic ensembles.

  • Learn about different thermostats and get an idea how they work.

  • Learn where thermostats that don’t produce correct thermodynamic ensembles can still be very useful.

Temperature at the molecular level.

\[f_v(v)=\left(\frac{m}{2\pi k_B T}\right)^{3/2}\cdot4\pi v^2\cdot\exp({-mv^2/2k_B T})\]

Maxwell-Boltzmann distributions

Krypton at different temperatures   Noble gases with different mass at 298K

Plot of velocity distributions

Velocity distributions obtained from MD simulations of water at different temperature.

Plot of Maxwell-Boltzmann distributions

Thermodynamic ensembles

MD simulations are usually simulate one of the following thermodynamic ensembles:

  1. The microcanonical or constant NVE ensemble.
  2. The canonical or constant NVT ensemble.
  3. The isothermal-isobaric or constant NPT ensemble.

Temperature Control Algorithms

  1. Strong coupling methods
  2. Weak coupling methods
  3. Stochastic methods
  4. Extended system dynamics

1. Strong coupling methods

Velocity rescaling

Velocity reassignment

Downsides:

2. Weak coupling methods

Berendsen thermostat

Downsides:

Heat flows between the simulation system and the heat bath with the rate defined by a time constant \(\tau_T\)

3. Stochastic methods

Randomly assign a subset of atoms new velocities based on Maxwell-Boltzmann distributions for the target temperature. Randomization interferes with correlated motion and thus slows down the system’s kinetics.

Andersen thermostat

The Andersen thermostat:

The Lowe-Andersen thermostat

Bussi stochastic velocity rescaling thermostat

Langevin thermostat

4. Extended system thermostats

Nosé-Hoover thermostat

Drawbacks:

The time constant parameter in this thermostat controls the period of temperature fluctuations at equilibrium.

Nosé-Hoover-chains

Global and local thermostats


Challenge: Thermodynamic ensembles

What thermodynamic ensemble describes an isolated system?

  1. Canonical
  2. Grand canonical
  3. Isothermal-isobaric
  4. Microcanonical

Solution

Microcanonical


Challenge: Thermostats

Which of the following statements is incorrect?

  1. Stochastic temperature control methods impair conformational transitions
  2. The Berendsen thermostat is very useful for heating simulation systems
  3. Extended system thermostats control temperature without random velocity rescaling
  4. Local thermostats work well for small groups of atoms

Solution

Local thermostats work well for small groups of atoms

Specifying local thermostats

With NAMD it is possible to set coupling coefficients for each atom in occupancy or beta column of a pdb file:

langevinFile
langevinCol

tCoupleFile
tCoupleFCol

In GROMACS temperature of a selected groups of atoms can be controlled independently using tc-grps. Temperature coupling groups are coupled separately to temperature bath.

Selecting thermostats in molecular dynamics packages

Thermostat/MD package GROMACS NAMD AMBER
velocity rescaling   reascaleFreq (steps)  
velocity reassignment   reassignFreq (steps)  
Andersen tcoupl = andersen    
massive-Andersen tcoupl = andersen-massive   ntt = 2
Lowe-Andersen   loweAndersen on  
Berendsen tcoupl = berendsen tCouple on ntt = 1
Langevin   langevin on ntt = 3
Bussi tcoupl = V-rescale stochRescale on  
Nose-Hoover tcoupl = nose-hoover    
Nose-Hoover-chains nh-chain-length (default 10)    

Key Points

  • On the molecular level, temperature manifests itself as a number of particles having a certain average kinetic energy.

  • Some temperature control algorithms (e.g. the Berendsen thermostat) fail to produce kinetic energy distributions that represent a correct thermodynamic ensemble.

  • Other thermostats, like Nosé-Hoover, produce correct thermodynamic ensembles but can take long to converge.

  • Even though the the Berendsen thermostat fails to produce correct thermodynamic ensembles, it can be useful for system relaxation as it is robust and converges fast.