Periodic boundary conditions
Encyclopedia
In mathematical model
s and computer simulation
s, periodic boundary conditions (PBC) are a set of boundary conditions that are often used to simulate a large system by modelling a small part that is far from its edge. Periodic boundary conditions resemble the topologies of some video games; a unit cell or simulation box of a geometry suitable for perfect three-dimensional tiling is defined, and when an object passes through one face of the unit cell, it reappears on the opposite face with the same velocity. The simulation is of an infinite perfect tiling of the system. In topological terms, the space can be thought of as being mapped onto a three-dimensional torus
. The tiled copies of the unit cell are called images, of which there are infinitely many. During the simulation, only the properties of the unit cell need be recorded and propagated. The minimum-image convention is a common form of PBC particle bookkeeping in which each individual particle in the simulation interacts with the closest image of the remaining particles in the system.
An example occurs in molecular dynamics
, where PBC are usually applied to simulate bulk gasses, liquids, crystals or mixtures. A common application uses PBCs to simulate solvated macromolecule
s in a bath of explicit solvent
.
bulk system with no surfaces present. Moreover, in simulations of planar
surfaces, it is very often useful to simulate two dimensions (e.g. x and y)
with periodic boundaries, while leaving the third (z) direction with different boundary conditions, such as remaining vacuum to infinity.
This setup is known as slab boundary conditions.
PBC can be used in conjunction with Ewald summation
methods (usually particle mesh Ewald) of accounting for electrostatic
forces in the system. However, PBC also introduces correlational artifacts that do not respect the translational invariance of the system, and requires constraints on the composition and size of the simulation box.
In simulations of solid systems, the strain
field arising from any inhomogenuity in the system
will be artificially truncated and modified by the periodic boundary. Similarly, the wavelength
of sound or shock waves and phonon
s in the system is limited by the box size.
In simulations containing ionic (Coulomb) interactions, the net electrostatic charge of the system must be zero to avoid summing to an infinite charge when PBC is applied. In some applications it is appropriate to obtain neutrality by adding ion
s such as sodium
or chloride
(as counterion
s) in appropriate numbers if the molecules of interest are charged. Sometimes ions are even added to a system in which the molecules of interest are neutral, to approximate the ionic strength
of the solution in which the molecules naturally appear. Maintenance of the minimum-image convention also generally requires that a spherical cutoff radius for nonbonded forces be at most half the length of one side of a cubic box. Even in electrostatically neutral systems, a net dipole moment
of the unit cell can introduce a spurious bulk-surface energy, equivalent to pyroelectricity
in polar crystals
.
The size of the simulation box must also be large enough to prevent periodic artifacts from occurring due to the unphysical topology of the simulation. In a box that is too small, a macromolecule may interact with its own image in a neighboring box, which is functionally equivalent to a molecule's "head" interacting with its own "tail". This produces highly unphysical dynamics in most macromolecules, although the magnitude of the consequences and thus the appropriate box size relative to the size of the macromolecules depends on the intended length of the simulation, the desired accuracy, and the anticipated dynamics. For example, simulations of protein folding
that begin from the native state
may undergo smaller fluctuations, and therefore may not require as large a box, as simulations that begin from a random coil
conformation. However, the effects of solvation shell
s on the observed dynamics – in simulation or in experiment – are not well understood. A common recommendation based on simulations of DNA
is to require at least 1 nm of solvent around the molecules of interest in every dimension.
are needed.
The first is to make an object which leaves the simulation cell
on one side enter back on the other. This is of course a simple
operation, and could in code be e.g. (for the x dimension, assuming
an orthogonal
unit cell centered on the origin):
The second is to make sure that every distance between atoms, or other
vector calculated from one atom to another, has a length and direction which
corresponds to the minimum image criterion. This can be achieved
as follows to calculate e.g. the x direction distance component
from atom i to atom j:
Naturally both operations should be repeated in all 3 dimensions.
These operations can be written in much more compact form for orthorhombic cells if the origin is shifted to a corner of the box. Then we have, in one dimension, for positions and distances respectively:
For non-orthorhombic images the situation can be considerably more complicated.
In simulations of ionic systems considerably more complicated operations
may be needed to handle the long-range Coulomb interactions.
or rectangular prism is the most intuitive and common choice, but can be computationally expensive due to unnecessary amounts of solvent
molecules in the corners, distant from the central macromolecules. A common alternative that requires less volume is the truncated octahedron
.
of the system will be conserved, but angular momentum is not conserved because the PBC system is not rotationally symmetric. When applied to the microcanonical ensemble
(constant particle number, volume, and energy, abbreviated NVE), using PBC rather than reflecting walls slightly alters the sampling of the simulation due to the conservation of total linear momentum
and the position of the center of mass; this ensemble has been termed the "molecular dynamics
ensemble" or the NVEPG ensemble. These additional conserved quantities introduce minor artifacts related to the statistical mechanical
definition of temperature
, the departure of the velocity distributions from a Boltzmann distribution
, and violations of equipartition for systems containing particles with heterogeneous mass
es. The simplest of these effects is that a system of N particles will behave, in the molecular dynamics ensemble, as a system of N-1 particles. These artifacts have quantifiable consequences for small toy systems containing only perfectly hard particles; they have not been studied in depth for standard biomolecular simulations, but given the size of such systems, the effects will be largely negligible.
Mathematical model
A mathematical model is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used not only in the natural sciences and engineering disciplines A mathematical model is a...
s and computer simulation
Computer simulation
A computer simulation, a computer model, or a computational model is a computer program, or network of computers, that attempts to simulate an abstract model of a particular system...
s, periodic boundary conditions (PBC) are a set of boundary conditions that are often used to simulate a large system by modelling a small part that is far from its edge. Periodic boundary conditions resemble the topologies of some video games; a unit cell or simulation box of a geometry suitable for perfect three-dimensional tiling is defined, and when an object passes through one face of the unit cell, it reappears on the opposite face with the same velocity. The simulation is of an infinite perfect tiling of the system. In topological terms, the space can be thought of as being mapped onto a three-dimensional torus
Torus
In geometry, a torus is a surface of revolution generated by revolving a circle in three dimensional space about an axis coplanar with the circle...
. The tiled copies of the unit cell are called images, of which there are infinitely many. During the simulation, only the properties of the unit cell need be recorded and propagated. The minimum-image convention is a common form of PBC particle bookkeeping in which each individual particle in the simulation interacts with the closest image of the remaining particles in the system.
An example occurs in molecular dynamics
Molecular dynamics
Molecular dynamics is a computer simulation of physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a period of time, giving a view of the motion of the atoms...
, where PBC are usually applied to simulate bulk gasses, liquids, crystals or mixtures. A common application uses PBCs to simulate solvated macromolecule
Macromolecule
A macromolecule is a very large molecule commonly created by some form of polymerization. In biochemistry, the term is applied to the four conventional biopolymers , as well as non-polymeric molecules with large molecular mass such as macrocycles...
s in a bath of explicit solvent
Water model
In computational chemistry, classical water models are used for the simulation of water clusters, liquid water, and aqueous solutions with explicit solvent. These models use the approximations of molecular mechanics...
.
PBC requirements and artifacts
Periodic boundary conditions are particularly useful for simulating a part of abulk system with no surfaces present. Moreover, in simulations of planar
surfaces, it is very often useful to simulate two dimensions (e.g. x and y)
with periodic boundaries, while leaving the third (z) direction with different boundary conditions, such as remaining vacuum to infinity.
This setup is known as slab boundary conditions.
PBC can be used in conjunction with Ewald summation
Ewald summation
Ewald summation, named after Paul Peter Ewald, is a method for computing the interaction energies of periodic systems , particularly electrostatic energies. Ewald summation is a special case of the Poisson summation formula, replacing the summation of interaction energies in real space with an...
methods (usually particle mesh Ewald) of accounting for electrostatic
Coulomb's law
Coulomb's law or Coulomb's inverse-square law, is a law of physics describing the electrostatic interaction between electrically charged particles. It was first published in 1785 by French physicist Charles Augustin de Coulomb and was essential to the development of the theory of electromagnetism...
forces in the system. However, PBC also introduces correlational artifacts that do not respect the translational invariance of the system, and requires constraints on the composition and size of the simulation box.
In simulations of solid systems, the strain
Strain (materials science)
In continuum mechanics, the infinitesimal strain theory, sometimes called small deformation theory, small displacement theory, or small displacement-gradient theory, deals with infinitesimal deformations of a continuum body...
field arising from any inhomogenuity in the system
will be artificially truncated and modified by the periodic boundary. Similarly, the wavelength
of sound or shock waves and phonon
Phonon
In physics, a phonon is a collective excitation in a periodic, elastic arrangement of atoms or molecules in condensed matter, such as solids and some liquids...
s in the system is limited by the box size.
In simulations containing ionic (Coulomb) interactions, the net electrostatic charge of the system must be zero to avoid summing to an infinite charge when PBC is applied. In some applications it is appropriate to obtain neutrality by adding ion
Ion
An ion is an atom or molecule in which the total number of electrons is not equal to the total number of protons, giving it a net positive or negative electrical charge. The name was given by physicist Michael Faraday for the substances that allow a current to pass between electrodes in a...
s such as sodium
Sodium
Sodium is a chemical element with the symbol Na and atomic number 11. It is a soft, silvery-white, highly reactive metal and is a member of the alkali metals; its only stable isotope is 23Na. It is an abundant element that exists in numerous minerals, most commonly as sodium chloride...
or chloride
Chloride
The chloride ion is formed when the element chlorine, a halogen, picks up one electron to form an anion Cl−. The salts of hydrochloric acid HCl contain chloride ions and can also be called chlorides. The chloride ion, and its salts such as sodium chloride, are very soluble in water...
(as counterion
Counterion
A counterion is the ion that accompanies an ionic species in order to maintain electric neutrality. In table salt the sodium cation is the counterion for the chlorine anion and vice versa.In a charged transition metal complex, a simple A counterion is the ion that accompanies an ionic species in...
s) in appropriate numbers if the molecules of interest are charged. Sometimes ions are even added to a system in which the molecules of interest are neutral, to approximate the ionic strength
Ionic strength
The ionic strength of a solution is a measure of the concentration of ions in that solution. Ionic compounds, when dissolved in water, dissociate into ions. The total electrolyte concentration in solution will affect important properties such as the dissociation or the solubility of different salts...
of the solution in which the molecules naturally appear. Maintenance of the minimum-image convention also generally requires that a spherical cutoff radius for nonbonded forces be at most half the length of one side of a cubic box. Even in electrostatically neutral systems, a net dipole moment
Dipole moment
Dipole moment can be defined as the product of magnitude of charge & distance of separation between the charges.Dipole moment may refer to:*Electric dipole moment, the measure of the electrical polarity of a system of charges...
of the unit cell can introduce a spurious bulk-surface energy, equivalent to pyroelectricity
Pyroelectricity
Pyroelectricity is the ability of certain materials to generate a temporary voltage when they are heated or cooled. The change in temperature modifies the positions of the atoms slightly within the crystal structure, such that the polarization of the material changes. This polarization change...
in polar crystals
Ferroelectricity
Ferroelectricity is a property of certain materials which possess a spontaneous electric polarization that can be reversed by the application of an external electric field. The term is used in analogy to ferromagnetism, in which a material exhibits a permanent magnetic moment. Ferromagnetism was...
.
The size of the simulation box must also be large enough to prevent periodic artifacts from occurring due to the unphysical topology of the simulation. In a box that is too small, a macromolecule may interact with its own image in a neighboring box, which is functionally equivalent to a molecule's "head" interacting with its own "tail". This produces highly unphysical dynamics in most macromolecules, although the magnitude of the consequences and thus the appropriate box size relative to the size of the macromolecules depends on the intended length of the simulation, the desired accuracy, and the anticipated dynamics. For example, simulations of protein folding
Protein folding
Protein folding is the process by which a protein structure assumes its functional shape or conformation. It is the physical process by which a polypeptide folds into its characteristic and functional three-dimensional structure from random coil....
that begin from the native state
Native state
In biochemistry, the native state of a protein is its operative or functional form. While all protein molecules begin as simple unbranched chains of amino acids, once completed they assume highly specific three-dimensional shapes; that ultimate shape, known as tertiary structure, is the folded...
may undergo smaller fluctuations, and therefore may not require as large a box, as simulations that begin from a random coil
Random coil
A random coil is a polymer conformation where the monomer subunits are oriented randomly while still being bonded to adjacent units. It is not one specific shape, but a statistical distribution of shapes for all the chains in a population of macromolecules...
conformation. However, the effects of solvation shell
Solvation shell
A Solvation shell is a shell of any chemical species acting as a solvent, surrounding a solute species. When the solvent is water it is often referred to as a hydration shell or hydration sphere....
s on the observed dynamics – in simulation or in experiment – are not well understood. A common recommendation based on simulations of DNA
DNA
Deoxyribonucleic acid is a nucleic acid that contains the genetic instructions used in the development and functioning of all known living organisms . The DNA segments that carry this genetic information are called genes, but other DNA sequences have structural purposes, or are involved in...
is to require at least 1 nm of solvent around the molecules of interest in every dimension.
Practical implementation: continuity and the minimum image convention
To implement periodic boundary conditions in practice, at least two stepsare needed.
The first is to make an object which leaves the simulation cell
on one side enter back on the other. This is of course a simple
operation, and could in code be e.g. (for the x dimension, assuming
an orthogonal
Orthogonality
Orthogonality occurs when two things can vary independently, they are uncorrelated, or they are perpendicular.-Mathematics:In mathematics, two vectors are orthogonal if they are perpendicular, i.e., they form a right angle...
unit cell centered on the origin):
The second is to make sure that every distance between atoms, or other
vector calculated from one atom to another, has a length and direction which
corresponds to the minimum image criterion. This can be achieved
as follows to calculate e.g. the x direction distance component
from atom i to atom j:
Naturally both operations should be repeated in all 3 dimensions.
These operations can be written in much more compact form for orthorhombic cells if the origin is shifted to a corner of the box. Then we have, in one dimension, for positions and distances respectively:
For non-orthorhombic images the situation can be considerably more complicated.
In simulations of ionic systems considerably more complicated operations
may be needed to handle the long-range Coulomb interactions.
Unit cell geometries
PBC requires the unit cell to be a shape that will tile perfectly into a three-dimensional crystal. Thus, a spherical or elliptical droplet cannot be used. A cubeCube
In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex. The cube can also be called a regular hexahedron and is one of the five Platonic solids. It is a special kind of square prism, of rectangular parallelepiped and...
or rectangular prism is the most intuitive and common choice, but can be computationally expensive due to unnecessary amounts of solvent
Solvent
A solvent is a liquid, solid, or gas that dissolves another solid, liquid, or gaseous solute, resulting in a solution that is soluble in a certain volume of solvent at a specified temperature...
molecules in the corners, distant from the central macromolecules. A common alternative that requires less volume is the truncated octahedron
Truncated octahedron
In geometry, the truncated octahedron is an Archimedean solid. It has 14 faces , 36 edges, and 24 vertices. Since each of its faces has point symmetry the truncated octahedron is a zonohedron....
.
Conserved properties
Under periodic boundary conditions, the linear momentumMomentum
In classical mechanics, linear momentum or translational momentum is the product of the mass and velocity of an object...
of the system will be conserved, but angular momentum is not conserved because the PBC system is not rotationally symmetric. When applied to the microcanonical ensemble
Microcanonical ensemble
In statistical physics, the microcanonical ensemble is a theoretical tool used to describe the thermodynamic properties of an isolated system. In such a system, the possible macrostates of the system all have the same energy and the probability for the system to be in any given microstate is the same...
(constant particle number, volume, and energy, abbreviated NVE), using PBC rather than reflecting walls slightly alters the sampling of the simulation due to the conservation of total linear momentum
Momentum
In classical mechanics, linear momentum or translational momentum is the product of the mass and velocity of an object...
and the position of the center of mass; this ensemble has been termed the "molecular dynamics
Molecular dynamics
Molecular dynamics is a computer simulation of physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a period of time, giving a view of the motion of the atoms...
ensemble" or the NVEPG ensemble. These additional conserved quantities introduce minor artifacts related to the statistical mechanical
Statistical mechanics
Statistical mechanics or statistical thermodynamicsThe terms statistical mechanics and statistical thermodynamics are used interchangeably...
definition of temperature
Temperature
Temperature is a physical property of matter that quantitatively expresses the common notions of hot and cold. Objects of low temperature are cold, while various degrees of higher temperatures are referred to as warm or hot...
, the departure of the velocity distributions from a Boltzmann distribution
Boltzmann distribution
In chemistry, physics, and mathematics, the Boltzmann distribution is a certain distribution function or probability measure for the distribution of the states of a system. It underpins the concept of the canonical ensemble, providing its underlying distribution...
, and violations of equipartition for systems containing particles with heterogeneous mass
Mass
Mass can be defined as a quantitive measure of the resistance an object has to change in its velocity.In physics, mass commonly refers to any of the following three properties of matter, which have been shown experimentally to be equivalent:...
es. The simplest of these effects is that a system of N particles will behave, in the molecular dynamics ensemble, as a system of N-1 particles. These artifacts have quantifiable consequences for small toy systems containing only perfectly hard particles; they have not been studied in depth for standard biomolecular simulations, but given the size of such systems, the effects will be largely negligible.
See also
- Helical boundary conditionsHelical boundary conditionsIn mathematics, helical boundary conditions are a variation on periodic boundary conditions. Helical boundary conditions provide a method for determining the index of a lattice site's neighbours when each lattice site is indexed by just a single coordinate. On a lattice of dimension d where the...
- Molecular modeling
- Software for molecular mechanics modeling