pymatgen
pymatgen copied to clipboard
`SpacegroupAnalyzer.get_symmetrized_structure()` weird results on structures with magnetic moments
If I query a structure with magnetic moments defined i.e. mp-1228485 and run it through SpacegroupAnalyzer then call get_symmetrized_structure() it returns
SymmetrizedStructure
Full Formula (Al12 Cr4 O24)
Reduced Formula: Al3CrO6
Spacegroup: R3 (146)
abc : 7.165227 7.166083 8.451375
angles: 113.162862 113.161083 85.839799
Sites (40)
# SP a b c Wyckoff magmom
--- ---- -------- -------- -------- --------- --------
0 Al 0.973155 0.473169 0.648738 4a 0.002
1 Al 0.975235 0.975237 0.650128 4a -0.002
2 Al 0.52897 0.028961 0.352616 4a 0.002
3 Cr 0.52741 0.527402 0.35158 4a -0.002
4 O 0.044653 0.704117 0.594498 4b 0.001
5 O 0.780519 0.968294 0.747281 4b -0.001
6 O 0.798074 0.950804 0.406879 4b -0.001
7 O 0.729983 0.528205 0.244689 4b 0.001
8 O 0.709869 0.548396 0.607886 4b -0
9 O 0.447642 0.810549 0.405891 4b 0
If I go to bilbao crystallographic server and look up spacegroup 146's wyckoff sets we see that a sites and b sites have multiplicities 3 and 9 respectively (https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-normsets?from=wycksets&gnum=146).
Given only the above if I applied the symmetry operations I would end up with very large numbers of duplicated sites and wouldn't know which magmoms should be where when merging sites.
Instead what I feel SymmetrizedStructure should be can be obtained as SpacegroupAnalyzer(SpacegroupAnalyzer(struct).get_refined_structure()).get_symmetrized_structure()
SymmetrizedStructure
Full Formula (Al9 Cr3 O18)
Reduced Formula: Al3CrO6
Spacegroup: R3 (146)
abc : 4.879461 4.879461 13.278842
angles: 90.000000 90.000000 120.000000
Sites (30)
# SP a b c Wyckoff
--- ---- -------- -------- -------- ---------
0 Al 0 0 0.148822 3a
1 Al 0.333333 0.666667 0.316863 3a
2 Al 0.666667 0.333333 0.186033 3a
3 Cr 0.333333 0.666667 0.018331 3a
4 O 0.685458 0.995592 0.249595 9b
5 O 0.360234 0.043126 0.086106 9b
However doing this discards the magmom information (not important for me but probably important for pymatgen).
would an inc_magmoms arg to SpacegroupAnalyzer be an acceptable addition True by default but can be turned off if all you care about is the structural spacegroup?
would an inc_magmoms arg to SpacegroupAnalyzer be an acceptable addition True by default but can be turned off if all you care about is the structural spacegroup?
Yes, I think so.
I haven't had chance to look at this specific example yet, but this is an issue.
It's difficult to know what the "correct" action is here; without vector magnetic moments we're in an unfortunate in-between where we cannot properly apply magnetic space groups, but using crystallographic space groups where, essentially, atoms with different moments are treated as non-equivalent are also not appropriate (for example, if you use get_symmetrized_structure() on a structure with a specific magnetic ordering, you might find it undesirable for this ordering to be stripped).
This problem is exacerbated by the fact that, due to numerical noise, often magnetic moments on atoms are not going to be exactly equal. If I have to handle structures like this myself, the first step I take is usually to round off the magmoms.