Radial distribution function
In statistical mechanics, the radial distribution function, (or pair correlation function) formula_1 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 formula_2 is the average number density of particles, then the local time-averaged density at a distance formula_3 from O is formula_4. 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 formula_3 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 formula_3 and formula_7 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 whose centers are within the circular shell, dotted in orange. The radial distribution function 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 formula_8 multiplied by the volume of the spherical shell, which symbolically can be expressed as formula_9. 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 (micrometer -sized) particles via traditional or confocal microscopy. The radial distribution function is of fundamental importance since it can be used, using the Kirkwood–Buff solution theory, to link the microscopic details to macroscopic properties. Moreover, by the reversion of the Kirkwood-Buff theory, it is possible to attain the microscopic details of the radial distribution function from the macroscopic properties. Definition. Consider a system of formula_10 particles in a volume formula_11 (for an average number density formula_2) and at a temperature formula_13 (let us also define formula_14). The particle coordinates are formula_15, with formula_16. The potential energy due to the  interaction between particles is formula_17 and we do not consider the case of an externally applied field. The appropriate averages are taken in the canonical ensemble formula_18, with formula_19 the configurational integral, taken over all possible combinations of particle positions. The probability of an elementary configuration, namely finding particle 1 in formula_20, particle 2 in formula_21, etc. is given by The total number of particles is huge, so that formula_22 in itself is not very useful. However, one can also obtain the probability of a reduced configuration, where the positions of only formula_23 particles are fixed, in formula_24, with no  constraints on the remaining formula_25 particles. To this end, one has to integrate () over the remaining coordinates formula_26: The particles being identical, it is more relevant to consider the probability that "any" formula_28 of them occupy positions formula_24 in "any" permutation, thus defining the formula_28-"particle density" For formula_31, () 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 formula_32 and equal to the overall density of the system: It is now time to introduce a correlation function formula_34 by formula_35  is called a correlation function, since if the atoms are independent from each other formula_36 would simply equal formula_37 and therefore formula_35 corrects for the correlation between atoms. From () and () it follows that Relations involving "g"(r). The structure factor. The second-order correlation function formula_39 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. If the system consists of spherically symmetric particles, formula_39 depends only on the relative distance between them, formula_41. We will drop the  sub- and superscript: formula_42. Taking particle 0 as fixed at the origin of the coordinates, formula_43 is the "average" number of particles (among the remaining formula_44) to be found in the volume formula_45 around the position formula_46. We can formally count these particles and take the average via the expression formula_47, with formula_48 the ensemble average, yielding: where the second equality requires the equivalence of particles formula_49. The formula above is useful for relating formula_50 to the static structure factor formula_51, defined by formula_52, since we have: , and thus: formula_54, proving the Fourier relation alluded to above. This equation is  only valid in the sense of distributions, since formula_50 is not normalized: formula_56, so that formula_57 diverges as the volume formula_11, 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: Finally, we rename formula_60 and, if the system is a liquid, we can invoke its isotropy: The compressibility equation. Evaluating () in formula_61 and using the relation between the isothermal compressibility formula_62 and the structure factor at the origin yields the compressibility equation: The potential  of mean force. It can be shown that the radial distribution function is related to the two-particle potential of mean force formula_63 by: In the dilute limit, the potential of mean force is the exact pair potential under which the equilibrium point configuration has a given formula_1. The energy equation. If the particles interact via identical pairwise potentials: formula_65, the average internal energy per particle is: The pressure equation of state. Developing the virial equation yields the pressure equation of state: Thermodynamic properties in 3D. 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: formula_66 Where N is the number of particles in the system, formula_67 is the number density, formula_68 is the pair potential. The pressure of the system can also be calculated by relating the 2nd virial coefficient to formula_69 . The pressure can be calculated as follows: formula_70 Where formula_13 is the temperature and formula_72 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 formula_1. Approximations. For dilute systems (e.g. gases), the correlations in the positions of the particles that formula_1 accounts for are only due to the potential formula_75 engendered by the reference particle, neglecting indirect effects. In the first approximation, it is thus simply given by the Boltzmann distribution law: If formula_75 were zero for all formula_3 – i.e., if the particles did not exert any influence on each other, then formula_78 for all formula_79 and the mean local density would be equal to the mean density  formula_80: the presence of a particle at O would not influence the particle distribution around it and the gas would be ideal. For distances formula_3 such that formula_75 is significant, the mean local density will differ from the mean density formula_80, depending on the sign of formula_75 (higher for negative interaction energy and lower for positive formula_75). As the density of the gas increases, the low-density limit becomes less and less accurate since a particle situated in formula_79 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 formula_1, which resembles the virial equation: This similarity is not accidental; indeed, substituting () in the relations above for the thermodynamic parameters (Equations , and ) yields the corresponding virial expansions. The auxiliary function formula_88 is known as the "cavity distribution function". It has been shown that for classical fluids at a fixed density and a fixed positive temperature, the effective pair potential that generates a given formula_1 under equilibrium is unique up to an additive constant , if it exists. In recent years, some attention has been given to develop Pair Correlation Functions for spatially-discrete data such as lattices or networks. Experimental. One can determine formula_1 indirectly (via its relation with the structure factor formula_91) using neutron scattering or x-ray scattering data. The technique can be used at very short length scales (down to the atomic level) 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 to charged  colloids. Going from the experimental formula_91 to formula_1 is not straightforward and the analysis can be quite involved. It is also possible to calculate formula_1 directly by extracting particle positions from traditional or confocal microscopy. This technique is limited to particles large enough for optical detection (in the micrometer 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) 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, glasses, gels, and hydrodynamic interactions. Direct visualization of a full (distance-dependent and angle-dependent) pair correlation function was achieved by a scanning tunneling microscopy in the case of 2D molecular gases. Higher-order correlation functions. It has been noted that radial distribution functions alone are insufficient to characterize structural information. Distinct point processes may possess identical or practically indistinguishable radial distribution functions, known as the degeneracy problem. In such cases, higher order correlation functions are needed to further describe the structure. Higher-order distribution functions formula_95 with formula_96 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.