MDALGO

From VASP Wiki

MDALGO = 0 | 1 | 2 | 3 | 11 | 21 | 13
Default: MDALGO = 0 

Description: MDALGO specifies the molecular dynamics simulation protocol (in case IBRION=0 and VASP was compiled with -Dtbdyn).


MDALGO=0: Standard molecular dynamics

Standard molecular dynamics (IBRION=0), the same behavior as if VASP were compiled without -Dtbdyn.

MDALGO=1: NVT-ensemble with Andersen thermostat

Andersen thermostat

NVT-simulation with Andersen thermostat. In the approach proposed by Andersen[1] the system is thermally coupled to a fictitious heat bath with the desired temperature. The coupling is represented by stochastic impulsive forces that act occasionally on randomly selected particles. The collision probability is defined as an average number of collisions per atom and time-step. This quantity can be controlled by the flag ANDERSEN_PROB. The total number of collisions with the heat-bath is written in the file REPORT for each MD step.

Constrained molecular dynamics

Constrained molecular dynamics is performed using the SHAKE algorithm.[2]. In this algorithm, the Lagrangian for the system is extended as follows:

where the summation is over r geometric constraints, is the Lagrangian for the extended system, and λi is a Lagrange multiplier associated with a geometric constraint σi:

with ξi(q) being a geometric parameter and ξi is the value of ξi(q) fixed during the simulation.

In the SHAKE algorithm, the Lagrange multipliers λi are determined in the iterative procedure:

  1. Perform a standard MD step (leap-frog algorithm):
  2. Use the new positions q(tt) to compute Lagrange multipliers for all constraints:
  3. Update the velocities and positions by adding a contribution due to restoring forces (proportional to λk):
  4. repeat steps 2-4 until all |σi(q)| are smaller than a predefined tolerance.


  • For a constrained molecular dynamics run with Andersen thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=1, and choose an appropriate setting for ANDERSEN_PROB
  3. Define geometric constraints in the ICONST-file, and set the STATUS parameter for the constrained coordinates to 0
  4. When the free-energy gradient is to be computed, set LBLUEOUT=.TRUE.

For a slow-growth simulation, one has to additionally:

  1. Specify the transformation velocity-related INCREM-tag for each geometric parameter with STATUS=0
  2. .

MDALGO=2: NVT-ensemble with Nose-Hoover thermostat

Nose-Hoover thermostat (SMASS needs to be specified in the INCAR file).

Constrained molecular dynamics

For a short description of constrained molecular dynamics by means of the SHAKE algorithm, see its section under MDALGO=1.

  • For a constrained molecular dynamics run with Nose-Hoover thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=2, and choose an appropriate setting for SMASS
  3. Define geometric constraints in the ICONST-file, and set the STATUS parameter for the constrained coordinates to 0
  4. When the free-energy gradient is to be computed, set LBLUEOUT=.TRUE.

For a slow-growth simulation, one has to additionally:

  1. Specify the transformation velocity-related INCREM-tag for each geometric parameter with STATUS=0
  2. .

MDALGO=3: NVT- or NpT-ensemble with Langevin thermostat

Note: Geometric constraints and metadynamics are not available for Langevin dynamics.

NVT-simulation with Langevin thermostat

The Langevin thermostat[3] maintains the temperature through a modification of Newton's equations of motion

where Fi is the force acting on atom i due to the interaction potential, γi is a friction coefficient, and fi is a random force with dispersion σi related to γi through:

with Δt being the time-step used in the MD to integrate the equations of motion. Obviously, Langevin dynamics is identical to the classical Hamiltonian in the limit of vanishing γ.

  • To run an NVT-simulation with a Langevin thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set ISIF=2
  3. Set MDALGO=3 to invoke the Langevin thermostat
  4. Specify friction coefficients for all species in the POSCAR file, by means of the LANGEVIN_GAMMA-tag.


NpT-simulation with Langevin thermostat

In the method of Parrinello and Rahman[4][5], the equations of motion for ionic and lattice degrees-of-freedom are derived from the following Lagrangian:

where si is a position vector in fractional coordinates for atom i, h is the matrix formed by lattice vectors, the tensor G is defined as G=hth, pext is the external pressure, Ω is the cell volume (Ω=det h), and W is a constant with the dimensionality of mass. Integrating equations of motion based on the Parrinello-Rahman Lagrangian generates an NpH ensemble, where the enthalpy is the constant of motion. The Parrinello-Rahman method can be combined with a Langevin thermostat[3] to generate an NpT-ensemble.

  • To run an NpT-simulation (Parinello-Rahman dynamics) with a Langevin thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set ISIF=3 to allow for relaxation of the cell volume and shape. At the moment, dynamics with fixed volume+variable shape (ISIF=4) or fixed shape+variable volume (ISIF=7) are not available.
  3. Set MDALGO=3 to invoke the Langevin thermostat
  4. Specify friction coefficients for all species in the POSCAR file, by means of the LANGEVIN_GAMMA-tag.
  5. Specify a separate set of friction coefficient for the lattice degrees-of-freedom, using the LANGEVIN_GAMMA_L-tag.
  6. Set a mass for the lattice degrees-of-freedom, using the PMASS-tag.
  7. Optionally, one may define an external pressure (in kB), by means of the PSTRESS-tag.

