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

Split general contractions into blocks whenever possible #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

susilehtola
Copy link
Contributor

This pull request makes the BSE split general contractions into blocks whenever possible.

For example, if the contraction pattern looks like

x x x x 0 0
x x x x 0 0
x x x x 0 0 
x x x x 0 0
0 0 0 0 y y
0 0 0 0 y y

this will be identified by the code, and the general contraction will be split into two shells, consisting of the x and y entries, respectively.

A special case of the procedure concerns completely free primitives

x x x x 0 0
x x x x 0 0
x x x x 0 0 
0 0 0 0 y 0
0 0 0 0 0 z

which will from now on not be included in the generally contracted shell; instead, they will be contained in their own shells.

The PR doesn't have any functional changes, since the output formats will still act exactly the same: formats that employ general contractions will show the blocked contractions, whereas formats employing segmented contractions are already omitting any zero entries.

The main reason for the PR is to improve curation tools: identical basis sets are now detected as identical, since the placing of e.g. free primitives as a dummy part of the contraction pattern vs as one-function shells does not affect how the BSE treats the functions internally. The new convention may also slightly reduce storage costs, since zero entries don't need to be stored.

@codecov-io
Copy link

codecov-io commented Feb 26, 2021

Codecov Report

Merging #199 (285b696) into master (32721c8) will increase coverage by 0.10%.
The diff coverage is 96.66%.

@susilehtola susilehtola force-pushed the split_blocked_contractions branch from 7bb517b to 44e8507 Compare February 26, 2021 18:02
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