Skip to content

Commit e249928

Browse files
committed
update identical molecule checking for group allocation
1 parent f9096f4 commit e249928

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CodeEntropy/group_molecules.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def _by_molecules(self, universe):
9898
# atom names as molecule_j, then index i is added to group j
9999
# The index of molecule_j is the group key, the keys are
100100
# all integers, but may not be consecutive numbers.
101-
if number_atoms_i == number_atoms_j and (names_i == names_j).all:
101+
if number_atoms_i == number_atoms_j and all(
102+
i == j for i, j in zip(names_i, names_j)
103+
):
102104
if molecule_j in molecule_groups.keys():
103105
molecule_groups[molecule_j].append(molecule_i)
104106
else:

0 commit comments

Comments
 (0)