NVE ensemble: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The NVE ensemble is a statistical ensemble that is used to study material properties under the conditions of a constant particle number N, constant volume V and an internal energy E fluctuating around an equilibrium value E. This page describes how to sample the NVE ensemble from a [[Molecular dynamics calculations|molecular dynamics]] run.
The [[NVE ensemble]] (micro-canonical ensemble) is a [[:Category:Ensembles|statistical ensemble]] that is used to study material properties under the conditions of a constant particle number N, constant volume V and a conserved internal energy E (up to numerical inaccuracies). This page describes how to sample the NVE ensemble from a [[Molecular dynamics calculations|molecular-dynamics]] run.
   
   
''' Instructions for setting up a NVE ensemble '''
''' Instructions for setting up a NVE ensemble '''


For the NVE ensemble there are two equivalent choices of tags to set up a [[Molecular dynamics calculations|molecular dynamics]] run.
There are two choices of thermostats which can be adjusted to set up a [[Molecular dynamics calculations|molecular-dynamics]] run.
The user can either set the [[Andersen thermostat]] or the [[Nose-Hoover thermostat]] to give a NVE ensemble. The [[Andersen thermostat]] thermostat can be used by setting the collision probability ({{TAG|ANDERSEN_PROB}}) with the fictitious heat bath to zero and [[Nose-Hoover thermostat]] by setting the mass of the virtual degree to minus three.
The [[Andersen thermostat]] can be used by setting the collision probability ({{TAG|ANDERSEN_PROB}}) with the fictitious heat bath to zero and the  [[Nose-Hoover thermostat]] by setting the mass of the virtual degree of freedom ({{TAG|SMASS}}) to minus three. Both settings will switch the thermostat off, such that the velocities are determined by the [[Hellmann-Feynman forces]] or [[Machine-learned force fields]] only.
See table for the corresponding {{TAG|MDALGO}} setting and related tags.


{|class="wikitable" style="margin:aut  
{|class="wikitable" style="margin:aut  
Line 13: Line 14:
| additional tags  to set || style="text-align:center;"| {{TAG|ANDERSEN_PROB}}=0.0 ||style="text-align:center;"| {{TAG|SMASS}}=-3  
| additional tags  to set || style="text-align:center;"| {{TAG|ANDERSEN_PROB}}=0.0 ||style="text-align:center;"| {{TAG|SMASS}}=-3  
|}
|}
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.
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.
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]].
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]]''
 
  #INCAR molecular-dynamics tags NVE ensemble
  {{TAGBL|IBRION}} = 0                  # choose molecular-dynamics
  {{TAGBL|MDALGO}} = 1                  # using Andersen thermostat
  {{TAGBL|ISIF}} = 2                    # compute stress tensor but do not change box volume/shape
  {{TAGBL|TEBEG}} = 300                  # set temperature
  {{TAGBL|NSW}} = 10000                  # number of time steps
  {{TAGBL|POTIM}} = 1.0                  # time step in femto seconds
  {{TAGBL|ANDERSEN_PROB}} = 0.0          # setting Andersen collision probability to zero to get NVE enseble
{{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==
[[Molecular dynamics calculations|Molecular-dynamics calculations]], {{TAG|ISIF}}, {{TAG|MDALGO}}, [[:Category:Ensembles|Ensembles]]
 
[[Category:Molecular dynamics]][[Category:Ensembles]][[Category:Thermostats]]

Latest revision as of 10:38, 21 November 2023

The NVE ensemble (micro-canonical ensemble) is a statistical ensemble that is used to study material properties under the conditions of a constant particle number N, constant volume V and a conserved internal energy E (up to numerical inaccuracies). This page describes how to sample the NVE ensemble from a molecular-dynamics run.

Instructions for setting up a NVE ensemble

There are two choices of thermostats which can be adjusted to set up a molecular-dynamics run. The Andersen thermostat can be used by setting the collision probability (ANDERSEN_PROB) with the fictitious heat bath to zero and the Nose-Hoover thermostat by setting the mass of the virtual degree of freedom (SMASS) to minus three. Both settings will switch the thermostat off, such that the velocities are determined by the Hellmann-Feynman forces or Machine-learned force fields only. See table for the corresponding MDALGO setting and related tags.

NVE ensemble Andersen Nose-Hoover
MDALGO 1 0 or 2
additional tags to set ANDERSEN_PROB=0.0 SMASS=-3

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. There are two implementations of the Nose-Hoover thermostat in VASP which will give the same results. The MDALGO=0 version can be used even if the code was compiled without the precompiler option -Dtbdyn. To enforce constant volume throughout the calculation, 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 molecular-dynamics run or by performing structure and volume optimization with IBRION=1 or 2 and setting ISIF>2. A general guide for molecular-dynamics simulations can be found on the molecular-dynamics page.

An example INCAR file for the Andersen thermostat

 #INCAR molecular-dynamics tags NVE ensemble 
 IBRION = 0                   # choose molecular-dynamics 
 MDALGO = 1                   # using Andersen thermostat
 ISIF = 2                     # 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 
 ANDERSEN_PROB = 0.0          # setting Andersen collision probability to zero to get NVE enseble
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, Ensembles