[QE-users] About Gridding Complex-Valued Wavefunctions for Spectroscopy Calculations

Erik.Schultheis at dlr.de Erik.Schultheis at dlr.de
Mon Aug 26 07:54:44 CEST 2024


Hello Barry,

The complex wavefunction coefficients are stored in the .dat files. You got one complex coefficient per reciprocal lattice vector. The reciprocal lattice vectors have a radial cut-off defined by the ecutwfc input parameter. For gamma-only calculations only half of the coefficients are stored, for the positive half-sphere of reciprocal lattice vectors. The other half can be obtained by complex conjugating, (see here https://docs.abinit.org/theory/wavefunctions/#plane-wave-basis-set-sphere).

Additionally, the .dat files contain information about the reciprocal lattice vectors, miller indices, number of bands. So the .dat files contain more than just the wavefunction.

Here (https://mattermodeling.stackexchange.com/questions/9149/how-to-read-qes-wfc-dat-files-with-python) you can find python code to read the data stored in the .dat files.
Alternatively, you can compile QE with HDF5 (–with-hdf5 compile flag), then the .dat files are .hdf5 files and can be read easily with a HDF5 data viewer.

Best regards
Erik

Von: users <users-bounces at lists.quantum-espresso.org> Im Auftrag von Barry (Yangtao) Li
Gesendet: Montag, 26. August 2024 03:58
An: users at lists.quantum-espresso.org
Betreff: [QE-users] About Gridding Complex-Valued Wavefunctions for Spectroscopy Calculations

I am writing to seek your guidance on generating and properly gridding complex-valued wavefunctions. Our goal is to obtain 3D complex wavefunctions, fully gridded on their defined FFT grid, which we intend to use for advanced spectroscopy simulations as an added feature to Quantum Espresso.

For instance, with a system defined by 2×2×2 k-points and no symmetry, we expect to have 8 k-vectors (and therefore, we will obtain 8 wavefunctions binaries stored in .save after SCF). If we desire 40 bands and an FFT grid of (20, 20, 20), our expectation is that 8 wavefunction files (binaries or texts) would be written, each with the same size of 16×20×20×20×40 = 5,120.000 bytes as we are aiming for each wavefunction to be stored as complex*16 data, separated by bands looping from 1 to 40, and in each band block its (1:20, 1:20, 1:20) a row of 3D complex wavefunction data.

We would greatly appreciate any advice or documentation you can provide on how to achieve this, especially how to ensure the wavefunctions are accurately gridded on their FFT grid in the desired complex format, we tried to count the bytes of the QE-generated .dat files, the bytes are far away from the expected, so we don't know how to grid them. We also tried pp.x postprocessing, however, since it is mainly designed for orbital visualization, the phase information, i.e., the complex nature of wavefunction is not stored after the post-processing. For Gamma-only, we can do a square-root transformation, however, for non-Gamma cases, the square-root won't work anymore.

We believe this capability could be highly beneficial for users interested in extending QE's functionality into advanced spectroscopy, and we would be more than happy to contribute to its development.

Thank you for your support and any assistance you can offer.

Sincerely
Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20240826/cb26af49/attachment.html>


More information about the users mailing list