** Next:** Reciprocal space correlations
** Up:** Running, measuring, analyzing
** Previous:** Measuring the melting temperature

Real space correlation functions are typically of the form

and are straightforward to obtain by molecular dynamics: one
has to compute the quantity of interest starting
from the atomic positions and velocities for several configurations,
construct the correlation function for each configuration, and
average over the available configurations.
The simplest example is the pair correlation function *g*(*r*),
which is essentially a density-density correlation.
*g*(*r*) is the probability to find a pair a distance *r* apart,
relative to what expected for a uniform random distribution
of particles at the same density:

| |
(18) |

This function carries information on the structure of the system.
For a crystal, it exhibits a sequence of peaks at positions
corresponding to shells around a given atom. The positions and
magnitude of the peaks are a ``signature'' of the crystal structure
(fcc, hcp, bcc, ...) of the system.
For a liquid, *g*(*r*) exhibits its major peak close to the average
atomic separation of neighboring atoms, and oscillates with
less pronounced peaks at larger distances.
The magnitude of the peaks decays exponentially with distance
as *g*(*r*) approaches 1.
In all cases, *g*(*r*) vanishes below a certain distance, where
atomic repulsion is strong enough to prevent pairs of atoms from getting
so close.
One quantity often computed from *g*(*r*) is the average number of atoms
located between *r*_{1} and *r*_{2} from a given atom,

This allows to define coordination numbers also in situations
where disorder is present.
The calculation of *g*(*r*) is intrinsically a *O*(*N*^{2}) operation,
and therefore it can slow down considerably an optimized molecular
dynamics program. If the behavior at large *r* is not important,
it might be convenient to define a cutoff distance, and use
techniques borrowed from fast force calculations using short-ranged
potentials to decrease the computational burden.
It should also be noted that periodic boundary conditions impose
a natural cutoff at *L*/2, where *L* is the minimum between the
box sizes *L*_{x}, *L*_{y}, *L*_{z} in the three directions.
For larger distance the results are spoiled by size effects.

** Next:** Reciprocal space correlations
** Up:** Running, measuring, analyzing
** Previous:** Measuring the melting temperature
*Furio Ercolessi*

*9/10/1997*