Cell lists

Last updated

Cell lists (also sometimes referred to as cell linked-lists) is a data structure in molecular dynamics simulations to find all atom pairs within a given cut-off distance of each other. These pairs are needed to compute the short-range non-bonded interactions in a system, such as Van der Waals forces or the short-range part of the electrostatic interaction when using Ewald summation.

Contents

Algorithm

The pairwise interactions for a single particle can be computed by a) computing the interaction to all other particles or b) by dividing the domain into cells with an edge length of at least the cut-off radius of the interaction potential and computing the interaction between the particle and all particles in the same (red) and in the adjacent (green) cells. CellLists.png
The pairwise interactions for a single particle can be computed by a) computing the interaction to all other particles or b) by dividing the domain into cells with an edge length of at least the cut-off radius of the interaction potential and computing the interaction between the particle and all particles in the same (red) and in the adjacent (green) cells.

Cell lists work by subdividing the simulation domain into cells with an edge length greater than or equal to the cut-off radius of the interaction to be computed. The particles are sorted into these cells and the interactions are computed between particles in the same or neighbouring cells.

In its most basic form, the non-bonded interactions for a cut-off distance are computed as follows:

for all neighbouring cell pairs do
for alldo
for alldo
ifthen
Compute the interaction between and .
end if
end for
end for
end for

Since the cell length is at least in all dimensions, no particles within of each other can be missed.

Given a simulation with particles with a homogeneous particle density, the number of cells is proportional to and inversely proportional to the cut-off radius (i.e. if increases, so does the number of cells). The average number of particles per cell therefore does not depend on the total number of particles. The cost of interacting two cells is in . The number of cell pairs is proportional to the number of cells which is again proportional to the number of particles . The total cost of finding all pairwise distances within a given cut-off is in , which is significantly better than computing the pairwise distances naively.

Periodic boundary conditions

In most simulations, periodic boundary conditions are used to avoid imposing artificial boundary conditions. Using cell lists, these boundaries can be implemented in two ways.

Ghost cells

Periodic boundary conditions can be simulated by wrapping the simulation box in an additional layer of cells (shaded orange) containing periodic copies of the boundary cells (blue particles). CellLists Ghosts.png
Periodic boundary conditions can be simulated by wrapping the simulation box in an additional layer of cells (shaded orange) containing periodic copies of the boundary cells (blue particles).

In the ghost cells approach, the simulation box is wrapped in an additional layer of cells. These cells contain periodically wrapped copies of the corresponding simulation cells inside the domain.

Although the data—and usually also the computational cost—is doubled for interactions over the periodic boundary, this approach has the advantage of being straightforward to implement and very easy to parallelize, since cells will only interact with their geographical neighbours.

Periodic wrapping

Instead of creating ghost cells, cell pairs that interact over a periodic boundary can also use a periodic correction vector . This vector, which can be stored or computed for every cell pair , contains the correction which needs to be applied to "wrap" one cell around the domain to neighbour the other. The pairwise distance between two particles and is then computed as

.

This approach, although more efficient than using ghost cells, is less straightforward to implement (the cell pairs need to be identified over the periodic boundaries and the vector needs to be computed/stored).

Improvements

Despite reducing the computational cost of finding all pairs within a given cut-off distance from to , the cell list algorithm listed above still has some inefficiencies.

Consider a computational cell in three dimensions with edge length equal to the cut-off radius . The pairwise distance between all particles in the cell and in one of the neighbouring cells is computed. The cell has 26 neighbours: 6 sharing a common face, 12 sharing a common edge and 8 sharing a common corner. Of all the pairwise distances computed, only about 16% will actually be less than or equal to . In other words, 84% of all pairwise distance computations are spurious.

