Shifting of site coordinates in pymatgen.core.structure.Structure

For several materials, the site coordinates in pymatgen.core.structure.Structure do not seem to match those that are present in the .cif files downloaded from the Materials Project website. Specifically, the last column always remains the same, but the first two column coordinates seem to get shuffled around. If I’m getting something wrong, please let me know as well. Here are some examples of the first two columns getting shuffled:


Example 1 - Material with id mp-6499 :

Code:

with MPRester(myapikey) as mpr:
    res = mpr.summary.search(material_ids=['mp-6499']
)
print(res[0].structure)

Output:

...
abc   :   7.195157   6.591124   7.577377
angles:  61.623832  90.000000  90.000000
pbc   :       True       True       True
Sites (24)
  #  SP           a         b         c    magmom
---  ----  --------  --------  --------  --------
0  Ba    0.360454  0.824923  0.339831        -0
1  Ba    0.860454  0.175077  0.160169        -0
2  Ba    0.639546  0.175077  0.660169        -0
3  Ba    0.139546  0.824923  0.839831        -0
4  Li    0.427014  0.404811  0.196796        -0
5  Li    0.927014  0.595189  0.303204        -0
6  Li    0.572986  0.595189  0.803204        -0
7  Li    0.072986  0.404811  0.696796        -0
8  B     0.661475  0.712471  0.081536        -0
9  B     0.161475  0.287529  0.418464        -0
10  B     0.338525  0.287529  0.918464        -0
11  B     0.838525  0.712471  0.581536        -0
12  O     0.18434   0.143722  0.977251         0
13  O     0.159652  0.483229  0.228999         0
14  O     0.840348  0.516771  0.771001         0
15  O     0.340348  0.483229  0.728999         0
16  O     0.005647  0.242693  0.540414         0
17  O     0.505647  0.757307  0.959586         0
18  O     0.994353  0.757307  0.459586         0
19  O     0.494353  0.242693  0.040414         0
20  O     0.81566   0.856278  0.022749         0
21  O     0.31566   0.143722  0.477251         0
22  O     0.659652  0.516771  0.271001         0
23  O     0.68434   0.856278  0.522749         0

Compare the above with the site coordinates from the downloaded .cif file:

...
_cell_length_a   6.59112400
_cell_length_b   7.19515700
_cell_length_c   7.57737661
_cell_angle_alpha   90.00000000
_cell_angle_beta   118.37616816
_cell_angle_gamma   90.00000000
...
Ba2+  Ba0  1  0.17507700  0.63954600  0.33983100  1
Ba2+  Ba1  1  0.82492300  0.13954600  0.16016900  1
Ba2+  Ba2  1  0.82492300  0.36045400  0.66016900  1
Ba2+  Ba3  1  0.17507700  0.86045400  0.83983100  1
Li+  Li4  1  0.59518900  0.57298600  0.19679600  1
Li+  Li5  1  0.40481100  0.07298600  0.30320400  1
Li+  Li6  1  0.40481100  0.42701400  0.80320400  1
Li+  Li7  1  0.59518900  0.92701400  0.69679600  1
B3+  B8  1  0.28752900  0.33852500  0.08153600  1
B3+  B9  1  0.71247100  0.83852500  0.41846400  1
B3+  B10  1  0.71247100  0.66147500  0.91846400  1
B3+  B11  1  0.28752900  0.16147500  0.58153600  1
O2-  O12  1  0.85627800  0.81566000  0.97725100  1
O2-  O13  1  0.51677100  0.84034800  0.22899900  1
O2-  O14  1  0.48322900  0.15965200  0.77100100  1
O2-  O15  1  0.51677100  0.65965200  0.72899900  1
O2-  O16  1  0.75730700  0.99435300  0.54041400  1
O2-  O17  1  0.24269300  0.49435300  0.95958600  1
O2-  O18  1  0.24269300  0.00564700  0.45958600  1
O2-  O19  1  0.75730700  0.50564700  0.04041400  1
O2-  O20  1  0.14372200  0.18434000  0.02274900  1
O2-  O21  1  0.85627800  0.68434000  0.47725100  1
O2-  O22  1  0.48322900  0.34034800  0.27100100  1
O2-  O23  1  0.14372200  0.31566000  0.52274900  1

Checking for the Ba atoms is enough to see the last column remains the same but the first two get shifted around, but this happens for all atoms.


For another random material:

Example 2 - Material with id mp-1029776

Code:

from pymatgen.ext.matproj import MPRester
with MPRester(myapikey) as mpr:
    res = mpr.summary.search(material_ids=['mp-1029776']
)
print(res[0].structure)

Output:

....
abc   :   6.684071   5.549288   5.605421
angles:  87.662729  90.000000  90.000000
pbc   :       True       True       True
Sites (20)
#  SP           a         b         c    magmom
---  ----  --------  --------  --------  --------
0  Li    0.597237  0.093096  0.316577        -0
1  Li    0.097237  0.406904  0.683423        -0
2  Li    0.402763  0.906904  0.683423        -0
3  Li    0.902763  0.593096  0.316577        -0
4  Li    0.836694  0.273398  0.05398         -0
5  Li    0.336694  0.226602  0.94602         -0
6  Li    0.163306  0.726602  0.94602         -0
7  Li    0.663306  0.773398  0.05398         -0
8  Ge    0.63771   0.425499  0.650071        -0
9  Ge    0.13771   0.074501  0.349929        -0
10  Ge    0.36229   0.574501  0.349929        -0
11  Ge    0.86229   0.925499  0.650071        -0
12  N     0.148847  0.396366  0.228562         0
13  N     0.648847  0.103634  0.771438         0
14  N     0.851153  0.603634  0.771438         0
15  N     0.351153  0.896366  0.228562         0
16  N     0.622363  0.450511  0.3031           0
17  N     0.122363  0.049489  0.6969           0
18  N     0.377637  0.549489  0.6969           0
19  N     0.877637  0.950511  0.3031           0

But compare the above with the site coordinates from the downloaded .cif file:

...
_cell_length_a   5.54928800
_cell_length_b   6.68407100
_cell_length_c   5.60542128
_cell_angle_alpha   90.00000000
_cell_angle_beta   92.33727147
_cell_angle_gamma   90.00000000
...
Li+  Li0  1  0.90690400  0.59723700  0.31657700  1
Li+  Li1  1  0.59309600  0.09723700  0.68342300  1
Li+  Li2  1  0.09309600  0.40276300  0.68342300  1
Li+  Li3  1  0.40690400  0.90276300  0.31657700  1
Li+  Li4  1  0.72660200  0.83669400  0.05398000  1
Li+  Li5  1  0.77339800  0.33669400  0.94602000  1
Li+  Li6  1  0.27339800  0.16330600  0.94602000  1
Li+  Li7  1  0.22660200  0.66330600  0.05398000  1
Ge4+  Ge8  1  0.57450100  0.63771000  0.65007100  1
Ge4+  Ge9  1  0.92549900  0.13771000  0.34992900  1
Ge4+  Ge10  1  0.42549900  0.36229000  0.34992900  1
Ge4+  Ge11  1  0.07450100  0.86229000  0.65007100  1
N3-  N12  1  0.60363400  0.14884700  0.22856200  1
N3-  N13  1  0.89636600  0.64884700  0.77143800  1
N3-  N14  1  0.39636600  0.85115300  0.77143800  1
N3-  N15  1  0.10363400  0.35115300  0.22856200  1
N3-  N16  1  0.54948900  0.62236300  0.30310000  1
N3-  N17  1  0.95051100  0.12236300  0.69690000  1
N3-  N18  1  0.45051100  0.37763700  0.69690000  1
N3-  N19  1  0.04948900  0.87763700  0.30310000  1

Once again, the last column remains the same, while values in the first two columns are shifted around.


My pymatgen version:

2023.7.20