xcx
Exchange–correlation (XC) functionals for density-functional theory (DFT) — a pure-Rust, libxc-compatible reimplementation with no C dependency.
Given a density (and, per functional, its gradient / kinetic energy density),
xcx returns the XC energy per particle and its first derivatives, plus
metadata (family, requirements, exact-exchange fraction, range-separation and
VV10 parameters). Each functional is one scalar energy expression; derivatives
come from forward-mode automatic differentiation, so they are correct by
construction.
xcx maps `(rho, sigma, tau[, lapl]) → energy density + derivatives + metadata
- linear mixing` and nothing else: no grids, AO evaluation, SCF, or dispersion.
See docs/api-convention.md
for the frozen data/ABI contract and the full scope fence. Licensed under
MPL-2.0 (matching upstream libxc).
use ;
let f = new?;
let rho = ;
let out = f.eval?;
// out.exc[i] = energy per particle; out.vrho[i] = ∂(n·ε)/∂n
# Ok::