reverse()
The reverse reaction: breaking and forming swap, and so do the change slots.
Usage
reverse(gra: R) -> R
reverse(gra: ReactionGraph | StereoReactionGraph) -> ReactionGraph | StereoReactionGraphThe TS slot of each change stays as it is.
>>> g = ReactionGraph(
... symbols=["H", "H", "H"], bonds=[(0, 1), (1, 2)], breaking=[(0, 1)],
... forming=[(1, 2)],
... )
>>> reverse(g).breaking((1, 2),)