Analytical number density correction #2
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
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...
The text was updated successfully, but these errors were encountered: