Author: Shivam Beniwal
Date: 26 August 2021
This notebook demonstrates a helpful method from the pymatgen magnetism analyzer module to add magnetic information to a structure as an input to a DFT run where the outcome of the calculation is dependent on the initial magnetic structure, and/or requires some magnetic moment as starting point. This can be extremely useful in case of newly predicted structures.
# Uncomment the subsequent lines in this cell to install dependencies for Google Colab.
# !pip install pymatgen==2022.7.19
from pymatgen.analysis.magnetism.analyzer import CollinearMagneticStructureAnalyzer
from pymatgen.core.structure import Structure
from pymatgen.ext.matproj import MPRester
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
# Specify location of CIF on your device
structure = Structure.from_file("/home/user/Documents/cifs/lfp.cif")
print(structure)
Full Formula (Li14 Fe9 P16 O56) Reduced Formula: Li14Fe9(P2O7)8 abc : 10.747796 9.625861 12.724342 angles: 68.820392 116.025779 107.299876 Sites (95) # SP a b c --- ---- -------- -------- -------- 0 Li+ 0.137339 0.92805 0.597441 1 Li+ 0.126045 0.434026 0.0847 2 Li+ 0.626176 0.453868 0.590839 3 Li+ 0.373824 0.546132 0.409161 4 Li+ 0.021288 0.643996 0.39688 5 Li+ 0.862661 0.07195 0.402559 6 Li+ 0.978712 0.356004 0.60312 7 Li+ 0.497222 0.8674 0.316203 8 Li+ 0.514158 0.632938 0.173531 9 Li+ 0.62191 0.955426 0.089457 10 Li+ 0.485842 0.367062 0.826469 11 Li+ 0.37809 0.044574 0.910543 12 Li+ 0.502778 0.1326 0.683797 13 Li+ 0.873955 0.565974 0.9153 14 Fe2+ 0.744962 0.435377 0.3042 15 Fe2+ 0.264262 0.071531 0.201932 16 Fe2+ 0.217648 0.200486 0.416895 17 Fe2+ 0.735738 0.928469 0.798068 18 Fe2+ 0.255038 0.564623 0.6958 19 Fe2+ 0.782352 0.799514 0.583105 20 Fe2+ 0.780133 0.300909 0.07859 21 Fe2+ 0 0 0 22 Fe2+ 0.219867 0.699091 0.92141 23 P5+ 0.700902 0.638321 0.014979 24 P5+ 0.208131 0.231393 0.659702 25 P5+ 0.538911 0.196141 0.132759 26 P5+ 0.052823 0.968562 0.776985 27 P5+ 0.798275 0.263793 0.843927 28 P5+ 0.299098 0.361679 0.985021 29 P5+ 0.050175 0.469029 0.273158 30 P5+ 0.949825 0.530971 0.726842 31 P5+ 0.947177 0.031438 0.223015 32 P5+ 0.461089 0.803859 0.867241 33 P5+ 0.300562 0.864765 0.485466 34 P5+ 0.699438 0.135235 0.514534 35 P5+ 0.201725 0.736207 0.156073 36 P5+ 0.464356 0.308442 0.367888 37 P5+ 0.535644 0.691558 0.632112 38 P5+ 0.791869 0.768607 0.340298 39 O2- 0.539863 0.158192 0.024743 40 O2- 0.092099 0.652773 0.225938 41 O2- 0.176637 0.901046 0.105233 42 O2- 0.20505 0.21303 0.022179 43 O2- 0.907901 0.347227 0.774062 44 O2- 0.716621 0.007461 0.47944 45 O2- 0.687158 0.754916 0.709086 46 O2- 0.954695 0.45511 0.336803 47 O2- 0.27639 0.492284 0.014508 48 O2- 0.8474 0.341196 0.944993 49 O2- 0.458339 0.562539 0.70479 50 O2- 0.043629 0.050809 0.156863 51 O2- 0.542044 0.165795 0.421783 52 O2- 0.540547 0.662135 0.919652 53 O2- 0.985828 0.405574 0.162943 54 O2- 0.302814 0.399019 0.860061 55 O2- 0.283379 0.992539 0.52056 56 O2- 0.312842 0.245084 0.290914 57 O2- 0.79495 0.78697 0.977821 58 O2- 0.354953 0.203087 0.752629 59 O2- 0.180042 0.392693 0.609766 60 O2- 0.808738 0.58249 0.640002 61 O2- 0.956371 0.949191 0.843137 62 O2- 0.308298 0.743719 0.790965 63 O2- 0.460137 0.841808 0.975257 64 O2- 0.72361 0.507716 0.985492 65 O2- 0.200766 0.718122 0.515678 66 O2- 0.459453 0.337865 0.080348 67 O2- 0.34922 0.712757 0.247493 68 O2- 0.98317 0.904386 0.66758 69 O2- 0.045305 0.54489 0.663197 70 O2- 0.539787 0.65326 0.525967 71 O2- 0.193456 0.914965 0.862184 72 O2- 0.093481 0.150897 0.728314 73 O2- 0.906519 0.849103 0.271686 74 O2- 0.536855 0.934374 0.793678 75 O2- 0.191262 0.41751 0.359998 76 O2- 0.823363 0.098954 0.894767 77 O2- 0.819958 0.607307 0.390234 78 O2- 0.1526 0.658804 0.055007 79 O2- 0.460213 0.34674 0.474033 80 O2- 0.541661 0.437461 0.29521 81 O2- 0.841986 0.849279 0.439014 82 O2- 0.65078 0.287243 0.752507 83 O2- 0.697186 0.600981 0.139939 84 O2- 0.699212 0.094667 0.641348 85 O2- 0.014173 0.594426 0.837057 86 O2- 0.158014 0.150721 0.560986 87 O2- 0.300788 0.905333 0.358652 88 O2- 0.806544 0.085035 0.137816 89 O2- 0.01683 0.095614 0.33242 90 O2- 0.691702 0.256281 0.209035 91 O2- 0.463145 0.065626 0.206322 92 O2- 0.645047 0.796913 0.247371 93 O2- 0.457956 0.834205 0.578217 94 O2- 0.799234 0.281878 0.484322
Here we define magnetic moments of individual species present in the structure, if not already present. Refer to pymatgen docs for more information on options available for the argument overwrite_magmom_mode. Here we add magmoms for all sites in the structure irrespective of input structure, suitable for a spin-polarized (a.k.a 'magnetic') calculation.
This is particularly interesting in case of either attempting a ferromagnetic calculation or an antiferromagnetic calculation.
magmom = CollinearMagneticStructureAnalyzer(
structure, overwrite_magmom_mode="replace_all_if_undefined"
)
# Assume an initial ferromagnetic order
fm_structure = magmom.get_ferromagnetic_structure(make_primitive=True)
print(fm_structure)
Full Formula (Li14 Fe9 P16 O56) Reduced Formula: Li14Fe9(P2O7)8 abc : 10.747796 9.625861 12.724342 angles: 68.820392 116.025779 107.299876 Sites (95) # SP a b c magmom --- ---- -------- -------- -------- -------- 0 Li+ 0.137339 0.92805 0.597441 0 1 Li+ 0.126045 0.434026 0.0847 0 2 Li+ 0.626176 0.453868 0.590839 0 3 Li+ 0.373824 0.546132 0.409161 0 4 Li+ 0.021288 0.643996 0.39688 0 5 Li+ 0.862661 0.07195 0.402559 0 6 Li+ 0.978712 0.356004 0.60312 0 7 Li+ 0.497222 0.8674 0.316203 0 8 Li+ 0.514158 0.632938 0.173531 0 9 Li+ 0.62191 0.955426 0.089457 0 10 Li+ 0.485842 0.367062 0.826469 0 11 Li+ 0.37809 0.044574 0.910543 0 12 Li+ 0.502778 0.1326 0.683797 0 13 Li+ 0.873955 0.565974 0.9153 0 14 Fe2+ 0.744962 0.435377 0.3042 5 15 Fe2+ 0.264262 0.071531 0.201932 5 16 Fe2+ 0.217648 0.200486 0.416895 5 17 Fe2+ 0.735738 0.928469 0.798068 5 18 Fe2+ 0.255038 0.564623 0.6958 5 19 Fe2+ 0.782352 0.799514 0.583105 5 20 Fe2+ 0.780133 0.300909 0.07859 5 21 Fe2+ 0 0 0 5 22 Fe2+ 0.219867 0.699091 0.92141 5 23 P5+ 0.700902 0.638321 0.014979 0 24 P5+ 0.208131 0.231393 0.659702 0 25 P5+ 0.538911 0.196141 0.132759 0 26 P5+ 0.052823 0.968562 0.776985 0 27 P5+ 0.798275 0.263793 0.843927 0 28 P5+ 0.299098 0.361679 0.985021 0 29 P5+ 0.050175 0.469029 0.273158 0 30 P5+ 0.949825 0.530971 0.726842 0 31 P5+ 0.947177 0.031438 0.223015 0 32 P5+ 0.461089 0.803859 0.867241 0 33 P5+ 0.300562 0.864765 0.485466 0 34 P5+ 0.699438 0.135235 0.514534 0 35 P5+ 0.201725 0.736207 0.156073 0 36 P5+ 0.464356 0.308442 0.367888 0 37 P5+ 0.535644 0.691558 0.632112 0 38 P5+ 0.791869 0.768607 0.340298 0 39 O2- 0.539863 0.158192 0.024743 0 40 O2- 0.092099 0.652773 0.225938 0 41 O2- 0.176637 0.901046 0.105233 0 42 O2- 0.20505 0.21303 0.022179 0 43 O2- 0.907901 0.347227 0.774062 0 44 O2- 0.716621 0.007461 0.47944 0 45 O2- 0.687158 0.754916 0.709086 0 46 O2- 0.954695 0.45511 0.336803 0 47 O2- 0.27639 0.492284 0.014508 0 48 O2- 0.8474 0.341196 0.944993 0 49 O2- 0.458339 0.562539 0.70479 0 50 O2- 0.043629 0.050809 0.156863 0 51 O2- 0.542044 0.165795 0.421783 0 52 O2- 0.540547 0.662135 0.919652 0 53 O2- 0.985828 0.405574 0.162943 0 54 O2- 0.302814 0.399019 0.860061 0 55 O2- 0.283379 0.992539 0.52056 0 56 O2- 0.312842 0.245084 0.290914 0 57 O2- 0.79495 0.78697 0.977821 0 58 O2- 0.354953 0.203087 0.752629 0 59 O2- 0.180042 0.392693 0.609766 0 60 O2- 0.808738 0.58249 0.640002 0 61 O2- 0.956371 0.949191 0.843137 0 62 O2- 0.308298 0.743719 0.790965 0 63 O2- 0.460137 0.841808 0.975257 0 64 O2- 0.72361 0.507716 0.985492 0 65 O2- 0.200766 0.718122 0.515678 0 66 O2- 0.459453 0.337865 0.080348 0 67 O2- 0.34922 0.712757 0.247493 0 68 O2- 0.98317 0.904386 0.66758 0 69 O2- 0.045305 0.54489 0.663197 0 70 O2- 0.539787 0.65326 0.525967 0 71 O2- 0.193456 0.914965 0.862184 0 72 O2- 0.093481 0.150897 0.728314 0 73 O2- 0.906519 0.849103 0.271686 0 74 O2- 0.536855 0.934374 0.793678 0 75 O2- 0.191262 0.41751 0.359998 0 76 O2- 0.823363 0.098954 0.894767 0 77 O2- 0.819958 0.607307 0.390234 0 78 O2- 0.1526 0.658804 0.055007 0 79 O2- 0.460213 0.34674 0.474033 0 80 O2- 0.541661 0.437461 0.29521 0 81 O2- 0.841986 0.849279 0.439014 0 82 O2- 0.65078 0.287243 0.752507 0 83 O2- 0.697186 0.600981 0.139939 0 84 O2- 0.699212 0.094667 0.641348 0 85 O2- 0.014173 0.594426 0.837057 0 86 O2- 0.158014 0.150721 0.560986 0 87 O2- 0.300788 0.905333 0.358652 0 88 O2- 0.806544 0.085035 0.137816 0 89 O2- 0.01683 0.095614 0.33242 0 90 O2- 0.691702 0.256281 0.209035 0 91 O2- 0.463145 0.065626 0.206322 0 92 O2- 0.645047 0.796913 0.247371 0 93 O2- 0.457956 0.834205 0.578217 0 94 O2- 0.799234 0.281878 0.484322 0
order = magmom.ordering # Useful if magnetic order is unknown or not user-defined
print(order)
Ordering.FM
spa = SpacegroupAnalyzer(structure)
spa.get_point_group_symbol()
'-1'
spa.get_space_group_symbol()
'P-1'
fm_structure.to(filename="lfp.mcif") # Save the structure in magCIF format.
spn_structure = (
magmom.get_structure_with_spin()
) # Returns spin decorated values in structure instead of magmom site properties
print(spn_structure)
Full Formula (Li14 Fe9 P16 O56) Reduced Formula: Li14Fe9(P2O7)8 abc : 10.747796 9.625861 12.724342 angles: 68.820392 116.025779 107.299876 Sites (95) # SP a b c --- ----------- -------- -------- -------- 0 Li+,spin=0 0.137339 0.92805 0.597441 1 Li+,spin=0 0.126045 0.434026 0.0847 2 Li+,spin=0 0.626176 0.453868 0.590839 3 Li+,spin=0 0.373824 0.546132 0.409161 4 Li+,spin=0 0.021288 0.643996 0.39688 5 Li+,spin=0 0.862661 0.07195 0.402559 6 Li+,spin=0 0.978712 0.356004 0.60312 7 Li+,spin=0 0.497222 0.8674 0.316203 8 Li+,spin=0 0.514158 0.632938 0.173531 9 Li+,spin=0 0.62191 0.955426 0.089457 10 Li+,spin=0 0.485842 0.367062 0.826469 11 Li+,spin=0 0.37809 0.044574 0.910543 12 Li+,spin=0 0.502778 0.1326 0.683797 13 Li+,spin=0 0.873955 0.565974 0.9153 14 Fe2+,spin=5 0.744962 0.435377 0.3042 15 Fe2+,spin=5 0.264262 0.071531 0.201932 16 Fe2+,spin=5 0.217648 0.200486 0.416895 17 Fe2+,spin=5 0.735738 0.928469 0.798068 18 Fe2+,spin=5 0.255038 0.564623 0.6958 19 Fe2+,spin=5 0.782352 0.799514 0.583105 20 Fe2+,spin=5 0.780133 0.300909 0.07859 21 Fe2+,spin=5 0 0 0 22 Fe2+,spin=5 0.219867 0.699091 0.92141 23 P5+,spin=0 0.700902 0.638321 0.014979 24 P5+,spin=0 0.208131 0.231393 0.659702 25 P5+,spin=0 0.538911 0.196141 0.132759 26 P5+,spin=0 0.052823 0.968562 0.776985 27 P5+,spin=0 0.798275 0.263793 0.843927 28 P5+,spin=0 0.299098 0.361679 0.985021 29 P5+,spin=0 0.050175 0.469029 0.273158 30 P5+,spin=0 0.949825 0.530971 0.726842 31 P5+,spin=0 0.947177 0.031438 0.223015 32 P5+,spin=0 0.461089 0.803859 0.867241 33 P5+,spin=0 0.300562 0.864765 0.485466 34 P5+,spin=0 0.699438 0.135235 0.514534 35 P5+,spin=0 0.201725 0.736207 0.156073 36 P5+,spin=0 0.464356 0.308442 0.367888 37 P5+,spin=0 0.535644 0.691558 0.632112 38 P5+,spin=0 0.791869 0.768607 0.340298 39 O2-,spin=0 0.539863 0.158192 0.024743 40 O2-,spin=0 0.092099 0.652773 0.225938 41 O2-,spin=0 0.176637 0.901046 0.105233 42 O2-,spin=0 0.20505 0.21303 0.022179 43 O2-,spin=0 0.907901 0.347227 0.774062 44 O2-,spin=0 0.716621 0.007461 0.47944 45 O2-,spin=0 0.687158 0.754916 0.709086 46 O2-,spin=0 0.954695 0.45511 0.336803 47 O2-,spin=0 0.27639 0.492284 0.014508 48 O2-,spin=0 0.8474 0.341196 0.944993 49 O2-,spin=0 0.458339 0.562539 0.70479 50 O2-,spin=0 0.043629 0.050809 0.156863 51 O2-,spin=0 0.542044 0.165795 0.421783 52 O2-,spin=0 0.540547 0.662135 0.919652 53 O2-,spin=0 0.985828 0.405574 0.162943 54 O2-,spin=0 0.302814 0.399019 0.860061 55 O2-,spin=0 0.283379 0.992539 0.52056 56 O2-,spin=0 0.312842 0.245084 0.290914 57 O2-,spin=0 0.79495 0.78697 0.977821 58 O2-,spin=0 0.354953 0.203087 0.752629 59 O2-,spin=0 0.180042 0.392693 0.609766 60 O2-,spin=0 0.808738 0.58249 0.640002 61 O2-,spin=0 0.956371 0.949191 0.843137 62 O2-,spin=0 0.308298 0.743719 0.790965 63 O2-,spin=0 0.460137 0.841808 0.975257 64 O2-,spin=0 0.72361 0.507716 0.985492 65 O2-,spin=0 0.200766 0.718122 0.515678 66 O2-,spin=0 0.459453 0.337865 0.080348 67 O2-,spin=0 0.34922 0.712757 0.247493 68 O2-,spin=0 0.98317 0.904386 0.66758 69 O2-,spin=0 0.045305 0.54489 0.663197 70 O2-,spin=0 0.539787 0.65326 0.525967 71 O2-,spin=0 0.193456 0.914965 0.862184 72 O2-,spin=0 0.093481 0.150897 0.728314 73 O2-,spin=0 0.906519 0.849103 0.271686 74 O2-,spin=0 0.536855 0.934374 0.793678 75 O2-,spin=0 0.191262 0.41751 0.359998 76 O2-,spin=0 0.823363 0.098954 0.894767 77 O2-,spin=0 0.819958 0.607307 0.390234 78 O2-,spin=0 0.1526 0.658804 0.055007 79 O2-,spin=0 0.460213 0.34674 0.474033 80 O2-,spin=0 0.541661 0.437461 0.29521 81 O2-,spin=0 0.841986 0.849279 0.439014 82 O2-,spin=0 0.65078 0.287243 0.752507 83 O2-,spin=0 0.697186 0.600981 0.139939 84 O2-,spin=0 0.699212 0.094667 0.641348 85 O2-,spin=0 0.014173 0.594426 0.837057 86 O2-,spin=0 0.158014 0.150721 0.560986 87 O2-,spin=0 0.300788 0.905333 0.358652 88 O2-,spin=0 0.806544 0.085035 0.137816 89 O2-,spin=0 0.01683 0.095614 0.33242 90 O2-,spin=0 0.691702 0.256281 0.209035 91 O2-,spin=0 0.463145 0.065626 0.206322 92 O2-,spin=0 0.645047 0.796913 0.247371 93 O2-,spin=0 0.457956 0.834205 0.578217 94 O2-,spin=0 0.799234 0.281878 0.484322
The above structure is saved as a magCIF with .mcif extension. This can be converted back to a CIF with relevant magnetic information associated with each site. OpenBabel does this easily, on command line write-
obabel -imcif lfp.mcif -ocif -O lfp.cif
In some cases, it might be useful to analyze magnetic behavior of a strucure from the Materials Project database.
# Establish rester for accessing Materials API
mpr = MPRester(api_key="API_KEY")
mp_id = "mp-504263" # Previously reported structure; Co replaced at Fe site
structure_from_mp = mpr.get_structure_by_material_id(mp_id)
print(structure)
Full Formula (Li14 Co9 P16 O56) Reduced Formula: Li14Co9(P2O7)8 abc : 10.747796 9.625861 12.724342 angles: 68.820392 116.025779 107.299876 Sites (95) # SP a b c magmom --- ---- -------- -------- -------- -------- 0 Li 0.137339 0.92805 0.597441 0 1 Li 0.126045 0.434026 0.0847 0 2 Li 0.626176 0.453868 0.590839 0.001 3 Li 0.373824 0.546132 0.409161 0.001 4 Li 0.021288 0.643996 0.39688 0 5 Li 0.862661 0.07195 0.402559 0 6 Li 0.978712 0.356004 0.60312 0 7 Li 0.497222 0.8674 0.316203 -0 8 Li 0.514158 0.632938 0.173531 -0 9 Li 0.62191 0.955426 0.089457 0.001 10 Li 0.485842 0.367062 0.826469 -0 11 Li 0.37809 0.044574 0.910543 0.001 12 Li 0.502778 0.1326 0.683797 -0 13 Li 0.873955 0.565974 0.9153 0 14 Co 0.744962 0.435377 0.3042 2.768 15 Co 0.264262 0.071531 0.201932 2.762 16 Co 0.217648 0.200486 0.416895 2.746 17 Co 0.735738 0.928469 0.798068 2.762 18 Co 0.255038 0.564623 0.6958 2.768 19 Co 0.782352 0.799514 0.583105 2.747 20 Co 0.780133 0.300909 0.07859 2.739 21 Co 0 0 0 -0.988 22 Co 0.219867 0.699091 0.92141 2.739 23 P 0.700902 0.638321 0.014979 0.007 24 P 0.208131 0.231393 0.659702 0.004 25 P 0.538911 0.196141 0.132759 0.003 26 P 0.052823 0.968562 0.776985 0.009 27 P 0.798275 0.263793 0.843927 0.004 28 P 0.299098 0.361679 0.985021 0.007 29 P 0.050175 0.469029 0.273158 0.007 30 P 0.949825 0.530971 0.726842 0.009 31 P 0.947177 0.031438 0.223015 0.008 32 P 0.461089 0.803859 0.867241 0.003 33 P 0.300562 0.864765 0.485466 0.008 34 P 0.699438 0.135235 0.514534 0.009 35 P 0.201725 0.736207 0.156073 0.004 36 P 0.464356 0.308442 0.367888 0.004 37 P 0.535644 0.691558 0.632112 0.004 38 P 0.791869 0.768607 0.340298 0.006 39 O 0.539863 0.158192 0.024743 0.024 40 O 0.092099 0.652773 0.225938 0.007 41 O 0.176637 0.901046 0.105233 0.036 42 O 0.20505 0.21303 0.022179 0.018 43 O 0.907901 0.347227 0.774062 0.008 44 O 0.716621 0.007461 0.47944 0.025 45 O 0.687158 0.754916 0.709086 0.053 46 O 0.954695 0.45511 0.336803 0.025 47 O 0.27639 0.492284 0.014508 0.026 48 O 0.8474 0.341196 0.944993 0.032 49 O 0.458339 0.562539 0.70479 0.025 50 O 0.043629 0.050809 0.156863 0.029 51 O 0.542044 0.165795 0.421783 0.003 52 O 0.540547 0.662135 0.919652 0.002 53 O 0.985828 0.405574 0.162943 0.026 54 O 0.302814 0.399019 0.860061 0.026 55 O 0.283379 0.992539 0.52056 0.024 56 O 0.312842 0.245084 0.290914 0.053 57 O 0.79495 0.78697 0.977821 0.018 58 O 0.354953 0.203087 0.752629 0.001 59 O 0.180042 0.392693 0.609766 0.03 60 O 0.808738 0.58249 0.640002 0.037 61 O 0.956371 0.949191 0.843137 0.029 62 O 0.308298 0.743719 0.790965 0.05 63 O 0.460137 0.841808 0.975257 0.024 64 O 0.72361 0.507716 0.985492 0.026 65 O 0.200766 0.718122 0.515678 0.026 66 O 0.459453 0.337865 0.080348 0.002 67 O 0.34922 0.712757 0.247493 0.002 68 O 0.98317 0.904386 0.66758 0.026 69 O 0.045305 0.54489 0.663197 0.023 70 O 0.539787 0.65326 0.525967 0.024 71 O 0.193456 0.914965 0.862184 0.036 72 O 0.093481 0.150897 0.728314 0.008 73 O 0.906519 0.849103 0.271686 0.008 74 O 0.536855 0.934374 0.793678 0.026 75 O 0.191262 0.41751 0.359998 0.037 76 O 0.823363 0.098954 0.894767 0.036 77 O 0.819958 0.607307 0.390234 0.028 78 O 0.1526 0.658804 0.055007 0.032 79 O 0.460213 0.34674 0.474033 0.021 80 O 0.541661 0.437461 0.29521 0.023 81 O 0.841986 0.849279 0.439014 0.03 82 O 0.65078 0.287243 0.752507 0.002 83 O 0.697186 0.600981 0.139939 0.028 84 O 0.699212 0.094667 0.641348 0.027 85 O 0.014173 0.594426 0.837057 0.026 86 O 0.158014 0.150721 0.560986 0.034 87 O 0.300788 0.905333 0.358652 0.027 88 O 0.806544 0.085035 0.137816 0.036 89 O 0.01683 0.095614 0.33242 0.026 90 O 0.691702 0.256281 0.209035 0.05 91 O 0.463145 0.065626 0.206322 0.026 92 O 0.645047 0.796913 0.247371 0.001 93 O 0.457956 0.834205 0.578217 0.003 94 O 0.799234 0.281878 0.484322 0.026
mgmmnt = CollinearMagneticStructureAnalyzer(
structure_from_mp, overwrite_magmom_mode="replace_all_if_undefined"
)
mgmmnt.is_magnetic
True
mgmmnt.magnetic_species_and_magmoms
{'Co': [0.988, 2.739, 2.746, 2.747, 2.762, 2.768]}
mgmmnt.ordering
<Ordering.FiM: 'FiM'>