PAOFLOW.basis_gen.xc#
Exchange-correlation functionals for the radial pseudo-atom solver.
Spin-unpolarised only. All inputs and outputs in Hartree atomic units.
Two functionals are supported:
LDA-PW92 – Slater exchange + Perdew-Wang 1992 correlation.
PBE – spin-unpolarised PBE GGA, for a spherical density on a user-supplied 1D radial mesh.
The select_functional() helper inspects a UPF and returns the
string 'LDA' or 'PBE'. Pseudos tagged with any GGA flavour
other than PBE fall back to PBE (the user-requested policy) with a
RuntimeWarning.
Functions#
|
Spin-unpolarised LDA (Slater exchange + PW92 correlation). |
|
Spin-unpolarised PBE GGA for a spherical density on a radial mesh. |
|
Return |
Module Contents#
- PAOFLOW.basis_gen.xc.lda_pw92(n)[source]#
Spin-unpolarised LDA (Slater exchange + PW92 correlation).
- Parameters:
n (ndarray) – Electron density (Bohr^-3). Zero/negative entries return zero.
- Returns:
eps_xc (ndarray) – XC energy per particle (Hartree).
v_xc (ndarray) – XC potential (Hartree).
- PAOFLOW.basis_gen.xc.pbe(n, r, rab=None)[source]#
Spin-unpolarised PBE GGA for a spherical density on a radial mesh.
- Parameters:
- Returns:
eps_xc (ndarray) – XC energy per particle (Hartree).
v_xc (ndarray) – XC potential,
\[v_{xc}(r) = \frac{\partial F}{\partial n} - \frac{1}{r^2}\frac{d}{dr}\!\left[r^2 \cdot 2\frac{\partial F}{\partial\sigma}\frac{dn}{dr}\right].\]
- PAOFLOW.basis_gen.xc.select_functional(upf)[source]#
Return
'LDA'or'PBE'for the XC functional carried byupf.Inspects
upf.qexc(UPFPP_HEADERfunctionalattribute). Tokens are matched case-insensitively:any token in
{PBE, PBX, PBC, GGA}->'PBE'.tokens are a subset of
{SLA, PW, PZ, LDA, NOGX, NOGC, VWN}->'LDA'.any other GGA flavour (BLYP, BP, B3LYP, B88, …) ->
'PBE'with aRuntimeWarning. This matches the user-requested “fall back to PBE for any other GGA” policy: the pseudopotential was built with gradient corrections, so a GGA-level frozen potential is a much closer match than LDA.