radialdf package

Module contents

Radial Distribution Function module

radialdf.inner_rdf(boundary, particles, r, dr)

Computes the radial distribution function, showing the average density of other particles around each particle sampled in concentric shells of thickness dr within a maximum radius of r. This function stays a distance of r away from all borders as it currently does not deal with border effects. It will calculate the RDF only for those particles located at least r away from each border.

The particles argument should have an (n, k) shape where n is the amount of particles and k the number of dimensions.

The boundary argument should have shape (k, 2) where each row is the mimimum and maximum of a dimension of the volume within which particles should have been placed. An example for 3d-data would be [[0, 100], [0, 200], [0, 100]] for a 100x200x100 box.

Parameters
  • boundary (np.ndarray-like with shape (k, 2)) – The limits for each dimension of the particles. Used to normalize to volume and exclude boundary particles.

  • particles (np.ndarray-like with shape (n, k)) – The particles to investigate.

  • r (float) – The maximum search radius, and the boundary exclusion size

  • dr (float) – Resolution of the RDF. Thickness of the radial shells whose particle density is the basis of the RDF.

radialdf.rdf(boundary, particles, r, dr)