# Category:Biased molecular dynamics

(Redirected from Biased molecular dynamics)

Biased molecular dynamics (MD) refers to advanced MD-simulation methods that introduce a bias potential. One of the most important purposes of using bias potentials is to enhance the sampling of phase space with low probability density (e.g., transition regions of chemical reactions). Depending on the type of sampling and in combination with the corresponding statistical methods one then has access to important thermodynamic quantities like, e.g., free energies. Biased molecular dynamics comes in very different flavors such as, e.g., umbrella sampling[1] and umbrella integration[2], to name a few. In the following, a short theoretical overview, an introduction to the available bias potentials, and a description of how to use bias potentials in VASP is given. For a comprehensive description (especially about umbrella sampling), we refer the interested user to Ref. [3] written by D. Frenkel and B. Smit.

## Theoretical background

The probability density for a geometric parameter ξ of the system driven by a Hamiltonian

${\displaystyle H(q,p)=T(p)+V(q),\;}$

with T(p), and V(q) being kinetic, and potential energies, respectively, can be written as

${\displaystyle P(\xi _{i})={\frac {\int \delta {\Big (}\xi (q)-\xi _{i}{\Big )}\exp \left\{-H(q,p)/k_{B}\,T\right\}dq\,dp}{\int \exp \left\{-H(q,p)/k_{B}\,T\right\}dq\,dp}}=\langle \delta {\Big (}\xi (q)-\xi _{i}{\Big )}\rangle _{H}.}$

The term ${\displaystyle \langle X\rangle _{H}}$ stands for a thermal average of quantity X evaluated for the system driven by the Hamiltonian H.

If the system is modified by adding a bias potential ${\displaystyle {\tilde {V}}(\xi )}$ acting on one or multiple selected internal coordinates of the system ξ=ξ(q), the Hamiltonian takes the form

${\displaystyle {\tilde {H}}(q,p)=H(q,p)+{\tilde {V}}(\xi ),}$

and the probability density of ξ in the biased ensemble is

${\displaystyle {\tilde {P}}(\xi _{i})={\frac {\int \delta {\Big (}\xi (q)-\xi _{i}{\Big )}\exp \left\{-{\tilde {H}}(q,p)/k_{B}\,T\right\}dq\,dp}{\int \exp \left\{-{\tilde {H}}(q,p)/k_{B}\,T\right\}dq\,dp}}=\langle \delta {\Big (}\xi (q)-\xi _{i}{\Big )}\rangle _{\tilde {H}}.}$

It can be shown that the biased and unbiased averages are related via

${\displaystyle P(\xi _{i})={\tilde {P}}(\xi _{i}){\frac {\exp \left\{{\tilde {V}}(\xi )/k_{B}\,T\right\}}{\langle \exp \left\{{\tilde {V}}(\xi )/k_{B}\,T\right\}\rangle _{\tilde {H}}}}.}$

More generally, an observable

${\displaystyle \langle A\rangle _{H}={\frac {\int A(q)\exp \left\{-H(q,p)/k_{B}\,T\right\}dq\,dp}{\int \exp \left\{-H(q,p)/k_{B}\,T\right\}dq\,dp}}}$

can be expressed in terms of thermal averages within the biased ensemble as

${\displaystyle \langle A\rangle _{H}={\frac {\langle A(q)\,\exp \left\{{\tilde {V}}(\xi )/k_{B}\,T\right\}\rangle _{\tilde {H}}}{\langle \exp \left\{{\tilde {V}}(\xi )/k_{B}\,T\right\}\rangle _{\tilde {H}}}}.}$

One of the most popular methods using bias potentials is umbrella sampling[1]. This method uses a bias potential to enhance sampling of ξ in regions with low Pi), e.g., transition regions of chemical reactions. The correct distributions are recovered afterward using the equation for ${\displaystyle \langle A\rangle _{H}}$ above.

## How to

 Mind: Mind that for VASP 5.x the biased molecular dynamics runs have to be chosen by adding 10 to the chosen value of MDALGO. E.g. MDALGO=12 instead of MDALGO=2 has to be chosen for Nose-Hoover thermostat.
