You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new version of spglib (I am not sure starting from which one) the spacegroup symbol for orthorhombic systems seems to have changed. Taking for example mp-569450 the symbol in the materials project db is Cm2m, while the SpacegroupAnalyzer returns Amm2. Based on a quick test the problem seems to be there for several space groups with number between 16 and 75.
Apart from the compatibility with the information previously obtained, this change leads to an error when trying to obtain the high symmetry path for some of these materials.
Example code
from pymatgen import MPRester, Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.symmetry.bandstructure import HighSymmKpath
data = MPRester().get_data('mp-569450')[0]
s = Structure.from_str(data['cif'], fmt='cif')
print SpacegroupAnalyzer(s).get_spacegroup_symbol(), data['spacegroup']['symbol']
HighSymmKpath(s)
Error message
pymatgen/symmetry/bandstructure.py:99: UserWarning: Unexpected value for spg_symbol: Amm2
Suggested solution (if any)
At least for HighSymmPath, as it seems that in some cases symbols containing a C has been consistently replaced with symbols containing an A, a simple solution could be to replace line 96 of symmetry/bandstucture.py with elif "C" in spg_symbol or "A" in spg_symbol:
but maybe it would be necessary to verify explicitly that this will be the intended behaviour for all the modified symbols.
The text was updated successfully, but these errors were encountered:
@hautierg will need to fix this. In general, the bandstructure code should not depend on specific crystallographic settings for centered lattices. Cm2m and Amm2 are perfectly valid representations of spacegroup 38.
System
Summary
With the new version of spglib (I am not sure starting from which one) the spacegroup symbol for orthorhombic systems seems to have changed. Taking for example mp-569450 the symbol in the materials project db is Cm2m, while the SpacegroupAnalyzer returns Amm2. Based on a quick test the problem seems to be there for several space groups with number between 16 and 75.
Apart from the compatibility with the information previously obtained, this change leads to an error when trying to obtain the high symmetry path for some of these materials.
Example code
Error message
pymatgen/symmetry/bandstructure.py:99: UserWarning: Unexpected value for spg_symbol: Amm2
Suggested solution (if any)
At least for HighSymmPath, as it seems that in some cases symbols containing a C has been consistently replaced with symbols containing an A, a simple solution could be to replace line 96 of symmetry/bandstucture.py with
elif "C" in spg_symbol or "A" in spg_symbol:
but maybe it would be necessary to verify explicitly that this will be the intended behaviour for all the modified symbols.
The text was updated successfully, but these errors were encountered: