syndirella.Postera
Postera.py
This module contains the functionality for a Postera search.
Classes
This class contains information about the Postera search. It will perform the Postera search using the |
Module Contents
- class syndirella.Postera.Postera[source]
Bases:
syndirella.DatabaseSearch.DatabaseSearchThis class contains information about the Postera search. It will perform the Postera search using the perform_database_search function. It will also store the results of the Postera search as a .csv file.
- perform_route_search(compound: str) List[Dict[str, List[Dict[str, str]]]][source]
This function is used to perform the route query.
- perform_database_search(reactant: rdkit.Chem.Mol, reaction_name: str, search_type: str = 'superstructure', vendors: list[str] = ['enamine_bb', 'mcule', 'mcule_ultimate', 'enamine_real', 'enamine_made']) List[str] | None[source]
This function is used to perform the Postera search using the database_search_function.
- perform_superstructure_search(smiles: str, queryThirdPartyServices: bool = False, keep_catalogue: bool = False, vendors: list[str] = ['all']) List[Tuple[str, Tuple[str, str] | None]] | None[source]
This function is used to perform the Postera superstructure search.
- perform_exact_search(smiles: str, queryThirdPartyServices: bool = False, catalogues: List[str] = ['all']) List[Dict][source]
This function is used to perform the Postera exact search.
- perform_exact_batch_search(smiles_list: List[str], queryThirdPartyServices: bool = False, catalogues: List[str] = ['all']) List[Dict][source]
Performs exact search with a batch of smiles.
- structure_output(hits: List[Dict] | None, query_smiles: str, keep_catalogue: bool = False) List[Tuple[str, Tuple[str, str] | None]] | None[source]
Formats output into a list of tuples with smiles and catalogue.
- static get_resp_json(url: str, api_key: str, data: Dict = None, retries: int = 50, backoff_factor: float = 0.5) Dict | None | None[source]
Directly get the response json from a request, with retry mechanism for handling 429 status code.
- static get_search_results(url: str, api_key: str, data: Dict[str, Any], page: int = 1, max_pages: int = 900) List[Dict] | None[source]
Recursively get all pages for the endpoint until reach null next page or the max_pages threshold. The default max_pages is set to 900 since the recursion limit is 1000.