One way of overcoming this inefficiency is to partition the domain into cells of edge length smaller than . The pairwise interactions are then not just computed between neighboring cells, but between all cells within of each other (first suggested in [1] and implemented and analysed in [2] [3] and [4] ). This approach can be taken to the limit wherein each cell holds at most one single particle, therefore reducing the number of spurious pairwise distance evaluations to zero. This gain in efficiency, however, is quickly offset by the number of cells that need to be inspected for every interaction with a cell , which, for example in three dimensions, grows cubically with the inverse of the cell edge length. Setting the edge length to , however, already reduces the number of spurious distance evaluations to 63%.

Another approach is outlined and tested in Gonnet, [5] in which the particles are first sorted along the axis connecting the cell centers. This approach generates only about 40% spurious pairwise distance computations, yet carries an additional cost due to sorting the particles.

See also

Related Research Articles

Stress–energy tensor Tensor describing energy momentum density in spacetime

The stress–energy tensor, sometimes called the stress–energy–momentum tensor or the energy–momentum tensor, is a tensor physical quantity that describes the density and flux of energy and momentum in spacetime, generalizing the stress tensor of Newtonian physics. It is an attribute of matter, radiation, and non-gravitational force fields. This density and flux of energy and momentum are the sources of the gravitational field in the Einstein field equations of general relativity, just as mass density is the source of such a field in Newtonian gravity.

Second quantization Formulation of the quantum many-body problem

Second quantization, also referred to as occupation number representation, is a formalism used to describe and analyze quantum many-body systems. In quantum field theory, it is known as canonical quantization, in which the fields are thought of as field operators, in a manner similar to how the physical quantities are thought of as operators in first quantization. The key ideas of this method were introduced in 1927 by Paul Dirac, and were developed, most notably, by Vladimir Fock and Pascual Jordan later.

In physics, the S-matrix or scattering matrix relates the initial state and the final state of a physical system undergoing a scattering process. It is used in quantum mechanics, scattering theory and quantum field theory (QFT).

Smoothed-particle hydrodynamics Method of hydrodynamics simulation

Smoothed-particle hydrodynamics (SPH) is a computational method used for simulating the mechanics of continuum media, such as solid mechanics and fluid flows. It was developed by Gingold and Monaghan and Lucy in 1977, initially for astrophysical problems. It has been used in many fields of research, including astrophysics, ballistics, volcanology, and oceanography. It is a meshfree Lagrangian method, and the resolution of the method can easily be adjusted with respect to variables such as density.

LSZ reduction formula

In quantum field theory, the LSZ reduction formula is a method to calculate S-matrix elements from the time-ordered correlation functions of a quantum field theory. It is a step of the path that starts from the Lagrangian of some quantum field theory and leads to prediction of measurable quantities. It is named after the three German physicists Harry Lehmann, Kurt Symanzik and Wolfhart Zimmermann.

A multipole expansion is a mathematical series representing a function that depends on angles—usually the two angles used in the spherical coordinate system for three-dimensional Euclidean space, . Similarly to Taylor series, multipole expansions are useful because oftentimes only the first few terms are needed to provide a good approximation of the original function. The function being expanded may be real- or complex-valued and is defined either on , or less often on for some other .

Crank–Nicolson method Finite difference method for numerically solving parabolic differential equations

In numerical analysis, the Crank–Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations. It is a second-order method in time. It is implicit in time, can be written as an implicit Runge–Kutta method, and it is numerically stable. The method was developed by John Crank and Phyllis Nicolson in the mid 20th century.

Theoretical motivation for general relativity

A theoretical motivation for general relativity, including the motivation for the geodesic equation and the Einstein field equation, can be obtained from special relativity by examining the dynamics of particles in circular orbits about the earth. A key advantage in examining circular orbits is that it is possible to know the solution of the Einstein Field Equation a priori. This provides a means to inform and verify the formalism.

Covariant formulation of classical electromagnetism

