mdonatello.drawer.StereocenterHighlighter

class mdonatello.drawer.StereocenterHighlighter(molecule: Mol, checkbox: Dict[str, Checkbox])[source]

A class responsible for highlighting of stereocenters in a molecule.

Parameters:

moleculeRDKit.Chem.rdchem.Mol

An RDKit molecule object representing the molecule that should be highlighted.

checkboxCheckbox

A checkbox widget indicating whether to highlight the stereocenters of the molecule.

Returns:

highlightsdict

A dictionary with keys “atoms” and “bonds”, each containing lists of atom indices and bond indices that should be highlighted, respectively.

highlight_colorsdict

A dictionary mapping atom indices and bond indices to their respective highlight colors.

__init__(molecule: Mol, checkbox: Dict[str, Checkbox])[source]

Initialize the StereocenterHighlighter with a molecule and a checkbox for stereocenters.

Methods

__init__(molecule, checkbox)

Initialize the StereocenterHighlighter with a molecule and a checkbox for stereocenters.

determine_highlights()

Determine the atom and bond indices to highlight based on their stereocenter configuration.