Eur. Phys. J. Plus (2013) 128:10 Page 7 of 21
This second reason explains why cubic boxes are being used at all, because there are other box shapes that result in
a larger distance between nearest periodic images for the same box volume. Depending on the criteria that one uses,
there are two shapes that can claim to be optimal. The first is the rhombic dodecahedron (i.e. the Wigner-Seitz cell of
a face-centred cubic lattice). For a given volume, the rhombic dodecahedron has the largest distance between nearest
periodic images —or, what amounts to the same thing, it has the largest inscribed sphere. The other (more popular)
shape is the truncated octahedron (the Wigner-Seitz cell of a body-centred cubic lattice). The truncated octahedron
is the most “spherical” unit cell that can be used, in the sense that it has the smallest enclosing sphere. In fact, the
ratio of the radii of the enclosing and inscribed spheres of the truncated octahedron is
√
5/3 ≈ 1.29. For a rhombic
dodecahedron, this ratio is
√
2 ≈ 1.41 and for a cube it is
√
3 ≈ 1.73. In two dimensions the optimal box shape is a
hexagon (and in 4D it is the Wigner-Seitz cell of the so-called D
4
lattice).
In simulations of isotropic fluids, any shape of the simulation box can be chosen, provided that it is sufficiently
large to make finite-size effects unimportant. However, for ordered phases such as crystals, the choice of the simulation
box is constrained by the fact that it has to accommodate an integral number of crystal unit cells. If the crystal under
study is cubic, then a cubic simulation box will do, otherwise the simulation box should be chosen such that it is
as “spherical” as possible, yet commensurate with the unit cell of the crystal under study. Note that this constraint
implies that, if a given substance has several crystal polymorphs of lower than cubic symmetry, then different box
shapes will be needed to simulate these phases. Moreover, for low symmetry crystals, the shape of the crystal unit
cell will, in general, depend on temperature and pressure. Hence, simulations of different thermodynamic state points
will require simulation boxes with different shapes. If the shape of the simulation box is incompatible with the crystal
symmetry, the crystal will be strained. This is easy to verify by computing the stress tensor of the system: if the
average stress is not isotropic (hydrostatic), the shape of the simulation box causes a deformation of the crystal. As
a consequence, elastic free energy will be stored in the crystal and it will be less stable than in its undeformed state.
Not surprisingly, such a deformation will affect the location of phase coexistence curves. The effect of the shape of
the simulation box on the crystal under study is not simply a finite-size effect: even a macroscopic crystals can be
deformed. However, for a large enough system, it is always possible to choose the number of crystal unit cells in the
x, y and z directions such that the resulting crystal is almost commensurate with the simulation box. The remaining
difference is a finite-size effect. However, if we have been less careful and have prepared a deformed crystal, then it
will stay deformed, if not forever, then at least much longer than the time that we can study in a simulation.
3.3.1 Deformable boxes
In practice, the shape of the simulation box is not chosen by trial and error until the crystal is stress free (or, more
precisely, has an isotropic stress). In the early 80’s, Parrinello and Rahman [5] developed a constant-stress Molecular
Dynamics scheme that treated the parameters characterising the box shape as dynamical variables. In a simulation, the
box shape fluctuates and the average box shape is the one compatible with the imposed stress. If the imposed stress is
isotropic, then the Parrinello-Rahman technique yields the box shape compatible with an undeformed crystal. Shortly
after its introduction, the Parrinello-Rahman technique was extended to Monte Carlo simulations by Najafabadi and
Yip [6]. More recently, the method of Najafabadi and Yip was used by Filion and coworkers [7] to predict the crystal
structure of novel materials. In this method, small systems are used such that appreciable fluctuations in the shape of
the simulation box are possible: this allows one to explore a wide range of possible structures.
Potentially, the fluctuations in the shape of the simulation box can become a problem: if the box becomes very
anisometric, the nearest-neighbour distance in some directions becomes very small and serious finite-size effects are
observed. This problem is always present if fluctuating box shapes are used to simulated liquids (but, usually, there
is no need to use fluctuating box shapes in that case). In the case of crystals, the problems are most pronounced for
small systems. In that case, the fluctuations of the box shape may have to be constrained. To allow for larger changes
in the shape of the crystal unit cell, the system should be mapped onto a new simulation box, once the original box
becomes too deformed. This remapping does not affect the atomic configuration of the system.
3.4 Liquid crystals
Liquid crystals are phases with symmetry properties intermediate between those of an isotropic liquid and of a
fully ordered, three-dimensional crystal. The simplest liquid crystal, the so-called nematic phase, has no long-range
translational order, but the molecules are on average aligned along a fixed direction, called the nematic director.Like
isotropic liquids, nematic phases are compatible with any shape of the simulation box. However, for more highly
ordered liquid-crystalline phases, the box shape should be chosen carefully. To give a simple example: the smectic-A
phases is similar to the nematic phase in that all molecules are, on average aligned along a director but, unlike the
nematic phase, the density of the nematic phase along the director is periodic. In the simplest case one can view the
smectic-A phase as a stack of liquid-like molecular layers. Clearly, in a simulation, the boundary conditions should be