Restart and output files cheat sheet
The restart and output files WAVECAR, CHGCAR, CHG, and vaspwave.h5 store the wavefunctions and the charge density that VASP writes at the end of a run. Four tags control which files are written and in which format: LWAVE, LCHARG, LH5, and LCHARGH5.
How the tags interact
LWAVE and LCHARG decide whether the wavefunctions and the charge density are written. LH5 decides where they go: the legacy files (WAVECAR, CHGCAR, CHG) for LH5 = .FALSE., or vaspwave.h5 for LH5 = .TRUE.. Setting LH5 = .TRUE. therefore suppresses the legacy files entirely. LCHARGH5 is the exception: it writes the charge density to vaspwave.h5 independently of LH5, so that the density is available for plotting with py4vasp while restart information is still written to the legacy files.
A file is written according to the following rules:
- WAVECAR —
LWAVE = .TRUE.andLH5 = .FALSE. - vaspwave.h5 group
/wave—LWAVE = .TRUE.andLH5 = .TRUE. - CHGCAR and CHG —
LCHARG = .TRUE.andLH5 = .FALSE.[1] - vaspwave.h5 group
/charge—LCHARGH5 = .TRUE.
Defaults
The defaults of LWAVE, LCHARG, and LH5 are fixed and do not depend on the other tags:
LCHARGH5 is the only tag whose default is not fixed: 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 lists every combination of effective (i.e., after applying the defaults) tag values and the files that are written. ✓ marks a written file, — a file that is not written. The highlighted row is the default configuration.
| LWAVE | LCHARG | LH5 | LCHARGH5 | WAVECAR | CHGCAR | CHG | 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: 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, vaspwave.h5, TAUCAR
Tags: LWAVE, LCHARG, LH5, LCHARGH5, LTAU
References