calculation of $g(r)$
Radial distribution function for the Lennard-Jones model fluid at $\scriptstyle T^* = 0.71, \; n^* = 0.844$.

In statistical mechanics, the radial distribution function, (or pair correlation function) $g(r)$ in a system of particles (atoms, molecules, colloids, etc.), describes how density varies as a function of distance from a reference particle.

If a given particle is taken to be at the origin O, and if $\rho =N/V$ is the average number density of particles, then the local time-averaged density at a distance $r$ from O is $\rho g(r)$. This simplified definition holds for a homogeneous and isotropic system. A more general case will be considered below.

In simplest terms it is a measure of the probability of finding a particle at a distance of $r$ away from a given reference particle, relative to that for an ideal gas. The general algorithm involves determining how many particles are within a distance of r and r+dr away from a particle. This general theme is depicted to the right, where the red particle is our reference particle, and blue particles are those which are within the circular shell, dotted in orange.

The RDF is usually determined by calculating the distance between all particle pairs and binning them into a histogram. The histogram is then normalized with respect to an ideal gas, where particle histograms are completely uncorrelated. For three dimensions, this normalization is the number density of the system multiplied by the volume of the spherical shell, which mathematically can be expressed as $g(r)_I = 4\pi r^2\rho dr$, where $\rho$ is the number density.

Given a potential energy function, the radial distribution function can be computed either via computer simulation methods like the Monte Carlo method, or via the Ornstein-Zernike equation, using approximative closure relations like the Percus-Yevick approximation or the Hypernetted Chain Theory. It can also be determined experimentally, by radiation scattering techniques or by direct visualization for large enough (micron-sized) particles via traditional or confocal microscopy.

The radial distribution function is of fundamental importance in thermodynamics because the macroscopic thermodynamic quantities can usually be determined from $g(r)$.

## Definition

Consider a system of $N$ particles in a volume $V$ (for an average number density $\rho =N/V$) and at a temperature $T$ (let us also define $\textstyle \beta = \frac{1}{kT}$). The particle coordinates are $\mathbf{r}_{i}$, with $\textstyle i = 1, \, \ldots, \, N$. The potential energy due to the interaction between particles is $\textstyle U_{N} (\mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{N})$ and we do not consider the case of an externally applied field.

The appropriate averages are taken in the canonical ensemble $(N,V,T)$, with $\textstyle Z_{N} = \int \cdots \int \mathrm{e}^{-\beta U_{N}} \mathrm{d} \mathbf{r}_1 \cdots \mathrm{d} \mathbf{r}_N$ the configurational integral, taken over all possible combinations of particle positions. The probability of an elementary configuration, namely finding particle 1 in $\textstyle \mathrm{d} \mathbf{r}_1$, particle 2 in $\textstyle \mathrm{d} \mathbf{r}_2$, etc. is given by

$P^{(N)}(\mathbf{r}_1,\ldots,\mathbf{r}_N ) \, \mathrm{d} \mathbf{r}_1 \cdots \mathrm{d} \mathbf{r}_N = \frac{\mathrm{e}^{-\beta U_{N}}}{Z_N} \, \mathrm{d} \mathbf{r}_1 \cdots \mathrm{d} \mathbf{r}_N\,$.

(1)

The total number of particles is huge, so that $P^{(N)}$ in itself is not very useful. However, one can also obtain the probability of a reduced configuration, where the positions of only $n < N$ particles are fixed, in $\textstyle \mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{n}$, with no constraints on the remaining $N-n$ particles. To this end, one has to integrate (1) over the remaining coordinates $\mathbf{r}_{n+1}\, \ldots, \, \mathbf{r}_{N}$:

$P^{(n)}(\mathbf{r}_1,\ldots,\mathbf{r}_n) =\frac{1}{Z_N} \int \cdots \int \mathrm{e}^{-\beta U_N} \, \mathrm{d} \mathbf{r}_{n+1} \cdots \mathrm{d} \mathbf{r}_N \,$.

