Skip to main content

reverse()

The reverse reaction: breaking and forming swap, and so do the change slots.

Usage

Source

reverse(gra: R) -> R
 
reverse(gra: ReactionGraph | StereoReactionGraph) -> ReactionGraph | StereoReactionGraph

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