mdonatello.mapper.FunctionalGroupHandler

class mdonatello.mapper.FunctionalGroupHandler[source]

A class that is responsible for handling functional groups in molecules.

Parameters:

molRDKit.Chem.Mol

An RDKit molecule object that represents the molecule in which functional groups are identified.

fgstr

The functional group for which the color is requested.

Returns:

fg_countsdict

A dictionary with functional group names as keys and lists of atom indices as values, representing the atoms involved in each functional group.

colorTuple[float, float, float]

An RGB tuple representing the color assigned to the specified functional group.

__init__()

Methods

__init__()

calculate_functional_groups(mol)

Identifies, calculates and counts the functional groups present in the given RDKit molecule.

get_color_for_functional_group(fg)

Determines the color associated with the given functional group based on its chemical structure.