def get_equivalent_atoms(mol_file1, mol_file2): """Get a dictionary of equivalent atom pairs based on bonds mol_file1 -- path to a .mol file mol_file2 -- path to a second .mol file Will return an empty dictionary if no mapping is found """ # Get coordinates and number atoms from a mol file coords_and_bonds1 = Iab.coords_to_lists(mol_file1) # Construct graph where nodes are atom numbers and edges are bonds G1 = Iab.construct_graph(coords_and_bonds1) # Get coordinates and number atoms for molecule 2 coords_and_bonds2 = Iab.coords_to_lists(mol_file2) # Construct graph where nodes are atom numbers and edges are bonds # for molecule 2 G2 = Iab.construct_graph(coords_and_bonds2) # Find the combination of atoms that exclude the hydroxyl protons # and return the mapping dictionary return [Iab.get_redox_graph_mapping(G1, G2), coords_and_bonds1, \ coords_and_bonds2, G1, G2]