Rdf module

Contents

Namespaces

namespace rdf
Defines RDF-specific functions. This calculates the bulk radial distribution function.

Functions

auto gr(double* rdfArray, int* nframes, double binsize, int nbin, std::vector<double> box, std::vector<std::vector<double>> coord, double cutoff, int nop, int switchVar) -> int

Function documentation

int gr(double* rdfArray, int* nframes, double binsize, int nbin, std::vector<double> box, std::vector<std::vector<double>> coord, double cutoff, int nop, int switchVar)

Parameters
rdfArray in The array for holding the histogram for the $g(r)$ values
nframes in The total number of frames for which the $g(r)$ is sampled
binsize in The user-specified bin-width or bin size
nbin in The total number of bins in the $g(r)$ histogram
box in The simulation box lengths, required for calculating the total volume
coord in A vector of vectors, holding the coordinates of the particles
cutoff in This is the maximum length upto which the $g(r)$ will be calculated, and should be less than half the box length
nop in The total number of particles in the simulation box
switchVar in Int whose value determines whether initialization (0), sampling (1) or normalization (2) will be performed
Returns an int value of 0 (success) or 1 (failure)

Function for calculating the RDF or $g(r)$

The is calculated for a bulk system, containing identical particles of a single type. Depending on the value of switchVar, either initialization, sampling or normalization of the $g(r)$ is performed.