Radial distribution functions.¶
If we look at a configuration after a call to md_step()
we see that pairs of particles are at different distances from each other. An important characteristic is the probability distribution of separations between all pairs of particles.
The 'virial theorem' shows that this distribution function gives a second independent way of calculating the pressure
The Fourier transform of this function is measured in X-ray scattering experiments on materials.
From the time evolution of configurations build the two-dimensional histogram of separations between pairs of particles. $g({\bf r})$, where ${\bf r}$ is the vector separation between particles.
From the same configurations build the one-dimensional histogram $g(r)$, where $r=|{\bf r}|$. Study this function as a function of density, for moderate values of $N\sim 100$.
Python list functions are useful for this exercise, since they can grow efficiently after each call to md_step()