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 Cp2kOutput.spin_polarized() likely not doing what author intended #2954

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

janosh
Copy link
Member

@janosh janosh commented Apr 25, 2023

if ("UKS" or "UNRESTRICTED_KOHN_SHAM" or "LSD" or "SPIN_POLARIZED") in self.data["dft"].values():
            return True

"UKS" or "UNRESTRICTED_KOHN_SHAM" or "LSD" or "SPIN_POLARIZED" short-circuits to "UKS" and so won't return True even if "UNRESTRICTED_KOHN_SHAM" or "LSD" or "SPIN_POLARIZED" are present.

@janosh janosh added io Input/output functionality fix Bug fix PRs labels Apr 25, 2023
@janosh janosh enabled auto-merge (squash) April 25, 2023 14:38
@janosh janosh merged commit e165609 into master Apr 25, 2023
@janosh janosh deleted the fix-cp2koutput-spin-polarized branch April 25, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PRs io Input/output functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant