Ensembles
Consider a system in equilibrium containing N particles, where N is in the order of 1023. We could now try to measure a thermodynamic variable of the system by inserting an instrument into the system and reading its display. Such a measurement is called an observation and the measured thermodynamic variable an observable. Since the system is in equilibrium we expect to find the same value of the observable every time we make an observation, or, when we are observing constantly, we expect the display not to change indicating that the observable is constant and, hence, the system is in equilibrium. However, if we take a close look at our observation, we see that the observable is not constant at all, it varies, apparently random, around the expected equilibrium value of the observable, see the figure below.
![]() |
In this figure we have the system is shown on the left, with an instrument connected to it, to measure the observable, which time recording is shown on the right. The dotted line corresponds to the time average.
To get to the equilibrium value of the observable, we have to take the time average of our observable. One could argue that these fluctuations are caused by noise arising from the instrument, but even with the most precise instrument we still observe these fluctuations. This seems to be in contradiction with the laws of thermodynamic, which simply state that in equilibrium the thermodynamic function remains constant. When we derived the laws of thermodynamics we did not specify that we were dealing with matter, which consists of independent particles. Hence, as a result, thermodynamics does not know anything about matter. However, we know that matter exists, and, from classical mechanics, we can write down the equations of motion of the independent particles.
The thermodynamic quantity of energy is related to the coordinates and momenta of the independent particles through the Hamiltonian. The same yields, in one way or the other, for every thermodynamic variable. We can therefore write the observable O as a function of the coordinates and momenta O=O(qN, pN). However, when time moves on the coordinates and momenta of the particles change. However, this
new distribution still resembles the original specific energy. Therefore the coordinates and momenta are a function of time, and, as a consequence, the observable O depends on the time implicitly. We could write this in the following form
![]() | (1) |
If we were to plot the trajectory of the system in phase space, we would see that it remains constantly on the same hypersurface, which is a consequence of our definition of the Hamiltonian.
We could choose the fix any of the macroscopic thermodynamic variables, which would lead to a new hypersurface on which the trajectory must remain. Such a collection of possibly accessible states is called an ensemble.
Three common types of ensembles to distinguish in statistical are the microcanonical ensemble (constant energy, volume and number of particles), the canonical ensemble (constant temperature, volume and number of particles), and the isothermal-isobaric ensemble (constant temperature, pressure and number of particles). In the figure below a thermodynamic equivalent of each of this ensembles is shown schematically.
![]() | ![]() | ![]() | ||
| Microcanonical ensemble | Canonical ensemble | Isothermal-isobaric ensemble |
When starting a calculation on a system it is not known in advance what type of ensemble one is dealing with. As a matter of fact, it actually is not important to know which ensemble the system is, since they can easily be transformed to each other like we did for the thermodynamic potentials through a Legendre transformation. In general one chooses the ensemble which suits the problem best, or which makes the mathematics as easy as possible.
Ergodicity
So far we have tried to obtain an expression to calculate the observed fluctuations of specific thermodynamic variables, using classical mechanics. The equations that have to be solved, turned out to be highly dimensional (in general of the order 1023), and are, therefore, almost impossible to solve. In order to be able to perform calculations on the systems under investigation, we have to make an assumption: we are going to assume that our systems are ergodic.
A basic concept in statistical physics is that when we are observing a system moving through ‘state’ space (either the phase or the Hilbert space), the system will, if we wait long enough, eventually flow through all the microscopic states that are consistent with the constraints we have imposed to control the system. While the system is flowing through all microscopic states in state space, we perform M independent measurements, and, therfore, the observable is given by
![]() | (2) |
where Oi is the value for the observable at the ith measurement. Furthermore it is assumed that during a measurement of the observable, the system can be considered to be in only one microscopic state. Therefore, we can partition the sum of (2) as
![]() | (3) |
where Oν = <ν|O|ν> is the quantal expectation value of O when the system is in state ν. It is easily seen that the term in the square brackets is the probability for finding the system during the measurements in state ν. This probability of finding the system in state ν is denoted by Pν and thus we can write
![]() | (4) |
where the pointed brackets indicate the weighted summation, or averaging, over O, and is consequently called the ensemble average. This idea of ensemble averaging arises from the view in which the measurements are performed over a long time, and that due to the flow of the system through state space, the time average is the same as the ensemble average, which can be denoted by
![]() | (5) |
Systems that obey this equivalence are said to be ergodic, and this equation is therefore known as the theorem of ergodicity. [1]
Although the equivalence of time and ensemble averaging sounds reasonable, it is not at all trivial. In fact it is very hard to prove, and there are many examples of non-ergodic systems. However, we believe that it holds for all many particle systems encountered in nature. This is justified by the fact that a many particle system never really settles into the systems equilibrium due to perturbations of some kind (for example the walls of the container).
Microcanonical ensemble
By employing the theorem of ergodicity to our systems we moved the problem from solving high dimensional differential equations (classical mechanics) or eigen value problems (quantum mechanics) to formulating the probability to find a system in a specific microscopic state. We illustrate this by taking the microcanonical ensemble, where the total energy E is fixed, and both the volume V and the number of particles N do not change. Thermodynamically a microcanonical ensemble describes an isolated system, which ensures us that the total energy in the system does not fluctuate. Thus, the system can access only those of its microscopic states that correspond to a given value E of the energy. The total number of microscopic states corresponding to this value of the system’s energy is called the degeneracy of the system, and is
denoted by Ω=Ω(E,N,V).
In order to be able to proceed, we have to make another assumption (the second and last one, the theorem of ergodicity being the first). This assumption is often referred to as the statistical postulate (also known as the equal a priori probability postulate) and is expressed as
| Given an isolated system in equilibrium, it is found with equal probability in each of its accessible microscopic states. |
This postulate is the fundamental assumption in statistical physics, since it states that a system does not have any preference for any of its available microscopic states. Thus, given Ω microscopic states corresponding to a particular energy level Eν, the probability Pν of finding the system in a microscopic state ν is given by
![]() | (6) |
This definition obeys the important requirement that the sum of the probabilities should equal
![]() | (7) |
The importance of this postulate is obvious, since it allows us to conclude that for a system at equilibrium the thermodynamic state (macroscopic state) which could result from the largest number of microscopic states is also the most probable macroscopic state of the system. Therefore, the statistical postulate that at fixed N, V and E all microscopic states are equally likely provides a molecular foundation for the theory of thermodynamics. The thermodynamic potential (state function) of the microcanonical ensemble is the internal energy E. [1]
Canonical ensemble
When we applied the microcanonical ensemble in the previous section, the thermodynamic variables that characterize the macroscopic state of the system were E, N, and V. However, it is often convenient to use a different set of variables, which we know are found by applying a Legendre transformation. In statistical physics we can obtain this manipulation by a change in ensemble. Therefore we are now going to consider the canonical ensemble, which differs from the microcanonical ensemble because the energy can fluctuate, but the system is kept in equilibrium by being in contact with a heat bath at temperature T. Consequently, the thermodynamic potential of this ensemble is the Helmholtz free energy.
A convenient way to look at the canonical ensemble is to define it as a subsystem of a microcanonical ensemble. Thus, we can look at the microcanonical ensemble as being the heat bath. This observation allows us to derive the distribution laws for states in the canonical ensemble, using the mathematics we derived previously for the microcanonical ensemble.
In a simulation the kinetic energy, and hence its expected value can be calculated easily, since it is simple the sum of the contributions of each momenta to the kinetic energy. Therefore, we can write a direct relation between momenta and temperature
![]() | (8) |
In a simulation all initial velocities are chosen randomly from a Gaussian distribution, thereby conserving the linear momentum. However, these velocities need not resemble the desired starting temperature T0 of the simulation. Through (8) we can calculate the current temperature T of the initial system. We can subsequently determine the square root of the quotient T0/T, which we can use to scale
the momenta (or velocities) to yield the desired starting temperature.
Although we have derived a way to start with the desired temperature, we now need to establish a method to keep the temperature constant in an ensemble which requests so. There are many techniques to maintain the temperature, but since PumMa only uses on, we discuss only the Berendsen loose coupling technique. [2]
The key issue in the Berendsen loose coupling technique is that we couple our system to an external heat bath with constant temperature, and that the temperature of the system is maintained by exchanging heat with the external bath. Due to the fact that heat is exchanged the velocities of the particles change. This change can be accomplished in the same way as with generating the initial velocity distribution to yield the correct starting temperature. However, such an instantaneously adjustment of the temperature to its target value would influence the system too much. Therefore we proportionally scale the velocities at every time step from v to λv, where
![]() | (9) |
where T0 is the desired temperature and λc is the proportional constant, which has a value between 0 and 1. It is clear that when λc=1 we return to the instantaneously adjustment scheme of the temperature. On the other hand, when λc=0, there is no scaling at all, and we are not longer working in an ensemble with constant temperature. One major advantage of this technique is that the Maxwellian shape of the velocity distribution is maintained, since we are only multiplying with constants.
Isothermal-isobaric ensemble
Until now we have only discussed two, the microcanonical and the canonical, ensembles out of the three mentioned. In the introduction on ensemble theory we talked about one other ensemble: the isothermal-isobaric ensemble. In a similar way we disussed the microcanonical and canonical ensembles above, we can discuss this remaining ensemble. This gives us the Gibbs free energy as the thermodynamic potential.
In the isothermal-isobaric ensemble both the temperature and pressure are to be kept constant. The system is allowed to exchange energy with a heat bath of temperature T and the volume can also change since its mean value is tuned by the pressure P applied on the system. This external pressure is applied to the system through the Berensen pressure coupling scheme.[2]
Instead of an external heat bath, we now define an external pressure bath, which rescales the positions of the particles rather than their velocities. It can be shown that we can write for the instantaneous pressure
![]() | (10) |
Similar to the rescaling of the velocities with the temperature coupling we can now rescale the positions at every time step from r to μr and also the box length L (assuming an isotropic system in a cubic box) from L to μL, where
![]() | (11) |
where P0 is the desired pressure, P is given by (10) and μc is the proportional constant, which has, again, a value between 0 and 1. This equation only holds for an isotropic system, but can easily been expanded for an anisotropic system as well. To keep the system in the isothermal-isobaric ensemble the proportional constant μc must be nonzero. On the other hand, when we want to keep the system in the canonical ensemble μc must be zero. In that case there is no position rescaling and, therefore, the volume does not change.
[1] D. Chandler, Introduction to Modern Statistical Mechanics, Oxford University Press, New York, USA (1987).
[2] H.J.C. Berendsen, J.P.M. Postma, W.F. van Gunsteren, A. DiNola and J. R. Haak, Molecular dynamics with coupling to an external bath, J. Chem. Phys., 81, 3684–3690 (1984).
<< Potentials | Theory | Numerical approaches >>