• Then one needs to set the geometric parameters and bias potential types. The geometric parameters ξ, also called collective variables, that are controlled via the potentials are defined in the ICONST file. The type of bias potential is also set in this file. The format of this file follows this layout:
flag item(1) ... item(N) status


Here flag specifies the type of geometric parameters (bond lengths, angles, etc.), item(1) ... item(N) the actual geometric items (atom numbers, etc.) and the status sets the type of used bias potential. Here we advise the user to also look into the description of the full capabilities of the geometric parameters.

• To avoid the update of the bias potential HILLS_BIN=NSW is set by default.
• Next one needs to set the parameters of the potential in the INCAR (harmonic and step function) file or in the PENALTYPOT file (Gaussian). The following table summarizes the available potentials with their corresponding parameters:
 Potential type status in ICONST INCAR parameters Harmonic potential 8 SPRING_K, SPRING_R0, optional SPRING_V0 Step function 4 FBIAS_A, FBIAS_D, and FBIAS_R0 Gaussian potential 5 parameters set in PENALTYPOT file

### Available potentials

In the following details are given on how to control the available bias potentials in VASP that are plotted in Fig.1.

#### Harmonic potentials

A sum of Harmonic potentials (curve (a) in Fig.1)
${\displaystyle {\tilde {V}}(\xi _{1},\dots ,\xi _{M_{8}})=\sum _{\mu =1}^{M}{\frac {1}{2}}\kappa _{\mu }(\xi _{\mu }(q)-\xi _{0\mu })^{2}\;}$
where the sum runs over all (${\displaystyle M_{8}}$) coordinates the potential acts upon. The potential is chosen in the ICONST file by setting the status to 8. The parameters of the potential are the force constant ${\displaystyle \kappa _{\mu }}$ (SPRING_K) and the minimum or the potential ${\displaystyle \xi _{0\mu }}$ SPRING_R0. These must be set in the INCAR file. Optionally, it is possible to change the value of ${\displaystyle \xi _{0\mu }}$ every MD step at a constant rate defined via the INCAR tag SPRING_V0.
 Mind: The number of items defined via SPRING_K, SPRING_R0, and SPRING_V0 must be equal to ${\displaystyle M_{8}}$. Otherwise, the calculation terminates with an error message.
This form of bias potential is employed in several simulation protocols, such as the umbrella sampling[1], umbrella integration, or steered MD, and is useful also in cases where the ${\displaystyle \xi _{\mu }}$ values need to be restrained.

#### Step function

A sum of Fermi-like step functions (curve (b) in Fig.1)
${\displaystyle {\tilde {V}}(\xi _{1},\dots ,\xi _{M_{4}})=\sum _{\mu =1}^{M_{4}}{\frac {A_{\mu }}{1+{\text{exp}}\left[-D_{\mu }({\frac {\xi (q)}{\xi _{0\mu }}}-1)\right]}}\;}$
where the sum runs over all (${\displaystyle M_{4}}$) coordinates the potential acts upon. The potential is chosen in the ICONST file by setting the status to 4. The parameters of the potential are the height of the step (${\displaystyle A_{\mu }}$ set by FBIAS_A), the slope around the point ${\displaystyle \xi _{0\mu }}$ (${\displaystyle D_{\mu }}$ set by FBIAS_D), and the position of the step (${\displaystyle \xi _{0\mu }}$ set by FBIAS_R0). These must be set in the INCAR file.
 Mind: The number of items defined via FBIAS_A, FBIAS_D, and FBIAS_R0 must be equal to ${\displaystyle M_{4}}$. Otherwise, the calculation terminates with an error message.
This form of potential is suitable especially for imposing restrictions on the upper (or lower) limit of the value of ${\displaystyle \xi }$.

#### Gaussian potential

