vibeqc.compute_gradient_periodic_rhf_gamma

vibeqc.compute_gradient_periodic_rhf_gamma(system, basis, result, *, lattice_opts=None, alpha_hf=1.0, dft_plus_u=None, variational_xc_fock=None)[source]

Analytic Γ-only periodic RHF atomic gradient.

Parameters:
  • system (PeriodicSystem) – Periodic system and AO basis.

  • basis (BasisSet) – Periodic system and AO basis.

  • result (PeriodicRHFResult) – Converged PeriodicRHFResult from vibeqc.run_rhf_periodic() (must have converged=True).

  • lattice_opts (Optional[LatticeSumOptions]) – LatticeSumOptions controlling the lattice-sum cutoffs. If None, defaults from LatticeSumOptions(). For the gradient to match the SCF energy gradient, these cutoffs must match the values used during the SCF (i.e. the same opts.lattice_opts you passed to run_rhf_periodic).

  • variational_xc_fock (Optional[np.ndarray]) – Optional (nbf, nbf) converged XC potential matrix V_xc in the AO basis. Supplied by the RKS caller so the energy- weighted density is built from the full variational KS Fock F_var = T + V_ne + J ½·α_HF·K + V_xc (see Notes on the gauge-free overlap-Lagrangian). None (the default) is the pure-HF case, where V_xc = 0.

  • alpha_hf (float)

  • dft_plus_u (Optional[Sequence['HubbardSite']])

Returns:

(n_atoms, 3) gradient in Ha/bohr.

Return type:

np.ndarray

Notes

Current scope (G1a-1): 1-electron Pulay + nuclear-repulsion + overlap-Lagrangian terms via the new lattice-summed C++ primitives. The 2-electron Pulay term falls back to the molecular code path on the Γ-folded total density. This is exact in the molecular limit (single cell, AO overlap between cells negligible) and approximate for truly periodic systems where cross-cell ERIs contribute. G1a-2 will replace the 2-e fallback with the full lattice-summed periodic ERI gradient.

Gauge-free overlap-Lagrangian. The EWALD_3D Γ driver reports mo_energies / fock on a shifted orbital-energy reference (the real-space exact-exchange G=0 self-image; α_HF-scaled, cell- size-independent — pure DFT is unaffected). Using those eigenvalues in the energy-weighted density W = 2 Σ_i ε_i C_μi C_νi injects a spurious −Δ·tr(D ∂S/∂R) force. In the molecular limit this function instead rebuilds the variational Fock F_var = ∂E/∂D from the converged density and takes ε from it, so the overlap term is gauge-consistent with the SCF energy (and the FD reference).