mod_dft_incdft Module

matrix incrementally from the density change (scf.F90 dold/fold), but the XC matrix is rebuilt from the full density on every iteration. As the SCF converges the density change dP sparsifies and the XC contribution stops changing, so rebuilding it is wasted quadrature.

XC is NONLINEAR in the density, so the reused matrix is an APPROXIMATION that must be refreshed. This module reuses the most recent full XC build (V_xc[D_ref], E_xc[D_ref]) only inside a controlled "late-SCF" window of the DIIS error, with a periodic forced full rebuild (drift hygiene, mirroring the J/K incremental reset cadence) and -- crucially -- a return to FULL XC builds once the error drops below incdft_stop, so the converged density is the true fixed point of the exact Fock and the converged energy/gradient are unchanged from the non-incremental baseline.

Opt-in via env OQP_XC_INCDFT (default off). Complementary to the Phi cache (Opt 1): the Phi cache removes the geometry-only collocation cost from every XC build, while IncDFT skips the density-driven XC work entirely on reused iterations.


Uses