wavefunction91 / GauXC

GauXC is a modern, modular C++ library for the evaluation of quantities related to the exchange-correlation (XC) energy (e.g. potential, etc) in the Gaussian basis set discretization of Kohn-Sham density function theory (KS-DFT) on heterogenous architectures.
Other
26 stars 18 forks source link

Evaluation of atomic overlap matrices #53

Open susilehtola opened 1 year ago

susilehtola commented 1 year ago

This might already be implemented, however... many applications require the evaluation of atomic overlap matrices

$$ S_{\mu \nu}^{A} = \int wA({\bf r}) \chi\mu ({\bf r}) \chi_\nu({\bf r}) {\rm d}^3 r $$

where $A$ is the atom and $\mu$ and $\nu$ are basis function indices.

An example use case is our generalized Pipek-Mezey orbital localization method, which replaces the original ill-defined Mulliken (or Löwdin) charges with a variety of mathematically well-defined partial charge estimates. It turns out that the localized orbitals are remarkably insensitive to the partial charge method, which can thereby be chosen by computational convenience, such as the Becke charges defined by the above overlap matrices

$$Q{ij}^{A} = C{\mu i} S{\mu \nu} C{\nu j}$$

We have also extended this method to forming generalized Pipek-Mezey Wannier functions

wavefunction91 commented 10 months ago

@susilehtola would an API to return a specific atomic overlap (as opposed to all or a batch of them) suit the needs here (at least to start)? Would it also be desirable to have an API that returns $Q_{ij}^A$ directly given MO coefficients (might make sense to spin that off onto another Issue if desired)?

wavefunction91 commented 10 months ago

Also, do you have a reference code for this? Code is written, but need something to verify against

susilehtola commented 10 months ago

Batching over atoms is fine, as long as you get the matrices separately. I don't think the MO transformation is within the scope of this feature, since it is trivial to achieve with a matrix multiply.

susilehtola commented 10 months ago

There are implementations in PySCF and ERKALE. As a simple check, you can just check that the sum equals the overlap matrix?