Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacegroup symbol compatibility for orthorhombic systems #374

Closed
gpetretto opened this issue May 13, 2016 · 2 comments
Closed

Spacegroup symbol compatibility for orthorhombic systems #374

gpetretto opened this issue May 13, 2016 · 2 comments
Assignees

Comments

@gpetretto
Copy link
Contributor

System

  • Pymatgen version:3.5.3
  • Python version: 2.7

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

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.

@shyuep
Copy link
Member

shyuep commented May 13, 2016

@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.

@shyuep
Copy link
Member

shyuep commented Aug 8, 2023

Seems like this issue has been defunct for 7 years. Closing....

@shyuep shyuep closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants