# API Reference


## Classes


Core classes


[Rotor](Rotor.md#protomol.Rotor)  
A hindered rotor: the torsion about `axis` that turns `top` (P85, P86).

[Umbrella](Umbrella.md#protomol.Umbrella)  
A pyramidal centre left flexible: its inversion is a double well (P87).

[AtropBond](AtropBond.md#protomol.AtropBond)  
A rigid single bond (atropisomer) or an even cumulated chain (allene axis).

[Octahedral](Octahedral.md#protomol.Octahedral)  
An octahedral centre: (center, n1, …, n6), n1 trans to n2, n3 to n5, n4 to n6.

[PlanarBond](PlanarBond.md#protomol.PlanarBond)  
A planar bond or an odd cumulated chain: (a, b, end1, end2, c, d).

[SquarePlanar](SquarePlanar.md#protomol.SquarePlanar)  
A square-planar centre: (center, n1, n2, n3, n4).

[StereoChange](StereoChange.md#protomol.StereoChange)  
One stereo site that changes in a reaction: its LS on each side and at the TS.

[Tetrahedral](Tetrahedral.md#protomol.Tetrahedral)  
A tetrahedral centre: (center, n1, n2, n3, n4).

[TrigonalBipyramidal](TrigonalBipyramidal.md#protomol.TrigonalBipyramidal)  
A trigonal-bipyramidal centre: (center, a1, a2, e1, e2, e3), e.g. an SN2 TS.

[MolGraph](MolGraph.md#protomol.MolGraph)  
A molecular graph: element symbols and bonds (pairs of atom indices).

[ReactionGraph](ReactionGraph.md#protomol.ReactionGraph)  
A reaction or TS graph.

[StereoMolGraph](StereoMolGraph.md#protomol.StereoMolGraph)  
A molecular graph with local stereodescriptors (LS).

[StereoReactionGraph](StereoReactionGraph.md#protomol.StereoReactionGraph)  
A reaction or TS graph with stereo.


## Dataclasses


Data-holding classes


[GeometryMismatches](GeometryMismatches.md#protomol.GeometryMismatches)  
Where a graph and a geometry disagree (`geometry_mismatches`).


## Exceptions


Exception classes


[GraphError](GraphError.md#protomol.GraphError)  
Invalid graph input (stereomol's GraphError).


## Functions


Public functions


[canonical_direction()](canonical_direction.md#protomol.canonical_direction)  
`gra` or its reverse with the smaller canonical JSON, and whether reversed.

[canonical_enantiomer()](canonical_enantiomer.md#protomol.canonical_enantiomer)  
`gra` or its `enantiomer`, whichever has the smaller canonical JSON.

[canonical_form()](canonical_form.md#protomol.canonical_form)  
The canonical graph and the atom map to it: `(canonical, atom_map)`.

[canonical_json()](canonical_json.md#protomol.canonical_json)  
The JSON of the canonical graph: `to_json(canonical_form(gra)[0])`.

[enantiomer()](enantiomer.md#protomol.enantiomer)  
The mirror image: every chiral LS inverted, atom indices kept.

[is_chiral()](is_chiral.md#protomol.is_chiral)  
Whether the graph differs from its mirror image, up to atom numbering.

[ts_graphs()](ts_graphs.md#protomol.ts_graphs)  
The topologically distinct TS channels from reactants to products (CCV).

[deduplicate()](deduplicate.md#protomol.deduplicate)  
The first graph of each isomorphism class, in input order.

[isomorphism()](isomorphism.md#protomol.isomorphism)  
An atom map `m` with `relabel(g1, m) == g2`, or None if there is none.

[display()](display.md#protomol.display)  
Show the graph in Jupyter.

[reacting_core()](reacting_core.md#protomol.reacting_core)  
The atoms CREST holds at a TS: those of the breaking and forming bonds (P67).

[rings()](rings.md#protomol.rings)  
The rings of a graph: a minimum cycle basis (SSSR), sorted (P85).

[rotors()](rotors.md#protomol.rotors)  
The hindered rotors of a stereo graph, sorted by their axes' atoms (P86).

[symmetry_number()](symmetry_number.md#protomol.symmetry_number)  
The symmetry number: the number of stereo-preserving automorphisms (P89).

[umbrellas()](umbrellas.md#protomol.umbrellas)  
The pyramidal centres the LS leave flexible, sorted by centre (P87).

[embed()](embed.md#protomol.embed)  
A 3D geometry of the graph, in its atom order, with its charge and spin.

[from_geometry()](from_geometry.md#protomol.from_geometry)  
The stereo graph of a geometry, keeping its atom order.

[geometry_mismatches()](geometry_mismatches.md#protomol.geometry_mismatches)  
Where the graph and the geometry disagree, atom i on atom i.

[stereoisomers()](stereoisomers.md#protomol.stereoisomers)  
The distinct determined stereoisomers of a stereo graph, mirror images too.

[transition_state()](transition_state.md#protomol.transition_state)  
The TS of a channel: the side slots its TS doesn't fix made undetermined.

[from_json()](from_json.md#protomol.from_json)  
The graph of the type named in the JSON, validated in strict mode.

[to_json()](to_json.md#protomol.to_json)  
The graph as compact JSON: its fields in field order, `type` first.

[low_t()](low_t.md#protomol.low_t)  
The graph with the low-T scheme's stereo sites (P54), keeping its parities.

[products()](products.md#protomol.products)  
The product side, as one (possibly disconnected) graph in the same atom order.

[reactants()](reactants.md#protomol.reactants)  
The reactant side, as one (possibly disconnected) graph in the same atom order.

[reaction_graph()](reaction_graph.md#protomol.reaction_graph)  
The reaction graph of two index-aligned graphs (same symbols, charge and spin).

[relabel()](relabel.md#protomol.relabel)  
The graph with atom k of the result = atom `atom_map[k]` of `gra`.

[reverse()](reverse.md#protomol.reverse)  
The reverse reaction: breaking and forming swap, and so do the change slots.

[without_stereo()](without_stereo.md#protomol.without_stereo)  
The graph without its LS and changes, as a `MolGraph` or a `ReactionGraph`.

[from_reaction_smiles()](from_reaction_smiles.md#protomol.from_reaction_smiles)  
The stereo reaction graph of an atom-mapped reaction SMILES (P62).

[from_smiles()](from_smiles.md#protomol.from_smiles)  
The stereo graph of a SMILES, with every atom explicit (stereomol's index rule).

[invert()](invert.md#protomol.invert)  
The other configuration. An undetermined LS is returned unchanged.

[isomers()](isomers.md#protomol.isomers)  
Every determined configuration of `ls`, in a fixed order.

[site()](site.md#protomol.site)  
The centre atom, or the sorted pair of end atoms (the key in the graph's maps).

[is_determined()](is_determined.md#protomol.is_determined)  
Whether every LS is determined (a workflow graph needs this).

[neighbors()](neighbors.md#protomol.neighbors)  
The sorted neighbours of atom `i`, over every bond (breaking and forming too).

[remove_stereo()](remove_stereo.md#protomol.remove_stereo)  
A new graph without the LS or change at a site.

[stereo_at()](stereo_at.md#protomol.stereo_at)  
The LS or change at a site (a centre atom or a bond's ends), or None.

[with_stereo()](with_stereo.md#protomol.with_stereo)  
A new graph with each item at its site, replacing what was there.

[examples.species()](examples.species.md#protomol.examples.species)  
(E)-pent-3-en-2-ol, one enantiomer: C[C@<span class="citation" data-cites="H">@H</span>](O)/C=C/C (16 atoms, singlet).

[examples.abstraction_ts()](examples.abstraction_ts.md#protomol.examples.abstraction_ts)  
C2H6 + OH → C2H5 + H2O (10 atoms, doublet): H abstraction, one channel.

[examples.stereoisomerization_ts()](examples.stereoisomerization_ts.md#protomol.examples.stereoisomerization_ts)  
26. → (E) but-2-en-1-yl radical (11 atoms, doublet): rotation about C2=C3.


## Type Aliases


Type alias definitions


[AtomStereo](AtomStereo.md#protomol.AtomStereo)  

[BondStereo](BondStereo.md#protomol.BondStereo)  

[Stereo](Stereo.md#protomol.Stereo)  

[AnyGraph](AnyGraph.md#protomol.AnyGraph)  
Any of the four graph types, discriminated by `type` (for a field of a pydantic
