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
PeriodicRHFResultfromvibeqc.run_rhf_periodic()(must haveconverged=True).lattice_opts (Optional[LatticeSumOptions]) –
LatticeSumOptionscontrolling the lattice-sum cutoffs. IfNone, defaults fromLatticeSumOptions(). For the gradient to match the SCF energy gradient, these cutoffs must match the values used during the SCF (i.e. the sameopts.lattice_optsyou passed torun_rhf_periodic).variational_xc_fock (Optional[np.ndarray]) – Optional
(nbf, nbf)converged XC potential matrixV_xcin the AO basis. Supplied by the RKS caller so the energy- weighted density is built from the full variational KS FockF_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, whereV_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/fockon 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 densityW = 2 Σ_i ε_i C_μi C_νiinjects a spurious−Δ·tr(D ∂S/∂R)force. In the molecular limit this function instead rebuilds the variational FockF_var = ∂E/∂Dfrom the converged density and takesεfrom it, so the overlap term is gauge-consistent with the SCF energy (and the FD reference).