syndirella.route.CobblersWorkshop ================================= .. py:module:: syndirella.route.CobblersWorkshop .. autoapi-nested-parse:: syndirella.route.CobblersWorkshop.py This module contains the CobblersWorkshop class. One instance of this object is used to describe a full route. Classes ------- .. autoapisummary:: syndirella.route.CobblersWorkshop.CobblersWorkshop Module Contents --------------- .. py:class:: CobblersWorkshop(product: str, reactants: List[Tuple[str]], reaction_names: List[str], num_steps: int, output_dir: str, filter: bool, id: str, atom_diff_min: int, atom_diff_max: int, atoms_ids_expansion: dict = None) This is the CobblersWorkshop class. It represents a full route. .. py:attribute:: logger .. py:attribute:: route_uuid :type: str .. py:attribute:: product :type: str .. py:attribute:: id :type: str .. py:attribute:: reactants :type: List[Tuple[str]] .. py:attribute:: reaction_names :type: List[str] .. py:attribute:: atom_diff_min :type: int .. py:attribute:: atom_diff_max :type: int .. py:attribute:: num_steps :type: int .. py:attribute:: output_dir :type: str .. py:attribute:: filter :type: bool .. py:attribute:: atoms_ids_expansion :type: dict :value: None .. py:attribute:: cobbler_benches :type: List[syndirella.route.CobblerBench.CobblerBench] :value: [] .. py:attribute:: first_library :type: syndirella.route.Library.Library :value: None .. py:attribute:: final_library :type: syndirella.route.Library.Library :value: None .. py:method:: check_product(product: str) -> str Checks scaffold can be converted to a molecule and can be sanitized. If not, logs an error. .. py:method:: check_reactants(reactants: List[Tuple[str]]) -> List[Tuple[str]] Checks reactants can be converted to molecules and can be sanitized. If not, logs an error. .. py:method:: check_reaction_names(reaction_names: List[str]) -> List[str] Checks reaction names are valid. If not, logs an error. .. py:method:: get_cobbler_bench(step: int) -> syndirella.route.CobblerBench.CobblerBench This function is used to get the cobbler bench for a specific step. .. py:method:: define_reaction() This function is used to define the reaction and finding ids and attachment atoms. .. py:method:: format_workshops_from_routes(routes: List[Tuple[Tuple[str, Tuple[str]], Ellipsis]]) This function is used to format workshops from the combinations of reaction names and reactants. Combinations is structured like: [(('reaction1_name', ('reactant1_smiles','reactant2_smiles)), ('reaction2_name', ('reactant2_smiles',)), ...), # first route (('reaction1_name', ('reactant1_smiles','reactant2_smiles)), ('reaction2_name', ('reactant2_smiles',)), ...),...] .. py:method:: configure_additional_routes(reaction_names_to_replace: List[str]) -> List This function is used to configure the additional routes from the combination of all the cobbler benches. .. py:method:: get_additional_routes(edit_route: bool = True) -> List | None This function is used to get an alternative route (as a CobblersWorkshop object) if it is needed. Args: edit_route: bool If True, the reactants in the route will be directly edited via SMARTS. If False, an additional route containing the additional reactions specified from a Postera search will be returned. .. py:method:: log_route() This function is used to log the route. .. py:method:: get_final_library() This function is used to get the final library of products. It dynamically handles any number of steps.