syndirella.Postera

Postera.py

This module contains the functionality for a Postera search.

Classes

Postera

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.DatabaseSearch

This 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.

url = 'https://api.postera.ai'[source]
api_key[source]
logger[source]

This function is used to perform the route query.

This function is used to perform the Postera search using the database_search_function.

This function is used to perform the Postera superstructure search.

This function is used to perform the Postera exact search.

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.

make_query()[source]

This function is used to make a query to the Postera database.

This function is used to save the results of the Postera search as a .csv file.

This function is used to load the results of the Postera search from a .csv file.