For the radial distribution function
$$g(r)=\frac{N(r)}{4\pi r^{2}dr \rho}$$
how do you do the calculation of the volume of the spherical shell in the denominator, $4\pi r^{2} dr$, when the simulation is done on a lattice? Since only discrete values of $r$ are possible, I imagine the calculation might be subtle.