The temperatures listed in the OSZICAR are computed using the kinetic energy including contribution from both atomic and lattice degrees of freedom. The external pressure for a simulation can be computed as one third of the trace of the stress-tensor corrected for kinetic contributions, listed in the OUTCAR file. This can be achieved, e.g. using the following command: grep "Total+kin" OUTCAR| awk 'BEGIN {p=0.} {p+=($2+$3+$4)/3.} END {print "pressure (kB):",p}'

Important: In Parinello-Rahman[4][5] dynamics (NpT), the stress tensor is used to define forces on lattice degrees-of-freedom. In order to achieve a reasonable quality of sampling (and to avoid numerical problems), it is essential to eliminate Pulay stress. Unfortunately, this usually requires a rather large value of ENCUT. PREC=low, frequently used in NVT-MD is not recommended for molecular dynamics with variable cell volume.

MDALGO=11: Biased-MD and metadynamics with Andersen thermostat

Andersen thermostat

See remarks under MDALGO=1.

Metadynamics

  • For a metadynamics run with Andersen thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=11, and choose an appropriate setting for ANDERSEN_PROB
  3. Set the parameters HILLS_H, HILLS_W, and HILLS_BIN
  4. Define collective variables in the ICONST-file, and set the STATUS parameter for the collective variables to 5
  5. If needed, define the bias potential in the PENALTYPOT-file

The actual time-dependent bias potential is written to the HILLSPOT-file, which is updated after adding a new Gaussian. At the beginning of the simulation, VASP attempts to read the initial bias potential from the PENALTYPOT-file. For the continuation of a metadynamics run, copy HILLSPOT to PENALTYPOT. The values of all collective variables for each MD step are listed in REPORT-file, check the lines after the string Metadynamics.

Biased molecular dynamics

  • For a biased molecular dynamics run with Andersen thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=11, and choose an appropriate setting for ANDERSEN_PROB
  3. In order to avoid updating of the bias potential, set HILLS_BIN=NSW
  4. Define collective variables in the ICONST-file, and set the STATUS parameter for the collective variables to 5
  5. Define the bias potential in the PENALTYPOT-file

The values of all collective variables for each MD step are listed in the REPORT-file, check the lines after the string Metadynamics.

MDALGO=21: Biased-MD and metadynamics with Nose-Hoover Thermostat

Biased-molecular- or meta-dynamics with Nose-Hoover Thermostat (SMASS needs to be specified in the INCAR file).

Metadynamics

  • For a metadynamics run with Nose-Hoover thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=21, and choose an appropriate setting for SMASS
  3. Set the parameters HILLS_H, HILLS_W, and HILLS_BIN
  4. Define collective variables in the ICONST-file, and set the STATUS parameter for the collective variables to 5
  5. If needed, define the bias potential in the PENALTYPOT-file

The actual time-dependent bias potential is written to the HILLSPOT-file, which is updated after adding a new Gaussian. At the beginning of the simulation, VASP attempts to read the initial bias potential from the PENALTYPOT-file. For the continuation of a metadynamics run, copy HILLSPOT to PENALTYPOT. The values of all collective variables for each MD step are listed in REPORT-file, check the lines after the string Metadynamics.

Biased molecular dynamics

  • For a biased molecular dynamics run with Nose-Hoover thermostat, one has to:
  1. Set the standard MD-related tags: IBRION=0, TEBEG, POTIM, and NSW
  2. Set MDALGO=21, and choose an appropriate setting for SMASS
  3. In order to avoid updating of the bias potential, set HILLS_BIN=NSW
  4. Define collective variables in the ICONST-file, and set the STATUS parameter for the collective variables to 5
  5. Define the bias potential in the PENALTYPOT-file

The values of all collective variables for each MD step are listed in the REPORT-file, check the lines after the string Metadynamics.

MDALGO=13: Multiple Anderson thermostats

Up to three user-defined atomic subsystems coupled with independent Andersen thermostats[1] (see remarks under MDALGO=1 as well). The POSCAR file must be organized such that the positions of atoms of subsystem i+1 are defined after those for the subsystem i, and the following flags must be set by the user:

Define the last atom for each subsystem (two or three values must be supplied). For instance, if total of 20 atoms is defined in the POSCAR file, and the initial 10 atoms belong to the subsystem 1, the next 7 atoms to the subsystem 2, and the last 3 atoms to the subsystem 3, NSUBSYS should be defined as follows:
NSUBSYS= 10 17 20
Note that the last number in the previous example is actually redundant (clearly the last three atoms belong to the last subsystem) and does not have to be user-supplied.
Simulation temperature for each subsystem
Collision probability for atoms in each subsystem. Only the values 0≤PSUBSYS≤1 are allowed.

Related Tags and Sections

IBRION, ISIF, SMASS, ANDERSON_PROB, RANDOM_SEED, LBLUEOUT, SHAKETOL, SHAKEMAXITER, HILLS_H, HILLS_W, HILLS_BIN, INCREM, STATUS, VALUE_MIN, VALUE_MAX, LANGEVIN_GAMMA, LANGEVIN_GAMMA_L, PMASS

References


Contents