PAOFLOW.elphon.wavefunction_symmetry#
Full-grid Bloch functions from an nscf on the irreducible wedge.
An nscf with K_POINTS automatic stores the wavefunctions of the irreducible k-points
only. The native electron-phonon vertex (PAOFLOW.elphon.dfpt_vertex) and the PAO
projections need every k of the full Γ-centred grid, which this module reconstructs by
symmetry: for the space-group operation g: x -> R x - t (crystal coordinates of
positions, SpaceGroup) the rotated state
(O_g psi_k)(r) = psi_k(g^-1 r) is the Bloch function at R k with coefficients
kappa' and m' being the crystal coordinates of R k and R G. Spinors are
rotated with the SU(2) matrix of the proper part of R; time reversal is complex
conjugation (k -> -k, G -> -G), combined with i sigma_y for spinors. The
rotated states are the same states as an nscf at R k would give, up to a unitary
mixing inside degenerate groups, so everything that treats the bands as bra and ket of the
same block (the vertex, the projections computed from the rotated block) is unchanged.
Classes#
How every point of the full grid derives from the irreducible k-points. |
|
Full-grid plane-wave blocks and k-points from an irreducible-wedge nscf save. |
Functions#
|
SU(2) matrix of a Cartesian rotation (QE |
|
Assign every full-grid point to an irreducible point and an operation. |
|
The Bloch functions at the full-grid point |
|
True when a QE save holds the irreducible wedge of a Gamma-centred automatic grid. |
|
|
|
Per-process cache of |
|
Indices of a full-grid list that QE's |
|
Replace the irreducible k-point data of a |
Module Contents#
- PAOFLOW.elphon.wavefunction_symmetry.su2_rotation(m_cart)[source]#
SU(2) matrix of a Cartesian rotation (QE
find_u: improper operations use-R).- Parameters:
m_cart (ndarray
(3, 3)) – Orthogonal matrix.- Returns:
cos(theta/2) - i sin(theta/2) n.sigmafor the proper rotation bythetaaboutn(right-handed); the overall sign is a global phase.- Return type:
ndarray
(2, 2), complex
- class PAOFLOW.elphon.wavefunction_symmetry.FullGridMap[source]#
How every point of the full grid derives from the irreducible k-points.
- Variables:
kpts_cryst (ndarray
(N, 3)) – Full grid in[0, 1), label order (third index fastest).source (ndarray
(N,)int) – Index of the irreducible point.isym (ndarray
(N,)int) – Operation (0 = identity for the representatives themselves).time_reversed (ndarray
(N,)bool)umklapp (ndarray
(N, 3)int) –kpts_cryst = (+/-) R k_irr + umklapp.
- source: numpy.typing.NDArray[numpy.int_][source]#
- isym: numpy.typing.NDArray[numpy.int_][source]#
- umklapp: numpy.typing.NDArray[numpy.int_][source]#
- PAOFLOW.elphon.wavefunction_symmetry.full_grid_map(kpts_irr_cryst, group, grid, at, bg, time_reversal=True)[source]#
Assign every full-grid point to an irreducible point and an operation.
- Parameters:
kpts_irr_cryst (ndarray
(nk_irr, 3))group (SpaceGroup)
grid (sequence of int) –
(nk1, nk2, nk3), Γ-centred.at (ndarray
(3, 3))bg (ndarray
(3, 3))time_reversal (bool, optional) – Also use
k -> -k.
- Raises:
ValueError – If the stars of the irreducible points do not cover the grid (wrong grid, symmetries or time-reversal flag).
- PAOFLOW.elphon.wavefunction_symmetry.rotate_block(block, group, isym, time_reversed, target_cryst, at, bg)[source]#
The Bloch functions at the full-grid point
target_crystfrom an irreducible block.- Parameters:
block (PlaneWaveBlock) – Stored block at the irreducible
k.group (SpaceGroup)
isym (int)
time_reversed (bool)
target_cryst (ndarray
(3,)) – The grid representative ([0, 1)); must equal(+/-) R kup to a reciprocal lattice vector, which is applied to the Miller indices (the storedkof the block may carry a different lattice shift than the folded k-point list).at (ndarray
(3, 3))bg (ndarray
(3, 3))
- Returns:
At
target_cryst, with the rotated Miller indices and phased coefficients.- Return type:
- PAOFLOW.elphon.wavefunction_symmetry.stores_irreducible_wedge(save_dir)[source]#
True when a QE save holds the irreducible wedge of a Gamma-centred automatic grid.
- PAOFLOW.elphon.wavefunction_symmetry.monkhorst_pack_grid(save_dir)[source]#
((nk1, nk2, nk3), (k1, k2, k3))of an automatic nscf fromdata-file-schema.xml.- Raises:
ValueError – For an explicit k-point list (no
monkhorst_packelement).
- class PAOFLOW.elphon.wavefunction_symmetry.WavefunctionProvider(save_dir, nspin=1, cache_blocks=256)[source]#
Full-grid plane-wave blocks and k-points from an irreducible-wedge nscf save.
- Parameters:
- block(ik, ispin=0)[source]#
Block at full-grid point
ik(label order), rotated from its irreducible source.
- gkspace_wfc(ik, ispin=0)[source]#
The
(gkspace, wfc)pair ofPAOFLOW.projection.do_atwfc_proj.read_QE_wfc()(raw coefficients).xkandbgare in bohr^-1 as in thewfc*.datheaders (bgcolumns).
- PAOFLOW.elphon.wavefunction_symmetry.provider_for(save_dir, nspin=1)[source]#
Per-process cache of
WavefunctionProviderkeyed by save directory.
- PAOFLOW.elphon.wavefunction_symmetry.irreducible_representatives(kpts_full_cryst, group, grid, at, bg, time_reversal=True)[source]#
Indices of a full-grid list that QE’s
kpoint_gridwould keep (first of each star in grid order).Used to emulate an irreducible-wedge save from a full-grid one in tests.
- PAOFLOW.elphon.wavefunction_symmetry.expand_data_controller_kpoints(data_controller)[source]#
Replace the irreducible k-point data of a
DataControllerby the full grid.Called on the reading rank right after the QE XML has been parsed (
unfold_kpoints=TrueinPAOFLOW.PAOFLOW):kpnts,kpnts_wght,my_eigsmatandnkpntsbecome those of the full Γ-centrednk1 x nk2 x nk3grid inK_POINTS automaticorder, so that the projections, the Hamiltonian (expand_wedge=False) and the electron-phonon vertex see an ordinary full-grid nscf. The wavefunctions themselves are rotated on demand byPAOFLOW.projection.do_atwfc_proj.read_QE_wfc().- Returns:
The provider used for the map (also cached per process, see
provider_for()).- Return type:
- Raises:
ValueError – If the save already holds the full grid, or if it is not a Γ-centred automatic grid.