A sum of Gauss functions (curve (b) in Fig.1)
${\displaystyle {\tilde {V}}(\xi _{1},\dots ,\xi _{M})=\sum _{\nu =1}^{N_{5}}h_{\nu }{\text{exp}}\left[-{\frac {\sum _{\mu =1}^{M_{5}}(\xi _{\mu }(q)-\xi _{0\nu ,\mu })^{2}}{2w_{\nu }^{2}}}\right],\;}$
where ${\displaystyle N_{5}}$ is the number of Gaussian functions and ${\displaystyle M_{5}}$ is the number of coordinates the potential acts upon. The potential is chosen in the ICONST file by setting the status to 5. The parameters of the potentials, ${\displaystyle h_{\nu }}$, ${\displaystyle w_{\nu }}$, and ${\displaystyle \xi _{0\nu ,\mu }}$ are defined in the PENALTYPOT file.
This type of bias potential is primarily intended for use in metadynamics, but since Gaussians can be used as basis functions for more general shapes, they can also be used to prepare various atypically shaped bias potentials.

### Output

The values of all collective variables defined in the ICONST file for each MD step are listed in the REPORT file. Check the lines after the string Metadynamics.

## Examples of usage

Let us consider the nucleophile substitution reaction of CH${\displaystyle _{3}}$Cl with Cl${\displaystyle ^{-}}$. The reactant is a weak van-der-Waals complex. The corresponding POSCAR file reads

vdW complex CH3Cl...Cl
1.00000000000000
12.0000000000000000    0.0000000000000000    0.0000000000000000
0.0000000000000000    12.0000000000000000    0.0000000000000000
0.0000000000000000    0.0000000000000000    12.0000000000000000
C H Cl
1 3 2
cart
5.91331371  7.11364924  5.78037960
5.81982231  8.15982106  5.46969017
4.92222130  6.65954232  5.88978969
6.47810398  7.03808479  6.71586385
4.32824726  8.75151396  7.80743202
6.84157897  6.18713289  4.46842049


Due to the weak interactions between CH${\displaystyle _{3}}$Cl and Cl${\displaystyle ^{-}}$, the complex can collapse at high temperatures. This can be avoided by setting an upper bound for the length of the non-bonding Cl...C interactions. This can be conveniently achieved by using a Fermi-like step-shaped bias potential. To this end, we need to define the Cl...C distance, i.e., the distance between the atoms 1 and 5, as a coordinate with status 4 in the ICONST file:

R 1 5 4


Next, we need to set the molecular dynamics parameters and specify the bias potential parameters FBIAS_A, FBIAS_D, and FBIAS_R0 in the INCAR file:

# Molecular dynamics part
IBRION = 0
TEBEG = 300
TEEND = 300
MDALGO = 2
POTIM = 2.0
NSW = 10000
# Bias potential part
FBIAS_A  = 1
FBIAS_D  = 50
FBIAS_R0 = 3.5


Since the bias potential acts only on one internal coordinate (${\displaystyle M_{4}=1}$), we need to provide only one number for each of the tags. The chosen bias potential parameters ensure that repulsive bias forces steeply increase when the C...Cl distance is increased beyond about ${\displaystyle 3.2\mathrm {\AA} }$. This causes a shortening of the distance in the next MD step. Notice that the bias force is essentially negligible for distances below ${\displaystyle 3\mathrm {\AA} }$. A careful adjustment of FBIAS_A and FBIAS_D is needed to ensure that (i) the bias force is large enough to effectively limit the value of ${\displaystyle \xi }$, and (ii) the interval of ${\displaystyle \xi }$ values for which the bias forces are significant is broad enough to avoid overcoming via random fluctuations. A suitable setting can be found by noting that the maximal bias force of ${\displaystyle {\frac {D\,A}{4\xi _{0}}}}$ is exerted on the system at the point ${\displaystyle \xi =\xi _{0}}$. This can be seen by inspecting the analytical expression for the potential.

## Related methods in VASP

• Metadynamics: In contrast to the methods discussed on this page metadynamics continuously updates the bias potential of the system to push it into unvisited parts of phase space.
• Interface pinning: This employs a bias potential to pin the state of an interface between a solid and a liquid. This method uses entirely different INCAR tags than the bias potentials presented on this page.

## Pages in category "Biased molecular dynamics"

The following 8 pages are in this category, out of 8 total.