vibeqc.define_external_functional¶
- vibeqc.define_external_functional(name, callback, *, hf_exchange_fraction=0.0, capability_version=1, required_grid_profile='')[source]¶
Register a differentiable full-grid XC provider.
The callback receives one atom-major dictionary containing
grid_profile, grid coordinates and weights, both spin densities, Cartesian density gradients, and kinetic-energy densities. It returns the integrated scalar XC energy and its full-grid adjoints for those six density feature arrays.Capability protocol version 1 supports
required_grid_profile. Use an empty string to accept any grid, or"pyscf-level3"to require that complete atomic-grid protocol. A mismatch fails before callback execution in every molecular and periodic AO-grid route.