syndirella.slipper.slipper_synthesizer.Labeler ============================================== .. py:module:: syndirella.slipper.slipper_synthesizer.Labeler .. autoapi-nested-parse:: slipper_synthesizer/Labeler.py This module contains a helper module for the SlipperSynthesizer class to label the products based on labeled atom ids to expand or not expand. Classes ------- .. autoapisummary:: syndirella.slipper.slipper_synthesizer.Labeler.Labeler Module Contents --------------- .. py:class:: Labeler(products: pandas.DataFrame, atom_ids_expansion: Dict[int, bool], library: syndirella.route.Library.Library) .. py:attribute:: products :type: pandas.DataFrame .. py:attribute:: atom_ids_expansion :type: dict .. py:attribute:: library :type: syndirella.route.Library.Library .. py:attribute:: output_dir :type: str .. py:method:: label_products() This is the main entry function for the Labeler class. .. py:method:: show_atoms_to_expand_and_not_expand() This will save a png of the scaffold compound with atoms to expand colored in green and not to expand colored in red. .. py:method:: label_products_with_atom_ids() This function will label the products with the atom ids to expand and not expand. .. py:method:: _label_product_with_atom_ids(atom_ids_to_expand: List[int], atom_ids_to_not_expand: List[int], row: pandas.Series) -> pandas.Series This function goes through each scaffold and checks if the compound has been expanded or not. .. py:method:: _has_non_mcs_bond(mol_smiles: str, ref_mol: rdkit.Chem.Mol, atom_id_ref: int) -> bool or str Check if the specified atom in the given molecule has a bond that is not in the MCS with a reference molecule. :param mol_smiles: SMILES string of the molecule to check :param ref_smiles: SMILES string of the reference molecule :param atom_id: Atom ID to check in the given molecule :return: True if the atom has a non-MCS bond, False otherwise .. py:method:: show_mcs_on_products() This function will output a png of the MCS on the products.