1 Radial distribution functions
2 -----------------------------
4 | :ref:`gmx rdf <gmx rdf>`
5 | The *radial distribution function* (RDF) or pair correlation function
6 :math:`g_{AB}(r)` between particles of type :math:`A` and :math:`B` is
7 defined in the following way:
12 g_{AB}(r)&=& {\displaystyle \frac{\langle \rho_B(r) \rangle}{\langle\rho_B\rangle_{local}}} \\
13 &=& {\displaystyle \frac{1}{\langle\rho_B\rangle_{local}}}{\displaystyle \frac{1}{N_A}}
14 \sum_{i \in A}^{N_A} \sum_{j \in B}^{N_B}
15 {\displaystyle \frac{\delta( r_{ij} - r )}{4 \pi r^2}} \\
18 with :math:`\langle\rho_B(r)\rangle` the particle density of type
19 :math:`B` at a distance :math:`r` around particles :math:`A`, and
20 :math:`\langle\rho_B\rangle_{local}` the particle density of type
21 :math:`B` averaged over all spheres around particles :math:`A` with
22 radius :math:`r_{max}` (see :numref:`Fig. %s <fig-rdfex>` C).
26 .. figure:: plots/rdf.*
29 Definition of slices in :ref:`gmx rdf <gmx rdf>`: A. :math:`g_{AB}(r)`.
30 B. :math:`g_{AB}(r,\theta)`. The slices are colored gray. C.
31 Normalization :math:`\langle\rho_B\rangle_{local}`. D. Normalization
32 :math:`\langle\rho_B\rangle_{local,\:\theta }`. Normalization volumes
35 Usually the value of :math:`r_{max}` is half of the box length. The
36 averaging is also performed in time. In practice the analysis program
37 :ref:`gmx rdf <gmx rdf>` divides the system
38 into spherical slices (from :math:`r` to :math:`r+dr`, see
39 :numref:`Fig. %s <fig-rdfex>` A) and makes a histogram in stead of
40 the :math:`\delta`-function. An example of the RDF of oxygen-oxygen in
41 SPC water \ :ref::ref:`80 <refBerendsen81>` is given in :numref:`Fig. %s <fig-rdf>`
45 .. figure:: plots/rdfO-O.*
48 :math:`g_{OO}(r)` for Oxygen-Oxygen of SPC-water.
50 With :ref:`gmx rdf <gmx rdf>` it is also possible to calculate an angle
51 dependent rdf :math:`g_{AB}(r,\theta)`, where the angle :math:`\theta`
52 is defined with respect to a certain laboratory axis :math:`{\bf e}`,
53 see :numref:`Fig. %s <fig-rdfex>` B.
58 g_{AB}(r,\theta) &=& {1 \over \langle\rho_B\rangle_{local,\:\theta }} {1 \over N_A} \sum_{i \in A}^{N_A} \sum_{j \in B}^{N_B} {\delta( r_{ij} - r ) \delta(\theta_{ij} -\theta) \over 2 \pi r^2 sin(\theta)}\\
59 cos(\theta_{ij}) &=& {{\bf r}_{ij} \cdot {\bf e} \over \|r_{ij}\| \;\| e\| }\end{aligned}
61 This :math:`g_{AB}(r,\theta)` is useful for analyzing anisotropic
62 systems. **Note** that in this case the normalization
63 :math:`\langle\rho_B\rangle_{local,\:\theta}` is the average density in
64 all angle slices from :math:`\theta` to :math:`\theta + d\theta` up to
65 :math:`r_{max}`, so angle dependent, see :numref:`Fig. %s <fig-rdfex>` D.