PAOFLOW.elphon.do_pao_eph#

Pseudo-atomic-orbital (Agapito-Bernardi) electron-phonon coupling driver.

This is the interpolation route of PAOFLOW.elphon: instead of reconstructing the DFPT perturbation from dvscf (bare local + nonlocal + induced), it reads Quantum ESPRESSO’s full coarse-grid coupling el_ph_mat – which already contains every contribution (including NLCC and ultrasoft augmentation) that ph.x computes – rotates it into the PAOFLOW pseudo-atomic-orbital (PAO) gauge, and Wigner-Seitz interpolates the electrons and the vertex to a dense grid to evaluate the isotropic Eliashberg properties.

Reference: L. A. Agapito and M. Bernardi, “Ab initio electron-phonon interactions using atomic orbital wave functions”, Phys. Rev. B 97, 235146 (2018).

The heavy lifting reuses the existing, validated primitives: vertex_pao_R() (PAO gauge + electron Fourier transform), lambda_q_dense_ws() (Wigner-Seitz dense interpolation + Fermi-surface double delta) and eliashberg_from_modes() (alpha^2F / lambda / Tc).

Functions#

vertex_from_qe_elphmat(elphmat_path, A, kpts_cryst, bg, ng)

PAO-gauge real-space vertex g(R_e) from one QE el_ph_mat dump.

vertex_from_qe_ahc(ahc_dir, iq, A, kpts_cryst, ...)

PAO-gauge real-space vertex g(R_e) from one unpatched QE AHC dump.

eliashberg_from_qe_coupling(A, HRs, kpts_cryst, bg, ...)

Isotropic Eliashberg properties from QE's coarse el_ph_mat (PAO route).

Module Contents#

PAOFLOW.elphon.do_pao_eph.vertex_from_qe_elphmat(elphmat_path, A, kpts_cryst, bg, ng)[source]#

PAO-gauge real-space vertex g(R_e) from one QE el_ph_mat dump.

Parameters:
  • elphmat_path (str) – Path to elphmat.<iq>.dat (patched-QE dump).

  • A (ndarray (nbnd, nawf, nk)) – PAO projection matrices A_{ni}(k) (arry['U'][..., ispin]), grabbed after projectability and before pao_hamiltonian.

  • kpts_cryst (ndarray (nk, 3)) – PAOFLOW coarse-grid k-points (crystal coordinates).

  • bg (ndarray (3, 3)) – Reciprocal-lattice vectors (rows), for the xq/xk -> crystal map.

  • ng (tuple(int, int, int)) – Coarse k-grid dimensions (== the pw.x SCF grid).

Returns:

  • gR (ndarray (nawf, nawf, ncart, n1, n2, n3))

  • q_cryst (ndarray (3,)) – The q-point of this dump in crystal coordinates.

PAOFLOW.elphon.do_pao_eph.vertex_from_qe_ahc(ahc_dir, iq, A, kpts_cryst, q_cryst, ng, nbnd, nmodes, nk)[source]#

PAO-gauge real-space vertex g(R_e) from one unpatched QE AHC dump.

Like vertex_from_qe_elphmat(), but reads the Cartesian ahc_gkk (read_qe_ahc_gkk()): no pattern rotation and no k-permutation – the AHC records are already in the nscf k-order, the same order as A and kpts_cryst for the same lead.save.

Parameters:
  • ahc_dir (str) – Directory with the ahc_gkk_iq<iq>.bin files.

  • iq (int) – 1-based q index (matches <prefix>.dyn<iq>).

  • A (ndarray (nbnd, nawf, nk)) – PAO projections.

  • kpts_cryst (ndarray (nk, 3)) – Coarse-grid k-points (crystal), nscf order.

  • q_cryst (ndarray (3,)) – q-point (crystal coordinates), from the .dyn file.

  • ng (tuple(int, int, int)) – Coarse k-grid dimensions.

  • nbnd (int) – AHC array dimensions.

  • nmodes (int) – AHC array dimensions.

  • nk (int) – AHC array dimensions.

Return type:

ndarray (nawf, nawf, ncart, n1, n2, n3)

PAOFLOW.elphon.do_pao_eph.eliashberg_from_qe_coupling(A, HRs, kpts_cryst, bg, at, coupling_dir, q_weights, ng, dyn_paths, elphmat_fmt='elphmat.%d.dat', source='elphmat', masses_amu=None, nk_dense=18, sigmas_ry=(0.02,), nelec=None, mu_star=0.1, ispin=0, isig=0, sigma_w_frac=0.02, fs_window=8.0, comm=None)[source]#

Isotropic Eliashberg properties from QE’s coarse el_ph_mat (PAO route).

For every irreducible q the coupling dump is rotated into the PAO gauge, Wigner-Seitz interpolated to a dense grid and reduced to lambda_{q nu}; the modes are combined with their star weights and fed to the validated property engine. The q = Gamma acoustic modes (omega -> 0) are zeroed, matching QE.

Parameters:
  • A (ndarray (nbnd, nawf, nk)) – PAO projections (grab arry['U'][..., ispin] before pao_hamiltonian).

  • HRs (ndarray (nawf, nawf, m1, m2, m3, nspin)) – PAO Hamiltonian (E_F at 0), from pao_hamiltonian.

  • kpts_cryst (ndarray (nk, 3)) – Coarse-grid k-points (crystal coordinates), e.g. read_nscf output.

  • bg (ndarray (3, 3)) – Reciprocal- and real-lattice vectors (rows).

  • at (ndarray (3, 3)) – Reciprocal- and real-lattice vectors (rows).

  • coupling_dir (str) – Directory holding the coupling files (elphmat.<iq>.dat for source='elphmat', or ahc_gkk_iq<iq>.bin for source='ahc').

  • q_weights (array_like (nq,)) – Star sizes of the irreducible q-points (need not be normalised). For a full un-reduced q-grid (e.g. the 27-point AHC output) use all ones.

  • ng (tuple(int, int, int)) – Coarse coupling k-grid (== SCF grid).

  • dyn_paths (sequence of str) – One QE *.dyn file per q (for frequencies/eigenvectors; also supplies the q-point for source='ahc').

  • elphmat_fmt (str, optional) – Filename template for the patched dumps (%d is the 1-based q index).

  • source ({'elphmat', 'ahc'}, optional) – Coupling input: the patched el_ph_mat dump (any pseudo) or the unpatched QE AHC ahc_gkk binaries (norm-conserving only).

  • masses_amu (array_like (natom,), optional) – Atomic masses (amu); required to mass-weight the phonon eigenvectors.

  • nk_dense (int, optional) – Dense interpolation grid size.

  • sigmas_ry (array_like, optional) – Fermi-surface smearing(s) (Ry); isig selects which one is reported.

  • nelec (float, optional) – Valence electrons for the dense-grid Fermi-level recompute.

  • mu_star (float, optional) – Coulomb pseudopotential for Tc.

  • ispin (int, optional)

  • isig (int, optional)

  • sigma_w_frac (float, optional) – Gaussian width (fraction of max frequency) for the alpha^2F histogram.

  • fs_window (float, optional) – Fermi-surface window (in smearings) used to prune the dense-grid double delta: only k with a band within fs_window * sigma of E_F are kept. The default (8) is exact to exp(-fs_window^2); lower it (e.g. 4-5) to speed up metals with wide bands at a controlled tolerance.

  • comm (mpi4py communicator, optional) – MPI communicator used to distribute the per-q loop (each q is an independent unit of work reusing the shared dense-electron cache). Defaults to MPI.COMM_WORLD; run mpirun -np N python ... for an (up to) N-fold speedup, capped at nq ranks. The dense electron diagonalisation is computed redundantly on every rank (the cache is needed by all q and is too large to broadcast cheaply); only the per-q vertex interpolation is parallelised.

Returns:

The eliashberg_from_modes() result, with the extra keys 'lambda_qv', 'omega_qv_thz' (both (nq, nmode)) and 'dos_ef' ((nq,), states/spin/Ry per q).

Return type:

dict