Bug fix: change CifWriter to save only the element symbol, and not the entire species string#3071
Bug fix: change CifWriter to save only the element symbol, and not the entire species string#3071kamronald wants to merge 3 commits intomaterialsproject:masterfrom
Conversation
Change the atom site type symbol, such that the element symbol is saved instead of the full species string (which includes site properties)
|
@kamronald does this still handle species with oxidation state correctly? |
|
@mkhorton good point, I just checked and it does not handle them properly, I'll fix that |
atom_site_type_symbol now saves the element and oxidation state, without the other site properties
|
@mkhorton oxidation states are now properly saved |
|
Thanks @kamronald! 👍 IIUC @mkhorton in #3065 (comment), he's suggesting we continue saving scalar magmoms to regular CIF using the local data name Also, would be great if you could refactor your repro #3065 (comment) into a new test case. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3071 +/- ##
==========================================
- Coverage 74.65% 74.09% -0.57%
==========================================
Files 230 230
Lines 69377 69382 +5
Branches 16154 16154
==========================================
- Hits 51796 51410 -386
- Misses 14513 14937 +424
+ Partials 3068 3035 -33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3c23114 to
36e289c
Compare
d725325 to
dca98be
Compare
e3fbc67 to
41e6d99
Compare
Change the "atom site type symbol", such that the element symbol is saved instead of the full species string (which includes site properties). This fixes Issue #3065, allowing for accurate writing of structures containing species properties to CIF and MCIF files.
Summary
Major updates:
Change the "atom site type symbol", such that the element symbol is saved instead of the full species string (which includes site properties).
Todos
Checklist
Ensure:
ruff.mypy.