Hello again,
I found a potential bug in the SpaceGroup class – specifically one of its class methods. When initiating a SpaceGroup class using the SpaceGroup.from_int_number(), the hexagonal option is not working in some cases. Here’s an example that illustrates the issue:
from pymatgen.symmetry.groups import SpaceGroup
#####
# when I want to load the hexagonal form of this spacegroup, it loads correctly
hexagonal = SpaceGroup.from_int_number(166, hexagonal=True)
# the 'H' at the end of the symbol indicates this is correctly the hexagonal sg
hexagonal.symbol # outputs 'R-3mH'
# the order of the hexagonal sg is correctly 32
hexagonal.order # outputs 32
####
# when I attempt to load the rhombohedral form, it is incorrectly giving me the hexagonal
rhombohedral = SpaceGroup.from_int_number(166, hexagonal=False)
# the symbol should no longer have the 'H' at the end
rhombohedral.symbol # outputs 'R-3mH'
# the order should be 12, not 32
rhombohedral.order # outputs 32
Is this a non-issue? Maybe I’m missunderstanding the SpaceGroup objects. I’m still getting (hexagonal != rhombohedral) == True for the objects above, so maybe there’s a nuance that I’m not seeing.
Any help would be greatly appreciated!
Thanks in advance,
Jack