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:
9 .. math:: \begin{array}{rcl}
10 g_{AB}(r)&=& {\displaystyle \frac{\langle \rho_B(r) \rangle}{\langle\rho_B\rangle_{local}}} \\
11 &=& {\displaystyle \frac{1}{\langle\rho_B\rangle_{local}}}{\displaystyle \frac{1}{N_A}}
12 \sum_{i \in A}^{N_A} \sum_{j \in B}^{N_B}
13 {\displaystyle \frac{\delta( r_{ij} - r )}{4 \pi r^2}} \\
17 with :math:`\langle\rho_B(r)\rangle` the particle density of type
18 :math:`B` at a distance :math:`r` around particles :math:`A`, and
19 :math:`\langle\rho_B\rangle_{local}` the particle density of type
20 :math:`B` averaged over all spheres around particles :math:`A` with
21 radius :math:`r_{max}` (see :numref:`Fig. %s <fig-rdfex>` C).
25 .. figure:: plots/rdf.*
28 Definition of slices in :ref:`gmx rdf <gmx rdf>`: A. :math:`g_{AB}(r)`.
29 B. :math:`g_{AB}(r,\theta)`. The slices are colored gray. C.
30 Normalization :math:`\langle\rho_B\rangle_{local}`. D. Normalization
31 :math:`\langle\rho_B\rangle_{local,\:\theta }`. Normalization volumes
34 Usually the value of :math:`r_{max}` is half of the box length. The
35 averaging is also performed in time. In practice the analysis program
36 :ref:`gmx rdf <gmx rdf>` divides the system
37 into spherical slices (from :math:`r` to :math:`r+dr`, see
38 :numref:`Fig. %s <fig-rdfex>` A) and makes a histogram in stead of
39 the :math:`\delta`-function. An example of the RDF of oxygen-oxygen in
40 SPC water \ :ref::ref:`80 <refBerendsen81>` is given in :numref:`Fig. %s <fig-rdf>`
44 .. figure:: plots/rdfO-O.*
47 :math:`g_{OO}(r)` for Oxygen-Oxygen of SPC-water.
49 With :ref:`gmx rdf <gmx rdf>` it is also possible to calculate an angle
50 dependent rdf :math:`g_{AB}(r,\theta)`, where the angle :math:`\theta`
51 is defined with respect to a certain laboratory axis :math:`{\bf e}`,
52 see :numref:`Fig. %s <fig-rdfex>` B.
54 .. math:: g_{AB}(r,\theta) = {1 \over \langle\rho_B\rangle_{local,\:\theta }}
55 {1 \over N_A} \sum_{i \in A}^{N_A} \sum_{j \in B}^{N_B} {\delta( r_{ij} - r )
56 \delta(\theta_{ij} -\theta) \over 2 \pi r^2 sin(\theta)}
57 :label: eqnrdfangleaxis1
59 .. math:: cos(\theta_{ij}) = {{\bf r}_{ij} \cdot {\bf e} \over \|r_{ij}\| \;\| e\| }
60 :label: eqnrdfangleaxis2
62 This :math:`g_{AB}(r,\theta)` is useful for analyzing anisotropic
63 systems. **Note** that in this case the normalization
64 :math:`\langle\rho_B\rangle_{local,\:\theta}` is the average density in
65 all angle slices from :math:`\theta` to :math:`\theta + d\theta` up to
66 :math:`r_{max}`, so angle dependent, see :numref:`Fig. %s <fig-rdfex>` D.