Restart and output files cheat sheet: Difference between revisions
Created page with "under construction" |
Draft restart/output-files cheat sheet: tag-interaction rules, defaults, 16-row overview table, recommendations, related tags (#1534 / WI 291) |
||
| Line 1: | Line 1: | ||
The restart and output files {{FILE|WAVECAR}}, {{FILE|CHGCAR}}, {{FILE|CHG}}, and {{FILE|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: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LH5}}, and {{TAG|LCHARGH5}}. | |||
== How the tags interact == | |||
{{TAG|LWAVE}} and {{TAG|LCHARG}} decide '''whether''' the wavefunctions and the charge density are written. {{TAG|LH5}} decides '''where''' they go: the legacy files ({{FILE|WAVECAR}}, {{FILE|CHGCAR}}, {{FILE|CHG}}) for {{TAG|LH5|.FALSE.}}, or {{FILE|vaspwave.h5}} for {{TAG|LH5|.TRUE.}}. Setting {{TAG|LH5|.TRUE.}} therefore suppresses the legacy files entirely. {{TAG|LCHARGH5}} is the exception: it writes the charge density to {{FILE|vaspwave.h5}} independently of {{TAG|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: | |||
* {{FILE|WAVECAR}} — {{TAG|LWAVE|.TRUE.}} and {{TAG|LH5|.FALSE.}} | |||
* {{FILE|vaspwave.h5}} group <code>/wave</code> — {{TAG|LWAVE|.TRUE.}} and {{TAG|LH5|.TRUE.}} | |||
* {{FILE|CHGCAR}} and {{FILE|CHG}} — {{TAG|LCHARG|.TRUE.}} and {{TAG|LH5|.FALSE.}} | |||
* {{FILE|vaspwave.h5}} group <code>/charge</code> — {{TAG|LCHARGH5|.TRUE.}} | |||
=== Defaults === | |||
The defaults of {{TAG|LWAVE}}, {{TAG|LCHARG}}, and {{TAG|LH5}} are fixed and do not depend on the other tags: | |||
* {{TAG|LWAVE|.TRUE.}} | |||
* {{TAG|LCHARG|.TRUE.}} | |||
* {{TAG|LH5|.FALSE.}} | |||
{{TAG|LCHARGH5}} is the only tag whose default is not fixed: 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. | |||
== 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. | |||
{| class="wikitable" style="text-align:center;" | |||
|+ Output files written for each effective tag combination | |||
! {{TAG|LWAVE}} !! {{TAG|LCHARG}} !! {{TAG|LH5}} !! {{TAG|LCHARGH5}} !! {{FILE|WAVECAR}} !! {{FILE|CHGCAR}} !! {{FILE|CHG}} !! {{FILE|vaspwave.h5}} /wave !! {{FILE|vaspwave.h5}} /charge | |||
|- style="background:#eaffea;" | |||
| .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. || — || — || — || — || ✓ | |||
|} | |||
== Recommendations and advice == | |||
{{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|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|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 == | |||
Files: {{FILE|WAVECAR}}, {{FILE|CHGCAR}}, {{FILE|CHG}}, {{FILE|vaspwave.h5}} | |||
Tags: {{TAG|LWAVE}}, {{TAG|LCHARG}}, {{TAG|LH5}}, {{TAG|LCHARGH5}}, {{TAG|LTAU}} | |||
== References == | |||
<references/> | |||
<!-- On publication, remove the "Construction:" prefix and add the categories: | |||
[[Category:Howto]][[Category:Charge density]] | |||
--> | |||
Revision as of 13:16, 10 June 2026
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. - 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.
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. | — | — | — | — | ✓ |
Recommendations and advice
Tip: To plot the charge density with py4vasp while still writing restart information to the legacy WAVECAR, set LCHARGH5 = .TRUE. together with LH5 = .FALSE..
|
| 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
Tags: LWAVE, LCHARG, LH5, LCHARGH5, LTAU
References