poli.objective_repository.dockstring.register.DockstringBlackBox

poli.objective_repository.dockstring.register.DockstringBlackBox#

class poli.objective_repository.dockstring.register.DockstringBlackBox(target_name: str, string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#

Black box implementation for the Dockstring problem.

Dockstring is a simple API for assessing the docking score of a small molecule to a given protein [1].

Parameters
  • target_name (str) – The name of the target protein.

  • string_representation (str, optional) – The string representation of the molecules. Either SMILES or SELFIES. Default is SMILES.

  • batch_size (int, optional) – The batch size for processing multiple inputs simultaneously, by default None.

  • parallelize (bool, optional) – Flag indicating whether to parallelize the computation, by default False.

  • num_workers (int, optional) – The number of workers to use for parallel computation, by default None.

  • evaluation_budget (int, optional) – The maximum number of function evaluations. Default is infinity.

alphabet#

The mapping of symbols to their corresponding indices in the alphabet.

Type

dict

_black_box(x, context=None)#

The black box function.

References

[1] “DOCKSTRING: Easy Molecular Docking Yields Better Benchmarks for Ligand Design.”

García-Ortegón, Miguel, Gregor N. C. Simm, Austin J. Tripp, José Miguel Hernández-Lobato, Andreas Bender, and Sergio Bacallado. Journal of Chemical Information and Modeling 62, no. 15 (August 8, 2022): 3486-3502. https://doi.org/10.1021/acs.jcim.1c01334.

__init__(target_name: str, string_representation: Literal['SMILES', 'SELFIES'] = 'SMILES', batch_size: Optional[int] = None, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#

Initialize the dockstring black box object.

Parameters
  • target_name (str) – The name of the target protein.

  • string_representation (str) – The string representation of the molecules. Either SMILES or SELFIES. Default is SMILES.

  • batch_size (int, optional) – The batch size for processing data, by default None.

  • parallelize (bool, optional) – Flag indicating whether to parallelize the processing, by default False.

  • num_workers (int, optional) – The number of workers to use for parallel processing, by default None.

  • evaluation_budget (int, optional) – The maximum number of function evaluations. Default is infinity.

Methods

__init__(target_name[, ...])

Initialize the dockstring black box object.

reset_evaluation_budget()

Resets the evaluation budget by setting the number of evaluations made to 0.

set_observer(observer)

Set the observer object for recording observations during evaluation.

terminate()

Terminate the black box optimization problem.