Interface

API documentation for DftFunctionals.

See in particular the key functions potential_terms and kernel_terms.

Missing documentation

More details on the public interface are needed.

DftFunctionals.DftFunctionalMethod
DftFunctional(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).

source
DftFunctionals.change_parametersMethod

Return 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.

source
DftFunctionals.familyMethod

Return the family of a functional. Results are :lda, :gga, :mgga and :mggal (Meta-GGA requiring Laplacian of ρ)

source
DftFunctionals.has_energyMethod

Does 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).

source
DftFunctionals.kernel_termsFunction
kernel_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}{∂ρ∂σ}$).

source
DftFunctionals.kindMethod

Return the functional kind: :x (exchange), :c (correlation), :k (kinetic) or :xc (exchange and correlation combined)

source
DftFunctionals.potential_termsFunction
potential_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), ($\frac{∂e}{∂ρ}$), ($\frac{∂e}{∂σ}$), ($\frac{∂e}{∂τ}$), Vl ($\frac{∂e}{∂(Δρ)}$).

source
DftFunctionals.spinindex_σMethod

In 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 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 σ.

source