PAOFLOW.elphon.eph_kq#

Bloch-basis electron-phonon matrix g_mn^v(k, q) and Eliashberg a2F/lambda (P3/P4).

The real-space tensor g_R from PAOFLOW.elphon.do_gkq.assemble_eph_tensor() is Fourier-transformed to the electron momentum k and the (commensurate) phonon momentum q, projected onto the primitive PAO Bloch states and combined with the phonon polarisations to give

\[g_{mn}^{v}(k, q) = \sum_{\kappa\alpha} \sqrt{\tfrac{\hbar}{2 M_\kappa \omega_{qv}}}\, e_{\kappa\alpha}^{v}(q)\, \langle m, k+q | \partial H / \partial u_{\kappa\alpha} | n, k \rangle .\]

Both Fourier transforms use the folded fftfreq real-space grid convention of PAOFLOW (PAOFLOW.utils.get_R_grid_fft.get_R_grid_fft()), so the electronic states (from an ifftn of the primitive HRs) and dH/du share the same k-grid and the k+q transition is a pure index shift. The 2x2x2 supercell supports the N_p = 8 commensurate q-points; k runs over the full primitive FFT grid (22^3 for Al).

Attributes#

Functions#

bloch_hamiltonian(HR)

H(k) on the native FFT grid from a folded-fftfreq real-space HR.

primitive_eigenstates(HR)

Diagonalise H(k) on the primitive FFT grid.

fourier_dHdu(g_R)

Fourier transform the real-space e-ph tensor to dH/du(k, q).

estates_on_grid(HR, nk)

Diagonalise H(k) on an nk^3 grid, Fourier-interpolated from HR.

fourier_dHdu_on_grid(g_R, nk)

dH/du(k, q) with the electron k-grid Fourier-interpolated to nk^3.

zero_point_amplitude(mass_amu, omega_thz[, ...])

Zero-point displacement amplitude sqrt(hbar / (2 M omega)) in Bohr.

assemble_g_bloch(dHdu_kq, v_k, v_kq, eigvec_q, ...)

Physical g_mn^v (eV) for one (k, q) transition.

phonon_moments(lambda_qv, omega_thz)

Coupling-weighted logarithmic and second phonon-frequency moments.

mcmillan_allen_dynes_tc(lam, omega_log_ev, omega2_ev)

Superconducting Tc from the McMillan and Allen-Dynes equations.

eliashberg_from_modes(lambda_qv, omega_qv_thz[, ...])

Isotropic a2F(omega), lambda and Tc from per-mode coupling.

eliashberg(data_controller, g_R, phonon[, ispin, ...])

Assemble g_mn^v(k, q) and the isotropic a2F(omega) / lambda.

Module Contents#

PAOFLOW.elphon.eph_kq.THZ_TO_EV = 0.004135667696[source]#
PAOFLOW.elphon.eph_kq.EV_TO_K = 11604.518[source]#
PAOFLOW.elphon.eph_kq.bloch_hamiltonian(HR)[source]#

H(k) on the native FFT grid from a folded-fftfreq real-space HR.

H(k) = sum_R H(R) e^{2 pi i k.R} = N * ifftn(H(R)) (the fftfreq folding leaves the phase unchanged). HR has shape (nawf, nawf, n1, n2, n3, nspin); the returned H(k) is indexed by the integer k-grid point m with k_frac = m / N.

PAOFLOW.elphon.eph_kq.primitive_eigenstates(HR)[source]#

Diagonalise H(k) on the primitive FFT grid.

Returns:

  • E (ndarray, shape (n1, n2, n3, nspin, nawf)) – Ascending eigenvalues (eV).

  • V (ndarray, shape (n1, n2, n3, nspin, nawf, nawf)) – Eigenvectors as columns (V[..., :, b] is band b).

PAOFLOW.elphon.eph_kq.fourier_dHdu(g_R)[source]#

Fourier transform the real-space e-ph tensor to dH/du(k, q).

g_R has shape (ncart, nawf, nawf, e1, e2, e3, p1, p2, p3, nspin) with the electron cells R_e on axes 3-5 and the phonon cells R_p on axes 6-8 (both folded-fftfreq). Returns dHdu of shape (ncart, nawf, nawf, k1, k2, k3, q1, q2, q3, nspin) with k_frac = m_k / N_e and q_frac = m_q / N_p.

PAOFLOW.elphon.eph_kq.estates_on_grid(HR, nk)[source]#

Diagonalise H(k) on an nk^3 grid, Fourier-interpolated from HR.

HR (native grid n^3) is zero-padded in R-space to nk^3 and transformed, giving band-limited PAO interpolation onto the denser grid.

