Repository navigation
Added
-
enantiomer(g),is_chiral(g)andcanonical_enantiomer(g)for the four graph
types (P50, P60).enantiomerinverts every chiral LS (Tetrahedral,AtropBond,
TrigonalBipyramidal,Octahedral, and a reaction graph's change slots), keeping
planar bonds, undetermined LS and atom indices.is_chiralcompares the canonical
JSON of the two, a reaction graph's in its canonical direction (P75: N inversion,
whose mirror image is its own reverse, is achiral).canonical_enantiomerreturns whichever has the smaller canonical
JSON (a tie keepsg); on a reaction graph each is compared in its canonical
direction, so the choice doesn't depend on the direction. -
The canonical TS, documented in
user_guide/02-identity.qmdand tested:
canonical_direction(canonical_enantiomer(ts))is the same for a TS, its reverse,
its mirror image and the mirror image reversed (P60). No new function. -
from_reaction_smiles(smiles, *, charge=None, spin=None)reads an atom-mapped
reaction SMILES into aStereoReactionGraph(P62): atom k is the atom with the k-th
smallest map number, each side is perceived asfrom_smilesdoes, and thets
slots are set by the TS-slot rules, aslow_tsets them (it is a reader, P84).
Every atom, H included, must be mapped, and both sides must have the same map
numbers; the default spin is the lower of the two
sides' radical counts. -
stereoisomers(g)forStereoMolGraph(P65): the distinct
determined stereoisomers, both mirror images kept, withg's atom indices. Every
undetermined LS takes each configuration, determined ones are kept, and the results
are deduplicated up to atom numbering. It takes stereo graphs only (P83): a
MolGraphorReactionGraphraisesTypeError, and gets its sites first with
stereoisomers(low_t(g)). Gives StereoMolGraph SI-001's 10 stereoisomers. An
allene's two collapse to one, as the back-end drops chain LS (P45). On a
StereoReactionGraph(P74), each change's side slots are expanded and itstsslot
follows by the TS-slot rules, so the results are the channels: a rotation's two
twisted TSs, an open SN2 centre's backside and frontside TSs and their mirror
images. A bifurcation'stsslot stays undetermined (one channel per product). -
transition_state(srg)(P74, P5): where the TS-slot rules leave a change'sts
slot undetermined with its sides determined (a bifurcation), the side slots become
undetermined too, so a bifurcation's channels give one TS graph; any other graph is
returned as it is. -
rings(g)andreacting_core(g)(P85, P67), for any graph:ringsis a minimum
cycle basis (SSSR) of the condensed graph, each ring in cycle order from its lowest
atom toward the lower of its ring neighbours, the list sorted (rings are fluxional
in v1, P88);reacting_coreis the atoms CREST holds at a TS, those of the
breaking and forming bonds, or of the changing sites when no bond changes. -
rotors(g) -> list[Rotor]andRotor(axis, top), a frozen model (P63, P85, P86),
for stereo graphs only (P83): a bond with no bond LS, in no ring, with a neighbour
beyond each end and no linear (sp) end is a rotor axis; a linear chain gives one
axis between its outer ends (2-butyne).topis the smaller side, with no axis
atom (MESS'sGroup). At a TS the condensed graph is read, its rings are rigid, a
transferred atom counts as linear, and a bond LS in any slot of a change holds its
bond. -
umbrellas(g) -> list[Umbrella]andUmbrella(center, neighbors), a frozen model
(P63, P87), for stereo graphs only: an atom with three neighbours, at no atom LS's
centre or bond LS's end, that is an N, P or As with a lone pair or a radical C
([CH3]; a high-T NH3). At a TS the condensed graph's neighbours and every change
slot count. -
symmetry_number(g)(P64, P89, P90), for stereo graphs only: the number of
stereo-preserving automorphisms, the total σ for MESS'sSymmetryFactor(every
rotor atSymmetry 1); a TS's on its condensed graph, its change slots included.
Chain LS count (allene 4), filtered on the back-end's automorphisms. It raises
GraphErrorfor an undetermined LS (an undeterminedtsslot is allowed) and for a
flexible ring of 4 or more atoms (a bond no bond LS holds), until a ring model
exists. Tested on the Experiments-SymmetryNumberssigma.csvandkinbot.csv
sets (tests/data/symmetry_numbers/, aslowmarker), with the species where
|Aut| differs from the expected value listed with the reason.
Changed
- TS sites (P67-P74, P80, P81): the
tsslot of each change at a TS site (an LS with
an atom in the reacting core: the atoms of the breaking and forming bonds, or of the
changing site when no bond changes) is now set by rule, where it was alwaysNone.
One side only: that side's LS, or undetermined when the other side has a triple
bond there (a bifurcation); a centre that swaps a neighbour: the backside
TrigonalBipyramidal(inversion) or aTetrahedralwithNonewhere the leaving
and attacking atoms meet (retention); a rotation: anAtropBond, undetermined,
whose two paritiesstereoisomersgives; a lone-pair inversion:None. The rules
are the low-T scheme's (P84):low_tand the readerfrom_reaction_smilesset the
slots, whilets_graphsandreaction_graph(which build a reaction graph from its
sides) and the constructors leave them empty. The pipeline for a TS is
ts_graphs→low_t→stereoisomers, sots_graphsgives one channel per
topology and side stereo, and a rotation's two twisted TSs are
stereoisomers(low_t(ch)). A TS's graph fromlow_t, and so its canonical JSON,
changes (examples.abstraction_ts(), which islow_tof its channel, among them);
species graphs don't. geometry_mismatchestakes a reaction graph's geometry to be its TS's (P69, P82):
it reads the determinedtsslots too (aTrigonalBipyramidalas stereomolgraph
reads one: the widest angle is axial), and its newreacting_bondsfield lists the
breaking and forming bonds that aren't partial (a full bond, up to 1.05 times the
covalent-radius sum, or longer than twice it). An end point is checked on its side,
geometry_mismatches(products(ts), geo).canonical_form,canonical_json,relabelandcanonical_directionaccept a
union argument (AnyGraph, orReactionGraph | StereoReactionGraphfor
canonical_direction), which ty rejected before; a precise argument still gives the
precise type back (P59). So doreverseandremove_stereo(P76). Typing only.