Skip to content

Commit ed323a8

Browse files
committed
Avoid generating a charged chlorine atomType in isomorphismTest
1 parent 9920774 commit ed323a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rmgpy/molecule/isomorphismTest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def load_cases_molecule_atom_types():
140140
'''
141141
output = []
142142
a_types = list(itertools.product(molecule_atom_types, repeat=2))
143+
uncharged_a_types = ['Cl']
143144
unpaired_electrons = list(itertools.product(range(3), repeat=2))
144145
cross_element_unpaired = list(itertools.product(a_types,unpaired_electrons))
145146
for item in cross_element_unpaired:
@@ -155,7 +156,10 @@ def load_cases_molecule_atom_types():
155156
for now, only allow charges up to +1, not +2, +3, even
156157
if the unspecified valency allows for that.
157158
'''
158-
charges.append(range(min(val,1)+1))
159+
if el not in uncharged_a_types:
160+
charges.append(range(min(val,1)+1))
161+
else:
162+
charges.append((0,0))
159163

160164
charge_combos = list(itertools.product(charges[0],charges[1]))#cross product for both graphs
161165
for charge_combo in charge_combos:#combine charge tuple with the cross product of element and unpaired

0 commit comments

Comments
 (0)