-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with Operator::erf_nuclear
/Operator::erfc_nuclear
#242
Comments
Since it's possible that Max and Andy are working from my 2019 fork of L2 for cmake, I just re-ran the test file on #233 that has been re-synced to master this year. Same result:
|
Only if |
I'm quite certain now that |
fwiw, no cure on this from #259, which is up-to-date with present master.
|
The diff if anybody needs this fixed right now is
L2 still disagrees with Mathematica in the eighth decimal place for the test case, after this. That tells me that I probably need to learn what knobs to push to get higher precision out of L2. |
@JonathonMisiewicz nice catch! I think default precision in Libint should be sufficient to get 14+ digits unless you are dealing with extreme exponents (or other params). Just double check your coordinates/exponents match exactly. |
I stand corrected. I can get 10 decimal places of agreement, and Mathematica breaks when I tell it to do the numerical integral tightly enough to check further. L2 is victorious. I can either do a lightning-quick PR tomorrow to close this, or I can add a test to make sure this stays fixed. If you want a test, let me know what template to follow. |
@JonathonMisiewicz if you could add a unit test to https://github.com/evaleev/libint/blob/master/tests/unit/test-1body.cc would be good ... just follow the patterns |
for posterity: 1-body (point charge) integral formulas in DOI 10.1039/b605188j are obtained by substituting |
While adding
Operator::erf_nuclear
/Operator::erfc_nuclear
integrals to Psi4 (psi4/psi4#2473), I noticed that the results fromlibint2
don't agree with what WolframAlpha (don't have a Mathematica license, sorry 😄) gives me.Here's a minimal example (Hydrogen atom with a single primitive) to reproduce this (the
Operator::nuclear
part is just to verify that my setup is correct):The output from the above code is:
However, from WolframAlpha, I get
1.05407
(erf) and1.89929
(erfc), which I could also reproduce using a hand-written McMurchie-Davidson code (thanks to @andysim).Now, when scaling
omega
by a factor of 1/2 inlibint2
, i.e.std::tuple<double, Zxyz_vector> params{0.5, pcs};
,I get the "correct" result for the minimal example above.
Some more diagnostics:
From the list above, we (@andysim and I) concluded that the discrepancy a) does not depend on the basis set angular momentum nor b) the location of the basis functions.
We think it's most likely related to the way the Boys function for these integrals is evaluated (because of the primitive exponents...).Any hint on how to resolve this would be greatly appreciated. Thanks a lot!
The text was updated successfully, but these errors were encountered: