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

Orbitals should be multiplied by sqrt(occ) not occ #3138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

susilehtola
Copy link
Member

Description

Fixes a bug in sad.cc: pseudo-orbitals should be obtained by multiplying the orbital with the square root of their occupation to reproduce the correct density matrix C occ C^T.

Closes #3137.

User API & Changelog headlines

  • RN 1
  • RN 2

Dev notes & details

  • Feature1
  • Feature2

Questions

  • Question1

Checklist

Status

  • Ready for review
  • Ready for merge

Copy link
Contributor

@TiborGY TiborGY left a comment

Choose a reason for hiding this comment

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

Would it be possible to add a test that fails before but passes after this change? Clearly there is a testing gap, given how long this bug has been present, and how something like this can be changed without having to change any of tests.

@susilehtola
Copy link
Member Author

Yes, by testing the guess energy for H atom.

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.

Potential bug in sad.cc: definition of pseudo-orbitals
2 participants