Skip to content

Commit

Permalink
f fam
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Dec 7, 2024
1 parent d560715 commit 0c6308a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arc/reaction/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ def determine_possible_reaction_products_from_family(rxn: 'ARCReaction',
product_dicts = list()
family = ReactionFamily(label=family_label, consider_arc_families=consider_arc_families)
products = family.generate_products(reactants=rxn.get_reactants_and_products(arc=True, return_copies=True)[0])
if products: # changed
if products:
for group_labels, product_lists in products.items():
for product_list in product_lists:
product_dicts.append({'family': family_label,
'group_labels': group_labels,
'products': product_list[0],
'label_map': {k: v for k, v in product_list[1].items() if v},
'label_map': {val: key for key, val in product_list[1].items() if val},
'own_reverse': family.own_reverse,
'discovered_in_reverse': reverse,
})
Expand Down Expand Up @@ -501,7 +501,7 @@ def check_product_isomorphism(products: List['Molecule'],
return products[0].is_isomorphic(p_species[0].mol)
if len(products) == 2:
for i in [0, 1]:
if products[0].is_isomorphic(p_species[i].mol) and products[1].is_isomorphic(p_species[not i].mol): # AttributeError: 'list' object has no attribute 'is_isomorphic'
if products[0].is_isomorphic(p_species[i].mol) and products[1].is_isomorphic(p_species[not i].mol):
return True
return False

Expand Down

0 comments on commit 0c6308a

Please sign in to comment.