stereoisomers()
The distinct determined stereoisomers of a stereo graph, mirror images too.
Usage
stereoisomers(g: StereoMolGraph) -> list[StereoMolGraph]
stereoisomers(g: StereoReactionGraph) -> list[StereoReactionGraph]The graph is expanded at the LS it has: only readers and schemes assign LS (P83), so a MolGraph or ReactionGraph gets its sites first, stereoisomers(low_t(g)). Each undetermined LS takes every configuration, the determined ones are kept, and graphs equal up to atom numbering are given once, the first in the order of isomers (parity 1 first, the lowest site varying slowest). Atom indices are those of g. A determined graph gives itself.
On a reaction graph each change’s side slots are expanded, then its ts slot is set by the TS-slot rules (P70; a determined slot the rules allow is kept), so a rotation gives its two twisted TSs and stereoisomers(low_t(ch)) gives a ts_graphs channel’s TS stereoisomers (P84). A bifurcation’s ts slot stays undetermined: one graph per product configuration, the channels (P74); transition_state gives their shared TS.
>>> from protomol import from_smiles, stereo_at
>>> isos = stereoisomers(from_smiles("CC(O)CC")) # butan-2-ol: (R) and (S)
>>> [stereo_at(smg, 1).parity for smg in isos][1, -1]
>>> len(stereoisomers(from_smiles("CC(O)C(O)C"))) # two centres, one meso form3
Raises
TypeError-
If
gis not a StereoMolGraph or StereoReactionGraph.