cphf_mod Module

@brief Native coupled-perturbed Hartree-Fock / Kohn-Sham (CPHF/CPKS) solver for closed-shell (RHF/RKS) references.

The static CPHF A-matrix is the orbital Hessian (A+B)_{ia,jb}, the same operator the TDDFT Z-vector solver applies. This module reuses that exact operator -- built from the native Rys 2e engine via int2_td_data_t plus the DFT XC kernel (tddft_fxc) -- so it has no libint dependency. It drives the existing pcg solver with: update : U(MO,occ-vir) -> AO density (iatogen) -> response Fock (A+B) -> MO occ-vir (mntoia) + orbital-energy diagonal (e_a-e_i) U precond : diagonal 1/(e_a-e_i) to solve A U = B for an arbitrary occ-vir right-hand side B.

cphf_solve is the reusable entry point (used by the analytic Hessian for the nuclear-perturbation response). cphf_polarizability_selftest validates the solver end to end against a known property: it solves with the dipole right-hand side and forms the static dipole polarizability, written to a file for comparison against an external reference (no geometry derivatives required).