WRT POTENTIAL: Difference between revisions

From VASP Wiki
No edit summary
(Add a disclaimer about the the choice of g=0 components)
Line 1: Line 1:
{{TAGDEF|WRT_POTENTIAL|string|None}}
{{TAGDEF|WRT_POTENTIAL|string|None}}
{{DISPLAYTITLE:WRT_POTENTIAL}}
{{DISPLAYTITLE:WRT_POTENTIAL}}
Description: Select the local potential to be written as a post-processing.
Description: Select which component of the local potential to be written as a post-processing step.
----
----
{{TAG|WRT_POTENTIAL}} can select one or multiple local potentials on the real-space grid in the unit cell to be written, e.g.,
{{TAG|WRT_POTENTIAL}} can select one or multiple local potentials on the real-space grid in the unit cell to be written, e.g.,
Line 23: Line 23:


The first dimension of the datasets in /results/potential is 1 for nonmagnetic calculation, 2 for spin-polarized calculation, and 4 for noncollinear calculations. In case the potential is scalar, i.e., has no B-field-like contribution that couples to the magnetization, only the 1st component exists. Hence, for ''hartree'' and ''ionic'', the first dimension is 1. The components for the magnetic calculations correspond to the spinor representation with the scalar potential in the first component and the B-field in the second ({{TAG|ISPIN}}=2) or <math>B_1</math>, <math>B_2</math> and <math>B_3</math> in the 2nd, 3rd and 4th component ({{TAG|LNONCOLLINEAR}}=T) in the basis of Pauli matrices <math>\{\sigma_1</math>, <math>\sigma_2</math>, <math>\mathbf{\sigma}_3\}</math> given by {{TAG|SAXIS}}.
The first dimension of the datasets in /results/potential is 1 for nonmagnetic calculation, 2 for spin-polarized calculation, and 4 for noncollinear calculations. In case the potential is scalar, i.e., has no B-field-like contribution that couples to the magnetization, only the 1st component exists. Hence, for ''hartree'' and ''ionic'', the first dimension is 1. The components for the magnetic calculations correspond to the spinor representation with the scalar potential in the first component and the B-field in the second ({{TAG|ISPIN}}=2) or <math>B_1</math>, <math>B_2</math> and <math>B_3</math> in the 2nd, 3rd and 4th component ({{TAG|LNONCOLLINEAR}}=T) in the basis of Pauli matrices <math>\{\sigma_1</math>, <math>\sigma_2</math>, <math>\mathbf{\sigma}_3\}</math> given by {{TAG|SAXIS}}.
{{NB|mind| As is convention in VASP, the g{{=}}0 component for both the reciprocal space representations of the hartree and ionic potentials are set to zero. For most use cases, this convention implies that viewing the sum of the hartree and ionic potentials is more meaningful than either potential individually.}}


{{TAG|WRT_POTENTIAL}} can be run as a post-processing step by restarting from a converged {{FILE|CHGCAR}} and setting {{TAG|ALGO}}=None. It is available for VASP >= 6.4.3.
{{TAG|WRT_POTENTIAL}} can be run as a post-processing step by restarting from a converged {{FILE|CHGCAR}} and setting {{TAG|ALGO}}=None. It is available for VASP >= 6.4.3.

Revision as of 08:05, 7 February 2024

WRT_POTENTIAL = string
Default: WRT_POTENTIAL = None 

Description: Select which component of the local potential to be written as a post-processing step.


WRT_POTENTIAL can select one or multiple local potentials on the real-space grid in the unit cell to be written, e.g.,

 WRT_POTENTIAL = total

or

 WRT_POTENTIAL = hartree ionic

The output is written to vaspout.h5 and can be accessed either by py4vasp or HDF5 command-line tools (h5ls, h5dump).

 import py4vasp as pv
 calc = pv.Calculation.from_path(".")
 pot_dict = calc.potential.read("total")

The above allows the creation of a Python dictionary with the potential data.

 h5ls -r vaspout.h5

The above shows the table of contents of vaspout.h5. Depending on the keywords specified with WRT_POTENTIAL and the system it yields

 /results/potential       Group
 /results/potential/grid  Dataset {3}
 /results/potential/hartree Dataset {1, 24, 24, 24}
 /results/potential/ionic Dataset {1, 24, 24, 24}
 /results/potential/total Dataset {4, 24, 24, 24}
 /results/potential/xc    Dataset {4, 24, 24, 24}

The grid density can be increased by choosing a higher value for ENCUT or explicitly by NGX, NGY, NGZ.

The first dimension of the datasets in /results/potential is 1 for nonmagnetic calculation, 2 for spin-polarized calculation, and 4 for noncollinear calculations. In case the potential is scalar, i.e., has no B-field-like contribution that couples to the magnetization, only the 1st component exists. Hence, for hartree and ionic, the first dimension is 1. The components for the magnetic calculations correspond to the spinor representation with the scalar potential in the first component and the B-field in the second (ISPIN=2) or , and in the 2nd, 3rd and 4th component (LNONCOLLINEAR=T) in the basis of Pauli matrices , , given by SAXIS.

Mind: As is convention in VASP, the g=0 component for both the reciprocal space representations of the hartree and ionic potentials are set to zero. For most use cases, this convention implies that viewing the sum of the hartree and ionic potentials is more meaningful than either potential individually.

WRT_POTENTIAL can be run as a post-processing step by restarting from a converged CHGCAR and setting ALGO=None. It is available for VASP >= 6.4.3.

Options to select

total

The output is written to /results/potential/total, as well as LOCPOT.

hartree

The output is written to /results/potential/hartree.

ionic

as mimicked by the pseudopotentials of the PAW method. The output is written to /results/potential/ionic.

xc

as defined by the selected exchange-correlation functional. The output is written to /results/potential/xc.
Mind: This only corresponds to the (semi-)local functionals, i.e., LDA, GGA, non-local vdW-DF functionals, and does not account for either the potential associated with the kinetic energy density in METAGGA or the nonlocal Fock exchange considered in hybrid functionals.

Related tags and articles

LVACPOTAV, LVTOT, LVHAR, WRT_POTENTIAL, LDIPOL, ENCUT, NGX, NGY, NGZ