Restart and output files cheat sheet
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:
- 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.
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 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.
| 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.
|
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
References