Skip to content
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

fix Taylor-based boys engine #243

Merged
merged 2 commits into from
Apr 4, 2022
Merged

fix Taylor-based boys engine #243

merged 2 commits into from
Apr 4, 2022

Conversation

evaleev
Copy link
Owner

@evaleev evaleev commented Mar 21, 2022

this replaces wrongly-committed 9e92fad

evaleev referenced this pull request Mar 21, 2022
the internally precomputed table of Fm was 1 element too short
@bingao
Copy link

bingao commented Mar 21, 2022

Thank you @evaleev I am going to test this fix and let you know once I have the results. Have a nice day.

@evaleev evaleev merged commit ba2ab8f into master Apr 4, 2022
@evaleev evaleev deleted the evaleev/fix/taylor_boys branch April 4, 2022 15:16
@bingao
Copy link

bingao commented Apr 4, 2022

Hi @evaleev

I did more tests. But first, let me summarize how I modified the codes so that you could check whether I did it correctly. I use Libint 2.7.1 (at https://github.com/evaleev/libint/releases/download/v2.7.1/libint-2.7.1.tgz) and I only changed the header file include/libint2/boys.h. Explicitly, line 490 is changed to:


              INTERPOLATION_ORDER + 1, 2 * (mmax + INTERPOLATION_ORDER)) {

and line 519 is changed to:

        max_m_ = mmax + INTERPOLATION_ORDER;

Then I generated 100,000 Chebyshev nodes in the range [0, 5000] as arguments and ran libint2::FmEval_Taylor<double, 7> with different maximum orders mmax of Boys functions. The maximum relative errors are as follows,

mmax=10, x=33.71441750639815, Fm=5.1433037645936454e-11, relative-error=9.023136785781899e-07
mmax=20, x=33.71441750639815, Fm=1.2931369521894102e-14, relative-error=0.005797678663402387
mmax=30, x=33.71441750639815, Fm=6.07970246113155e-16, relative-error=0.36380102185311175
mmax=40, x=33.71441750639815, Fm=8.544638342987548e-16, relative-error=6.13036696828868
mmax=50, x=33.71441750639815, Fm=1.5023921087296925e-14, relative-error=241.59856375362048
mmax=60, x=33.71441750639815, Fm=1.9784131483155954e-12, relative-error=48431.592216900586

It seems that the performance of libint2::FmEval_Taylor<double, 7> is still not satisfied if I did not do anything incorrectly.

One more thing, I notice that there is an assert() statement in the Taylor interpolation (include/libint2/boys.h):

        assert(mmax <= 63);

Does it mean that we can not compute Boys functions with Taylor interpolation for orders greater than 63?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants