orthonym.assembly.stereo_group_names#

Note

Internal API. Names and behaviour may change between releases.

Names with ‘rel’ and ‘rac’ for a molecule whose whole configuration is one OR or AND stereo group.

An OR group of a CXSMILES string (|o1:3,7|) says: one enantiomer, which one is not known (the relative configuration of its members is known). An AND group (|&1:3,7|) says: both enantiomers, a racemate. The Blue Book names both with plain CIP descriptors and a prefix:

  • “Relative configuration”, (the Blue Book): “Relative configuration denoting diastereoisomers may be denoted by using the prefix ‘rel’ which is cited at the front of the name of one enantiomer… This prefix ‘rel’ with plain stereodescriptors is preferred in preferred IUPAC names”; “rel-(1R,2S)-2-chlorocyclopentane-1-carboxylic acid (PIN)… [not rel-(1S,2R)-2-chlorocyclopentane-1-carboxylic acid]”.

  • “Racemates” (:45914, text:45916): “Racemates may be denoted by using the prefix ‘rac’ cited at the front of the name of one enantiomer… This prefix ‘rac’ with plain stereodescriptors is preferred in preferred IUPAC names… When a racemate is described, the stereodescriptor, such as ‘R’ or ‘RS’, is cited for the chirality center having the lowest locant”; “rac-(2R,3R)-3-bromobutan-2-ol (PIN)”, “rac-(2R)-2-bromobutane (PIN)”.

So the name is the name of the enantiomer whose first-cited CIP descriptor is R, with ‘rel-’ or ‘rac-’ in front. Both enantiomers are named by the ordinary, checked path (the drawn structure and its mirror image, each as a string without the group), the one whose leading descriptor block starts with R is taken, and the prefix is added. The prefix only widens what the name says (this enantiomer, or its mirror image), so the name is shipped only when OPSIN reads the name without the prefix back to exactly that enantiomer and reads the whole name to the same structure (OPSIN 2.9.0 reads ‘rel’/’rac’ and keeps the plain descriptors). The tier is the tier the enantiomer’s name earned.

Scope (anything else returns None, and the caller names the string as before, the group’s configuration left out): one fragment; exactly one AND or OR group and no other stereo element (every tetrahedral centre is in the group, no stereo double bond); an OR group of at least two centres (a single centre has no relative configuration), an AND group of at least one; no lone-pair centre (three-connected N, P, S: their SMILES reading differs between RDKit and the standard one); not a group that inverts to itself (a meso structure, named as drawn already); a name that starts with its descriptor block.

When the name does not start with its descriptor block (‘tert-butyl (2R,5S)-…’, ‘N-[(1R,2S)-…]’), the book’s general form is used instead, at a call that is not PIN-only: every CIP descriptor of the name starred for an OR group, ‘R*’/’S*’, “the ‘starred’ stereodescriptors ‘R*’, ‘S*’… that may be” used), or doubled for an AND group, ‘RS’/’SR’, “the stereodescriptors such as ‘RS’, ‘SR’, etc. that may be used in general nomenclature”), the first of them R. Only the descriptor blocks the descriptor check reads are rewritten (rules.stereochemistry.locate_stereo_blocks), and the name passes the same read-back. Such a name is not the PIN: it is labelled systematic_verified.

orthonym.assembly.stereo_group_names.leading_descriptor(name)#

The first R or S of the name’s leading descriptor block (‘(1S,2R)-…’ -> ‘S’), or None when the name does not start with a block or the block’s first CIP chirality descriptor is not R or S (an E/Z item before it is skipped; a lowercase pseudoasymmetric r/s, a starred or RS descriptor gives None).

orthonym.assembly.stereo_group_names.general_form(name, prefix)#

name with every CIP chirality descriptor of its descriptor blocks starred (‘rel’: R -> R*, S -> S*) or doubled (‘rac’: R -> RS, S -> SR), or None when a block cannot be rewritten in place, holds a descriptor of another kind (E/Z, r/s are kept), or the first rewritten descriptor is not R.

orthonym.assembly.stereo_group_names.group_descriptor_form(name, smiles, members, prefix)#

name (a name of smiles) with the descriptors of exactly the members centres starred (‘rel’) or doubled (‘rac’), the others kept; None when the reading does not bind every member to its own descriptor, a descriptor binds a member and another unit, or the first rewritten descriptor is not R.

orthonym.assembly.stereo_group_names.stereo_group_name(smiles, name_one, name_of, with_name, to_smiles, general=False)#

The result of naming smiles with ‘rel-‘/’rac-’ (see the module docstring), or None to name it as before.

name_one(s) names a string without a group (the public call itself); name_of(r) is the name in a result (None for no name); with_name(r, n) is the result with its name replaced; to_smiles(n) is OPSIN’s SMILES of a name; general allows the starred or doubled form (a call that is not PIN-only). A nested call (the namings of the two enantiomers) is not in scope.

orthonym.assembly.stereo_group_names.stereo_group_scope(fn)#

Wrap a public naming method: a string in scope is named by:func:stereo_group_name, any other string, and any case it does not build, as before (namer._enhanced_stereo_cleared_spelling leaves the group’s configuration out).

orthonym.assembly.stereo_group_names.install(cls)#

Wrap the public naming methods of cls (the Orthonym class) once, outermost (orthonym/__init__.py).