hackingmaterials / atomate

atomate is a powerful software for computational materials science and contains pre-built workflows.
https://hackingmaterials.github.io/atomate
Other
245 stars 175 forks source link

Fix for MagneticOrderingsWF static only #768

Closed fraricci closed 1 year ago

fraricci commented 1 year ago

I realized that the MagneticOrderingsWF did not work properly when static = True (static calculation only). Here it is a fix that seems to work fine.

To note that I had to code explicitly "structure is not None" in the StaticFW. I'm not sure why, probably it's due to the fact that the structure generated in a MagneticOrderingsWF is a TransformedStructure obj and not a standard Structure obj.

I fixed also a bug in the calculation of the total magnetization per formula unit.

fraricci commented 1 year ago

Let me know if anything else is needed here. I think the checks are failing for reasons unrelated to my commits. Thanks

Zhuoying commented 1 year ago

Hi @fraricci, thanks for the fix. I recently merged some PRs to fix the previous circleci test failures (they should not be related to your PR). Could you git pull these changes and retrigger the test? If the PR passes the pytest, I am merging it right now. Thanks!