Dear VASP team,
I don't know if the following behavior should be considered a bug or just a misinterpretation of the documentation on the wiki.
I recently recompiled version 6.5.1 on our cluster with HDF5 support and wanted to run a few tests on a simple system (primitive cell silicon) in order to understand how the various LWAVE, LCHARG, LH5, LWAVEH5, and LCHARGH5 flags combine. Based on my understanding from the wiki, I feel that some of the results were inconsistent, but wanted to double check.
Based on the wiki entry https://vasp.at/wiki/LWAVEH5, it was my understanding that even if LH5 = .FALSE. that this could be overwritten by setting LWAVEH5 = .TRUE. However, my tests showed the following behavior when I used h5py to do a quick check of the vaspwave.h5 file:
If LWAVEH5 = .FALSE. and LH5 = .TRUE. and LCHARGH5 = .FALSE. then no vaspwave.h5 was written out.
If LWAVEH5 = .FALSE. and LH5 = .FALSE. and LCHARGH5 = .TRUE. then a vaspwave.h5 was written out with only charge density information but no wave function information.
If LWAVEH5 = .FALSE. and LH5 = .TRUE. and LCHARGH5 = .TRUE. then a vaspwave.h5 was written out with only charge density information and no wave function information.
In each of these cases, the legacy CHG, CHGCAR, and WAVECAR files had data as expected.
Now, if I set LWAVEH5 = .TRUE. then I always got wave function data written out to vaspwave.h5 even if LH5 = .FALSE. while the LWAVECHGH5 tag did properly turn on / off the write out of charge density information to the vaspwave.h5 file.
So, it seems that, in general, for the above that LH5 is controlling legacy vs HDF5 write out of wave function information, and unless LWAVE = .FALSE. with LH5 = .FALSE. we always get wave function data.
Lastly, however, if I set LCHARG = .TRUE. and LH5 = .TRUE. and LCHARGH5 = .FALSE. then there is no charge density information written out to CHG, CHGCAR, or vaspwave.h5 which may be unexpected for some users as some users treat charge density as more fundamental for archive purposes than wave functions for future restarts.
Currently, I have not uploaded any files with this as there may be too many. However, I am more than happy to share any files that may be needed for clarification.
Thank you for your help.