Returns:

  • E (ndarray, shape (nk, nk, nk, nspin, nawf))

  • V (ndarray, shape (nk, nk, nk, nspin, nawf, nawf))

PAOFLOW.elphon.eph_kq.fourier_dHdu_on_grid(g_R, nk)[source]#

dH/du(k, q) with the electron k-grid Fourier-interpolated to nk^3.

The electron cells R_e (axes 3-5) are zero-padded to nk before the transform (k-interpolation); the phonon cells R_p (axes 6-8) are transformed on their native grid, giving the S^3 commensurate q-points. Returns dHdu of shape (ncart, nawf, nawf, nk, nk, nk, q1, q2, q3, nspin).

PAOFLOW.elphon.eph_kq.zero_point_amplitude(mass_amu, omega_thz, omega_floor_thz=0.001)[source]#

Zero-point displacement amplitude sqrt(hbar / (2 M omega)) in Bohr.

mass_amu is a scalar (or array) atomic mass in amu, omega_thz the mode frequency in THz. Modes below omega_floor_thz (acoustic Gamma) return 0.

PAOFLOW.elphon.eph_kq.assemble_g_bloch(dHdu_kq, v_k, v_kq, eigvec_q, omega_thz, masses)[source]#

Physical g_mn^v (eV) for one (k, q) transition.

Parameters:
  • dHdu_kq (ndarray, (ncart, nawf, nawf)) – dH/du_{kappa alpha} (eV/Bohr) connecting k and k+q.

  • v_k (ndarray, (nawf, nbnd)) – Electronic eigenvectors (columns) at k and k+q.

  • v_kq (ndarray, (nawf, nbnd)) – Electronic eigenvectors (columns) at k and k+q.

  • eigvec_q (ndarray, (natom, 3, nmode)) – Phonon polarisation vectors at q.

  • omega_thz (ndarray, (nmode,)) – Phonon frequencies (THz).

  • masses (ndarray, (natom,)) – Atomic masses (amu).

Returns:

g_mn^v(k, q) in eV.

Return type:

ndarray, (nmode, nbnd_kq, nbnd_k) complex

PAOFLOW.elphon.eph_kq.phonon_moments(lambda_qv, omega_thz)[source]#

Coupling-weighted logarithmic and second phonon-frequency moments.

From the per-mode coupling lambda_qv and frequencies omega_thz (THz), with the Eliashberg normalisation a2F(w) = (1/Nq) sum_qv (1/2) lambda_qv w_qv delta(w - w_qv) (so lambda = 2 int a2F/w dw), the moments reduce to lambda_qv-weighted averages of the mode frequencies:

\[\omega_{\log} = \exp\!\Big(\frac{\sum_{q\nu}\lambda_{q\nu}\ln\omega_{q\nu}} {\sum_{q\nu}\lambda_{q\nu}}\Big), \qquad \bar\omega_2 = \Big(\frac{\sum_{q\nu}\lambda_{q\nu}\omega_{q\nu}^2} {\sum_{q\nu}\lambda_{q\nu}}\Big)^{1/2}.\]

Computing them from the discrete mode sums (rather than the Gaussian-smeared a2F array) avoids the artificial low-frequency tail near w -> 0.

Parameters:
  • lambda_qv (array_like) – Per-mode coupling (any shape; flattened).

  • omega_thz (array_like) – Matching phonon frequencies in THz.

Returns:

(omega_log, omega_2) in eV. (0.0, 0.0) when the total coupling is non-positive.

Return type:

tuple(float, float)

PAOFLOW.elphon.eph_kq.mcmillan_allen_dynes_tc(lam, omega_log_ev, omega2_ev, mu_star=0.1)[source]#

Superconducting Tc from the McMillan and Allen-Dynes equations.

\[T_c^{\rm McM} = \frac{\omega_{\log}}{1.2}\, \exp\!\Big[\frac{-1.04(1+\lambda)}{\lambda-\mu^*(1+0.62\lambda)}\Big], \qquad T_c^{\rm AD} = f_1 f_2\, T_c^{\rm McM},\]

with the Allen-Dynes strong-coupling (f1) and shape (f2) corrections

\[f_1 = \big[1+(\lambda/\Lambda_1)^{3/2}\big]^{1/3},\quad f_2 = 1 + \frac{(\bar\omega_2/\omega_{\log}-1)\lambda^2} {\lambda^2+\Lambda_2^2},\]

Lambda_1 = 2.46(1+3.8\mu^*), Lambda_2 = 1.82(1+6.3\mu^*)(\bar\omega_2/\omega_{\log}). When the denominator lambda - mu*(1 + 0.62 lambda) is non-positive the equation predicts no superconductivity and Tc = 0 is returned.

