-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
mnt: changed spin_squared name to other name #497
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #497 +/- ##
==========================================
- Coverage 86.76% 86.76% -0.01%
==========================================
Files 399 399
Lines 50548 50544 -4
==========================================
- Hits 43860 43854 -6
- Misses 6688 6690 +2 ☔ View full report in Codecov by Sentry. |
Hmm, I stumbled upon this one: https://arxiv.org/pdf/1508.02058.pdf There seems to be more terms that could be useful? |
I agree to choose the standard name of
Anyways, as long as the documentation is clear what is calculated, I guess the user can figure things out from there. |
Maybe one could have an optional keyword to take the calculation one step further to compute the three values above? |
Yes, I think that perhaps it should default to all terms given in the article I reference, then options could be used to query them individually. However the current form returns all contamination values for a single state, whereas the article (and orca) seems to only return single numbers, what are your thoughts about that? Should we have a keyword for |
I think Regarding the terms in your reference (which I didn't study), they are only relevant for noncollinear and spin-orbit calculations, right? I think what you already have is the "standard" expression for spin contamination (up to the exact S^2 value and N_beta). |
Thanks, yes it covers nc/soc, but also discusses the collinear term. |
Could you remind me here, should |
@@ -7,7 +7,7 @@ | |||
from sisl._internal import set_module | |||
|
|||
from .distribution import get_distribution | |||
from .electron import EigenstateElectron, EigenvalueElectron, spin_squared | |||
from .electron import EigenstateElectron, EigenvalueElectron |
Check notice
Code scanning / CodeQL
Cyclic import Note
sisl.physics.electron
The correct name is a contamination of the spin states. This change adheres so that it is more correct.
Signed-off-by: Nick Papior <[email protected]>
I think it was obvious once I looked into it, will now default to return the sum ( |
Added `sum` flag for returning the sum of the spin_contamination. Signed-off-by: Nick Papior <[email protected]>
The correct name is a contamination of the spin states. This change adheres so that it is more correct.
@tfrederiksen @sofiasanz could you please review this name change?
I think this is more correct, no? You have it used in hubbard, but just wanted to clear it out.
CHANGELOG