Interface
API documentation for DftFunctionals.
See in particular the key functions potential_terms
and kernel_terms
.
More details on the public interface are needed.
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.DftFunctional
DftFunctionals.change_parameters
DftFunctionals.family
DftFunctionals.has_energy
DftFunctionals.identifier
DftFunctionals.kernel_terms
DftFunctionals.kind
DftFunctionals.needs_Δρ
DftFunctionals.needs_σ
DftFunctionals.needs_τ
DftFunctionals.parameters
DftFunctionals.potential_terms
DftFunctionals.spinindex_σ
DftFunctionals.DftFunctional
— MethodDftFunctional(identifier::Symbol, args...; kwargs...)
A generic DFT functional implementation. Valid identifiers
are the ones supported by Libxc as symbols, e.g. :lda_x
, hyb_gga_xc_b3lyp
. Only a subset of functionals is currently available. Additional arguments and kwargs are passed to the functional (e.g. to modify functional parameters).
DftFunctionals.DftFunctional
— MethodAPBE correlation. Constantin, Fabiano, Laricchia 2011 (DOI 10.1103/physrevlett.106.186406)
DftFunctionals.DftFunctional
— MethodPBEmol correlation. del Campo, Gazqez, Trickey and others 2012 (DOI 10.1063/1.3691197)
DftFunctionals.DftFunctional
— MethodPBESol correlation. Perdew, Ruzsinszky, Csonka and others 2008 (DOI 10.1103/physrevlett.100.136406)
DftFunctionals.DftFunctional
— MethodPBEfe correlation. Sarmiento-Perez, Silvana, Marques 2015 (DOI 10.1021/acs.jctc.5b00529)
DftFunctionals.DftFunctional
— MethodStandard PBE correlation. Perdew, Burke, Ernzerhof 1996 (DOI: 10.1103/PhysRevLett.77.3865)
DftFunctionals.DftFunctional
— MethodXPBE correlation. Xu, Goddard 2004 (DOI 10.1063/1.1771632)
DftFunctionals.DftFunctional
— MethodAPBE exchange. Constantin, Fabiano, Laricchia 2011 (DOI 10.1103/physrevlett.106.186406)
DftFunctionals.DftFunctional
— MethodPBEmol exchange. del Campo, Gazqez, Trickey and others 2012 (DOI 10.1063/1.3691197)
DftFunctionals.DftFunctional
— MethodRevised PBE exchange. Zhang, Yang 1998 (DOI 10.1103/physrevlett.80.890)
DftFunctionals.DftFunctional
— MethodPBESol exchange. Perdew, Ruzsinszky, Csonka and others 2008 (DOI 10.1103/physrevlett.100.136406)
DftFunctionals.DftFunctional
— MethodPBEfe exchange. Sarmiento-Perez, Silvana, Marques 2015 (DOI 10.1021/acs.jctc.5b00529)
DftFunctionals.DftFunctional
— MethodStandard PBE exchange. Perdew, Burke, Ernzerhof 1996 (DOI: 10.1103/PhysRevLett.77.3865)
DftFunctionals.DftFunctional
— MethodXPBE exchange. Xu, Goddard 2004 (DOI 10.1063/1.1771632)
DftFunctionals.DftFunctional
— MethodPerdew, Wang correlation from 1992 (10.1103/PhysRevB.45.13244)
DftFunctionals.DftFunctional
— MethodVWN5 LDA correlation according to Vosko, Wilk, and Nusair, (DOI 10.1139/p80-159).
DftFunctionals.DftFunctional
— MethodLDA Slater exchange (DOI: 10.1017/S0305004100016108 and 10.1007/BF01340281)
DftFunctionals.change_parameters
— MethodReturn a new version of the passed functional with its parameters adjusted. This may not be a copy in case no changes are done to its internal parameters. Generally the identifier of the functional will be changed to reflect the change in parameter values unless keep_identifier
is true. To get the tuple of adjustable parameters and their current values check out parameters
. It is not checked that the correct parameters are passed.
DftFunctionals.family
— MethodReturn the family of a functional. Results are :lda
, :gga
, :mgga
and :mggal
(Meta-GGA requiring Laplacian of ρ)
DftFunctionals.has_energy
— MethodDoes this functional support energy evaluations? Some don't, in which case energy terms will not be returned by potential_terms
and kernel_terms
, i.e. e
will be false
(a strong zero).
DftFunctionals.identifier
— FunctionReturn the identifier corresponding to a functional
DftFunctionals.kernel_terms
— Functionkernel_terms(f::Functional, ρ, [σ, τ, Δρ])
Evaluate energy, potential and kernel terms at a real-space grid of densities, density derivatives etc. Not required derivatives for the functional type will be ignored. Returns a named tuple with the same keys as potential_terms
and additionally second-derivative cross terms such as Vρσ
($\frac{∂^2e}{∂ρ∂σ}$).
DftFunctionals.kind
— MethodReturn the functional kind: :x
(exchange), :c
(correlation), :k
(kinetic) or :xc
(exchange and correlation combined)
DftFunctionals.needs_Δρ
— MethodTrue if the functional needs $Δ ρ$.
DftFunctionals.needs_σ
— MethodTrue if the functional needs $σ = 𝛁ρ ⋅ 𝛁ρ$.
DftFunctionals.needs_τ
— MethodTrue if the functional needs $τ$ (kinetic energy density).
DftFunctionals.parameters
— MethodReturn adjustable parameters of the functional and their values.
DftFunctionals.potential_terms
— Functionpotential_terms(f::Functional, ρ, [σ, τ, Δρ])
Evaluate energy and potential terms at a real-space grid of densities, density derivatives etc. Not required derivatives for the functional type will be ignored. Returns a named tuple with keys e
(Energy per unit volume), Vρ
($\frac{∂e}{∂ρ}$), Vσ
($\frac{∂e}{∂σ}$), Vτ
($\frac{∂e}{∂τ}$), Vl
($\frac{∂e}{∂(Δρ)}$).
DftFunctionals.spinindex_σ
— MethodIn the functional interface we explicitly use the symmetry $σ_{αβ} = σ_{βα}$ for the contracted density gradient $σ_ij = ∇ρ_i ⋅ ∇ρ_j$ where $i,j ∈ \{α, β\}$. Instead of treating $σ$ to have the spin components $σ_{αα}$, $σ_{αβ}$, $σ_{βα}$ and $σ_{ββ}$, we consider it to have three pseudo-spin components $σ_{αα}$, $σ_x$ and $σ_{ββ}$, where $σ_x = (σ_{αβ} + σ_{βα})/2 = σ_{αβ}$. Input arrays like σ
or output arrays like Vσ
or Vρσ
will therefore feature a spin axis of length 3 refering to the $σ_{αα}$, $σ_{αβ}$ and $σ_{ββ}$ components / derivatives respectively. E.g. σ
is of shape (3, n_p)
(where n_p
is the number of points where evaluation takes place.
This function maps the "unfolded" spin tuple (i, j)
in $σ_ij$ to the corresponding place in the length-3 spin axis of σ
.