# softmatter:Andersen Thermostat

The Andersen thermostat is a stochastic collision method. The velocity of a particle at randomly chosen from a Maxwell-Boltzmann distribution at the desired T is replaced.

$p(v_{ix}) = \left(\frac{m}{2\pi k_BT}\right )^{1/2}exp\left(-\frac{1}{2k_BT}mv_{ix}^2\right )$

The replacement represents a stochastic collision with the heat bath. This is equivalent to the system being in contact with a heat bath that randomly emits thermal particles that collide with the particles in the system and change their velocity. Between each collision, the system is simulated a constant energy. Thus, the overall effect is equivalent to a series of microcanonical simulations, each performed at a slightly different energy. * The distribution of energies of these "mini-microcanonical" simulations should be a Gaussian function.

• Anderson showed that, to achieve this, the mean rate v at which each particle should suffer a stochastic collisions is:

$v = \frac{2a\kappa}{3k_Bn^{1/3}N^{2/3}}$

where a is a dimensionless constant, κ is the thermal conductivity, n is the number density of the particles, N is the total number of particles. If κ isn't known, then we can find v from the intermolcular collision frequency vc:

$v = \frac{v_c}{N^2/3}$

• If the collision frequency v is too low, then the system will not sample from a softmatter:canonical canonical ensemble of energies.
• If v is too large, then the temperature controller dominates and the fluctuations in the kinetic energy aren't physical.
• If v is just right, the stochastic collisions turn the Molecular dynamics simulation into a Markov process and generate a canonical ensemble. That is, the states of energy, E, will be generated according to the Boltzmann distribution.
• More than one particle's velocity may be changed at a time.
• This method is appropriate for statics and thermodynamics, since it generates the right ensemble.
• But the Anderseon thermostat randomly decorrelates velocities and makes the dynamics aphysical.