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
For example, I would expect the following code to not raise an error: assert SpaceGroup("P3").is_subgroup(SpaceGroup("P3"))
The if j not in all_groups needs to be removed in the first iteration.
Second, the current implementation disregards klassengleiche group-supergroup relationships where the overall translational symmetry is increased, but not through centering. For example, I would expect this to not raise an error: assert SpaceGroup("Fm-3m").is_subgroup(SpaceGroup("Pm-3m"))
This test is failing because the -3 is defined along (111) in m-3m, but along (001) in -3m (therefore, the matrices are different). Generally, this affects all group-subgroup relationships if the groups are in crystal systems with different crystallographic directions / blickrichtungen. For example, this is also failing, assert PointGroup("2").is_subgroup(PointGroup("4"))
because the rotation axis is along c in the tetragonal, but is notated along b in the monoclinic system (in this database).
I would specify this in the warning
* Modified SpaceGroup.is_subgroup() following issue #3937, added tests.
* Added crystal_system attribute to PointGroup, modified is_subgroup warning of SymmetryGroup.
* Modified is_subgroup of PointGroup to raise NotImplementedError if group subgroup relationship would be possible (fr. crystal system), but cannot be checked currently due to crystallographic direction issue.
* Enabled PointGroup init from different settings, added test for that, added missing setting differences (trigonal groups), re-enabled SpaceGroup.is_subgroup shortcut with constraint of non-klassengleiche group subgroup relationship
* Removed bug in short Hermann Mauguin symbol of some trigonal groups introduced by myself in #3859
---------
Signed-off-by: Katharina Ueltzen <94910364+kaueltzen@users.noreply.github.com>
Python version
3.10
Pymatgen version
master
Operating system version
No response
Current behavior
Hey, two remarks regarding the
is_subgroup
method ofSpaceGroup
:First, the current implementation does not allow isomorphic group-subgroup relationships (same space group type) because of
pymatgen/src/pymatgen/symmetry/groups.py
Line 537 in 0234182
For example, I would expect the following code to not raise an error:
assert SpaceGroup("P3").is_subgroup(SpaceGroup("P3"))
The
if j not in all_groups
needs to be removed in the first iteration.Second, the current implementation disregards klassengleiche group-supergroup relationships where the overall translational symmetry is increased, but not through centering. For example, I would expect this to not raise an error:
assert SpaceGroup("Fm-3m").is_subgroup(SpaceGroup("Pm-3m"))
However, because of
pymatgen/src/pymatgen/symmetry/groups.py
Line 528 in 0234182
Also, I had a look at the uncommented
PointGroup
subgroup test:pymatgen/tests/symmetry/test_groups.py
Line 59 in 0234182
This test is failing because the -3 is defined along (111) in m-3m, but along (001) in -3m (therefore, the matrices are different). Generally, this affects all group-subgroup relationships if the groups are in crystal systems with different crystallographic directions / blickrichtungen. For example, this is also failing,
assert PointGroup("2").is_subgroup(PointGroup("4"))
because the rotation axis is along c in the tetragonal, but is notated along b in the monoclinic system (in this database).
I would specify this in the warning
pymatgen/src/pymatgen/symmetry/groups.py
Line 79 in 0234182
In the future, it would probably be best to have a database similar to the maximal subgroup database of space group types.
If you agree, I can implement and test the SpaceGroup changes.
Expected Behavior
I would expect my code snippets from above to not raise an error.
Minimal example
No response
Relevant files to reproduce this bug
No response
The text was updated successfully, but these errors were encountered: