NpH ensemble: Difference between revisions

From VASP Wiki
(Created page with "The NpH ensemble (isoenthalpic–isobaric ensemble) is a statistical ensemble that is used to study material properties under the conditions of a c...")
 
No edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The [[NpH ensemble]] (isoenthalpic–isobaric ensemble) is a [[:Category:Ensembles|statistical ensemble]] that is used to study material properties under the conditions of a constant particle number N, a pressure p fluctuating around an equilibrium pressure p and a enthalpy H fluctuating around an equilibrium value H. This page describes how to sample the NpH ensemble from a [[Molecular dynamics calculations|molecular-dynamics]] run.
The [[NpH ensemble]] (isoenthalpic–isobaric ensemble) is a [[:Category:Ensembles|statistical ensemble]] that is used to study material properties under the conditions of a constant particle number N, a pressure p fluctuating around an equilibrium pressure <math> \langle p \rangle </math> and a conserved enthalpy H (up to numerical inaccuracies). This page describes how to sample the NpH ensemble from a [[Molecular dynamics calculations|molecular-dynamics]] run.
   
   
''' Instructions for setting up a NpH ensemble '''
''' Instructions for setting up a NpH ensemble '''


To run a NpH [[Molecular dynamics calculations|molecular-dynamics]] run the [[Langevin thermostat]] has to be used.
To run an NpH [[Molecular dynamics calculations|molecular-dynamics]] simulation {{TAGO|MDALGO|3}} has to be used. The {{TAG|LANGEVIN_GAMMA}} and {{TAG|LANGEVIN_GAMMA_L}} have to be zero to disable any thermostatting. By setting the tag {{TAGO|LANGEVIN_GAMMA|0}} the friction term and
the stochastic term of the [[Langevin thermostat]] will be zero, such that the velocities are determined by the Hellmann-Feynman forces or machine-learned force fields only. Setting the tag {{TAGO|LANGEVIN_GAMMA_L|0}},
removes the stochastic term and the friction term from the barostat, resulting in a box update
depending solely on the kinetic stress tensor. The inertia of lattice degrees-of-freedom is controlled with the {{TAG|PMASS}} tag.


{|class="wikitable" style="margin:aut  
{|class="wikitable" style="margin:aut  
Line 14: Line 17:
|style="text-align:center;"| {{TAG|LANGEVIN_GAMMA_L}}          ||  style="text-align:center;"|  0         
|style="text-align:center;"| {{TAG|LANGEVIN_GAMMA_L}}          ||  style="text-align:center;"|  0         
|-  
|-  
| additional tags  to set || style="text-align:center;"| {{TAG|ANDERSEN_PROB}}=0.0 ||style="text-align:center;"| {{TAG|SMASS}}=-3
|style="text-align:center;"| {{TAG|LANGEVIN_GAMMA}}           ||  style="text-align:center;"|  0
|-
| optional tags  to set || style="text-align:center;"| {{TAG|PMASS}}      
|}
|}


