Radial distribution functions¶
with ⟨ρB(r)⟩ the particle density of type B at a distance r around particles A, and ⟨ρB⟩local the particle density of type B averaged over all spheres around particles A with radius rmax (see Fig. 51 C).

Fig. 51 Definition of slices in gmx rdf: A. gAB(r). B. gAB(r,θ). The slices are colored gray. C. Normalization ⟨ρB⟩local. D. Normalization ⟨ρB⟩local,θ. Normalization volumes are colored gray.
Usually the value of rmax is half of the box length. The averaging is also performed in time. In practice the analysis program gmx rdf divides the system into spherical slices (from r to r+dr, see Fig. 51 A) and makes a histogram in stead of the δ-function. An example of the RDF of oxygen-oxygen in SPC water :ref:80 is given in Fig. 52
With gmx rdf it is also possible to calculate an angle dependent rdf gAB(r,θ), where the angle θ is defined with respect to a certain laboratory axis e, see Fig. 51 B.
This g_{AB}(r,\theta) is useful for analyzing anisotropic systems. Note that in this case the normalization \langle\rho_B\rangle_{local,\:\theta} is the average density in all angle slices from \theta to \theta + d\theta up to r_{max}, so angle dependent, see Fig. 51 D.