# 5.2 Pair Correlation Function

Let

An average of this quantity represents the relative frequency, or probability densitiy of some particle being situated near . In other words, is simply the mean fluid density at position :

In a fluid we usually have ; only in the presence of external fields or near surfaces varies in a non-trivial manner.

Let us proceed to the pair correlation function'' (PCF)
 (5.1)

This is the conditional probability density of finding a particle at , given that there is a particle at the coordinate origin. Thus provides a measure of local spatial ordering in a fluid.

To determine , proceed like this:
• Divide the range of -values (at most , where is the side length of the basic cell) into intervals of length .
• A given configuration is scanned to determine, for each pair , a distance channel''number

• In a histogram table the corresponding value is then incremented by . This procedure is repeated every, say, MD steps (or MC steps).
• At the end of the simulation run the histogram is normalized according to 5.1.
The typical shape of the PCF at liquid densities is depicted in Fig. 5.1.

Significance of in fluid physics:
• The average of any quantity that depends on the pair potential may be expressed as an integral over .

• Theory: analytical approximations to for a given pair potential .[KOHLER 72],[HANSEN 86]
• Experiment: the Fourier transform of , the scattering law''

is just the relative intensity of neutron or X-ray scattering at a scattering angle with

PROJECT MD/MC (LENNARD-JONES): Augment your Lennard-Jones MD (or MC) program by a routine that computes the pair correlation function according to 5.2; remember to apply the nearest image convention when computing the pair distances. As the subroutine ENERGY already contains a loop over all particle pairs , it is best to increment the histogram within that loop.

Plot the PCF and see whether it resembles the one given in Figure 5.1.

F. J. Vesely / University of Vienna