The particles being identical, it is more relevant to consider the probability that any $n$ of them occupy positions $\textstyle \mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{n}$ in any permutation, thus defining the $n$-particle density

$\rho^{(n)}(\mathbf{r}_1,\ldots,\mathbf{r}_n) =\frac{N!}{(N-n)!} P^{(n)} (\mathbf{r}_1,\ldots,\mathbf{r}_n) \,$.

(2)

For $n=1$, (2) gives the one-particle density which, for a crystal, is a periodic function with sharp maxima at the lattice sites. For a (homogeneous) liquid, it is independent of the position $\textstyle \mathbf{r}_1$ and equal to the overall density of the system:

$\frac{1}{V} \int \rho^{(1)}(\mathbf{r}_1) \, \mathrm{d} \mathbf{r}_1 = \rho^{(1)} = \frac{N}{V} = \rho \,$

It is now time to introduce a correlation function $g^{(n)}$ by

$\rho^{(n)}(\mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{n}) = \rho^{n}g^{(n)}(\mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{n}) \,$.

(3)

$g^{(n)}$ is called a correlation function, since if the atoms are independent from each other $\rho^{(n)}$ would simply equal $\rho^{n}$ and therefore $g^{(n)}$ corrects for the correlation between atoms.

From (3) and (2) it follows that

$g^{(n)}(\mathbf{r}_{1}\, \ldots, \, \mathbf{r}_{n}) = \frac{V^{n}N!}{N^{n}(N-n)!} \cdot \frac{1}{Z_N} \, \int \cdots \int \mathrm{e}^{-\beta U_N} \, \mathrm{d} \mathbf{r}_{n+1} \cdots \mathrm{d} \mathbf{r}_N \,$.

(4)

## Relations involving $g(r)$

### The structure factor

The second-order correlation function $g^{(2)}(\mathbf{r}_{1},\mathbf{r}_{2})$ is of special importance, as it is directly related (via a Fourier transform) to the structure factor of the system and can thus be determined experimentally using X-ray diffraction or neutron diffraction.[1]

If the system consists of spherically symmetric particles, $g^{(2)}(\mathbf{r}_{1},\mathbf{r}_{2})$ depends only on the relative distance between them, $\mathbf{r}_{12} = \mathbf{r}_{2} - \mathbf{r}_{1}$. We will drop the sub- and superscript: $\textstyle g(\mathbf{r})\equiv g^{(2)}(\mathbf{r}_{12})$. Taking particle 0 as fixed at the origin of the coordinates, $\textstyle \rho g(\mathbf{r}) \mathrm{d}\rm{r} = \mathrm{d} n (\mathbf{r})$ is the number of particles (among the remaining $N-1$) to be found in the volume $\textstyle \mathrm{d}\mathbf{r}$ around the position $\textstyle \mathbf{r}$.

We can formally count these particles as $\textstyle \mathrm{d} n (\mathbf{r}) = \langle \sum_{i \neq 0} \delta ( \mathbf{r} - \mathbf{r}_i) \rangle \mathrm{d} \mathbf{r}$, with $\textstyle \langle \cdot \rangle$ the ensemble average, yielding:

$g(\mathbf{r}) = \frac{1}{\rho} \langle \sum_{i \neq 0} \delta ( \mathbf{r} - \mathbf{r}_i) \rangle = V \frac{N-1}{N} \left \langle \delta ( \mathbf{r} - \mathbf{r}_1) \right \rangle$

(5)

where the second equality requires the equivalence of particles $\textstyle 1, \, \ldots, \, N-1$. The formula above is useful for relating $g(\mathbf{r})$ to the static structure factor $S(\mathbf{q})$, defined by $\textstyle S(\mathbf{q}) = 1/N \langle \sum_{ij} \mathrm{e}^{-i \mathbf{q} (\mathbf{r}_i - \mathbf{r}_j)} \rangle$, since we have:

