Requests for technical support from the VASP group should be posted in the VASP-forum.

NpT ensemble

From Vaspwiki
Jump to navigationJump to search

The NpT (isobaric-isothermic) ensemble is selected by setting ISIF=3 in the INCAR file and specifying a thermostat via the tag MDALGO.

The following table shows the possible ensemble and thermostat combinations in VASP:

Ensemble Andersen Nose-Hoover Langevin Multiple Andersen
NpT not available not available MDALGO=3 not available

Currently this ensemble is only implemented for the Langevin thermostat.

NpT- ensemble with Langevin thermostat

In the method of Parrinello and Rahman[1][2], 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.

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[1][2] 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.

  • 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.


  1. a b M. Parrinello and A. Rahman, Phys. Rev. Lett. 45, 1196 (1980).
  2. a b M. Parrinello and A. Rahman, J. Appl. Phys. 52, 7182 (1981).
  3. [ M. P. Allen and D. J. Tildesley, Computer simulation of liquids (Oxford university press: New York, 1991).]