theochem / grid

Python library for numerical integration, interpolation, and differentiation on (molecular) grids.
https://grid.qcdevs.org/
GNU Lesser General Public License v3.0
43 stars 17 forks source link

"Promolecule tricks" #16

Open PaulWAyers opened 5 years ago

PaulWAyers commented 5 years ago

Using the "promolecule tricks" that Ali & Derrick developed for regional and whole-molecule integration of various functions.

PaulWAyers commented 5 years ago

We should use "promolecular tricks" not only for molecular integration but also for Poisson solving.

PaulWAyers commented 5 years ago

We may need to use a different pruned grid for Poisson solving. Probably we need to use more spherical points at long range (though we can still prune at short range I think).

PaulWAyers commented 1 year ago

I migrated discussions from the "team" to a new (private) discussions repository. I put a key document there. https://github.com/orgs/theochem/discussions/1

The basic idea is that for any given molecular property density, $p_{\text{molecule}}$, you decompose it as a sum of atomic property densities, $p_A$. The atomic contributions can be done with AtomDB using the basis-set-fits in BFit. Using basis-set fits ensures that the atomic contributions can be obtained analytically.

Then, given a linear operator on the property density, one writes:

$$ L[p{\text{molecule}}] = \sum{A=1}^{N_{\text{atoms}}} L[pA] + L\left[p{\text{molecule}} - \sum{A=1}^{N{\text{atoms}}} p_A\right] $$

This is useful when the atomic linear operator, $L[p_A]$, can be evaluated analytically. This means that the burden on the numerical integration/interpolation/differentiation/differential-equations-solving on the grid is less, since one is only having to compute the correction to the (often very good) promolecular approximation.

There are a few special cases of interest, most of which are dealt with in the discussion, and many of which are lower priority for now (and maybe forever). Note that matrix elements occurring in DFT can be addressed in this way, because

$$ \braket{\chii | v{xc;molecule} | \chij} = \sum{A=1}^{N_{\text{atoms}}} \braket{\chii | v{xc;A} | \chi_j} + \braket{\chii | v{xc;molecule} - \sum{A=1}^{N{\text{atoms}}}v_{xc;A} | \chi_j} $$

where (in Gaussian basis sets) the atomic matrix elements are analytic (and very sparse).

For atomic partitioning of properties, a similar trick can be performed. The integral we need is slightly different, however:

$$ P_A = \int wA(\mathbf{r}) p{\text{molecule}}(\mathbf{r}) d \mathbf{r} = \int p_{A}(\mathbf{r}) d \mathbf{r} + \int wA(\mathbf{r}) p{\text{molecule}}(\mathbf{r}) - p_{A}(\mathbf{r}) d \mathbf{r} $$

The numerical integral is small here, as long as the expected relation $wA(\mathbf{r}) p{\text{molecule}}(\mathbf{r}) \approx p_{A}(\mathbf{r})$ holds.

My opinion is that the first "generic" promolecular trick should be performed in grid itself. The second trick should be relegated to mean-field since it directly relates to acquiring matrix elements in DFT. The third trick should be relegated to denspart since it directly relates to molecular partitioning. Your thoughts, @Ali-Tehrani ?

Obviously other "special cases" may well appear in other packages.