Dear Barry,
you could have a look to the utility "pw2bgw.f90" which is used to
interface with a different code, but does also input/output of the
wavefunctions, which you could recycle.
! pw2bgw subroutines:
!
! write_wfng - generates complex wavefunctions in G-space (normalized to 1)
! real_wfng - constructs real wavefunctions by applying the Gram-Schmidt
! process (called from write_wfng)
! write_rhog - generates real/complex charge density in G-space
! (units of the number of electronic states per unit cell)
! calc_rhog - computes charge density by summing over a subset of occupied
! bands (called from write_rhog), destroys charge density
...
Be careful, that if you use any ultrasoft or paw pseudopotentials, the
wavefunctions are not normalized.
On 26/08/2024 03:58, Barry (Yangtao) Li wrote:
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
_______________________________________________
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing [email protected]
https://lists.quantum-espresso.org/mailman/listinfo/users
--
Dr. Lorenzo Paulatto
IdR @ IMPMC - CNRS UMR 7590 & Sorbonne Université
phone: +33 (0)1 442 79822 / skype: paulatz
http://www.impmc.upmc.fr/~paulatto/ - https://anharmonic.github.io/
23-24/423 B115, 4 place Jussieu 75252 Paris CX 05
_______________________________________________
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list [email protected]
https://lists.quantum-espresso.org/mailman/listinfo/users