Skip to content

v0.0.4

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 03:55

Added

  • enantiomer(g), is_chiral(g) and canonical_enantiomer(g) for the four graph
    types (P50, P60). enantiomer inverts every chiral LS (Tetrahedral, AtropBond,
    TrigonalBipyramidal, Octahedral, and a reaction graph's change slots), keeping
    planar bonds, undetermined LS and atom indices. is_chiral compares 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_enantiomer returns whichever has the smaller canonical
    JSON (a tie keeps g); 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.qmd and 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 a StereoReactionGraph (P62): atom k is the atom with the k-th
    smallest map number, each side is perceived as from_smiles does, and the ts
    slots are set by the TS-slot rules, as low_t sets 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) for StereoMolGraph (P65): the distinct
    determined stereoisomers, both mirror images kept, with g'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
    MolGraph or ReactionGraph raises TypeError, 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 its ts slot
    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's ts slot stays undetermined (one channel per product).

  • transition_state(srg) (P74, P5): where the TS-slot rules leave a change's ts
    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) and reacting_core(g) (P85, P67), for any graph: rings is 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_core is 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] and Rotor(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). top is the smaller side, with no axis
    atom (MESS's Group). 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] and Umbrella(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's SymmetryFactor (every
    rotor at Symmetry 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
    GraphError for an undetermined LS (an undetermined ts slot 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-SymmetryNumbers sigma.csv and kinbot.csv
    sets (tests/data/symmetry_numbers/, a slow marker), with the species where
    |Aut| differs from the expected value listed with the reason.

Changed

  • TS sites (P67-P74, P80, P81): the ts slot 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 always None.
    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 a Tetrahedral with None where the leaving
    and attacking atoms meet (retention); a rotation: an AtropBond, undetermined,
    whose two parities stereoisomers gives; a lone-pair inversion: None. The rules
    are the low-T scheme's (P84): low_t and the reader from_reaction_smiles set the
    slots, while ts_graphs and reaction_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, so ts_graphs gives one channel per
    topology and side stereo, and a rotation's two twisted TSs are
    stereoisomers(low_t(ch)). A TS's graph from low_t, and so its canonical JSON,
    changes (examples.abstraction_ts(), which is low_t of its channel, among them);
    species graphs don't.
  • geometry_mismatches takes a reaction graph's geometry to be its TS's (P69, P82):
    it reads the determined ts slots too (a TrigonalBipyramidal as stereomolgraph
    reads one: the widest angle is axial), and its new reacting_bonds field 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, relabel and canonical_direction accept a
    union argument (AnyGraph, or ReactionGraph | StereoReactionGraph for
    canonical_direction), which ty rejected before; a precise argument still gives the
    precise type back (P59). So do reverse and remove_stereo (P76). Typing only.