Periodic Boundary Conditions

Overview

Teaching: 20 min
Exercises: 0 min
Questions
  • How to simulate a bulk (gas, liquid or solid) system by using only a small part?

Objectives
  • Understand why and when periodic boundary conditions are used.

  • Understand how shape and size of a periodic box can affect simulation.

  • Learn how to set periodic box parameters in GROMACS and NAMD.

What is PBC and why is it important?

Figure: Periodic Boundary Conditions

Choosing periodic box size and shape.

Box shape

Cubic periodic box

Figure: Cubic box

Octahedral and dodecahedral periodic boxes

  Space filling with truncated octahedrons
Figure: truncated Octahedron

Triclinic periodic boxes

Figure: Triclinic Cell

Box size

10 nm margin

Figure: Periodic Boundary Conditions

Pitfalls

Figure: Periodic Boundary Conditions


Periodic box

Which of the statements is incorrect?

  1. The smallest dimension of a periodic box must be at least as large as the cut-off radius
  2. The minimum box size should extend at least 10 nm from the solute
  3. The smallest dimension of a periodic box must be at least as large as the double cut-off radius
  4. There is an equivalent triclinic unit cell for any repeating shape that occupies all of space

Solution

The smallest dimension of a periodic box must be at least as large as the cut-off radius


Specifying Periodic Box

GROMACS

The box specification is integrated into structure files. The box parameters can be set using the editconf program or manually. The editconf program accepts the following options:

-bt Box type triclinic, cubic, dodecahedron, octahedron
-box Box vectors lengths, a, b, c nm
-angles Box vectors angles, bc, ac, ab degrees
-d Distance between the solute and the box nm

Example:

module load StdEnv/2020 gcc gromacs
wget http://files.rcsb.org/view/1lyz.pdb
gmx pdb2gmx -f 1lyz.pdb -ff amber99sb-ildn -water spce -ignh
gmx editconf -f conf.gro -o conf_boxed.gro -d 1.0 -bt cubic

In the example above the editconf program will append box vectors to the structure file ‘conf.gro’ and save it in the file ‘conf_boxed.gro’. The 9 components of the three box vectors are saved in the last line of the structure file in the order: xx yy zz xy xz yx yz zx zy. Three of the values (xy, xz, and yz) are always zeros because they are duplicates of (yx, zx, and zy). The values of the box vectors components are related to the unit cell vectors \(a,b,c,\alpha,\beta,\gamma\) from the CRYST1 record of a PDB file with the equations:

\[xx=a, yy=b\cdot\sin(\gamma), zz=\frac{v}{(a*b*\sin(\gamma))}\] \[xy=0, xz=0, yx=b\cdot\cos(\gamma)\] \[yz=0, zx=c\cdot\cos(\beta), zy=\frac{c}{\sin(\gamma)}\cdot(cos(\alpha)-cos(\beta)\cdot\cos(\gamma))\] \[v=\sqrt{1-\cos^2(\alpha)-cos^2(\beta)-\cos^2(\gamma) +2.0\cdot\cos(\alpha)\cdot\cos(\beta)\cdot\cos(\gamma)}\cdot{a}\cdot{b}\cdot{c}\]

NAMD

Periodic box is specified in the run parameter file by three unit cell vectors, the units are .

# cubic box
cellBasisVector1 100 0 0
cellBasisVector2 0 100 0
cellBasisVector3 0 0 100

Alternatively periodic box parameters can be read from the .xsc (eXtended System Configuration) file by using the extendedSystem keyword. If this keyword is used cellBasisVectors are ignored. NAMD always generates .xsc files at runtime.

extendedSystem restart.xsc

Comparing periodic boxes

Using the structure file ‘conf.gro’ from the example above generate triclinic, cubic, dodecahedral and truncated octahedral boxes with the 15 distance between the solute and the box edge.

Which of the boxes will be the fastest to simulate?

References:

  1. Molecular dynamics simulations with constrained roto-translational motions: Theoretical basis and statistical mechanical consistency
  2. The effect of box shape on the dynamic properties of proteins simulated under periodic boundary conditions
  3. Periodic box types in Gromacs manual

Key Points

  • Periodic boundary conditions are used to approximate an infinitely large system.

  • Periodic box should not restrict molecular motions in any way.

  • The macromolecule shape, rotation and conformational changes should be taken into account in choosing the periodic box parameters.