namespace rdf2

Overview

Defines RDF-specific functions. More…

Detailed Documentation

Defines RDF-specific functions.

The radial distribution function \(g(r)\), or pair distribution function. It can be used to illuminate features of short-range and long-range order. The RDF is the probability of finding a particle at a distance of \(r\) from a tagged reference particle, relative to that of an ideal gas. For a system of \(N\) particles, the pair correlation function for \(N(N-1)\) pairs is:

\[ \rho_N^{(2)}(r,r') = ⟨\sum_{i=1}^{N} \sum_{j=1,j \neq i}^{N} \delta (r-r_i) \delta (r'-r_j) \langle\]

The code essentially bins distances between pairs of particles, and normalizes the resulting histogram is normalized with respect to an ideal gas. The algorithm for the calculation of \(g(r)\) may be divided into the following steps:

  1. Initialization: The \(g(r)\) array is initialized to zero.

  2. Sampling: The histogram is added to for a particular bin, if the distance of a pair of atoms falls within the \(r\) associated with the bin.

  3. Normalization: Every bin of the \(g(r)\) array is normalized by the product of the number of ideal gas particles in that bin, and the number of particles and number of frames.

To account for the geometry of the slab-like quasi-two-dimensional system, the RDF must be additionally normalized by a form factor \(f\) such that \(f = \frac{h}{2r}\) for \(r>h\) and \(f = \frac{h}{2r}\) for \(r \le h\); where \(h\) is the height of the quasi-two-dimensional system.

Changelog