jjgoings / McMurchie-Davidson

do a simple closed shell Hartree-Fock using McMurchie-Davidson to compute integrals
BSD 3-Clause "New" or "Revised" License
78 stars 17 forks source link

Speed up by detecting which two-e integrals are zeros? #9

Closed mfkasim1 closed 3 years ago

mfkasim1 commented 3 years ago

Hi,

Thanks for the great repo! I'm learning a lot from this. It seems like the two-electron integrals produces a lot of zeros, even if the central positions are close to each other (or even exactly the same). Is it possible to speed it up by detecting which two-e integrals are zeros?

jjgoings commented 3 years ago

Hi!

Good point! At the moment, if you set RHF(direct=True, acc2e=1e-12)you will screen out ERIs that don't contribute beyond a threshold of 1e-12. Note that the direct implementation is still a work in progress, and will likely be slower for small systems (which is kind of the limit of the code right now anyway :/).

The ERI screening code itself is in formPT of McMurchie-Davidson/cython/fock.pyx.

Unfortunately there is not ERI screening for conventional SCF, which is the default. As always, feel free to create a pull request if you choose to work on this!

mfkasim1 commented 3 years ago

Thanks for your reply. Any reference about the screening mechanism?

jjgoings commented 3 years ago

@mfkasim1 Sure!

Almlöf, Jan, Knut Fægri Jr, and Knut Korsell. "Principles for a direct SCF approach to LCAO–MO ab‐initio calculations." Journal of Computational Chemistry 3.3 (1982): 385-399.