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

[BUG FIX] Edge case for Magmoms #460

Merged
merged 9 commits into from
Aug 14, 2023
Merged

[BUG FIX] Edge case for Magmoms #460

merged 9 commits into from
Aug 14, 2023

Conversation

jmmshn
Copy link
Contributor

@jmmshn jmmshn commented Aug 2, 2023

There's a strange interaction between charge-decorated structures and magmoms.

Charge-decorated structures can site.species.spin == None which would lead to a result of [None, ....] for the _get_magmoms function and then lead to failure when writing the INCAR

There's a strange interaction between charge-decorated structures and magmoms. 

Charge-decorated structures can `site.species.spin == None` which would lead to a result of `[None, ....]` for the `_get_magmoms` function and then lead to failure when writing the INCAR
@jmmshn jmmshn marked this pull request as ready for review August 2, 2023 05:15
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #460 (05f64bd) into main (95b15d5) will decrease coverage by 0.16%.
Report is 5 commits behind head on main.
The diff coverage is 50.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #460      +/-   ##
==========================================
- Coverage   65.30%   65.15%   -0.16%     
==========================================
  Files          74       74              
  Lines        7186     7186              
  Branches      927      927              
==========================================
- Hits         4693     4682      -11     
- Misses       2208     2220      +12     
+ Partials      285      284       -1     
Files Changed Coverage Δ
src/atomate2/vasp/sets/base.py 69.23% <0.00%> (ø)
src/atomate2/vasp/sets/defect.py 85.29% <100.00%> (ø)

... and 1 file with indirect coverage changes

@jmmshn jmmshn changed the title Edge case for Magmoms [BUG FIX] Edge case for Magmoms Aug 9, 2023
@jmmshn
Copy link
Contributor Author

jmmshn commented Aug 9, 2023

@utf, @janosh, this was causing failures with structures grabbed with oxidation states.

@utf
Copy link
Member

utf commented Aug 14, 2023

Thanks @jmmshn

@utf utf merged commit 013e66b into materialsproject:main Aug 14, 2023
@utf utf added the fix Bug fix PR label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants