pyscf / pyscf-forge

pyscf-forge is a staging ground for code that may be suitable for pyscf-core
Apache License 2.0
27 stars 23 forks source link

Calculate `pdft_feff` #38

Closed matthew-hennefarth closed 1 year ago

matthew-hennefarth commented 1 year ago

Adds calculating second derivative of the on-top kernel with respect 1- and 2-RDM as well as computing the vector-hessian product on the grid. Numerically these terms are the one- and two- body on-top gradient response terms defined as

$$ [\gamma \cdot\mathbf{F}]^qp = \int \vec{\rho\gamma}^T\cdot\mathbf{f}^\mathrm{ot}\cdot \frac{\partial\vec{\rho}}{\partial\gamma^p_q} $$

$$ [\gamma \cdot\mathbf{F}]_{pr}^{qs} = \int \vec{\rho\gamma}^T\cdot\mathbf{f}^\mathrm{ot}\cdot \frac{\partial\vec{\rho}}{\partial\gamma\{qs}^{pr}} $$

where $\mathbf{f}^\mathrm{ot}$ is the Hessian of the on-top potential kernel with respect to the density variables. Since on-top kernels are translated from the corresponding Kohn-Sham functionals via a non-linear mapping, some care is taken.

Tests are added that to numerically check that the analytical equations agree. See a discussion here of what is being tested.