PAOFLOW.elphon.pseudopotential_terms#
Bare pseudopotential terms of the electron-phonon vertex (norm-conserving).
The induced potential of ph.x (dvscf) excludes the bare ionic contribution; the
vertex adds, as EPW’s dvqpsi_us3 / dvqpsi_us_only3 and compute_dvloc:
the derivative of the local pseudopotential,
dV^loc_{kappa alpha}(q + G) = -i (q+G)_alpha V^loc_kappa(|q+G|) exp(-i (q+G).tau_kappa);the derivative of the Kleinman-Bylander projectors,
sum_ij [ |d beta_i> D_ij <beta_j| + |beta_i> D_ij <d beta_j| ]withd beta(k+G) = -i (k+G) beta(k+G).
The radial tables V^loc(q) and beta(q) mirror QE’s (upflib/vloc_mod.f90,
upflib/beta_mod.f90: Simpson integration on the UPF mesh, dq = 0.01 bohr^-1,
four-point Lagrange interpolation) so that the vertex reproduces EPW’s epmatq to the
rounding level. Fully relativistic projectors used in a scalar run are averaged as QE’s
average_pp. Spherical harmonics follow ylmr2 (real, QE ordering).
Attributes#
Classes#
|
|
Kleinman-Bylander projectors |
Functions#
|
Simpson integration on a logarithmic mesh, as QE's |
|
QE's |
|
Four-point Lagrange interpolation of a table |
|
Real spherical harmonics in QE's |
Scalar projectors and |
|
|
Projectors and |
|
Clebsch-Gordan coefficient of QE's |
|
QE |
|
QE |
|
QE |
Projectors of a fully relativistic UPF used with spin-orbit coupling (no averaging). |
|
|
Periodic part of |
|
Radial table |
|
|
Module Contents#
- PAOFLOW.elphon.pseudopotential_terms.qe_simpson(func, rab)[source]#
Simpson integration on a logarithmic mesh, as QE’s
simpson(odd or even mesh).- Parameters:
func (ndarray
(mesh,))rab (ndarray
(mesh,)) –dr/diof the mesh.
- PAOFLOW.elphon.pseudopotential_terms.radial_cutoff_index(r, rcut=RCUT_LOCAL)[source]#
QE’s
msh: number of mesh points up torcut, made odd.
- PAOFLOW.elphon.pseudopotential_terms.lagrange4(table, q, dq=DQ)[source]#
Four-point Lagrange interpolation of a table
table[i] = f(i dq)(QEinterp_beta).- Parameters:
table (ndarray
(..., nq))q (ndarray
(n,)) – Abscissae (>= 0); values whose stencil leaves the table are zero.
- Return type:
ndarray
(..., n)
- PAOFLOW.elphon.pseudopotential_terms.real_spherical_harmonics_qe(lmax, vectors)[source]#
Real spherical harmonics in QE’s
ylmr2ordering and sign convention.- Parameters:
lmax (int)
vectors (ndarray
(n, 3)) – Directions (any length; the zero vector gives thecos theta = 0limit).
- Returns:
Column
lm = l^2 + 1 + 2m(1-based) iscos(m phi)type,lm + 1sin(m phi).- Return type:
ndarray
(n, (lmax+1)^2)
- PAOFLOW.elphon.pseudopotential_terms.average_relativistic_projectors(upf)[source]#
Scalar projectors and
Dof a fully relativistic UPF used without spin-orbit (QEaverage_pp).- Parameters:
upf (UPF) –
PAOFLOW.inputs.read_upf.UPFwithbeta[i]['j']set.- Returns:
betas(list ofr beta(r)arrays),lll(list of int),cutoff(list of int),dion_ry(nbeta, nbeta).- Return type:
- PAOFLOW.elphon.pseudopotential_terms.scalar_projectors(upf)[source]#
Projectors and
D(Ry) of a UPF as used in a scalar-relativistic run.
- PAOFLOW.elphon.pseudopotential_terms.spinor_coefficient(l, j, m, spin)[source]#
Clebsch-Gordan coefficient of QE’s
spinor(spin= 1 up, 2 down;m= m_j - 1/2).
- PAOFLOW.elphon.pseudopotential_terms.spherical_index(l, j, m, spin)[source]#
QE
sph_ind: the orbitalm_lof the spin component of the|l j m_j>spinor.
- PAOFLOW.elphon.pseudopotential_terms.real_to_complex_harmonics(lmax=LMAXX)[source]#
QE
rot_ylm:rot[lmax + m_complex, real index]for theylmr2real harmonics.
- PAOFLOW.elphon.pseudopotential_terms.spin_orbit_coefficient(l, j, mi, mk, s1, s2, rot)[source]#
QE
fcoef(ih, kh, is1, is2)for two real-harmonic projectorsmi, mk(0-based) of the same(l, j).
- PAOFLOW.elphon.pseudopotential_terms.relativistic_projectors(upf)[source]#
Projectors of a fully relativistic UPF used with spin-orbit coupling (no averaging).
- class PAOFLOW.elphon.pseudopotential_terms.LocalPotentialTable(upf, omega, qmax, dq=DQ)[source]#
V^loc(q)of one species on QE’s interpolation table (Ry, includes the Coulomb tail).- Parameters:
- PAOFLOW.elphon.pseudopotential_terms.bare_local_perturbation(tables, species_of_atom, tau_alat, q_cart, g_miller, g_cart, tpiba, fft_grid)[source]#
Periodic part of
dV^loc / du_{kappa alpha}(q)on the grid (EPWcompute_dvloc).- Parameters:
tables (dict) – Species ->
LocalPotentialTable.species_of_atom (sequence of str)
tau_alat (ndarray
(nat, 3)) – Positions (Cartesian, alat).q_cart (ndarray
(3,)) – q (Cartesian,2 pi / alat).g_miller (ndarray
(3, ng)int and(ng, 3)) – The smooth G sphere (PAOFLOW.elphon.plane_waves.g_sphere()).g_cart (ndarray
(3, ng)int and(ng, 3)) – The smooth G sphere (PAOFLOW.elphon.plane_waves.g_sphere()).tpiba (float) –
2 pi / alat(bohr^-1).
- Returns:
dvloc_{3 kappa + alpha}(r)in Ry/bohr.- Return type:
ndarray
(3 nat, nr1, nr2, nr3), complex
- PAOFLOW.elphon.pseudopotential_terms.projector_q_table(upf, nb, beta, l, q, r, rab, kkbeta, pref)[source]#
Radial table
beta_l(q)of one projector on the interpolation grid (QEinit_us_1).- Parameters:
upf (UPF or PotcarDataset) – The dataset of the species.
nb (int) – Projector index within the dataset.
beta (ndarray
(mesh,)) –r beta(r)on the radial mesh.l (int) – Angular momentum.
q (ndarray
(nqx,)) – Interpolation grid (bohr^-1).r (ndarray
(mesh,)) – Radial mesh (bohr) anddr/di.rab (ndarray
(mesh,)) – Radial mesh (bohr) anddr/di.kkbeta (int) – Number of mesh points of the projector support.
pref (float) –
4 pi / sqrt(omega).
- Returns:
\(\frac{4\pi}{\sqrt\Omega}\int_0^{r_{kkbeta}} r^2 \beta(r) j_l(qr)\, dr\), Simpson integration on the mesh as QE’s
beta_mod.- Return type:
ndarray
(nqx,)
Notes
A VASP dataset (
PotcarDataset) stores the projector VASP applies to the plane waves as a reciprocal-space tableprojector_q_tables[nb], \(P(q) = 4\pi\int \tilde p(r) j_l(qr) r^2 dr\); that table is interpolated (cubic spline, zero beyond its last point) and divided by \(\sqrt\Omega\) instead, so that the augmented metric of the projections is the one of the WAVECAR bands.
- class PAOFLOW.elphon.pseudopotential_terms.KleinmanBylanderProjectors(upf_by_species, species_of_atom, omega, qmax, dq=DQ, spin_orbit=False, require_norm_conserving=True)[source]#
Kleinman-Bylander projectors
beta_i(k+G)andD_ij(Ry) of all atoms (QEinit_us_2).- Parameters:
upf_by_species (dict) – Species ->
PAOFLOW.inputs.read_upf.UPF(norm-conserving).species_of_atom (sequence of str) – Species of every atom.
omega (float) – Cell volume (bohr^3).
qmax (float) – Largest
|k+G|needed (bohr^-1):sqrt(ecutwfc)for the stored spheres.dq (float, optional) – Table step (bohr^-1).
spin_orbit (bool, optional) – Fully relativistic projectors with the spinor coupling matrix (QE
dvan_so); otherwise fully relativistic UPFs are averaged as in a scalar run.require_norm_conserving (bool, optional) – Raise on ultrasoft / PAW pseudopotentials (default, the electron-phonon vertex needs the norm-conserving form of the non-local potential). With
Falsethe projectors of augmented pseudopotentials are tabulated too andQ(orQ_sowithspin_orbit=True) holds the integrated augmentation charges, which is what the overlap operatorS = 1 + sum_ij q_ij |beta_i><beta_j|of the projections needs.
- Variables:
atom_of_projector (ndarray
(nproj,)int)l_of_projector (ndarray
(nproj,)int)D (ndarray
(nproj, nproj)or None) – Block diagonal per atom, coupling projectors with equal(l, m)(Ry);Nonewith spin-orbit coupling.Q (ndarray
(nproj, nproj)or None) – Integrated augmentation charges \(q_{ij}\) with the same block structure asD(dimensionless);Nonewhen every species is norm-conserving or with spin-orbit coupling.D_so (ndarray
(2, 2, nproj, nproj)complex or None) – Spinor couplingD^{s1 s2}_{ij} = dion_{nb_i nb_j} fcoef(i, j, s1, s2)(Ry).Q_so (ndarray
(2, 2, nproj, nproj)complex or None) – Augmentation charges in the spinor basis (QEqq_so) for ultrasoft / PAW projectors with spin-orbit coupling, see_spinor_augmentation();Nonefor norm-conserving sets and without spin-orbit coupling (thenQ).
- at(kpg_cart, tau_alat, tpiba)[source]#
beta_i(k+G)for the vectors of one sphere.- Parameters:
kpg_cart (ndarray
(npw, 3)) –k + G(Cartesian,2 pi / alat).tau_alat (ndarray
(nat, 3)) – Positions (Cartesian, alat).tpiba (float) –
2 pi / alat(bohr^-1).
- Returns:
(4 pi / sqrt(Omega)) (-i)^l beta_l(|k+G|) Y_lm(k+G) exp(-i (k+G).tau).- Return type:
ndarray
(nproj, npw), complex
- PAOFLOW.elphon.pseudopotential_terms.nonlocal_perturbation(kb, coefficients_k, kpg_k, kpg_kq, tau_alat, tpiba, beta_k=None, beta_kq=None)[source]#
dV^NL / du_{kappa alpha} |psi_nk>on thek+q+Gsphere (EPWdvqpsi_us_only3).- Parameters:
coefficients_k (ndarray
(nb, npol * npw_k), complex) – Bands at k (spinor components concatenated fornpol = 2).kpg_k (ndarray
(npw_k, 3),(npw_kq, 3)) –k + Gandk + q + G'(Cartesian,2 pi / alat); the latter are the vectors of the stored block atk' = k + q - G0, so no umklapp relabelling is needed.kpg_kq (ndarray
(npw_k, 3),(npw_kq, 3)) –k + Gandk + q + G'(Cartesian,2 pi / alat); the latter are the vectors of the stored block atk' = k + q - G0, so no umklapp relabelling is needed.tau_alat (ndarray
(nat, 3))tpiba (float)
beta_k (ndarray, optional) – Precomputed
kb.at(...)of the two spheres.beta_kq (ndarray, optional) – Precomputed
kb.at(...)of the two spheres.
- Returns:
sum_{i in kappa} beta_i(k+q+G') [ ps1_{i n alpha} + (k+q+G')_alpha ps2_{i n alpha} ]withps1 = D alphap_alpha,alphap_alpha = <beta| i tpiba (k+G)_alpha |psi>,ps2 = -i tpiba D becp,becp = <beta|psi>; with spin-orbit couplingDis the spinor matrixD^{s1 s2}and the spin components are coupled (EPWps1_nc).- Return type:
ndarray
(3 nat, nb, npol * npw_kq), complex