validate_mapping#
- validate_mapping(orig_graph, correct_graph, mapping)[source]#
Validate that a given atom mapping preserves the connectivity between two molecular graphs.
- Parameters:
orig_graph (networkx.Graph) – The graph representation of the original molecule.
correct_graph (networkx.Graph) – The graph representation of the target molecule.
mapping (dict) – A dictionary mapping node indices from orig_graph to correct_graph.
- Return type:
None
- Raises:
ValueError – If the mapping does not preserve the connectivity between the two graphs.