syndirella.Cobbler

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

Cobbler

A single cobbler represents 1 scaffold compound design. It can contain multiple routes (CobblerWorkshop objects).

Module Contents

class syndirella.Cobbler.Cobbler(scaffold_compound: str, output_dir: str, atom_diff_min: int, atom_diff_max: int)[source]

A single cobbler represents 1 scaffold compound design. It can contain multiple routes (CobblerWorkshop objects).

scaffold_compound: str[source]
id: str[source]
atom_diff_min: int[source]
atom_diff_max: int[source]
url = 'https://api.postera.ai'[source]
api_key[source]
reaction_names[source]
n_reactants_per_reaction[source]
output_dir[source]
logger[source]
get_routes() List[syndirella.route.CobblersWorkshop.CobblersWorkshop][source]

This function is used to get the routes for the scaffold compound. Main function that is called.

get_route(routes: List[Dict[str, List[Dict[str, str]]]]) syndirella.route.CobblersWorkshop.CobblersWorkshop[source]

From Postera routes, choose the route, then create the cobblers workshop.

create_cobblers_workshop_from_Postera(route: List[Dict]) syndirella.route.CobblersWorkshop.CobblersWorkshop[source]

Creates a cobblers workshop from a route.

get_passing_routes(routes: List[Dict[str, List[Dict[str, str]]]]) List[List[Dict]][source]

Gets the passing routes from the routes based on their reaction names are in the allowed list.

filter_routes(routes: List[List[Dict]]) List[List[Dict]][source]

Filters routes that contain reactants with a single atom, or an intramolecular reaction that is coded as two reactants.

choose_route(routes: List[Dict[str, List[Dict[str, str]]]]) List[Dict][source]

Gets first route from List if all the reaction names are allowed and if doesn’t contain a single atom as reactant.

_print_route(reaction_names: List[str], reactants: List[str], product: str)[source]

This function is used to print the route.

save()[source]

Pickle cobbler object, so it can be read later.