$S(\mathbf{q}) = 1 + \frac{1}{N} \langle \sum_{i \neq j} \mathrm{e}^{-i \mathbf{q} (\mathbf{r}_i - \mathbf{r}_j)} \rangle = 1 + \frac{1}{N} \left \langle \int_V \mathrm{d} \mathbf{r} \, \mathrm{e}^{-i \mathbf{q} \mathbf{r}} \sum_{i \neq j} \delta \left [ \mathbf{r} - (\mathbf{r}_i - \mathbf{r}_j) \right ] \right \rangle = 1+ \frac{N(N-1)}{N} \int_V \mathrm{d} \mathbf{r}\, \mathrm{e}^{-i \mathbf{q} \mathbf{r}} \left \langle \delta ( \mathbf{r} - \mathbf{r}_1 ) \right \rangle$, and thus:

$S(\mathbf{q}) = 1 + \rho \int_V \mathrm{d} \mathbf{r} \, \mathrm{e}^{-i \mathbf{q} \mathbf{r}} g(\mathbf{r})$, proving the Fourier relation alluded to above.

This equation is only valid in the sense of distributions, since $g(\mathbf{r})$ is not normalized: $\textstyle \lim_{r \rightarrow \infty} g(\mathbf{r}) = 1$, so that $\textstyle \int_V \mathrm{d} \mathbf{r} g(\mathbf{r})$ diverges as the volume $V$, leading to a Dirac peak at the origin for the structure factor. Since this contribution is inaccessible experimentally we can subtract it from the equation above and redefine the structure factor as a regular function:

$S'(\mathbf{q}) = S(\mathbf{q}) - \rho \delta (\mathbf{q})= 1 + \rho \int_V \mathrm{d} \mathbf{r} \, \mathrm{e}^{-i \mathbf{q}\mathbf{r}} [g(\mathbf{r}) - 1]$.

Finally, we rename $S(\mathbf{q}) \equiv S'(\mathbf{q})$ and, if the system is a liquid, we can invoke its isotropy:

$S(q) = 1 + \rho \int_V \mathrm{d} \mathbf{r} \, \mathrm{e}^{-i \mathbf{q}\mathbf{r}} [g(r) - 1]$.

(6)

### The compressibility equation

Evaluating (6) in $q=0$ and using the relation between the isothermal compressibility $\textstyle \chi _T$ and the structure factor at the origin yields the compressibility equation:

$\rho kT \chi _T= kT\left(\frac{\partial \rho}{\partial p}\right)=1 + \rho \int_V \mathrm{d} \mathbf{r} \, [g(r) - 1]$.

(7)

### The potential of mean force

It can be shown[2] that the radial distribution function is related to the two-particle potential of mean force $w^{(2)}(r)$ by:

$g(r) = \exp \left [ -\frac{w^{(2)}(r)}{kT} \right ]$.

(8)

### The energy equation

If the particles interact via identical pairwise potentials: $\textstyle U_{N} = \sum_{i > j = 1}^N u(\left | \mathbf{r}_i - \mathbf{r}_j \right |)$, the average internal energy per particle is:[3]

$\frac{\left \langle E \right \rangle}{N} = \frac{3}{2} kT + \frac{\left \langle U_{N} \right \rangle}{N} = \frac{3}{2} kT + \frac{\rho}{2}\int_V \mathrm{d} \mathbf{r} \, u(r)g(r, \rho, T)$.

(9)

### The pressure equation of state

Developing the virial equation yields the pressure equation of state:

$p = \rho kT - \frac{\rho^2}{6} \int_V \mathrm{d} \mathbf{r} \, r g(r, \rho, T) \frac{\mathrm{d} u(r)}{\mathrm{d} r}$.

(10)

### Thermodynamic properties

The radial distribution function is an important measure because several key thermodynamic properties, such as potential energy and pressure can be calculated from it.

For a 3-D system where particles interact via pairwise potentials, the potential energy of the system can be calculated as follows:[4]

$PE=\frac{N}{2}4\pi\rho\int^{\infty}_0r^2u(r)g(r)dr$

Where N is the number of particles in the system, $\rho$ is the number density, u(r) is the pair potential.

