Boundary Conditions¶
Before carrying out molecular simulations, a suitable system model must be chosen that can adequately capture the behaviour of molecular systems. One crucial factor is the size of the system (simulation box size). If the system size is too small, this can introduce simulation artefacts that can artificially disturb the outcome of the system behaviour. If the system size is too large, one would run into issues of computational resources limitations, or practical limits of lengthy simulation times.
Ideally one would like to make a system as large as possible to simulate a realistic environment. Introducing a hard boundary would not be a practical approach unless a simulation of a system in a confined space is required. The most common way to achieve a system size of an infinite sense is by means of introducing periodic boundary conditions (PBCs). These prevent surface effects dominating over bulk effects, as illustrated below.
In a nutshell, this means when a particle moves beyond a boundary, it will ‘wrap around’ and move by the same amount at the opposite end of the simulation box. The simulation box in the middle is the ‘actual’ simulation system, whereas the boxes surrounding it are ‘images’ of the centre box.
Note
The diagram above is just for illustration purposes with only neighbouring images boxes shown. In reality, images are replicated infinitely in all directions.
The most common simulation boxes are cubic or orthorhombic PBCs. However, other shapes are also possible as shown below:
Cutoff values and minimum image convention
For a system with PBC, a minimum image convention must be applied to find the shortest possible distances between particle pairs for potential and force calculations. This means the selected atom pairs could either originate from the actual simulation box or from its image.
For the minimum image convention to work, the interaction cutoff \(r_{cut}\) must be set to no more than half of the smallest simulation cell width.
For instance, if a system is a cubic box of size 40 angstroms with PBC, then \(r_{cut}\) must not be larger than 20 angstroms.
The diagram on the left illustrates the minimum image convention. Consider a simulation box (in 2D projection) of length L. To calculate the forces acting between atoms \(i\) and \(j\), the shortest interatomic distance between atom \(i\) and atom \(j\) (the image of atom \(j\), \(j^{\prime}\)) is chosen.
To calculate van der Waals (vdw) interactions, only the interatomic distances according to the minimum image convention are considered.
If very long-range interactions are required, e.g. for charge-based electrostatics, PBCs enable the use of Ewald summation to split the interactions into real space and reciprocal space parts: pairwise calculations with a cutoff are used for real space contributions, while the reciprocal space part deals with large numbers of periodic images for the system by applying Fourier transforms.
For more information, see Distance cutoffs and Ewald sums in the Classical Force Field section.