PAOFLOW.elphon.qe_matdyn#

Fourier (matdyn-style) interpolation of phonons and the electron-phonon coupling from Quantum ESPRESSO real-space force constants (Phase 1A).

This is the PAOFLOW analogue of the QE q2r.x -> matdyn.x (la2F=.true.) step: it takes the real-space interatomic force constants (flfrc, e.g. Pb333.fc) and the real-space electron-phonon coupling “force constants” (a2Fmatdyn.NN) on a coarse commensurate q-grid and Fourier-interpolates both onto an arbitrarily dense q-grid. At each dense q the dynamical matrix is diagonalised to give the mode frequencies / eigenvectors, and the coupling matrix is projected onto the modes to give the mode-resolved lambda_{q nu}. The dense (lambda_qv, omega_qv) are then fed to PAOFLOW.elphon.eph_kq.eliashberg_from_modes() to build the smooth Eliashberg a2F(omega).

This “generalised Fourier interpolation” is the step EPW performs with maximally-localised Wannier functions; here it is done directly with the PAO / QE real-space representation, so the coupling is interpolated from a handful of coarse q-points to a dense grid at negligible cost.

The force-constant files use the standard QE flfrc block layout:

<crystal header>            # only in flfrc (nr line onwards is shared)
nr1 nr2 nr3
i j na nb                   # 3*3*nat*nat blocks
m1 m2 m3  Phi(i,j,na,nb; m)  # nr1*nr2*nr3 lines each
...

Attributes#

Functions#

read_qe_ifc(path)

Parse a QE flfrc interatomic force-constant file (e.g. Pb333.fc).

read_a2f_ifc(path[, nat])

Parse a QE a2Fmatdyn.NN real-space electron-phonon coupling file.

build_ws_images(nr, at, tau)

Wigner-Seitz real-space images per atom pair for matdyn interpolation.

interpolate_coupling(ifc_ph, ifc_a2f, nk[, ...])

Interpolate phonons + el-ph coupling onto a dense nk^3 q-grid.

Module Contents#

PAOFLOW.elphon.qe_matdyn.AMU_RY = 911.4442421[source]#
PAOFLOW.elphon.qe_matdyn.RY_TO_EV = 13.605693122994[source]#
PAOFLOW.elphon.qe_matdyn.THZ_TO_EV = 0.004135667696[source]#
PAOFLOW.elphon.qe_matdyn.RY_TO_THZ = 3289.842[source]#
PAOFLOW.elphon.qe_matdyn.read_qe_ifc(path)[source]#

Parse a QE flfrc interatomic force-constant file (e.g. Pb333.fc).

Returns:

{'nat', 'ntyp', 'ibrav', 'celldm', 'masses_amu', 'tau', 'nr', 'frc', 'has_zeu'}. frc has shape (3, 3, nat, nat, nr1, nr2, nr3) in Ry / Bohr^2; masses_amu is (nat,) in amu.

Return type:

dict

PAOFLOW.elphon.qe_matdyn.read_a2f_ifc(path, nat=1)[source]#

Parse a QE a2Fmatdyn.NN real-space electron-phonon coupling file.

The layout matches read_qe_ifc() from the grid line on, prefixed by a single header line sigma_Ry  Ef_Ry  N(E_F).

Parameters:
  • path (str) – Path to the a2Fmatdyn.NN file.

  • nat (int, optional) – Number of atoms (needed because the file has no crystal header; default 1).

Returns:

{'sigma_ry', 'ef_ry', 'dos_ef', 'nr', 'frc'}. frc has shape (3, 3, nat, nat, nr1, nr2, nr3); dos_ef is in states / spin / Ry.

Return type:

dict

PAOFLOW.elphon.qe_matdyn.build_ws_images(nr, at, tau)[source]#

Wigner-Seitz real-space images per atom pair for matdyn interpolation.

For every atom pair (na, nb) the routine scans real-space cells R = sum_i n_i a_i over n_i in [-2 nr_i, 2 nr_i], keeps those whose bond vector R + tau_na - tau_nb lies in (or on the boundary of) the Wigner-Seitz cell of the nr-supercell, and records the grid index m_i = n_i mod nr_i together with the integer cell n (for the Bloch phase) and the WS weight. This reproduces QE matdyn (wsinit + frc_blk), giving a far better dense-grid interpolation than a plain per-axis fold.

Returns:

(na, nb) -> list of (m (3,), n (3,), weight).

Return type:

dict

PAOFLOW.elphon.qe_matdyn.interpolate_coupling(ifc_ph, ifc_a2f, nk, freq_scale=None, asr=True, ws=True)[source]#

Interpolate phonons + el-ph coupling onto a dense nk^3 q-grid.

Parameters:
  • ifc_ph (dict) – Output of read_qe_ifc() (phonon force constants).

  • ifc_a2f (dict) – Output of read_a2f_ifc() (el-ph coupling force constants).

  • nk (int or (int, int, int)) – Dense q-grid size.

  • freq_scale (float, optional) – Overrides the Ry-dynamical-matrix -> THz frequency scale (otherwise the physical constant is used). Use to calibrate against a QE phonon DOS.

  • asr (bool, optional) – Apply the simple acoustic sum rule to both force-constant tensors (default True, matching QE asr='simple').

  • ws (bool, optional) – Use the full Wigner-Seitz interpolation (default True, matching QE matdyn); False falls back to the cheaper per-axis fold. True requires a supported ibrav (see _lattice_vectors()).

Returns:

{'omega_thz', 'lambda_qv', 'proj', 'dos_ef', 'q_cryst'}. omega_thz / lambda_qv / proj are (nq, nmode); proj is the raw mode projection <z|A(q)|z> (before the lambda conversion).

Return type:

dict