The pressure of the system can also be calculated by relating the 2nd virial coefficient to g(r). The pressure can be calculated as follows:[4]

$P = \rho k_BT-\frac{2}{3}\pi\rho^2\int_{0}^{\infty}dr\frac{du(r)}{dr}r^3g(r)$

Where $T$ is the temperature and kB is Boltzmann's constant. Note that the results of potential and pressure will not be as accurate as directly calculating these properties because of the averaging involved with the calculation of $g(r)$.

## Approximations

For dilute systems (e.g. gases), the correlations in the positions of the particles that $g(r)$ accounts for are only due to the potential $u(r)$ engendered by the reference particle, neglecting indirect effects. In the first approximation, it is thus simply given by the Boltzmann distribution law:

$g(r) = \exp \left [ -\frac{u(r)}{kT} \right ]$.

(11)

If $u(r)$ were zero for all $r$ – i.e., if the particles did not exert any influence on each other, then '$g(r) = 1$ for all r and the mean local density would be equal to the mean density $\rho$: the presence of a particle at O would not influence the particle distribution around it and the gas would be ideal. For distances $r$ such that $u(r)$ is significant, the mean local density will differ from the mean density $\rho$, depending on the sign of $u(r)$ (higher for negative interaction energy and lower for positive $u(r)$).

As the density of the gas increases, the low-density limit becomes less and less accurate since a particle situated in $\mathbf{r}$ experiences not only the interaction with the particle in O but also with the other neighbours, themselves influenced by the reference particle. This mediated interaction increases with the density, since there are more neighbours to interact with: it makes physical sense to write a density expansion of $g(r)$, which resembles the virial equation:

$g(r) = \exp \left [ -\frac{u(r)}{kT} \right ] y(r) \quad \mathrm{with} \quad y(r) = 1 + \sum_{n=1}^{\infty} \rho ^n y_n (r)$.

(12)

This similarity is not accidental; indeed, substituting (12) in the relations above for the thermodynamic parameters (Equations 7, 9 and 10) yields the corresponding virial expansions.[5] The auxiliary function $y(r)$ is known as the cavity distribution function.[6]

## Experimental

One can determine $g(r)$ indirectly (via its relation with the structure factor $S(q)$) using neutron scattering or x-ray scattering data. The technique can be used at very short length scales (down to the atomic level[7]) but involves significant space and time averaging (over the sample size and the acquisition time, respectively). In this way, the radial distribution function has been determined for a wide variety of systems, ranging from liquid metals[8] to charged colloids.[9] It should be noted that going from the experimental $S(q)$ to $g(r)$ is not straightforward and the analysis can be quite involved.[10]

It is also possible to calculate $g(r)$ directly by extracting particle positions from traditional or confocal microscopy.[11] This technique is limited to particles large enough for optical detection (in the micron range), but it has the advantage of being time-resolved so that, aside from the statical information, it also gives access to dynamical parameters (e.g. diffusion constants[12]) and also space-resolved (to the level of the individual particle), allowing it to reveal the morphology and dynamics of local structures in colloidal crystals,[13] glasses,[14] gels,[15][16] and hydrodynamic interactions.[17]

## Higher-order correlation functions

Higher-order distribution functions $\textstyle g^{(k)}$ with $\textstyle k > 2$ were less studied, since they are generally less important for the thermodynamics of the system; at the same time, they are not accessible by conventional scattering techniques. They can however be measured by coherent X-ray scattering and are interesting insofar as they can reveal local symmetries in disordered systems.[18]

## References

