Add nuclear gradient functions
This PR adds nuclear gradients for the overlap integrals, the core Hamiltonian ($\hat{T} + \hat{V}_{ne}$) integrals, and the electron repulsion integrals, in the AO basis.
I based this on pyscf pyscf/grad/rhf.py, although that code is for an optimized Hartree-Fock wave function (in the MO basis). Once I am able to test these, the code will be ready to merge.
Checklist
- [x] Write a good description of what the PR does.
- [ ] Add tests for each unit of code added (e.g. function, class)
- [ ] Update documentation
- [ ] Squash commits that can be grouped together
- [ ] Rebase onto master
Type of Changes
| Type | |
|---|---|
| ✓ | :sparkles: New feature |
I would start by adding a test for Cartesian Gaussian primitives. When you take the derivative of a Gaussian primitive with respect to its nuclear coordinate, you pull down a multiplicative factor of $-\alpha | \mathbf{r} - \mathbf{R}_A|$, so each component of the gradient has an extra factor of the corresponding Cartesian dimension. That's an easy test.
The contracted Gaussian functions are similar (just a sum over primitive contributions.
The final bit is the AO -> MO transformation which can be tested vs PYSCF I think.