Metadynamics (MTD; also abbreviated as METAD or MetaD) is a
computer simulation
Computer simulation is the running of a mathematical model on a computer, the model being designed to represent the behaviour of, or the outcome of, a real-world or physical system. The reliability of some mathematical models can be determin ...
method in
computational physics
Computational physics is the study and implementation of numerical analysis to solve problems in physics. Historically, computational physics was the first application of modern computers in science, and is now a subset of computational science ...
,
chemistry
Chemistry is the scientific study of the properties and behavior of matter. It is a physical science within the natural sciences that studies the chemical elements that make up matter and chemical compound, compounds made of atoms, molecules a ...
and
biology
Biology is the scientific study of life and living organisms. It is a broad natural science that encompasses a wide range of fields and unifying principles that explain the structure, function, growth, History of life, origin, evolution, and ...
. It is used to
estimate
Estimation (or estimating) is the process of finding an estimate or approximation, which is a value that is usable for some purpose even if input data may be incomplete, uncertain, or unstable. The value is nonetheless usable because it is de ...
the
free energy and other
state function
In the thermodynamics of equilibrium, a state function, function of state, or point function for a thermodynamic system is a mathematical function relating several state variables or state quantities (that describe equilibrium states of a syste ...
s of a
system
A system is a group of interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its open system (systems theory), environment, is described by its boundaries, str ...
, where
ergodicity
In mathematics, ergodicity expresses the idea that a point of a moving system, either a dynamical system or a stochastic process, will eventually visit all parts of the space that the system moves in, in a uniform and random sense. This implies th ...
is hindered by the form of the system's
energy landscape
Energy () is the quantitative property that is transferred to a body or to a physical system, recognizable in the performance of work and in the form of heat and light. Energy is a conserved quantity—the law of conservation of energy ...
. It was first suggested by
Alessandro Laio and
Michele Parrinello in 2002
and is usually applied within
molecular dynamics
Molecular dynamics (MD) is a computer simulation method for analyzing the Motion (physics), physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamics ( ...
simulations. MTD closely resembles a number of newer methods such as adaptively biased molecular dynamics,
adaptive reaction coordinate forces
and local elevation umbrella sampling.
More recently, both the original and well-tempered metadynamics
were derived in the context of importance sampling and shown to be a special case of the adaptive biasing potential setting.
MTD is related to the
Wang–Landau sampling.
Introduction
The technique builds on a large number of related methods including (in a chronological order) the
deflation,
tunneling,
tabu search Tabu search (TS) is a metaheuristic search method employing local search methods used for mathematical optimization. It was created by Fred W. Glover in 1986
and formalized in 1989.
Local (neighborhood) searches take a potential solution to a ...
,
local elevation,
conformational flooding,
Engkvist-Karlström
and
Adaptive Biasing Force methods.
Metadynamics has been informally described as "filling the free energy wells with computational sand".
[http://www.grs-sim.de/cms/upload/Carloni/Presentations/Marinelli.ppt] The algorithm assumes that the system can be described by a few
collective variables (CV). During the simulation, the location of the system in the space determined by the collective variables is calculated and a positive
Gaussian
Carl Friedrich Gauss (1777–1855) is the eponym of all of the topics listed below.
There are over 100 topics all named after this German mathematician and scientist, all in the fields of mathematics, physics, and astronomy. The English eponymo ...
potential is added to the real energy landscape of the system. In this way the system is discouraged to come back to the previous point. During the evolution of the simulation, more and more Gaussians sum up, thus discouraging more and more the system to go back to its previous steps, until the system explores the full energy landscape—at this point the modified free energy becomes a constant as a function of the collective variables which is the reason for the collective variables to start fluctuating heavily. At this point the energy landscape can be recovered as the opposite of the sum of all Gaussians.
The time interval between the addition of two Gaussian functions, as well as the Gaussian height and Gaussian width, are tuned to optimize the ratio between accuracy and computational cost. By simply changing the size of the Gaussian, metadynamics can be fitted to yield very quickly a rough map of the energy landscape by using large Gaussians, or can be used for a finer grained description by using smaller Gaussians.
Usually, the well-tempered metadynamics
is used to change the Gaussian size adaptively. Also, the Gaussian width can be adapted with the adaptive Gaussian metadynamics.
Metadynamics has the advantage, upon methods like adaptive
umbrella sampling
Umbrella sampling is a technique in computational physics and chemistry
Chemistry is the scientific study of the properties and behavior of matter. It is a physical science within the natural sciences that studies the chemical elements tha ...
, of not requiring an initial estimate of the energy landscape to explore.
However, it is not trivial to choose proper collective variables for a complex simulation. Typically, it requires several trials to find a good set of collective variables, but there are several automatic procedures proposed:
essential coordinates,
Sketch-Map, and non-linear data-driven collective variables.
Multi-replica approach
Independent metadynamics simulations (replicas) can be coupled together to improve usability and parallel performance. There are several such methods proposed: the multiple walker MTD, the parallel tempering MTD, the bias-exchange MTD,
and the collective-variable tempering MTD. The last three are similar to the
parallel tempering method and use replica exchanges to improve sampling. Typically, the
Metropolis–Hastings algorithm is used for replica exchanges, but the
infinite swapping and
Suwa-Todo algorithms give better replica exchange rates.
High-dimensional approach
Typical (single-replica) MTD simulations can include up to 3 CVs, even using the multi-replica approach, it is hard to exceed 8 CVs in practice. This limitation comes from the bias potential, constructed by adding Gaussian functions (kernels). It is a special case of the
kernel density estimator (KDE). The number of required kernels, for a constant KDE accuracy, increases exponentially with the number of dimensions. So MTD simulation length has to increase exponentially with the number of CVs to maintain the same accuracy of the bias potential. Also, the bias potential, for fast evaluation, is typically approximated with a
regular grid
A regular grid is a tessellation of ''n''-dimensional Euclidean space by Congruence_(geometry), congruent parallelepiped#Parallelotope, parallelotopes (e.g. bricks). Its opposite is Unstructured grid, irregular grid.
Grids of this type appear on ...
. The required
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
to store the grid increases exponentially with the number of dimensions (CVs) too.
A high-dimensional generalization of metadynamics is NN2B.
It is based on two
machine learning
Machine learning (ML) is a field of study in artificial intelligence concerned with the development and study of Computational statistics, statistical algorithms that can learn from data and generalise to unseen data, and thus perform Task ( ...
algorithms: the
nearest-neighbor density estimator (NNDE) and the
artificial neural network
In machine learning, a neural network (also artificial neural network or neural net, abbreviated ANN or NN) is a computational model inspired by the structure and functions of biological neural networks.
A neural network consists of connected ...
(ANN). NNDE replaces KDE to estimate the updates of bias potential from short biased simulations, while ANN is used to approximate the resulting bias potential. ANN is a memory-efficient representation of high-dimensional functions, where derivatives (biasing forces) are effectively computed with the
backpropagation
In machine learning, backpropagation is a gradient computation method commonly used for training a neural network to compute its parameter updates.
It is an efficient application of the chain rule to neural networks. Backpropagation computes th ...
algorithm.
An alternative method, exploiting ANN for the adaptive bias potential, uses
mean potential forces for the estimation.
This method is also a high-dimensional generalization of the
Adaptive Biasing Force (ABF) method. Additionally, the training of ANN is improved using Bayesian regularization, and the error of approximation can be inferred by training an ensemble of ANNs.
Developments since 2015
In 2015, White, Dama, and Voth introduced experiment-directed metadynamics, a method that allows for shaping
molecular dynamics
Molecular dynamics (MD) is a computer simulation method for analyzing the Motion (physics), physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamics ( ...
simulations to match a desired
free energy surface. This technique guides the simulation towards
conformations that align with experimental data, enhancing our understanding of complex molecular systems and their behavior.
In 2020, an evolution of metadynamics was proposed, the ''on-the-fly probability enhanced sampling'' method (OPES), which is now the method of choice of
Michele Parrinello's research group. The OPES method has only a few robust parameters, converges faster than metadynamics, and has a straightforward reweighting scheme. In 2024, a replica-exchange variant of OPES was developed, named OneOPES, designed to exploit a thermal gradient and multiple CVs to sample large biochemical systems with several degrees of freedom. This variant aims to address the challenge of describing such systems, where the numerous degrees of freedom are often difficult to capture with only a few CVs. OPES has been implemented in the
PLUMED library since version 2.7.
Algorithm
Assume we have a
classical -particle system with positions at
in the
Cartesian coordinates
In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
. The particle interaction are described with a
potential
Potential generally refers to a currently unrealized ability. The term is used in a wide variety of fields, from physics to the social sciences to indicate things that are in a state where they are able to change in ways ranging from the simple r ...
function
. The potential function form (e.g. two local minima separated by a high-energy barrier) prevents an
ergodic
In mathematics, ergodicity expresses the idea that a point of a moving system, either a dynamical system or a stochastic process, will eventually visit all parts of the space that the system moves in, in a uniform and random sense. This implies th ...
sampling with
molecular dynamics
Molecular dynamics (MD) is a computer simulation method for analyzing the Motion (physics), physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamics ( ...
or
Monte Carlo
Monte Carlo ( ; ; or colloquially ; , ; ) is an official administrative area of Monaco, specifically the Ward (country subdivision), ward of Monte Carlo/Spélugues, where the Monte Carlo Casino is located. Informally, the name also refers to ...
methods.
Original metadynamics
A general idea of MTD is to enhance the system sampling by discouraging revisiting of sampled states. It is achieved by augmenting the system
Hamiltonian
Hamiltonian may refer to:
* Hamiltonian mechanics, a function that represents the total energy of a system
* Hamiltonian (quantum mechanics), an operator corresponding to the total energy of that system
** Dyall Hamiltonian, a modified Hamiltonian ...
with a bias potential
:
:
.
The bias potential is a function of
collective variables . A collective variable is a function of the particle positions
. The bias potential is continuously updated by adding bias at rate
, where
is an instantaneous collective variable value at time
:
:
.
At infinitely long simulation time
, the accumulated bias potential converges to
free energy with opposite sign (and irrelevant constant
):
:
For a computationally efficient implementation, the update process is
discretised into
time intervals (
denotes the
floor function
In mathematics, the floor function is the function that takes as input a real number , and gives as output the greatest integer less than or equal to , denoted or . Similarly, the ceiling function maps to the least integer greater than or eq ...
) and
-function is replaced with a localized positive
kernel function . The bias potential becomes a sum of the kernel functions centred at the instantaneous collective variable values
at time
:
:
.
Typically, the kernel is a
multi-dimensional Gaussian function, whose covariance matrix has diagonal non-zero elements only:
:
.
The parameter
,
, and
are determined ''a priori'' and kept constant during the simulation.
Implementation
Below there is a
pseudocode
In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages (like assignment operator, conditional operator, loop) with informal, usually self-explanatory, notation of actio ...
of MTD base on
molecular dynamics
Molecular dynamics (MD) is a computer simulation method for analyzing the Motion (physics), physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamics ( ...
(MD), where
and
are the
-particle system positions and velocities, respectively. The bias
is updated every
MD steps, and its contribution to the system forces
is
.
set initial
and
set
every MD step:
compute CV values:
every
MD steps:
update bias potential:
compute atomic forces:
propagate
and
by
Free energy estimator
The finite size of the kernel makes the bias potential to fluctuate around a mean value. A converged free energy can be obtained by averaging the bias potential. The averaging is started from
, when the motion along the collective variable becomes diffusive:
:
Applications
Metadynamics has been used to study:
*
protein folding
Protein folding is the physical process by which a protein, after Protein biosynthesis, synthesis by a ribosome as a linear chain of Amino acid, amino acids, changes from an unstable random coil into a more ordered protein tertiary structure, t ...
*
chemical reactions
A chemical reaction is a process that leads to the chemical transformation of one set of chemical substances to another. When chemical reactions occur, the atoms are rearranged and the reaction is accompanied by an energy change as new products ...
*
molecular docking
*
phase transitions
In physics, chemistry, and other related fields like biology, a phase transition (or phase change) is the physical process of transition between one state of a medium and another. Commonly the term is used to refer to changes among the basic Sta ...
.
* encapsulation of DNA onto hydrophobic and hydrophilic single-walled carbon nanotubes.
Implementations
PLUMED
PLUMED is an
open-source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
implementing many MTD algorithms and
collective variables. It has a flexible
object-oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
design and can be interfaced with several MD programs (
AMBER
Amber is fossilized tree resin. Examples of it have been appreciated for its color and natural beauty since the Neolithic times, and worked as a gemstone since antiquity."Amber" (2004). In Maxine N. Lurie and Marc Mappen (eds.) ''Encyclopedia ...
,
GROMACS
GROMACS is a molecular dynamics package mainly designed for simulations of proteins, lipids, and nucleic acids. It was originally developed in the Biophysical Chemistry department of University of Groningen, and is now maintained by contributors ...
,
LAMMPS
LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator) is a molecular dynamics program developed by Sandia National Laboratories. It utilizes the Message Passing Interface (MPI) for parallel communication, enabling high-performance s ...
,
NAMD,
Quantum ESPRESSO, DL_POLY_4,
CP2K
CP2K is a freely available ( GPL) quantum chemistry and solid state physics program package, written in Fortran 2008, to perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. It prov ...
, and OpenMM).
Other
Other MTD implementations exist in th
Collective Variables Module (for
LAMMPS
LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator) is a molecular dynamics program developed by Sandia National Laboratories. It utilizes the Message Passing Interface (MPI) for parallel communication, enabling high-performance s ...
,
NAMD, and
GROMACS
GROMACS is a molecular dynamics package mainly designed for simulations of proteins, lipids, and nucleic acids. It was originally developed in the Biophysical Chemistry department of University of Groningen, and is now maintained by contributors ...
),
ORAC,
CP2K
CP2K is a freely available ( GPL) quantum chemistry and solid state physics program package, written in Fortran 2008, to perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems. It prov ...
,
EDM,
[https://github.com/whitead/electronic-dance-music Plugin for ]LAMMPS
LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator) is a molecular dynamics program developed by Sandia National Laboratories. It utilizes the Message Passing Interface (MPI) for parallel communication, enabling high-performance s ...
and
Desmond.
External links
Introduction to metadynamicsPLUMEDColvars module website (NAMD, LAMMPS, Gromacs)Visual movie of metadynamics
See also
*
Local elevation
*
Parallel tempering
*
Umbrella sampling
Umbrella sampling is a technique in computational physics and chemistry
Chemistry is the scientific study of the properties and behavior of matter. It is a physical science within the natural sciences that studies the chemical elements tha ...
References
{{reflist, 2
Molecular dynamics
Computational chemistry
Theoretical chemistry