Skip to content

Commit e65abc8

Browse files
committed
BUG: fix order of symops in FindSpaceGroup result
1 parent a0ec81c commit e65abc8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/diffpy/structure/spacegroups.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def FindSpaceGroup(symops, shuffle=False):
109109
sameorder = all(str(o0) == str(o1) for o0, o1 in zz)
110110
if not sameorder:
111111
rv = copy.copy(rv)
112+
rv.symop_list = symops
112113
return rv
113114

114115

src/diffpy/structure/tests/testspacegroups.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def test_FindSpaceGroup(self):
3939
self.assertIs(sg123, FindSpaceGroup(ops123))
4040
sg123r = FindSpaceGroup(ops123[::-1])
4141
self.assertIsNot(sg123, sg123r)
42+
self.assertIsNot(sg123.symop_list, sg123r.symop_list)
43+
self.assertEqual(ops123[::-1], sg123r.symop_list)
4244
self.assertEqual(_hashSymOpList(sg123.symop_list),
4345
_hashSymOpList(sg123r.symop_list))
4446
self.assertIs(sg123, FindSpaceGroup(ops123[::-1], shuffle=True))

0 commit comments

Comments
 (0)