Skip to content

Fix Cp2kOutput.spin_polarized() likely not doing what author intended - #2954

Merged
janosh merged 2 commits into
masterfrom
fix-cp2koutput-spin-polarized
Apr 25, 2023
Merged

Fix Cp2kOutput.spin_polarized() likely not doing what author intended#2954
janosh merged 2 commits into
masterfrom
fix-cp2koutput-spin-polarized

Conversation

@janosh

@janosh janosh commented Apr 25, 2023

Copy link
Copy Markdown
Member
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