# Thermostats

##### Table of contents
1. 1. General Information
2. 2. What Not To Do
3. 3. What To Do

Version as of 14:32, 30 Nov 2021

to this version.

Return to Version archive.

View current version

See GROMACS Manual, Chapter 3, for details on how temperature coupling is applied and the types currently available.

## General Information

Thermostats are designed to help a simulation sample from the correct ensemble (i.e. NVT or NPT) by modulating the temperature of the system in some fashion. First, we need to establish what we mean by temperature. In simulations, the "instantaneous (kinetic) temperature" is usually computed from the kinetic energy of the system using the equipartition theorem. In other words, the temperature is computed from the system's total kinetic energy.

So, what's the goal of a thermostat? Actually, it turns out the goal is not to keep the temperature constant, as that would mean fixing the total kinetic energy, which would be silly and not the aim of NVT or NPT. Rather, it's to ensure that the average temperature of a system be correct.

To see why this is the case, imagine a glass of water sitting in a room. Suppose you can look very closely at a few molecules in some small region of the glass, and measure their kinetic energies. You would not expect the kinetic energy of this small number of particles to remain precisely constant; rather, you'd expect fluctuations in the kinetic energy due to the small number of particles. As you average over larger and larger numbers of particles, the fluctuations in the average get smaller and smaller, so finally by the time you look at the whole glass, you say it has "constant temperature".

Molecular dynamics simulations are often fairly small compared to a glass of water, so we have bigger fluctuations. So it's really more appropriate here to think of the role of a thermostat as ensuring that we have (a) the correct average temperature, and (b) fluctuations of the correct size.

## What Not To Do

Some hints on practices that generally not a good idea to use:

• Do not use separate thermostats for different components of your system. Some molecular dynamics thermostats only work well in the thermodynamic limit. If you use one thermostat for, say, a small molecule, another for protein, and another for water, you are likely introducing errors and artifacts that are hard to predict. In particular, do not couple ions in aqueous solvent in a separate group from that solvent. For a protein simulation, using `tc_grps = Protein Non-Protein` is usually best.
• Do not use thermostats that work well only in the limit of a large number of degrees of freedom for systems with few degrees of freedom (for example, do not use Nose-Hoover or Berendsen thermostats for types of free energy calculations where you will have a component of the system with very few degrees of freedom in an end state (i.e. a noninteracting small molecule))

## What To Do

Some hints on practices that generally are a good idea:

• Preferably, use a thermostat which samples the correct distribution of temperatures (for example, Langevin dynamics as a thermostat, or the Andersen thermostat, which is not currently implemented), in addition to giving you the correct average temperature.
• At least: use a thermostat that gives you the correct average temperature, and apply it to the whole system (not just components of the system).
Page last modified 14:07, 8 Oct 2009 by JLemkul?