Skip to content

Commit 3465eb9

Browse files
committed
Added I to generatePairs() in reaction.py
1 parent 5f7e063 commit 3465eb9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

rmgpy/reaction.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -922,22 +922,24 @@ def generatePairs(self):
922922
productSulfurs = [sum([1 for atom in product.molecule[0].atoms if atom.isSulfur()]) for product in products ]
923923
reactantChlorines = [sum([1 for atom in reactant.molecule[0].atoms if atom.isChlorine()]) for reactant in reactants]
924924
productChlorines = [sum([1 for atom in product.molecule[0].atoms if atom.isChlorine()]) for product in products ]
925+
reactantIodines = [sum([1 for atom in reactant.molecule[0].atoms if atom.isChlorine()]) for reactant in reactants]
926+
productIodines = [sum([1 for atom in product.molecule[0].atoms if atom.isChlorine()]) for product in products ]
925927

926928
# Sort the reactants and products by C/O/N/S numbers
927-
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, reactant
928-
in zip(reactantCarbons,reactantOxygens,reactantNitrogens,reactantSilicons,reactantSulfurs,reactantChlorines,reactants)]
929+
reactants = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, reactant
930+
in zip(reactantCarbons,reactantOxygens,reactantNitrogens,reactantSilicons,reactantSulfurs,reactantChlorines, reactantIodines, reactants)]
929931
reactants.sort()
930-
products = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, product) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, product
931-
in zip(productCarbons,productOxygens,productNitrogens,productSilicons,productSulfurs,productChlorines,products)]
932+
products = [(carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, product) for carbon, oxygen, nitrogen, silicon, sulfur, chlorine, iodine, product
933+
in zip(productCarbons,productOxygens,productNitrogens,productSilicons,productSulfurs,productChlorines, productIodines, products)]
932934
products.sort()
933935

934936
while len(reactants) > 1 and len(products) > 1:
935-
self.pairs.append((reactants[-1][6], products[-1][6]))
937+
self.pairs.append((reactants[-1][-1], products[-1][-1]))
936938
reactants.pop()
937939
products.pop()
938940
for reactant in reactants:
939941
for product in products:
940-
self.pairs.append((reactant[6], product[6]))
942+
self.pairs.append((reactant[-1], product[-1]))
941943

942944
def draw(self, path):
943945
"""

0 commit comments

Comments
 (0)