Optimizing Acsint #26
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had some time to optimize Acsint. It is much faster now, but quite a bit slower than libcint still. Maybe it is a starting point for someone who wants to use nonstandard types.
The biggest issue was excessive compilation time due to needless specialization on the shell sizes. I fixed it by making the shells have runtime shell sizes. This should also benefit type stability throughout other parts of GaussianBasis.
Simple benchmark
Before
This PR
Libcint backend
Compatibility
The results of
ERI_2e4c(bset)
are the same as before up to a relative tolerance of1e-15
. This can probably be further reduced using the newcutoff
parameter ofgenerate_ERI_quartet
.One thing I found though is that
ERI_2e4c(bset)
does not matchERI_2e4c(bset2)
, neither now nor before the PR. Possibly that has to do something with spherical vs cartesian.