syndirella.route.Reaction

syndirella.route.Reaction.py

This module contains the Reaction class. One instance of this object is used to describe a single reaction.

Classes

Reaction

This class contains information about the reaction. It is used to find the atoms on the reactants involved in

Module Contents

class syndirella.route.Reaction.Reaction(product: rdkit.Chem.Mol, reactants: List[rdkit.Chem.Mol], reaction_name: str, smarts_handler: syndirella.SMARTSHandler.SMARTSHandler, route_uuid: str)[source]

This class contains information about the reaction. It is used to find the atoms on the reactants involved in the reaction, check the reaction atoms are the ones that are supposed to be connected.

route_uuid: str[source]
logger[source]
scaffold: rdkit.Chem.Mol[source]
reactants: List[rdkit.Chem.Mol][source]
reaction_name: str[source]
smarts_handler: syndirella.SMARTSHandler.SMARTSHandler[source]
reaction_pattern: rdkit.Chem.rdChemReactions[source]
all_attach_ids: Dict[rdkit.Chem.Mol, List[int]] | None[source]
additional_rxn_options: List[Dict[str, str]][source]
alt_reactions: List[Dict[str, str]] | None = [][source]
alt_reaction() List[Dict[str, str]] | None[source]

This function is used to determine if an additional reaction is specified.

get_additional_reactions() List[Tuple[str, Tuple[str, str]]] | None[source]

This function edits the reactants to make an additional reaction.

check_reaction_can_produce_product(new_reactant: rdkit.Chem.Mol, other_reactant: rdkit.Chem.Mol, reaction_name: str) bool[source]

This function is used to check if the new reactants can simply produce a scaffold from the labeled reaction.

edit_reactant(reactant: Tuple[rdkit.Chem.Mol, Tuple[int], str], new_reactant_smarts: str, to_replace_smarts: str, replacement_connecting_atom_id: int) rdkit.Chem.Mol | None[source]

Directly edits the reactant to replace SMARTS matched atoms to new SMARTS.

_replace_carboxylic_acid_hydroxy_with_dummy(mol: rdkit.Chem.Mol) rdkit.Chem.Mol[source]
_replace_halide_with_dummy(mol: rdkit.Chem.Mol, atom_to_check_by_symbol=None) rdkit.Chem.Mol[source]
_find_attachment_id_from_dummy(reactant: rdkit.Chem.Mol, dummy_symbol='*') Tuple[List[int], List[List[int]]][source]
use_fmcs(reactant: rdkit.Chem.Mol) Dict[int, int][source]
find_attachment_id_for_reactant(reactant: rdkit.Chem.Mol) List[int] | None[source]

This function is used to find the attachment indices of a single reactant in the reaction. :param reactant: a single reactant molecule :returns a list of tuples (attachmentIdx_whole, attachmentIdx_subMol)

find_attachment_ids_for_all_reactants() Dict[rdkit.Chem.Mol, List[int]] | None[source]

This function is used to find the attachment indices of all reactants in the reaction. :returns a list of lists, each containing tuples of attachment indices for each reactant

format_matched_smarts_to_index(matched_reactants: Dict[str, Tuple[rdkit.Chem.Mol, List[int], str]]) Dict[int, Tuple[rdkit.Chem.Mol, List[int], str]] | None[source]

Formats matched smarts to reactant by using reactant index in smarts as the key.

find_reaction_atoms_for_all_reactants() Tuple[Dict[str, Tuple[rdkit.Chem.Mol, List[int], str]] | None, Dict[int, Tuple[rdkit.Chem.Mol, List[int], str]]][source]

This function is used to find the reaction atoms of both reactants. And how those atoms correspond to the SMARTS pattern associated with the reaction.