rmgpy.molecule.vf2.VF2¶
- class rmgpy.molecule.vf2.VF2¶
An implementation of the second version of the Vento-Foggia (VF2) algorithm for graph and subgraph isomorphism.
- feasible(vertex1, vertex2)¶
Return
Trueif vertex vertex1 from the first graph is a feasible match for vertex vertex2 from the second graph, orFalseif not. The semantic and structural relationship of the vertices is evaluated, including several structural “look-aheads” that cheaply eliminate many otherwise feasible pairs.
- find_isomorphism(graph1, graph2, initial_mapping, save_order=False, strict=True)¶
Return a list of dicts of all valid isomorphism mappings from graph graph1 to graph graph2 with the optional initial mapping initial_mapping. If no valid isomorphisms are found, an empty list is returned.
- find_subgraph_isomorphisms(graph1, graph2, initial_mapping, save_order=False)¶
Return a list of dicts of all valid subgraph isomorphism mappings from graph graph1 to subgraph graph2 with the optional initial mapping initial_mapping. If no valid subgraph isomorphisms are found, an empty list is returned.
- is_isomorphic(graph1, graph2, initial_mapping, save_order=False, strict=True)¶
Return
Trueif graph graph1 is isomorphic to graph graph2 with the optional initial mapping initial_mapping, orFalseotherwise.
- is_subgraph_isomorphic(graph1, graph2, initial_mapping, save_order=False)¶
Return
Trueif graph graph1 is subgraph isomorphic to subgraph graph2 with the optional initial mapping initial_mapping, orFalseotherwise.