theochem / horton

HORTON: Helpful Open-source Research TOol for N-fermion systems
http://theochem.github.io/horton/
GNU General Public License v3.0
94 stars 40 forks source link

Point-charge-interaction integrals for each point #296

Open PaulWAyers opened 2 years ago

PaulWAyers commented 2 years ago

For the electrostatic potential and several other things we are doing, it would be helpful to be able to compute the 1-electron "electron-nuclear" attraction integrals for each point separately. That is, for points $\mathbf{r}_k$ and atomic orbitals (AO basis functions) $\phi_a(\mathbf{r})$, we'd like to be able to evaluate the quantity,

$$ V_{abk} = \int \frac{\phi_a(\mathbf{r}) \phi_b(\mathbf{r})}{|\mathbf{r} - \mathbf{r}_k|} d \mathbf{r} $$

It seems that the "raw" integral we need is GB2AttractionIntegral https://github.com/theochem/horton/blob/e8f9124e53819dbc9ccf2b0cfd4d572042fb20d3/horton/gbasis/ints.cpp#L198

and that overlay (with sum over "atomic" centers?) is compute_nuclear_attraction. https://github.com/theochem/horton/blob/e8f9124e53819dbc9ccf2b0cfd4d572042fb20d3/horton/gbasis/gbasis.cpp#L232

Unfortunately, this part of the code is not (very well) documented. @tovrstra do you have any advice on how to do/expose this? We could call the high-level function one time for every grid point, but that seems wasteful since (I think) a lot of the recursive work gets redone over and over.... @leila-pujal volunteered to delve into whatever implementation we need to add.

gbasis does this too, but we were trying to make it so we can do this with both "old" and "new" HORTON.