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 True if vertex vertex1 from the first graph is a feasible match for vertex vertex2 from the second graph, or False if 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, strict)

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)

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, strict)

Return True if graph graph1 is isomorphic to graph graph2 with the optional initial mapping initial_mapping, or False otherwise.

is_subgraph_isomorphic(graph1, graph2, initial_mapping, save_order)

Return True if graph graph1 is subgraph isomorphic to subgraph graph2 with the optional initial mapping initial_mapping, or False otherwise.