Basic Examples (2)
Compute the radial distribution function from two points:
Compute the radial distribution function of a set of coordinates enclosed in a periodic 1D "box" of size (L = 4):
Display the coordinates in number line format along the axis for which the positions differ:
The radial distribution function has nonzero peaks at positions near those of the exact distances apart:
Plot the radial distribution function characteristic of this system:
Options (1)
RadialDistributionFunctionList takes the same options as Compile, and benefits from automated compilation to C:
Applications (2)
Compute the radial distribution function characteristic of a cube with unit length, enclosed in a sufficiently larger periodic box:
Plot the resulting radial distribution function, where you can see nearest neighbor, polygonal face hypotenuse and internal hypotenuse distances:
Properties and Relations (3)
By definition, the radial distribution function of an ideal gas converges to 1 at all distances when provided sufficient data (here, 1000 time steps on 100 positions of 100 particles):
Compute both the radial distribution function of just the first time step, and then that of the ensemble average over all time steps:
As expected, the radial distribution function converges to nearly 1 as sufficient data is introduced:
Normalization by the expected number of particles in that vicinity works in 2D cases as well:
The same is true for 1D cases:
Possible Issues (4)
The radial distribution function is accurate out to and is thus truncated at this point, beyond which it would artificially decay:
If the box is sufficiently larger than the domain of the particle coordinates, the calculation is as expected (using real particle positions):
The peaks are at the expected unit distance for the touching particles, at the polygonal face hypotenuse distance and the interior hypotenuse:
If the box size (L) is too small, the minimum image convention is employed, applying periodicity in each dimension:
In this case, particles are perfectly overlapping and the separation distance between all pairs is r_{ij}=0; however, the convention is to put them in the first nonzero bin:
Modifying the concentric shell bin width can affect normalization and positional accuracy, similar to the behavior in Riemann sums with too few discretizing rectangles:
Compare the difference when using two different bin widths:
Neat Examples (3)
Compute the radial distribution function characteristic of an icosahedral distribution of particles and compare it with that of a cube, each with a minimum separation distance of 1:
Plot the resulting radial distribution functions to compare:
Compare the radial distribution function of both a simple cubic and face-centered cubic (FCC) crystalline lattice (neglecting periodicity, each with nearest neighbors touching at unit lengths):
Compute and plot the radial distribution functions to compare:
Compute the potential of mean force that has given rise to the interactions, in this example showing that the 3D ideal gas has no potential of interaction:
Compute the corresponding potential of mean force (in units where k_{B}T=1):
It can be seen that despite the noise associated finite data, the potential of mean force is fairly close to zero when averaged over the entire domain: