@@ -916,15 +916,19 @@ def generatePairs(self):
916916 productOxygens = [sum ([1 for atom in product .molecule [0 ].atoms if atom .isOxygen ()]) for product in products ]
917917 reactantNitrogens = [sum ([1 for atom in reactant .molecule [0 ].atoms if atom .isNitrogen ()]) for reactant in reactants ]
918918 productNitrogens = [sum ([1 for atom in product .molecule [0 ].atoms if atom .isNitrogen ()]) for product in products ]
919+ reactantSilicons = [sum ([1 for atom in reactant .molecule [0 ].atoms if atom .isSilicon ()]) for reactant in reactants ]
920+ productSilicons = [sum ([1 for atom in product .molecule [0 ].atoms if atom .isSilicon ()]) for product in products ]
919921 reactantSulfurs = [sum ([1 for atom in reactant .molecule [0 ].atoms if atom .isSulfur ()]) for reactant in reactants ]
920922 productSulfurs = [sum ([1 for atom in product .molecule [0 ].atoms if atom .isSulfur ()]) for product in products ]
923+ reactantChlorines = [sum ([1 for atom in reactant .molecule [0 ].atoms if atom .isChlorine ()]) for reactant in reactants ]
924+ productChlorines = [sum ([1 for atom in product .molecule [0 ].atoms if atom .isChlorine ()]) for product in products ]
921925
922926 # Sort the reactants and products by C/O/N/S numbers
923- reactants = [(carbon , oxygen , nitrogen , sulfur , reactant ) for carbon , oxygen , nitrogen , sulfur , reactant
924- in zip (reactantCarbons ,reactantOxygens ,reactantNitrogens ,reactantSulfurs ,reactants )]
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 )]
925929 reactants .sort ()
926- products = [(carbon , oxygen , nitrogen , sulfur , product ) for carbon , oxygen , nitrogen , sulfur , product
927- in zip (productCarbons ,productOxygens ,productNitrogens ,productSulfurs ,products )]
930+ products = [(carbon , oxygen , nitrogen , silicon , sulfur , chlorine , reactant ) for carbon , oxygen , nitrogen , silicon , sulfur , chlorine , reactant
931+ in zip (productCarbons ,productOxygens ,productNitrogens ,productSilicons , productSulfurs , productChlorines ,products )]
928932 products .sort ()
929933
930934 while len (reactants ) > 1 and len (products ) > 1 :
0 commit comments