1. Chandler, D. (1987). Introduction to Modern Statistical Mechanics. Oxford University Press.
2. Hansen, J. P. and McDonald, I. R. (2005). Theory of Simple Liquids (3rd edition). Academic Press.
3. Widom, B. (2002). Statistical Mechanics: A Concise Introduction for Chemists. Cambridge University Press.
4. McQuarrie, D. A. (1976). Statistical Mechanics. Harper Collins Publishers.
1. ^ citation needed
2. ^ See Chandler, section 7.3.
3. ^ See Hansen & McDonald, section 2.5.
4. ^ a b Smit, Daan Frenkel, Berend (2002). Understanding molecular simulation from algorithms to applications (2nd ed. ed.). San Diego: Academic Press. ISBN 0122673514.
5. ^ Barker, J.; Henderson, D. (1976). "What is "liquid"? Understanding the states of matter". Reviews of Modern Physics 48 (4): 587. doi:10.1103/RevModPhys.48.587. edit
6. ^ See Hansen & McDonald, Table 4.1 for a list of definitions.
7. ^ Yarnell, J.; Katz, M.; Wenzel, R.; Koenig, S. (1973). "Structure Factor and Radial Distribution Function for Liquid Argon at 85 °K". Physical Review A 7 (6): 2130. doi:10.1103/PhysRevA.7.2130. edit
8. ^ Gingrich, N. S.; Heaton, L. (1961). "Structure of Alkali Metals in the Liquid State". The Journal of Chemical Physics 34 (3): 873. doi:10.1063/1.1731688. edit
9. ^ Sirota, E.; Ou-Yang, H.; Sinha, S.; Chaikin, P.; Axe, J.; Fujii, Y. (1989). "Complete phase diagram of a charged colloidal system: A synchro- tron x-ray scattering study". Physical Review Letters 62 (13): 1524–1527. doi:10.1103/PhysRevLett.62.1524. PMID 10039696. edit
10. ^ Pedersen, J. S. (1997). "Analysis of small-angle scattering data from colloids and polymer solutions: Modeling and least-squares fitting". Advances in Colloid and Interface Science 70: 171–201. doi:10.1016/S0001-8686(97)00312-6. edit
11. ^ Crocker, J. (1996). "Methods of Digital Video Microscopy for Colloidal Studies". Journal of Colloid and Interface Science 179: 298–201. doi:10.1006/jcis.1996.0217. edit
12. ^ Nakroshis, P.; Amoroso, M.; Legere, J.; Smith, C. (2003). "Measuring Boltzmann's constant using video microscopy of Brownian motion". American Journal of Physics 71 (6): 568. doi:10.1119/1.1542619. edit
13. ^ Gasser, U.; Weeks, E. R.; Schofield, A.; Pusey, P. N.; Weitz, D. A. (2001). "Real-Space Imaging of Nucleation and Growth in Colloidal Crystallization". Science 292 (5515): 258–262. doi:10.1126/science.1058457. PMID 11303095. edit
14. ^ Weeks, E. R.; Crocker, J. C.; Levitt, A. C.; Schofield, A.; Weitz, D. A. (2000). "Three-Dimensional Direct Imaging of Structural Relaxation Near the Colloidal Glass Transition". Science 287 (5453): 627–631. doi:10.1126/science.287.5453.627. PMID 10649991. edit
15. ^ Cipelletti, L.; Manley, S.; Ball, R. C.; Weitz, D. A. (2000). "Universal Aging Features in the Restructuring of Fractal Colloidal Gels". Physical Review Letters 84 (10): 2275–2278. doi:10.1103/PhysRevLett.84.2275. PMID 11017262. edit
16. ^ Varadan, P.; Solomon, M. J. (2003). "Direct Visualization of Long-Range Heterogeneous Structure in Dense Colloidal Gels". Langmuir 19 (3): 509. doi:10.1021/la026303j. edit
17. ^ Gao, C.; Kulkarni, S. D.; Morris, J. F.; Gilchrist, J. F. (2010). "Direct investigation of anisotropic suspension structure in pressure-driven flow". Physical Review E 81 (4). doi:10.1103/PhysRevE.81.041403. edit
18. ^ Wochner, P.; Gutt, C.; Autenrieth, T.; Demmer, T.; Bugaev, V.; Ortiz, A. D.; Duri, A.; Zontone, F. et al. (2009). "X-ray cross correlation analysis uncovers hidden local symmetries in disordered matter". Proceedings of the National Academy of Sciences 106 (28): 11511. doi:10.1073/pnas.0905337106. edit