vibesketch.chem.cip

CIP stereodescriptors of a structure, and its stereo left undefined (#92).

R/S (and the pseudo-asymmetric r/s) at stereocentres, E/Z at double bonds and M/P at atropisomeric axes come from RDKit’s new CIP labeler, an implementation of the rules as revised by R. M. Hanson, S. Musacchio, J. W. Mayfield, M. J. Vainio, A. Yerin and D. Redkin, “Algorithmic analysis of Cahn-Ingold-Prelog rules of stereochemistry: proposals for revised rules and a guide for machine implementation”, J. Chem. Inf. Model. 58 (2018) 1755-1765, doi:10.1021/acs.jcim.8b00324 (rdCIPLabeler.AssignCIPLabels). It is used, not RDKit’s legacy approximation, so the drawing, figures and every interface give the same labels.

Stereocentres and double bonds that could be stereogenic but are drawn without a configuration, or as “either” on purpose, are reported (Chem.FindPotentialStereo), as a check rather than an error: a racemate or an unknown geometry is drawn so. Enhanced-stereo groups (ABS, AND, OR) are listed with their atoms.

Functions

labelled(mol)

A copy of mol whose atoms and bonds carry the new labeler's _CIPCode.

stereo_labels(mol)

The CIP descriptors, undefined stereo and enhanced-stereo groups of mol.

Classes

StereoLabels([atoms, bonds, ...])

Descriptors by atom index and by bond (as its two atom indices), and what is undefined.

class vibesketch.chem.cip.StereoLabels(atoms=<factory>, bonds=<factory>, undefined_centres=<factory>, unspecified_double_bonds=<factory>, groups=<factory>)[source]

Bases: object

Descriptors by atom index and by bond (as its two atom indices), and what is undefined.

Parameters:
atoms: list[tuple[int, str]]

R, S, r, s, or M and P at an axis atom.

Type:

[atom, label]

bonds: list[tuple[tuple[int, int], str]]

E, Z, or M and P at an atropisomeric bond.

Type:

[[begin, end], label]

undefined_centres: list[int]

Stereocentres drawn without a configuration, by atom index.

unspecified_double_bonds: list[tuple[int, int]]

Double bonds drawn without a geometry, as their two atom indices.

groups: list[dict[str, Any]]

{"kind": "abs" | "and" | "or", "atoms": [...]}.

Type:

Enhanced stereo

to_dict()[source]
Return type:

dict[str, Any]

vibesketch.chem.cip.labelled(mol)[source]

A copy of mol whose atoms and bonds carry the new labeler’s _CIPCode.

Parameters:

mol (Any)

Return type:

Any

vibesketch.chem.cip.stereo_labels(mol)[source]

The CIP descriptors, undefined stereo and enhanced-stereo groups of mol.

Parameters:

mol (Any)

Return type:

StereoLabels