Thermostats

We mentioned in the previous section that, for a sufficiently large system, averages computed in the microcanonical ensemble ($N,V,E$), are not much different from those computed in the canonical ensemble ($N,V,T$). However, it may be desirable to be able to generate MD trajectories that span the canonical ensemble, for example because one may want to control the temperature exactly. Moreover, we mentioned that some system may not be ergodic, with the harmonic system being an egregious example. This means that given an initial set of positions and momenta $(\{{\bf r}^0\},\{{\bf p}^0\})$, solving the Newton's equation of motion generates a trajectory that does not visit every neighbourhood of configurational space. In such a situation time averages are biased, and do not provide good approximations for ensemble averages.

One way to overcome this problem is to couple the simulated system with an external heat bath, provided that all degrees of freedom are interacting with the bath. Several techniques have been developed, but not all of them are capable of overcoming the ergodicity problem. One that does is the thermostat developed by Andersen 7.4, which is based on the concept of stochastic collisions. We know that in a perfect gas at some temperature $T$ the velocities are distributed according to the Maxwell distribution [*], therefore, one way to generate the canonical ensemble is to perform a MD simulation by repeatedly drawing velocities from a Maxwell distribution. This periodic velocity re-initialisation procedure also redistributes energy between different modes, and so it is an effective way to overcome the ergodicity problem. It can be shown that the frequency of these velocity re-initialisations does not affect the ability to sample the canonical ensemble, however, drawing the velocities too often will result in the system moving very slowly from one region of configuration space to another, and drawing them too seldom results in slow transfer of energy between different modes, which would only overcome the ergodicity problem slowly. Finding the appropriate time interval between velocities randomisations is then a matter of finding the right compromise to maximise efficiency.