The covariant formulation of classical electromagnetism refers to ways of writing the laws of classical electromagnetism in a form that is manifestly invariant under Lorentz transformations, in the formalism of special relativity using rectilinear inertial coordinate systems. These expressions both make it simple to prove that the laws of classical electromagnetism take the same form in any inertial coordinate system, and also provide a way to translate the fields and forces from one frame to another. However, this is not as general as Maxwell's equations in curved spacetime or non-rectilinear coordinate systems.

Ewald summation, named after Paul Peter Ewald, is a method for computing long-range interactions in periodic systems. It was first developed as the method for calculating electrostatic energies of ionic crystals, and is now commonly used for calculating long-range interactions in computational chemistry. Ewald summation is a special case of the Poisson summation formula, replacing the summation of interaction energies in real space with an equivalent summation in Fourier space. In this method, the long-range interaction is divided into two parts: a short-range contribution, and a long-range contribution which does not have a singularity. The short-range contribution is calculated in real space, whereas the long-range contribution is calculated using a Fourier transform. The advantage of this method is the rapid convergence of the energy compared with that of a direct summation. This means that the method has high accuracy and reasonable speed when computing long-range interactions, and it is thus the de facto standard method for calculating long-range interactions in periodic systems. The method requires charge neutrality of the molecular system in order to accurately calculate the total Coulombic interaction. A study of the truncation errors introduced in the energy and force calculations of disordered point-charge systems is provided by Kolafa and Perram.

In atomic, molecular, and optical physics and quantum chemistry, the molecular Hamiltonian is the Hamiltonian operator representing the energy of the electrons and nuclei in a molecule. This operator and the associated Schrödinger equation play a central role in computational chemistry and physics for computing properties of molecules and aggregates of molecules, such as thermal conductivity, specific heat, electrical conductivity, optical, and magnetic properties, and reactivity.

In many-body theory, the term Green's function is sometimes used interchangeably with correlation function, but refers specifically to correlators of field operators or creation and annihilation operators.

In computational chemistry, a constraint algorithm is a method for satisfying the Newtonian motion of a rigid body which consists of mass points. A restraint algorithm is used to ensure that the distance between mass points is maintained. The general steps involved are: (i) choose novel unconstrained coordinates, (ii) introduce explicit constraint forces, (iii) minimize constraint forces implicitly by the technique of Lagrange multipliers or projection methods.

In mathematics, the Kodaira–Spencer map, introduced by Kunihiko Kodaira and Donald C. Spencer, is a map associated to a deformation of a scheme or complex manifold X, taking a tangent space of a point of the deformation space to the first cohomology group of the sheaf of vector fields on X.

Orbit modeling is the process of creating mathematical models to simulate motion of a massive body as it moves in orbit around another massive body due to gravity. Other forces such as gravitational attraction from tertiary bodies, air resistance, solar pressure, or thrust from a propulsion system are typically modeled as secondary effects. Directly modeling an orbit can push the limits of machine precision due to the need to model small perturbations to very large orbits. Because of this, perturbation methods are often used to model the orbit in order to achieve better accuracy.

Heat transfer physics describes the kinetics of energy storage, transport, and energy transformation by principal energy carriers: phonons, electrons, fluid particles, and photons. Heat is energy stored in temperature-dependent motion of particles including electrons, atomic nuclei, individual atoms, and molecules. Heat is transferred to and from matter by the principal energy carriers. The state of energy stored within matter, or transported by the carriers, is described by a combination of classical and quantum statistical mechanics. The energy is different made (converted) among various carriers. The heat transfer processes are governed by the rates at which various related physical phenomena occur, such as the rate of particle collisions in classical mechanics. These various states and kinetics determine the heat transfer, i.e., the net rate of energy storage or transport. Governing these process from the atomic level to macroscale are the laws of thermodynamics, including conservation of energy.

Gluon field strength tensor

In theoretical particle physics, the gluon field strength tensor is a second order tensor field characterizing the gluon interaction between quarks.

Frequency selective surface

