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 excited states in splines when spin-up/down sets are built from the same spin species and occupation is specified on the first sposet #4158

Merged
merged 6 commits into from
Aug 10, 2022

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Aug 6, 2022

Proposed changes

I noticed this bug when I tried to delete the implicit sposet sharing by spin-up/down electron.

When spin-up/down sets are built from the same spin specie and the occupation is specified on the first sposet, the spin-up set will be built correctly but the spin-down set will misidentify itself the same as the up set and thus the excited set will be used for both up/down spin electrons. Current test reference numbers are all bad.

@Hyeondeok-Shin
Need to update reference number of all the excited states tests using splines

A quick scan shows examples in the manual load two sets of orbitals from different spin. So it seems fine @Hyeondeok-Shin please double check the manual entries.

What type(s) of changes does this code introduce?

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

epyc-server

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted

@ye-luo ye-luo mentioned this pull request Aug 8, 2022
@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 9, 2022

Test this please

@prckent prckent changed the title Fix excited states in splines when spin-up/down sets are built from the same spin specie and occupation is specified on the first sposet Fix excited states in splines when spin-up/down sets are built from the same spin species and occupation is specified on the first sposet Aug 9, 2022
@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 9, 2022

Test this please

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 9, 2022

all the reference values for the deterministic tests has been updated. short/long test will be updated following #4162

@prckent prckent self-requested a review August 9, 2022 20:43
Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ye & Hyeondeok.

I normally make a comment about avoiding these bugs in future, but if the implemented logic and tests are both wrong and consistent with each other there is not much more we can do, except things like having few options and therefore fewer lines and fewer chances for issues.

@prckent
Copy link
Contributor

prckent commented Aug 9, 2022

From the blame this bug looks to have existed for a long time....

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 9, 2022

Test this please

@ye-luo ye-luo enabled auto-merge August 9, 2022 21:20
@ye-luo ye-luo merged commit a58ef79 into QMCPACK:develop Aug 10, 2022
@ye-luo ye-luo deleted the fix-excited branch August 10, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants