mdonatello.drawer.FunctionalGroupHighlighter

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

A class responsible for highlighting of the functional groups in a molecule.

Parameters:

moleculeRDKit.Chem.Mol

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

checkboxesdict

A dictionary of checkbox widgets indicating which functional groups to highlight. Keys are functional group names (e.g., “Alcohol”), and values are the corresponding checkbox widgets.

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, checkboxes: Dict[str, Checkbox])[source]

Initialize the FunctionalGroupHighlighter with a molecule and functional group checkboxes.

Methods

__init__(molecule, checkboxes)

Initialize the FunctionalGroupHighlighter with a molecule and functional group checkboxes.

determine_highlights()

Determine the atom and bond indices to highlight based on the selected functional groups.