Restart and output files cheat sheet: Difference between revisions
m Hampel moved page Construction:Restart and output files cheat sheet to Restart and output files cheat sheet |
Revise per feedback: restart-file intro + definition, add LTAU/LVTOT (TAUCAR/POT), reframe LCHARGH5, drop CHG from table (note it tracks CHGCAR), link KnownIssue73 (ICHARG=11), group NB boxes |
||
| Line 1: | Line 1: | ||
The restart | 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 {{TAG|ISTART}} and the charge density through {{TAG|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 {{FILE|WAVECAR}} (wavefunctions), {{FILE|CHGCAR}} (charge density together with the PAW one-center occupancies), {{FILE|TAUCAR}} (kinetic energy density, for meta-GGA functionals), and {{FILE|POT}} (local potential, for OEP and hybrid-functional OEP calculations). Alternatively, these quantities are written to the single HDF5 file {{FILE|vaspwave.h5}}. The restart files differ from analysis and visualization output such as {{FILE|CHG}}, {{FILE|LOCPOT}}, {{FILE|DOSCAR}}, or {{FILE|vasprun.xml}}: the latter store derived or reduced quantities (for example, {{FILE|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 {{FILE|vaspwave.h5}}, is controlled by {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LTAU}}, {{TAG|LVTOT}}, {{TAG|LH5}}, and {{TAG|LCHARGH5}}. | |||
== How the tags interact == | == How the tags interact == | ||
{{TAG|LWAVE}} and {{TAG| | {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LTAU}}, and {{TAG|LVTOT}} decide '''whether''' the wavefunctions, the charge density, the kinetic energy density, and the local potential are written. {{TAG|LH5}} decides the '''format''': the legacy files for {{TAG|LH5|.FALSE.}}, or {{FILE|vaspwave.h5}} for {{TAG|LH5|.TRUE.}}, which suppresses the legacy files entirely. {{TAG|LCHARGH5}} is the exception: rather than switching the format, it writes the charge density to {{FILE|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: | |||
* {{FILE|WAVECAR}} — {{TAG|LWAVE|.TRUE.}} and {{TAG|LH5|.FALSE.}} | * {{FILE|WAVECAR}} — {{TAG|LWAVE|.TRUE.}} and {{TAG|LH5|.FALSE.}}; the {{FILE|vaspwave.h5}} group <code>/wave</code> — {{TAG|LWAVE|.TRUE.}} and {{TAG|LH5|.TRUE.}} | ||
* {{FILE|CHGCAR}} — {{TAG|LCHARG|.TRUE.}} and {{TAG|LH5|.FALSE.}}; the {{FILE|vaspwave.h5}} group <code>/charge</code> — {{TAG|LCHARGH5|.TRUE.}} | |||
* {{FILE|CHGCAR | * {{FILE|TAUCAR}} — like {{FILE|CHGCAR}}, but additionally requires {{TAG|LTAU|.TRUE.}}; the {{FILE|vaspwave.h5}} group <code>/kinetic_energy_density</code> follows the <code>/charge</code> rule. {{TAG|LTAU}} defaults to {{TAG|LTAU|.TRUE.}} for meta-GGA functionals. | ||
* {{FILE|vaspwave.h5}} group <code>/ | * {{FILE|POT}} — {{TAG|LVTOT|.TRUE.}} and {{TAG|LH5|.FALSE.}}; the {{FILE|vaspwave.h5}} group <code>/potential</code> requires {{TAG|LVTOT|.TRUE.}} and {{TAG|LH5|.TRUE.}}. Only OEP and hybrid-functional OEP calculations write {{FILE|POT}}. | ||
{{NB|mind|{{FILE|CHG}} is written together with {{FILE|CHGCAR}} under the same condition, but it omits the PAW one-center occupancies. Like {{FILE|LOCPOT}}, it is an analysis file and not a restart file.}} | |||
=== Defaults === | === Defaults === | ||
The defaults of {{TAG|LWAVE}}, {{TAG|LCHARG}}, and {{TAG| | The defaults of {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LH5}}, and {{TAG|LVTOT}} are fixed and do not depend on the other tags: | ||
* {{TAG|LWAVE|.TRUE.}} | * {{TAG|LWAVE|.TRUE.}} | ||
* {{TAG|LCHARG|.TRUE.}} | * {{TAG|LCHARG|.TRUE.}} | ||
* {{TAG|LH5|.FALSE.}} | * {{TAG|LH5|.FALSE.}} | ||
* {{TAG|LVTOT|.FALSE.}} | |||
{{TAG|LCHARGH5}} | {{TAG|LTAU}} defaults to {{TAG|LTAU|.TRUE.}} for meta-GGA functionals that need the kinetic energy density, and to {{TAG|LTAU|.FALSE.}} otherwise. {{TAG|LCHARGH5}} also has no fixed default: when it is not set, its value is {{TAG|LH5}} <code>.AND.</code> {{TAG|LCHARG}}. As a result, switching to HDF5 output with {{TAG|LH5|.TRUE.}} writes the charge density to {{FILE|vaspwave.h5}} automatically (as long as {{TAG|LCHARG|.TRUE.}}), while an explicit {{TAG|LCHARGH5|.FALSE.}} suppresses it. | ||
{{NB|tip|To plot the charge density with {{py4vasp}} while still writing restart information to the legacy {{FILE|WAVECAR}}, set {{TAG|LCHARGH5|.TRUE.}} together with {{TAG|LH5|.FALSE.}}.}} | {{NB|tip|To plot the charge density with {{py4vasp}} while still writing restart information to the legacy {{FILE|WAVECAR}}, set {{TAG|LCHARGH5|.TRUE.}} together with {{TAG|LH5|.FALSE.}}.}} | ||
== Overview table == | == Overview table == | ||
The table | The table covers the wavefunctions and the charge density 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 ({{FILE|TAUCAR}}) and the OEP local potential ({{FILE|POT}}) follow the same pattern as the charge density, additionally gated by {{TAG|LTAU}} and {{TAG|LVTOT}}. | ||
{| class="wikitable" style="text-align:center;" | {| class="wikitable" style="text-align:center;" | ||
|+ | |+ Restart files written for each effective tag combination (wavefunctions and charge density) | ||
! {{TAG|LWAVE}} !! {{TAG|LCHARG}} !! {{TAG|LH5}} !! {{TAG|LCHARGH5}} !! {{FILE|WAVECAR}} !! {{FILE|CHGCAR | ! {{TAG|LWAVE}} !! {{TAG|LCHARG}} !! {{TAG|LH5}} !! {{TAG|LCHARGH5}} !! {{FILE|WAVECAR}} !! {{FILE|CHGCAR}} !! {{FILE|vaspwave.h5}} /wave !! {{FILE|vaspwave.h5}} /charge | ||
|- style="background:#eaffea;" | |- style="background:#eaffea;" | ||
| .TRUE. || .TRUE. || .FALSE. || .FALSE. | | .TRUE. || .TRUE. || .FALSE. || .FALSE. || ✓ || ✓ || — || — | ||
|- | |- | ||
| .TRUE. || .TRUE. || .FALSE. || .TRUE. | | .TRUE. || .TRUE. || .FALSE. || .TRUE. || ✓ || ✓ || — || ✓ | ||
|- | |- | ||
| .TRUE. || .FALSE. || .FALSE. || .FALSE. || ✓ | | .TRUE. || .FALSE. || .FALSE. || .FALSE. || ✓ || — || — || — | ||
|- | |- | ||
| .TRUE. || .FALSE. || .FALSE. || .TRUE. || ✓ | | .TRUE. || .FALSE. || .FALSE. || .TRUE. || ✓ || — || — || ✓ | ||
|- | |- | ||
| .FALSE. || .TRUE. || .FALSE. || .FALSE. || — | | .FALSE. || .TRUE. || .FALSE. || .FALSE. || — || ✓ || — || — | ||
|- | |- | ||
| .FALSE. || .TRUE. || .FALSE. || .TRUE. || — | | .FALSE. || .TRUE. || .FALSE. || .TRUE. || — || ✓ || — || ✓ | ||
|- | |- | ||
| .FALSE. || .FALSE. || .FALSE. || .FALSE. | | .FALSE. || .FALSE. || .FALSE. || .FALSE. || — || — || — || — | ||
|- | |- | ||
| .FALSE. || .FALSE. || .FALSE. || .TRUE. | | .FALSE. || .FALSE. || .FALSE. || .TRUE. || — || — || — || ✓ | ||
|- | |- | ||
| .TRUE. || .TRUE. || .TRUE. || .FALSE. | | .TRUE. || .TRUE. || .TRUE. || .FALSE. || — || — || ✓ || — | ||
|- | |- | ||
| .TRUE. || .TRUE. || .TRUE. || .TRUE. | | .TRUE. || .TRUE. || .TRUE. || .TRUE. || — || — || ✓ || ✓ | ||
|- | |- | ||
| .TRUE. || .FALSE. || .TRUE. || .FALSE. | | .TRUE. || .FALSE. || .TRUE. || .FALSE. || — || — || ✓ || — | ||
|- | |- | ||
| .TRUE. || .FALSE. || .TRUE. || .TRUE. | | .TRUE. || .FALSE. || .TRUE. || .TRUE. || — || — || ✓ || ✓ | ||
|- | |- | ||
| .FALSE. || .TRUE. || .TRUE. || .FALSE. | | .FALSE. || .TRUE. || .TRUE. || .FALSE. || — || — || — || — | ||
|- | |- | ||
| .FALSE. || .TRUE. || .TRUE. || .TRUE. | | .FALSE. || .TRUE. || .TRUE. || .TRUE. || — || — || — || ✓ | ||
|- | |- | ||
| .FALSE. || .FALSE. || .TRUE. || .FALSE. | | .FALSE. || .FALSE. || .TRUE. || .FALSE. || — || — || — || — | ||
|- | |- | ||
| .FALSE. || .FALSE. || .TRUE. || .TRUE. | | .FALSE. || .FALSE. || .TRUE. || .TRUE. || — || — || — || ✓ | ||
|} | |} | ||
{{NB|mind|The tag {{TAG|LWAVEH5}} has no effect in current versions of VASP and is ignored. Use {{TAG|LH5}} to redirect the wavefunctions to {{FILE|vaspwave.h5}}.}} | {{NB|mind|The tag {{TAG|LWAVEH5}} has no effect in current versions of VASP and is ignored. Use {{TAG|LH5}} to redirect the wavefunctions to {{FILE|vaspwave.h5}}.}} | ||
{{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}}.}} | ||
== Related tags and articles == | == Related tags and articles == | ||
Files: {{FILE|WAVECAR}}, {{FILE|CHGCAR}}, {{FILE|CHG}}, {{FILE| | Files: {{FILE|WAVECAR}}, {{FILE|CHGCAR}}, {{FILE|CHG}}, {{FILE|TAUCAR}}, {{FILE|POT}}, {{FILE|LOCPOT}}, {{FILE|vaspwave.h5}} | ||
Tags: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LH5}}, {{TAG| | Tags: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LCHARGH5}}, {{TAG|LTAU}}, {{TAG|LVTOT}}, {{TAG|LH5}}, {{TAG|ISTART}}, {{TAG|ICHARG}} | ||
== References == | == References == | ||
Revision as of 13:08, 16 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 and hybrid-functional 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:
- WAVECAR —
LWAVE = .TRUE.andLH5 = .FALSE.; the vaspwave.h5 group/wave—LWAVE = .TRUE.andLH5 = .TRUE. - CHGCAR —
LCHARG = .TRUE.andLH5 = .FALSE.; the vaspwave.h5 group/charge—LCHARGH5 = .TRUE. - TAUCAR — like CHGCAR, but additionally requires
LTAU = .TRUE.; the vaspwave.h5 group/kinetic_energy_densityfollows the/chargerule. LTAU defaults toLTAU = .TRUE.for meta-GGA functionals. - POT —
LVTOT = .TRUE.andLH5 = .FALSE.; the vaspwave.h5 group/potentialrequiresLVTOT = .TRUE.andLH5 = .TRUE.. Only OEP and hybrid-functional OEP calculations write POT.
| Mind: CHG is written together with CHGCAR under the same condition, but it omits the PAW one-center occupancies. Like LOCPOT, it is an analysis file and not a restart file. |
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.
Tip: To plot the charge density with py4vasp while still writing restart information to the legacy WAVECAR, set LCHARGH5 = .TRUE. together with LH5 = .FALSE..
|
Overview table
The table covers the wavefunctions and the charge density 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.
| 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. | — | — | — | ✓ |
| Mind: The tag LWAVEH5 has no effect in current versions of VASP and is ignored. Use LH5 to redirect the wavefunctions to vaspwave.h5. |
Mind: Reading the charge density back from vaspwave.h5 is not yet implemented. A fixed-density restart (ICHARG = 11) cannot use a vaspwave.h5 that was written with LH5 = .TRUE.; write the CHGCAR for such restarts. See Known issues#KnownIssue73.
|
Mind: This page describes VASP 6.5 and later. HDF5 output (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 LCHARG was .NOT.LH5, and some combinations with LH5 = .TRUE. still wrote the legacy CHGCAR.
|
Related tags and articles
Files: WAVECAR, CHGCAR, CHG, TAUCAR, POT, LOCPOT, vaspwave.h5
Tags: LWAVE, LCHARG, LCHARGH5, LTAU, LVTOT, LH5, ISTART, ICHARG
References