Parameters:
  • lam (float) – Total electron-phonon coupling lambda.

  • omega_log_ev (float) – Logarithmic and second moments (eV), e.g. from phonon_moments().

  • omega2_ev (float) – Logarithmic and second moments (eV), e.g. from phonon_moments().

  • mu_star (float, optional) – Morel-Anderson Coulomb pseudopotential (default 0.10; typical 0.10-0.13).

Returns:

{'Tc_mcmillan_K', 'Tc_allen_dynes_K', 'omega_log_K', 'omega_2_K', 'f1', 'f2', 'mu_star'}.

Return type:

dict

PAOFLOW.elphon.eph_kq.eliashberg_from_modes(lambda_qv, omega_qv_thz, q_weights=None, mu_star=0.1, nomega=400, omega_pad=1.2, sigma_w_frac=0.05, omega_max_thz=None)[source]#

Isotropic a2F(omega), lambda and Tc from per-mode coupling.

Property engine shared by the finite-difference eliashberg() driver and by external couplings (e.g. Quantum ESPRESSO elph.inp_lambda). It takes the mode-resolved coupling lambda_{q nu} and the matching phonon frequencies and returns the Eliashberg spectral function and the derived superconducting quantities, with no reference to the electronic states.

The Eliashberg function follows the standard normalisation

\[\alpha^2 F(\omega) = \tfrac12 \sum_{q\nu} w_q\,\lambda_{q\nu}\, \omega_{q\nu}\,\delta(\omega - \omega_{q\nu}), \qquad \lambda = \sum_{q\nu} w_q\,\lambda_{q\nu} = 2\int \frac{\alpha^2 F(\omega)}{\omega}\,d\omega,\]

with q-point weights w_q normalised to unit sum (uniform by default).

Parameters:
  • lambda_qv (array_like, shape (nq, nmode)) – Mode-resolved coupling lambda_{q nu}.

  • omega_qv_thz (array_like, shape (nq, nmode)) – Matching phonon frequencies in THz.

  • q_weights (array_like, shape (nq,), optional) – Relative q-point weights (need not be normalised). Defaults to uniform.

  • mu_star (float, optional) – Coulomb pseudopotential for the McMillan / Allen-Dynes Tc (default 0.10).

  • nomega (int, optional) – Number of frequency points in the a2F grid (default 400).

  • omega_pad (float, optional) – The a2F grid runs to omega_pad * max(omega) (default 1.2).

  • sigma_w_frac (float, optional) – Gaussian broadening of a2F as a fraction of max(omega) (default 0.05).

  • omega_max_thz (float, optional) – Upper edge of the a2F frequency grid in THz (before omega_pad); defaults to the maximum mode frequency.

Returns:

{'omega', 'a2F', 'lambda', 'lambda_qv', 'omega_q', 'q_weights', 'omega_log', 'omega_2', 'mu_star', 'Tc_mcmillan', 'Tc_allen_dynes', 'f1', 'f2'}. omega, omega_log and omega_2 are in eV; the two Tc values are in kelvin.

Return type:

dict

PAOFLOW.elphon.eph_kq.eliashberg(data_controller, g_R, phonon, ispin=0, smearing_ev=0.3, nk_electron=None, nomega=400, omega_pad=1.2, mu_star=0.1, return_gkq=False)[source]#

Assemble g_mn^v(k, q) and the isotropic a2F(omega) / lambda.

Uses the primitive PAO Hamiltonian (arry['HRs']) for the electronic states and a phonopy object carrying the second-order force constants for the phonon frequencies / eigenvectors at the commensurate q-points.

Parameters:
  • nk_electron (int, optional) – Electronic k-grid size (nk_electron^3); the electronic states and dH/du are Fourier-interpolated to it, decoupling the k-sampling from the supercell’s R_e grid. Must be divisible by every supercell size. Defaults to the native HRs grid.

  • mu_star (float, optional) – Coulomb pseudopotential for the McMillan / Allen-Dynes Tc (default 0.10).

  • return_gkq (bool, optional) – If True, also return the full g_kq array ((nk, nq, nmode, nawf, nawf)). Off by default – at large grids this is many GB.

Returns:

{'omega', 'a2F', 'lambda', 'lambda_qv', 'N_EF', 'q_frac', 'omega_q', 'gamma_acoustic', 'nk_electron', 'omega_log', 'omega_2', 'mu_star', 'Tc_mcmillan', 'Tc_allen_dynes', 'f1', 'f2'[, 'g_kq']}. omega_log and omega_2 are in eV; the two Tc values are in kelvin. gamma_acoustic is max |g| over the three acoustic modes at q = Gamma (a small value confirms the acoustic sum rule).

Return type:

dict