syndirella.Cobbler ================== .. py:module:: syndirella.Cobbler .. autoapi-nested-parse:: syndirella.cobbler.Cobbler.py This module contains the Cobbler class. It is used to perform retrosynthetic analysis of the scaffold compound. It handles Postera searches, including multiple elaboration searches. Classes ------- .. autoapisummary:: syndirella.Cobbler.Cobbler Module Contents --------------- .. py:class:: Cobbler(scaffold_compound: str, output_dir: str, atom_diff_min: int, atom_diff_max: int) A single cobbler represents 1 scaffold compound design. It can contain multiple routes (CobblerWorkshop objects). .. py:attribute:: scaffold_compound :type: str .. py:attribute:: id :type: str .. py:attribute:: atom_diff_min :type: int .. py:attribute:: atom_diff_max :type: int .. py:attribute:: url :value: 'https://api.postera.ai' .. py:attribute:: api_key .. py:attribute:: reaction_names .. py:attribute:: n_reactants_per_reaction .. py:attribute:: output_dir .. py:attribute:: logger .. py:method:: get_routes() -> List[syndirella.route.CobblersWorkshop.CobblersWorkshop] This function is used to get the routes for the scaffold compound. Main function that is called. .. py:method:: get_route(routes: List[Dict[str, List[Dict[str, str]]]]) -> syndirella.route.CobblersWorkshop.CobblersWorkshop From Postera routes, choose the route, then create the cobblers workshop. .. py:method:: create_cobblers_workshop_from_Postera(route: List[Dict]) -> syndirella.route.CobblersWorkshop.CobblersWorkshop Creates a cobblers workshop from a route. .. py:method:: get_passing_routes(routes: List[Dict[str, List[Dict[str, str]]]]) -> List[List[Dict]] Gets the passing routes from the routes based on their reaction names are in the allowed list. .. py:method:: filter_routes(routes: List[List[Dict]]) -> List[List[Dict]] Filters routes that contain reactants with a single atom, or an intramolecular reaction that is coded as two reactants. .. py:method:: choose_route(routes: List[Dict[str, List[Dict[str, str]]]]) -> List[Dict] Gets first route from List if all the reaction names are allowed and if doesn't contain a single atom as reactant. .. py:method:: _print_route(reaction_names: List[str], reactants: List[str], product: str) This function is used to print the route. .. py:method:: save() Pickle cobbler object, so it can be read later.