Energies and forces 659
=
16 πρ^2 ǫσ^3
3
[
2
3
(
σ
rc
) 9
−
(
σ
rc
) 3 ]
. (B.8)
Eqns. (B.7) and (B.8) are called thestandard long-range corrections(Allen and Tildes-
ley, 1989; Frenkel and Smit, 2002). They should be included in orderto obtain accurate
thermodynamics averages from simulations using truncated potentials.
When periodic boundary conditions are employed (see left panel of Fig. 13.6),
interparticle distances are computed using theminimum image convention. The rule
of this convention is that in the infinite periodic array, particleiinteracts with the
periodic image of particlejto which it is closest. For a system with an arbitrary box
matrixh, the three components of the vector differencerij=ri−rjare computed as
follows for a system with an arbitrary box matrixh:
si = h−^1 ri
sij = si−sj
sij←−sij−NINT(sij) Minimum image convention
rij = hsij, (B.9)
where NINT(x) is the nearest-integer function. The first line transforms the coordi-
nates into the scaled coordinates of eqn. (5.7.2); the second line gives the raw inter-
particle vector differences; the third line applies the minimum image convention to
these differences; the last line transforms the differences back tothe original Cartesian
variables.
A cutoff radius alone is insufficient to reduce the computational overhead associated
with the short-range forces since it is still necessary to look over allN^2 pairs to
determine if the conditionrij< rcis satisfied for a given particle pair. However, since
the cutoff radius ensures that a given particle will only interact with afinite number
of other particles, we can build a list of all particlesjwith which a particleiinteracts.
Such a list is known as aVerlet neighbor list(Verlet, 1967). Since particles typically
diffuse, the neighbor list must be updated from time to time during thesimulation.
The average frequency of updates is controlled by a parameterδknown as theskin
length. Fig. B.1 illustrates the construction of a neighbor list. For each particlei, we
identify all particles that lie within a distancerc+δofiand store the indices of these
neighboring particles in an array. Once the list is built, we simply loop over its elements
and calculate all of the forces and energies of the pairs. Because some of the pairs in
the list are in the distance rangerc< rij< rc+δ, some of the energies and forces
will be zero. The smallerδis chosen, the fewer such interactions there will be, which
saves computational time. However, the largerδis chosen, the more infrequently the
list needs to be updated. Thus, the value ofδshould be optimized at the start of any
simulation.
At the start of a simulation, the initial positionsr 1 (0),...,rN(0) are saved and an
initial Verlet list is generated. At each time stepk∆t,k= 1, 2 , 3 ,..., the displacement
∆iof each particle from its initial position ∆i=|ri(k∆t)−ri(0)|is computed and
the maximum over all of these displacements ∆maxis subsequently determined. If at
thenth step ∆max> δ/2, then the interactions contained in the list will no longer