Skip to main content
Chemistry LibreTexts

The Canonical Ensemble

  • Page ID
    78459
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The most practical ensemble is the canonical ensemble with N, V, and T fixed. We can imagine a collection of boxes with equal volumes, and equal number of particles. The entire collection is kept in thermal equilibrium. Note that this is exactly the condition that we have using periodic boundary conditions and running dynamics at constant volume. The difference between a MD simulation and the theoretical concept of an N, V, T ensemble in that the MD simulation must use a trick to keep the temperature constant (to maintain thermal equilibrium). In practice, the ensemble is sampled by running the dynamics for a period of time sufficiently large that phase space is sampled. Here, phase space means all distributions of position and momenta of the particles. The methods used to maintain constant temperature will not be found in Allen & Tildesley. These have been investigated extensively.

    The Boltzmann Distribution

    We are ultimately interested in the probability that a given distribution will occur. The reason for this is that we must have this information in order to obtain useful thermodynamic averages. The method used to obtain the distribution function of the ensemble of systems is known as the method of the most probable distribution. We begin with the statistical entropy, S = k lnW.

    The weight, W (or thermodynamic probability) is the number of ways that distinguishable particles can be arranged into groups such a0 is the number in the zeroth group, a1 is the number in the first group etc. where A is the total number of systems in the ensemble.

    A = total number of systems.

    a0, a1, a2… = occupation numbers for system in each quantum state.

    The overall probability that Pj that a system is in the jth quantum state is obtained by averaging aj/A over all the allowed distributions. Thus, Pj is given by

    where the angle brackets indicate an ensemble average. Using this definition we can calculate any average property (i.e. any thermodynamic property) using the Gibbs postulate.

    The method of the most probable distribution is based on the idea that the average over á ajñ /A is identical to the most probable distribution (i.e. that the distribution is arbitrarily narrow in width). Physically, this results from the fact that we have so many particles in a typical system that the fluctuations from the mean are extremely (immeasurably) small. This point is confusing to most students. If we think only of translation motion, McQuarrie shows in Chapter 1 that the number of states increases dramatically as the energy (and quantum number increase). Although the number of states is an increasing function the kinetic energy is fixed and must be distributed in some statistical manner among all of the available molecules.

    The equivalence of the average probability of an occupation number and the most probable distribution is expressed as follows:

    To find the most probable distribution we maximize the probability function subject to two constraints.

    Conservation of energy requires:

    where ej is the energy of the jth system in its quantum state.

    Conservation of mass requires:

    which says only that the total number of the all of the systems in the ensemble must be A.

    Using S = k lnW we can reason that the system will tend towards the distribution among the aj that maximizes S. This can be expressed as S j( S/ aj) = 0.

    This condition is satisfied by

    S j(ln W/aj) = 0

    subject to constraints

    Using the method of LaGrange undetermined multipliers we have:

    We can evaluate ( lnW/ aj) = 0 using Stirling's approximation,

    ln x! » xlnx – x.

    We find ( ln A!/ aj) – S i ( ln ai!/ aj) = 0 as outlined below.

    Simplification of (lnW/aj)

    First step is to note that

    ln W = ln A! - S j ln aj! = A ln A – A - S j aj ln aj - S j aj

    Since A = S j aj these two cancel to give

    ln W = A ln A - S j aj ln aj

    The derivative is:

    Therefore we have:

    These latter derivatives result from the fact that ( ai/ ai) = 1 and ( aj/ ai)=0.

    The simple expression that results from these manipulations is:

    The most probable distribution is aj/A = ea -be j

    Now we need to find the undetermined multipliers a and b .

    The left hand side is 1. Thus, we have

    This determines a and defines the Boltzmann distribution.

    We will show that b =1/kT. This identification will show the importance of temperature in the Boltzmann distribution. The distribution represents a thermally equilibrated most probable distribution over all energy levels.

    The sum over all factors e-be is given a name. It is called the molecular partition function, q.

    The molecular partition function q gives an indication of the average number of states that are thermally accessible to a molecule at the temperature of the system.

    The ensemble partition function

    We distinguish here between the partition function of the ensemble, Q and that of an individual molecule, q. Since Q represents a sum over all states accessible to the system it can written as

    where the indices i,j,k, represent energy levels of different particles.

    Regardless of the type of particle the molecular partition function, q represents the energy levels of one individual molecule. We can rewrite the above sum as Q = qiqjqk… or Q = qN for N particles. Note that qi means a sum over states or energy levels accessible to molecule i and qj means the same for molecule j. The molecular partition function, q counts the energy levels accessible to molecule i only. Q counts not only the states of all of the molecules, but all of the possible combinations of occupations of those states. However, if the particles are not distinguishable then we will have counted N! states too many. The factor of N! is exactly how many times we can swap the indices in Q(N,V,T) and get the same value (again provided that the particles are not distinguishable).

    Example:

    If we consider 3 particles we have

    i,j,k j,i,k, k,i,j k,j,i j,k,i i,k,j or 6 = 3!

    Thus we write the partition function as

    The sum of all of the probabilities must equal 1. This is called normalization. The normalization constant of the above probability is 1/Q where

    Q is called the system partition function. The population of a particular state J with energy EJ is given by

    This expression is the Boltzmann distribution for the entire system.

    The molecular partition function

    We are concerned with the calculation of average thermodynamic properties using the partition function. For an ideal gas of non-interacting particles only the translational partition function matters. In polyatomic gases, solutions, or solids the vibrational, rotational, and electronic states also can contribute to the molecular partition function.

    Molecular energy levels are

    e = e a trans + e b vib + e c rot + e d elec

    where the indices a, b, c, d run over the levels of one particular molecule. We can write the molecular partition function as

    We will treat the individual contributions to the molecular partition function as needed. For a monatomic gas only qtrans contributes so we will consider the molecular partition function due to translation motion. We will consider the remaining molecular energy levels in subsequent lectures.

    The translational partition function

    Translational energy levels are so closely spaced as that they are essentially a continuous distribution. The quantum mechanical description of the energy levels is obtained from the quantum mechanical particle in a box.

    The energy levels are

    The box is a cube of length a, m is the mass of the molecule, h is Plank's constant, and nx, ny, nz are quantum numbers. The average quantum numbers will be very large for a typical molecule. This is very different than what we find for vibration and electronic levels where the quantum numbers are small (i.e. only one or a few levels are populated). Many translational levels are populated thermally.

    The translational partition function is

    The three summations are identical and so they can be written as the cube of one summation.

    The fact that the energy levels are essentially continuous and that the average quantum number is very large allows us to rewrite the sum as an integral.

    The sum started at 1 and the integral at 0. This difference is not important if the average value of n is ca. 109! If we have the substitution a = h2/8ma2kT we can rewrite the integral as

    This is a Gaussian integral. The solution of Gaussian integrals is discussed in the review section of the Website. If we now plug in for a and recognize that the volume of the box is V = a3 we have

    This is the molecular partition function. The system partition function for N indistinguishable gas molecules is Q = qN/N! The system partition function is

    where L is the thermal wavelength,

    We will use this partition function to calculate average thermodynamic quantities for a monatomic ideal gas.


    The Canonical Ensemble is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?