mdonatello.drawer.MoleculeDrawer
- class mdonatello.drawer.MoleculeDrawer(molecule: Mol, pharmacophore_checkboxes: Dict[str, Checkbox], functional_groups_checkboxes: Dict[str, Checkbox], rotatable_bonds_checkbox: Checkbox, partial_charges_checkbox: Checkbox, partial_charges_heatmap_checkbox: Checkbox, stereocenters_checkbox: Checkbox, murcko_scaffold_checkbox: Checkbox, factory: MolChemicalFeatureFactory)[source]
A class for drawing a molecule with various highlighted features.
Parameters:
- moleculeRDKit.Chem.Mol
An RDKit molecule object representing the molecule to be drawn.
- pharmacophore_checkboxesdict
A dictionary of checkbox widgets indicating which pharmacophore features to highlight. Keys are pharmacophore feature names (e.g., “Aromatic”), and values are the corresponding checkbox widgets.
- functional_groups_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.
- rotatable_bonds_checkboxCheckbox
A checkbox widget indicating whether to highlight rotatable bonds of the molecule.
- partial_charges_checkboxCheckbox
A checkbox widget indicating whether to display partial charges of the molecule.
- partial_charges_heatmap_checkboxCheckbox
A checkbox widget indicating whether to use a heatmap for partial charges of the molecule.
- stereocenters_checkboxCheckbox
A checkbox widget indicating whether to highlight the stereocenters of the molecule.
- murcko_scaffold_checkboxCheckbox
A checkbox widget indicating whether to highlight the Murcko scaffold of the molecule.
- factoryChemicalFeatures.MolChemicalFeatureFactory
A factory object used to generate pharmacophore features for the molecule.
Returns:
- svgstr
An SVG string representing the drawn molecule with highlighted features.
- __init__(molecule: Mol, pharmacophore_checkboxes: Dict[str, Checkbox], functional_groups_checkboxes: Dict[str, Checkbox], rotatable_bonds_checkbox: Checkbox, partial_charges_checkbox: Checkbox, partial_charges_heatmap_checkbox: Checkbox, stereocenters_checkbox: Checkbox, murcko_scaffold_checkbox: Checkbox, factory: MolChemicalFeatureFactory)[source]
Initialize the MoleculeDrawer with a molecule and various highlighting checkboxes and features.
Methods
__init__(molecule, pharmacophore_checkboxes, ...)Initialize the MoleculeDrawer with a molecule and various highlighting checkboxes and features.
draw_molecule(show_atom_indices, width, height)Draws the molecule with the highlighted features.