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

Bug in integral code #1

Closed erikkjellgren closed 7 years ago

erikkjellgren commented 7 years ago

Hi,

I tried to use you code (used integrals.py) to run a calculation on He with the basisset 6-31G, and got the following overlap matrix:

3.51E-01 | 3.75E-01 3.75E-01 | 1.00E+00

I think the diagonal, i.e. the selfoverlap should always be equal to 1.0 ?

I found this problem because I have in my own code (largely based on your code). I have not been able to figure it out. But have a suspicion that it have to do with the normalization of contracted basissets.

Please if you find a solution please send me an email: erikkjellgren@live.dk

jjgoings commented 7 years ago

I can confirm this. The code does not normalize the basis functions at the integral stage, because the normalization is taken into account at the SCF stage, e.g. solving FC = SCE we already take into account the metric S. So as long as we are consistent in our integral definitions, the SCF equations are invariant to our choice of normalization. Similar issue here: https://github.com/theochem/horton/issues/39

We can certainly normalize the integrals though, as it would allow us to a) compare with other codes, and, b) help us if we (ever) implement integral screening techniques. I'll look into this.