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

Hubbard: change int values of eigenvalues to float #1178

Conversation

AndresOrtegaGuerrero
Copy link
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero commented Feb 20, 2025

The values for the starting_ns_eigenvalue should be floats and not integers
At the moment the app was doing two errors

  1. it was sending integers
  2. it was setting spin up as 0 and spin down as 1 (However this is not the convention of QE)

The test was testing spin down as 1.

This PR changes the values to floats and corrects the tests. Closes #1176

@AndresOrtegaGuerrero AndresOrtegaGuerrero marked this pull request as draft February 20, 2025 13:48
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.09%. Comparing base (5d9618e) to head (4861d63).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1178   +/-   ##
=======================================
  Coverage   73.09%   73.09%           
=======================================
  Files          95       95           
  Lines        6578     6576    -2     
=======================================
- Hits         4808     4807    -1     
+ Misses       1770     1769    -1     
Flag Coverage Δ
python-3.11 ?
python-3.9 73.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AndresOrtegaGuerrero AndresOrtegaGuerrero marked this pull request as ready for review February 20, 2025 20:46
Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM! Great if you can answer my comment, for further clarification 🙏

@@ -143,7 +143,7 @@ def _define_default_eigenvalues(self):
[state + 1, spin, kind_name, -1] # default eigenvalue
for state in range(num_states)
]
for spin in range(2) # spin up and down
for spin in [2, 1] # spin up and down
Copy link
Member

Choose a reason for hiding this comment

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

Why reversed? Is this a standard?

Copy link
Member Author

Choose a reason for hiding this comment

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

i will reverse it ,

state_index,
kind_name,
int(value),
float(value),
Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see here that it is indeed expecting REAL. Good catch

@AndresOrtegaGuerrero AndresOrtegaGuerrero merged commit dc1f333 into aiidalab:main Feb 21, 2025
5 checks passed
@AndresOrtegaGuerrero AndresOrtegaGuerrero deleted the starting_ns_eigenvalue_float branch February 21, 2025 08:19
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.

DFT+U Fails
2 participants