The additional tags in the column for every thermostat have to be set to the given values. Otherwise the NVE ensemble will not be realized.
It is recommended to equilibrate the system of interest with an [[NpT_ensemble|NPT]] [[Molecular dynamics calculations|molecular-dynamics]] run before starting the NpH run. A general guide for molecular-dynamics simulations can be found on the [[Molecular dynamics calculations|molecular-dynamics]] page.
There are two implementations of the [[Nose-Hoover thermostat]] in VASP which will give the same results. The {{TAG|MDALGO}}=0 version can be used even if the code was compiled without the precompiler option [[Precompiler_options#-Dtbdyn|-Dtbdyn]]. To enforce constant volume throughout the calculation, {{TAG|ISIF}} has to be set to less than three. The cell shape and volume have to be preoptimized when doing NVT simulations. This can either be done with a [[NpT_ensemble|NPT]] [[Molecular dynamics calculations|molecular-dynamics]] run or by performing structure and volume optimization with {{TAG|IBRION}}=1 or 2 and setting {{TAG|ISIF}}>2.
A general guide for molecular-dynamics simulations can be found on the [[Molecular dynamics calculations|molecular-dynamics]] page.


''An example {{FILE|INCAR}} file for the [[Andersen thermostat]]''  
''An example {{FILE|INCAR}} file for the NpH ensemble''  


   #INCAR molecular-dynamics tags NVE ensemble  
   #INCAR molecular-dynamics tags NpH ensemble  
   {{TAGBL|IBRION}} = 0                  # choose molecular-dynamics  
   {{TAGBL|IBRION}} = 0                  # choose molecular-dynamics  
   {{TAGBL|MDALGO}} = 1                   # using Andersen thermostat
   {{TAGBL|MDALGO}} = 3                   # using Andersen thermostat
   {{TAGBL|ISIF}} = 2                     # compute stress tensor but do not change box volume/shape  
   {{TAGBL|ISIF}} = 3                     # compute stress tensor but do not change box volume/shape  
   {{TAGBL|TEBEG}} = 300                  # set temperature  
   {{TAGBL|TEBEG}} = 300                  # set temperature  
   {{TAGBL|NSW}} = 10000                  # number of time steps  
   {{TAGBL|NSW}} = 10000                  # number of time steps  
   {{TAGBL|POTIM}} = 1.0                  # time step in femto seconds  
   {{TAGBL|POTIM}} = 1.0                  # time step in femto seconds  
   {{TAGBL|ANDERSEN_PROB}} = 0.0         # setting Andersen collision probability to zero to get NVE enseble
   {{TAGBL|LANGEVIN_GAMMA}} = 0.0 0.0    # setting friction and stochastic term of Langevin thermostat zero
  {{TAGBL|LANGEVIN_GAMMA_L}} = 0.0      # setting friction and stochastic term of Langevin barostat zero
{{NB|mind| This {{FILE|INCAR}} file only contains the parameters for the molecular-dynamics part. The [[Electronic minimization|electronic minimization]] or the [[Machine-learned force fields|machine learning]] tags have to be added.}}
{{NB|mind| This {{FILE|INCAR}} file only contains the parameters for the molecular-dynamics part. The [[Electronic minimization|electronic minimization]] or the [[Machine-learned force fields|machine learning]] tags have to be added.}}


==Related tags and articles==
==Related tags and articles==
[[Molecular dynamics calculations|Molecular-dynamics calculations]], {{TAG|ISIF}}, {{TAG|MDALGO}}, [[:Category:Ensembles|Ensembles]]
[[Molecular dynamics calculations|Molecular-dynamics calculations]], {{TAG|ISIF}}, {{TAG|MDALGO}}, {{TAG|LANGEVIN_GAMMA}}, {{TAG|LANGEVIN_GAMMA_L}}, [[:Category:Ensembles|Ensembles]]


[[Category:Molecular dynamics]][[Category:Ensembles]][[Category:Thermostats]]
[[Category:Molecular dynamics]][[Category:Ensembles]][[Category:Thermostats]]

Latest revision as of 10:38, 21 November 2023

The NpH ensemble (isoenthalpic–isobaric ensemble) is a statistical ensemble that is used to study material properties under the conditions of a constant particle number N, a pressure p fluctuating around an equilibrium pressure and a conserved enthalpy H (up to numerical inaccuracies). This page describes how to sample the NpH ensemble from a molecular-dynamics run.

Instructions for setting up a NpH ensemble

To run an NpH molecular-dynamics simulation MDALGO = 3 has to be used. The LANGEVIN_GAMMA and LANGEVIN_GAMMA_L have to be zero to disable any thermostatting. By setting the tag LANGEVIN_GAMMA = 0 the friction term and the stochastic term of the Langevin thermostat will be zero, such that the velocities are determined by the Hellmann-Feynman forces or machine-learned force fields only. Setting the tag LANGEVIN_GAMMA_L = 0, removes the stochastic term and the friction term from the barostat, resulting in a box update depending solely on the kinetic stress tensor. The inertia of lattice degrees-of-freedom is controlled with the PMASS tag.

NpH ensemble Langevin
MDALGO 3
ISIF 3
LANGEVIN_GAMMA_L 0
LANGEVIN_GAMMA 0
optional tags to set PMASS

It is recommended to equilibrate the system of interest with an NPT molecular-dynamics run before starting the NpH run. A general guide for molecular-dynamics simulations can be found on the molecular-dynamics page.

An example INCAR file for the NpH ensemble

 #INCAR molecular-dynamics tags NpH ensemble 
 IBRION = 0                   # choose molecular-dynamics 
 MDALGO = 3                   # using Andersen thermostat
 ISIF = 3                     # compute stress tensor but do not change box volume/shape 
 TEBEG = 300                  # set temperature 
 NSW = 10000                  # number of time steps 
 POTIM = 1.0                  # time step in femto seconds 
 LANGEVIN_GAMMA = 0.0 0.0     # setting friction and stochastic term of Langevin thermostat zero
 LANGEVIN_GAMMA_L = 0.0       # setting friction and stochastic term of Langevin barostat zero
Mind: This INCAR file only contains the parameters for the molecular-dynamics part. The electronic minimization or the machine learning tags have to be added.

Related tags and articles

Molecular-dynamics calculations, ISIF, MDALGO, LANGEVIN_GAMMA, LANGEVIN_GAMMA_L, Ensembles