23vaspAS

Setup & Introduction Tutorials Tags / Variables Structures > crystals > surfaces > molecules Functions > electronic structure > ionic structure > formation energies > convergence tests > other functions 24vaspAS Database

...

Convergence Tests


Local Convergence Tests:

There are multiple functions that perform local convergence tests for a variety of variables (see below). They all follow the same syntax. Lets look at only one of them in more detail:

To perform a local kpoints convergence test on a structure $structure, use the following function:

lkpointsconvergence $structure "$n0 $dn $n1" $criterion $variable $task

It gradually increases kpoints from an initial value $n0 in steps of $dx up to a maximal value $n1. At every kpoint it will perform one specific task $task in the form of a function and its entries (for example electronicmin $structure or relaxation $structure). Then it will check how one specific variable $variable changes (for example FREE_ENERGY_$structure). If the change in this value is smaller than $criterion (in one step), then the convergence test will break.

If $variable = autovar, then $variable will be chosen automatically based on the specified $task.

At the end, if UPDATEVARIABLES=true, the value stored in KPOINTS_$structure will be updated to its converged value. If the convergence criterion is not reached, it will be updated to $n1

A gnuplot input file will also be prepared automatically: kpointsconvergence_gnup_$structure_$GGA

Table of Currently Available Local Convergence Test Functions (same input, syntax as above):

Name
Key Variable
lkpointsconvergence $KPOINTS_$structure
lencutconvergence $ENCUT
lnomegaconvergence $NOMEGA
lsupercellconvergence $SUPERCELL_FACTOR_$structure
lvacuumsizeconvergence $VACUUM_SIZE_$structure
lnumberoflayersconvergence $NUMBER_OF_LAYERS_$structure


Global Convergence Tests:

Each local convergence test function has a global convergence test counterpart (see below). These follow a very similar syntax that only differs marginally (so read section on local convergence tests (above) to understand this one):

To perform a global kpoints convergence test on a structure $structure, use the following function:

gkpointsconvergence $structure "$n0 $dn $n1 $nm" $criterion $variable $task

In contrast to local convergence tests, here the test is not aborted as soon as the convergence criterion is met locally. Instead the calculation will continue until $n1. Then it will check retroactively, at which point all results started to stay within the interval of the last computed value +- $criterion. Try to choose high values for $n1.

At the end, if UPDATEVARIABLES=true, the value stored in KPOINTS_$structure will be updated to its converged value. But notice how the variable $nm has to be set in addition to $n1. If the convergence criterion is not reached, it will be updated to $nm instead of $n1. This allows you to seccurely set large values for $n1.

Table of Currently Available Global Convergence Test Functions (same input, syntax as above):

Name
Key Variable
gkpointsconvergence $KPOINTS_$structure
gencutconvergence $ENCUT
gnomegaconvergence $NOMEGA
gsupercellconvergence $SUPERCELL_FACTOR_$structure
gvacuumsizeconvergence $VACUUM_SIZE_$structure
gnumberoflayersconvergence $NUMBER_OF_LAYERS_$structure


Tipp for lencutconvergence / gencutconvergence: readenmax

Running the function readenmax before encutconvergence enables you to use the variable $ENMAX in $n0, $dn, and $n1. You can even apply operators to it. $ENMAX refers to the highest ENMAX found in the POTCAR file.

Example: readenmax; encutconvergence $structure "$ENMAX 20 $ENMAX+300" $criterion $variable $task


...