rdfpy icon indicating copy to clipboard operation
rdfpy copied to clipboard

Analytical number density correction

Open by256 opened this issue 3 years ago • 0 comments

Currently, rdfpy computes the number density by finding the minimum size cuboidal box that can be placed around the given particle coordinates, and dividing the number of particles by the volume of this box.

When the number of particles intersecting the bounds of this box is large, this results in an incorrect number density, causing the resulting radial distribution function to not be centred around 1. This is more of an issue in 3D, where the number of box intersecting particles is significantly greater than the 2D case.

An analytical solution is needed, which finds the particles that intersect the box faces/corners, and computes what proportion of these particles is inside the box. When computing the number density, these intersecting particles should be counted as their proportion which exists inside the box.

This should be implemented as a separate function which will become the default number density calculation in both the rdf2d and rdf3d functions.

I may get around to doing this myself at some point...

by256 avatar Nov 19 '20 11:11 by256