A frequency-selective surface (FSS) is any thin, repetitive surface designed to reflect, transmit or absorb electromagnetic fields based on the frequency of the field. In this sense, an FSS is a type of optical filter or metal-mesh optical filters in which the filtering is accomplished by virtue of the regular, periodic pattern on the surface of the FSS. Though not explicitly mentioned in the name, FSS's also have properties which vary with incidence angle and polarization as well - these are unavoidable consequences of the way in which FSS's are constructed. Frequency-selective surfaces have been most commonly used in the radio frequency region of the electromagnetic spectrum and find use in applications as diverse as the aforementioned microwave oven, antenna radomes and modern metamaterials. Sometimes frequency selective surfaces are referred to simply as periodic surfaces and are a 2-dimensional analog of the new periodic volumes known as photonic crystals.

Quadrature-based moment methods (QBMM) are a class of computational fluid dynamics (CFD) methods for solving Kinetic theory and is optimal for simulating phases such as rarefied gases or dispersed phases of a multiphase flow. The smallest "particle" entities which are tracked may be molecules of a single phase or granular "particles" such as aerosols, droplets, bubbles, precipitates, powders, dust, soot, etc. Moments of the Boltzmann equation are solved to predict the phase behavior as a continuous (Eulerian) medium, and is applicable for arbitrary Knudsen number and arbitrary Stokes number . Source terms for collision models such as Bhatnagar-Gross-Krook (BGK) and models for evaporation, coalescence, breakage, and aggregation are also available. By retaining a quadrature approximation of a probability density function (PDF), a set of abscissas and weights retain the physical solution and allow for the construction of moments that generate a set of partial differential equations (PDE's). QBMM has shown promising preliminary results for modeling granular gases or dispersed phases within carrier fluids and offers an alternative to Lagrangian methods such as Discrete Particle Simulation (DPS). The Lattice Boltzmann Method (LBM) shares some strong similarities in concept, but it relies on fixed abscissas whereas quadrature-based methods are more adaptive. Additionally, the Navier–Stokes equations(N-S) can be derived from the moment method approach.

In computational and mathematical biology, a biological lattice-gas cellular automaton (BIO-LGCA) is a discrete model for moving and interacting biological agents, a type of cellular automaton. The BIO-LGCA is based on the lattice-gas cellular automaton (LGCA) model used in fluid dynamics. A BIO-LGCA model describes cells and other motile biological agents as point particles moving on a discrete lattice, thereby interacting with nearby particles. Contrary to classic cellular automaton models, particles in BIO-LGCA are defined by their position and velocity. This allows to model and analyze active fluids and collective migration mediated primarily through changes in momentum, rather than density. BIO-LGCA applications include cancer invasion and cancer progression.

References

  1. Allen, M. P.; D. J. Tildesley (1987). Computer Simulation of Liquids. Oxford: Clarendon Press.
  2. Mattson, W.; B. M. Rice (1999). "Near-neighbor calculations using a modified cell-linked list method". Computer Physics Communications. 119 (2–3): 135. Bibcode:1999CoPhC.119..135M. doi:10.1016/S0010-4655(98)00203-3.
  3. Yao, Z.; Wang, J.-S.; Liu, G.-R.; Cheng, M (2004). "Improved neighbor list algorithm in molecular simulations using cell decomposition and data sorting method". Computer Physics Communications. 161: 27. arXiv: physics/0311055 . Bibcode:2004CoPhC.161...27Y. doi:10.1016/j.cpc.2004.04.004.
  4. Heinz, T. N.; Hünenberger, P. H. (2004). "A fast pairlist-construction algorithm for molecular simulations under periodic boundary conditions". Journal of Computational Chemistry. 25 (12): 1474–86. doi:10.1002/jcc.20071. PMID   15224391.
  5. Gonnet, Pedro (2007). "A Simple Algorithm to Accelerate the Computation of Non-Bonded Interactions in Cell-Based Molecular Dynamics Simulations". Journal of Computational Chemistry. 28 (2): 570–573. doi:10.1002/jcc.20563. PMID   17183605.