qimpy.dft.electrons.xc.XC

class XC(*, spin_polarized, checkpoint_in=(None, ''), functional='gga-pbe', plus_U=None)

Bases: TreeNode

Exchange-correlation functional.

Parameters:
  • spin_polarized (bool) –

  • checkpoint_in (CheckpointPath) –

  • functional (str | list[str]) –

  • plus_U (PlusU | None) –

__init__(*, spin_polarized, checkpoint_in=(None, ''), functional='gga-pbe', plus_U=None)

Initialize exchange-correlation functional.

Parameters:
  • functional (str | list[str]) –

    [Input file] Name or list of names of exchange-correlation functionals. Each entry in the list must be one of the internal functionals:

    • gga_pbe

    • gga_pbesol

    • lda_pw

    • lda_pw_prec

    • lda_pz

    • lda_teter

    • lda_vwn

    • mgga_revtpss_x

    • mgga_tpss_x

    or a Libxc functional name (if available). Run the code with functional: ‘list’ to print the names of available functionals including those from Libxc (and exit immediately). The names are case insensitive, and may use hyphens or underscores.

    Additionally, for Libxc functionals, a combined xc name will expand to separate x and c names for convenience, where appropriate. Therefore, ‘gga-pbe’ (default) will use the internal PBE GGA, while ‘gga-xc-pbe’ will use ‘gga_x_pbe’ + ‘gga_c_pbe’ from Libxc.

    Finally, each functional name in the list can have an optional “*num” suffix (no spaces) to scale the functional by num. For example, the specification ‘gga-pbe*0.5 lda-pz*0.5’ may be used to compute a 50-50 mix of two functionals. Warning: there is no normalization or check to make the fractions of exchange or correlation to add up to 1.

  • plus_U (dict | PlusU | None) – [Input file] Optional DFT+U correction.

  • spin_polarized (bool) –

  • checkpoint_in (CheckpointPath) –

Methods

__init__

Initialize exchange-correlation functional.

add_child

Construct child object self.`attr_name` of type cls.

add_child_one_of

Invoke add_child on one of several child options in args.

save_checkpoint

Save self and all children in hierarchy to cp_path.

Attributes

plus_U

optional DFT+U correction

need_sigma

whether overall functional needs gradient

need_lap

whether overall functional needs laplacian

need_tau

whether overall functional needs KE density

child_names

Names of attributes with child objects.

need_lap: bool

whether overall functional needs laplacian

need_sigma: bool

whether overall functional needs gradient

need_tau: bool

whether overall functional needs KE density

plus_U: PlusU | None

optional DFT+U correction