PAOFLOW.basis_gen.atomic_potential#
Spherical Hartree potential and frozen-density effective potential.
For a spherically symmetric density n(r) the Hartree potential is
V_H(r) = 4 pi [ (1/r) integral_0^r n(r’) r’^2 dr’ + integral_r^inf n(r’) r’ dr’ ]
The UPF stores atrho(r) = 4 pi r^2 n(r) with int atrho dr = z_valence,
which makes the integrals cumulative trapezoidal sums of atrho and
atrho/r respectively.
Functions#
|
Compute V_H(r) from an atomic radial density. |
|
Spin-unpolarised V_xc(r) from atomic radial density. |
Return V_eff(r) = V_loc(r) + V_H(r) + V_xc(r) on the UPF mesh. |
Module Contents#
- PAOFLOW.basis_gen.atomic_potential.hartree_radial(atrho, r, rab=None)[source]#
Compute V_H(r) from an atomic radial density.
- Parameters:
- Returns:
v_h – Hartree potential in Hartree.
- Return type:
ndarray, shape (N,)
- PAOFLOW.basis_gen.atomic_potential.vxc_radial(atrho, r, rho_core=None, functional='LDA')[source]#
Spin-unpolarised V_xc(r) from atomic radial density.
- Parameters:
atrho (ndarray) – 4 pi r^2 n_val(r).
r (ndarray) – Radial mesh (Bohr).
rho_core (ndarray, optional) – True core density n_c(r) (Bohr^-3), not 4 pi r^2 n_c. When provided, the XC functional sees n_val(r) + n_c(r) – the non-linear core correction (NLCC) and PAW convention.
functional ({'LDA', 'PBE'}) – XC functional to use.
'LDA'-> PW92;'PBE'-> PBE GGA.
- Returns:
v_xc – XC potential in Hartree.
- Return type:
ndarray
- PAOFLOW.basis_gen.atomic_potential.frozen_effective_potential(upf)[source]#
Return V_eff(r) = V_loc(r) + V_H(r) + V_xc(r) on the UPF mesh.
The Hartree and XC contributions are evaluated from
upf.atrho(frozen at the pseudopotential-generation density). When the UPF carries a non-linear core correction (upf.nlcctrue andupf.rho_atcavailable) the smooth pseudo-core density is added to the valence density in the XC functional only; the Hartree term remains valence-only (standard USPP/PAW convention). The XC functional is auto-selected fromupf.qexcviaPAOFLOW.basis_gen.xc.select_functional(): LDA-PW92 for LDA pseudos, PBE for PBE pseudos, and PBE as a fallback for any other GGA flavour. All terms are in Hartree atomic units.Raises
ValueErrorifupf.atrhois missing.