Jump to content

Requests for technical support from the VASP team should be posted in the VASP Forum.

Restart and output files cheat sheet: Difference between revisions

From VASP Wiki
Hampel (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 69: Line 69:
{{NB|mind|Reading the charge density back from {{FILE|vaspwave.h5}} is not yet implemented. A fixed-density restart ({{TAG|ICHARG|11}}) cannot use a {{FILE|vaspwave.h5}} that was written with {{TAG|LH5|.TRUE.}}; write the {{FILE|CHGCAR}} for such restarts. See [[Known issues#KnownIssue73]].}}
{{NB|mind|Reading the charge density back from {{FILE|vaspwave.h5}} is not yet implemented. A fixed-density restart ({{TAG|ICHARG|11}}) cannot use a {{FILE|vaspwave.h5}} that was written with {{TAG|LH5|.TRUE.}}; write the {{FILE|CHGCAR}} for such restarts. See [[Known issues#KnownIssue73]].}}
{{NB|mind|This page describes VASP 6.5 and later. HDF5 output ({{FILE|vaspwave.h5}}) is available as of VASP 6.0, and additional datasets are written as of VASP 6.6.0. In VASP 6.0 to 6.4.2 the default of {{TAG|LCHARG}} was <code>.NOT.</code>{{TAG|LH5}}, and some combinations with {{TAG|LH5|.TRUE.}} still wrote the legacy {{FILE|CHGCAR}}.}}
{{NB|mind|This page describes VASP 6.5 and later. HDF5 output ({{FILE|vaspwave.h5}}) is available as of VASP 6.0, and additional datasets are written as of VASP 6.6.0. In VASP 6.0 to 6.4.2 the default of {{TAG|LCHARG}} was <code>.NOT.</code>{{TAG|LH5}}, and some combinations with {{TAG|LH5|.TRUE.}} still wrote the legacy {{FILE|CHGCAR}}.}}
== Recognizing which restart file was read ==
At startup VASP reports on the standard output which restart files it found and read, just before the <code>entering main loop</code> line. The excerpts below are for the wavefunction and charge-density restart.
No restart file present &mdash; the wavefunctions are initialized from scratch and the charge density from overlapping atoms:
<pre>
WAVECAR not read
entering main loop
</pre>
Wavefunctions read from {{FILE|WAVECAR}} ({{TAG|ISTART|1}}); the charge density is then built from these wavefunctions:
<pre>
found WAVECAR, reading the header
reading WAVECAR
the WAVECAR file was read successfully
initial charge from wavefunction
entering main loop
</pre>
Wavefunctions and charge density read from the legacy files ({{TAG|ISTART|1}}, {{TAG|ICHARG|1}}):
<pre>
found WAVECAR, reading the header
reading WAVECAR
the WAVECAR file was read successfully
charge density read from file: CHGCAR, restart
entering main loop
</pre>
Wavefunctions read from {{FILE|vaspwave.h5}} ({{TAG|LH5|.TRUE.}}, {{TAG|ISTART|1}}):
<pre>
found vaspwave.h5, reading the header of group: wave
reading vaspwave.h5
found vaspwave.h5, reading group = wave
the vaspwave.h5 file was read successfully
initial charge from wavefunction
entering main loop
</pre>
Here the charge density is taken from the wavefunctions (''initial charge from wavefunction''); the charge density stored in {{FILE|vaspwave.h5}} is not read (see [[Known issues#KnownIssue73]]).


== Related tags and articles ==
== Related tags and articles ==
Line 76: Line 115:
Tags: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LCHARGH5}}, {{TAG|LTAU}}, {{TAG|LVTOT}}, {{TAG|LH5}}, {{TAG|ISTART}}, {{TAG|ICHARG}}
Tags: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LCHARGH5}}, {{TAG|LTAU}}, {{TAG|LVTOT}}, {{TAG|LH5}}, {{TAG|ISTART}}, {{TAG|ICHARG}}


== References ==
<references/>
<!-- On publication, remove the "Construction:" prefix and add the categories:
[[Category:Howto]][[Category:Charge density]]
[[Category:Howto]][[Category:Charge density]]
-->

Latest revision as of 12:40, 17 June 2026

VASP can continue a calculation from the converged results of a previous run instead of restarting the electronic minimization from scratch. The wavefunctions are reused through ISTART and the charge density through ICHARG; some methods additionally need the kinetic energy density or the local potential. The files that store these quantities are the restart files.

The restart files are WAVECAR (wavefunctions), CHGCAR (charge density together with the PAW one-center occupancies), TAUCAR (kinetic energy density, for meta-GGA functionals), and POT (local potential, for OEP calculations). Alternatively, these quantities are written to the single HDF5 file vaspwave.h5. The restart files differ from analysis and visualization output such as CHG, LOCPOT, DOSCAR, or vasprun.xml: the latter store derived or reduced quantities (for example, CHG omits the PAW one-center occupancies) and are not read back to continue a calculation.

Which restart files are written, and whether in the legacy format or in vaspwave.h5, is controlled by LWAVE, LCHARG, LTAU, LVTOT, LH5, and LCHARGH5.

How the tags interact

LWAVE, LCHARG, LTAU, and LVTOT decide whether the wavefunctions, the charge density, the kinetic energy density, and the local potential are written. LH5 decides the format: the legacy files for LH5 = .FALSE., or vaspwave.h5 for LH5 = .TRUE., which suppresses the legacy files entirely. LCHARGH5 is the exception: rather than switching the format, it writes the charge density to vaspwave.h5 in addition, so that the density is available for plotting with py4vasp while the restart information is still written to the legacy files.

The files are written according to the following rules:

Defaults

The defaults of LWAVE, LCHARG, LH5, and LVTOT are fixed and do not depend on the other tags:

LTAU defaults to LTAU = .TRUE. for meta-GGA functionals that need the kinetic energy density, and to LTAU = .FALSE. otherwise. LCHARGH5 also has no fixed default: when it is not set, its value is LH5 .AND. LCHARG. As a result, switching to HDF5 output with LH5 = .TRUE. writes the charge density to vaspwave.h5 automatically (as long as LCHARG = .TRUE.), while an explicit LCHARGH5 = .FALSE. suppresses it.

Overview table

The table gives an overview of written restart files for every combination of effective (i.e., after applying the defaults) tag values. ✓ marks a written file, — a file that is not written. The highlighted row is the default configuration. The kinetic energy density (TAUCAR) and the OEP local potential (POT) follow the same pattern as the charge density, additionally gated by LTAU and LVTOT.

Restart files written for each effective tag combination (wavefunctions and charge density)
LWAVE LCHARG LH5 LCHARGH5 WAVECAR CHGCAR vaspwave.h5 /wave vaspwave.h5 /charge
.TRUE. .TRUE. .FALSE. .FALSE.
.TRUE. .TRUE. .FALSE. .TRUE.
.TRUE. .FALSE. .FALSE. .FALSE.
.TRUE. .FALSE. .FALSE. .TRUE.
.FALSE. .TRUE. .FALSE. .FALSE.
.FALSE. .TRUE. .FALSE. .TRUE.
.FALSE. .FALSE. .FALSE. .FALSE.
.FALSE. .FALSE. .FALSE. .TRUE.
.TRUE. .TRUE. .TRUE. .FALSE.
.TRUE. .TRUE. .TRUE. .TRUE.
.TRUE. .FALSE. .TRUE. .FALSE.
.TRUE. .FALSE. .TRUE. .TRUE.
.FALSE. .TRUE. .TRUE. .FALSE.
.FALSE. .TRUE. .TRUE. .TRUE.
.FALSE. .FALSE. .TRUE. .FALSE.
.FALSE. .FALSE. .TRUE. .TRUE.

Recognizing which restart file was read

At startup VASP reports on the standard output which restart files it found and read, just before the entering main loop line. The excerpts below are for the wavefunction and charge-density restart.

No restart file present — the wavefunctions are initialized from scratch and the charge density from overlapping atoms:

 WAVECAR not read
 entering main loop

Wavefunctions read from WAVECAR (ISTART = 1); the charge density is then built from these wavefunctions:

 found WAVECAR, reading the header
 reading WAVECAR
 the WAVECAR file was read successfully
 initial charge from wavefunction
 entering main loop

Wavefunctions and charge density read from the legacy files (ISTART = 1, ICHARG = 1):

 found WAVECAR, reading the header
 reading WAVECAR
 the WAVECAR file was read successfully
 charge density read from file: CHGCAR, restart
 entering main loop

Wavefunctions read from vaspwave.h5 (LH5 = .TRUE., ISTART = 1):

 found vaspwave.h5, reading the header of group: wave
 reading vaspwave.h5
 found vaspwave.h5, reading group = wave
 the vaspwave.h5 file was read successfully
 initial charge from wavefunction
 entering main loop

Here the charge density is taken from the wavefunctions (initial charge from wavefunction); the charge density stored in vaspwave.h5 is not read (see Known issues#KnownIssue73).

Related tags and articles

Files: WAVECAR, CHGCAR, CHG, TAUCAR, POT, LOCPOT, vaspwave.h5

Tags: LWAVE, LCHARG, LCHARGH5, LTAU, LVTOT, LH5, ISTART, ICHARG