PAOFLOW.elphon.plane_waves#
Plane-wave blocks of a QE nscf run and their transforms to and from the FFT grid.
The coarse electron-phonon vertex of PAOFLOW.elphon.dfpt_vertex works with the
raw plane-wave coefficients of wfc<ik>.dat (no Loewdin step, unlike the projection
reader PAOFLOW.projection.do_atwfc_proj.read_QE_wfc()), the periodic parts of the
Bloch functions on the smooth FFT grid and the gather of a real-space product back onto
the k + q + G sphere.
Conventions (QE): psi_nk(r) = Omega^-1/2 sum_G c_n(G) exp(i (k+G).r) with
sum_G |c_n(G)|^2 = 1; the periodic part on the grid is
u_n(r) = sum_G c_n(G) exp(i G.r) (inverse FFT without scaling); the forward
transform carries the 1/N factor. Grid index [i, j, k] is the point
i/nr1 a1 + j/nr2 a2 + k/nr3 a3.
Classes#
Plane-wave coefficients of all bands at one k-point. |
Functions#
|
Read |
|
|
|
FFT-box indices |
|
Periodic parts |
|
Fourier components of periodic fields on a |
|
Fourier-interpolate a periodic field from one FFT grid to another (QE |
|
Reciprocal vectors of the FFT box inside |
Module Contents#
- class PAOFLOW.elphon.plane_waves.PlaneWaveBlock[source]#
Plane-wave coefficients of all bands at one k-point.
- Variables:
xk_cart (ndarray, shape
(3,)) – k-point (Cartesian,2 pi / alat).miller (ndarray, shape
(3, npw), int) – Miller indices of thek + Gsphere (QEigkorder).coefficients (ndarray, shape
(nbnd, npol * npw), complex) – Raw coefficientsc_n(G)(spinor components concatenated fornpol = 2).npol (int) – Spinor components.
- miller: numpy.typing.NDArray[numpy.int_][source]#
- PAOFLOW.elphon.plane_waves.read_plane_wave_block(save_dir, ik, alat, nspin=1, ispin=0, bands=None)[source]#
Read
wfc<ik+1>.dat(or the HDF5 variant) of a QE save directory.- Parameters:
save_dir (str) – QE
outdir/prefix.savedirectory.ik (int) – Zero-based k-point index in the nscf order.
alat (float) – Lattice parameter (bohr): the file stores
kin bohr^-1, the block in2 pi / alat.nspin (int, optional) – 1 (or 4 for noncollinear) reads
wfc<ik>; 2 readswfcup/wfcdw.ispin (int, optional) – Spin channel for
nspin = 2(0 = down, 1 = up, as the projection reader).bands (slice, optional) – Subset of bands to keep.
- Return type:
- PAOFLOW.elphon.plane_waves.k_plus_g_cart(block, bg)[source]#
k + Gvectors of a block (Cartesian,2 pi / alat), shape(npw, 3).- Parameters:
block (PlaneWaveBlock)
bg (ndarray, shape
(3, 3)) – Reciprocal lattice vectors (rows,2 pi / alat).
- PAOFLOW.elphon.plane_waves.box_indices(miller, fft_grid)[source]#
FFT-box indices
(i1, i2, i3)of Miller indices (negative frequencies wrap).
- PAOFLOW.elphon.plane_waves.periodic_part_on_grid(coefficients, miller, fft_grid)[source]#
Periodic parts
u_n(r) = sum_G c_n(G) exp(i G.r)on the FFT grid.
- PAOFLOW.elphon.plane_waves.project_on_plane_waves(fields, miller, fft_grid, umklapp=(0, 0, 0))[source]#
Fourier components of periodic fields on a
k + q + Gsphere.- Parameters:
fields (ndarray, shape
(..., nr1, nr2, nr3), complex) – Periodic functions on the grid (for instancedv(r) u_n(r)).miller (ndarray, shape
(3, npw), int) – Miller indices of the stored block atk' = k + q - G0.umklapp (array_like, shape
(3,), int, optional) –G0: the component atG' = G'' - G0is returned for every storedG''.
- Returns:
(1/N) sum_r f(r) exp(-i (G'' - G0).r).- Return type:
ndarray, shape
(..., npw), complex
- PAOFLOW.elphon.plane_waves.interpolate_to_grid(field, fft_out, gcut=None)[source]#
Fourier-interpolate a periodic field from one FFT grid to another (QE
fft_interpolate).- Parameters:
- Return type:
ndarray, shape
(..., \*fft_out), complex