# How do you calculate a radial distribution function on a lattice?

$$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.

• any value of r is possible, particles only appear at discrete values of r, but that is inconsequential. The volume does not depend on the particles locations, only on ... the volume Mar 10, 2022 at 15:22
• I don't follow you: the spherical shell is not exactly spherical on a lattice because of the discretized nature of the lattice, so I would think that this needs to be accounted for. Mar 10, 2022 at 17:21
• The sphere is exactly spherical. A RDF measures from a given location, the probability of finding a particle of a certain type, a distance "r" from that central location. It doesn't matter if they are on a lattice or not. In the end you are just binning "dr"s and using particles x,y,z coordinates to calculate the "r" to figure out what bin to put them in, but you don't care if the particles are arranged on a lattice. Mar 10, 2022 at 18:15
• I would recommend getting this book, amazon.com/Molecular-Theory-Solutions-Arieh-Ben-Naim-ebook/dp/…, and reading about the rdf. Ben-Naim does the best job of anyone I have run across on explaining, in at least two different ways, the RDF. Mar 10, 2022 at 18:20
• @B.Kelly nice suggestion, any chapter or sections you recommend in particular? Mar 10, 2022 at 22:29

Below you can see a picture that tries to explain this point. The $$\mathrm{d}r$$, or more correctly for the approximation we are making the $$\Delta r$$, is just the distance between the two circles.