poli.objective_repository.foldx_stability_and_sasa.register.FoldXStabilityAndSASABlackBox#
- class poli.objective_repository.foldx_stability_and_sasa.register.FoldXStabilityAndSASABlackBox(wildtype_pdb_path: Union[Path, List[Path]], experiment_id: Optional[str] = None, tmp_folder: Optional[Path] = None, eager_repair: bool = False, verbose: bool = False, batch_size: int = 1, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#
A black box implementation for computing the solvent accessible surface area (SASA) score using FoldX.
- Parameters
wildtype_pdb_path (Union[Path, List[Path]]) – The path(s) to the wildtype PDB file(s).
experiment_id (str, optional) – The ID of the experiment. Default is None.
tmp_folder (Path, optional) – The path to the temporary folder. Default is None.
eager_repair (bool, optional) – Whether to perform eager repair. Default is False.
verbose (bool, optional) – Whether to print the output from FoldX. Default is False.
batch_size (int, optional) – The batch size for parallel processing. Default is None.
parallelize (bool, optional) – Whether to parallelize the computation. Default is False.
num_workers (int, optional) – The number of workers for parallel processing. Default is None.
evaluation_budget (int, optional) – The maximum number of function evaluations. Default is infinity.
Notes
We expect the user to have FoldX v5.0 installed and compiled. More specifically, we expect a binary file called foldx to be in the path ~/foldx/foldx.
- __init__(wildtype_pdb_path: Union[Path, List[Path]], experiment_id: Optional[str] = None, tmp_folder: Optional[Path] = None, eager_repair: bool = False, verbose: bool = False, batch_size: int = 1, parallelize: bool = False, num_workers: Optional[int] = None, evaluation_budget: int = inf, force_isolation: bool = False)#
Initialize the AbstractBlackBox object.
- Parameters
batch_size (int, optional) – The batch size for parallel execution, by default None.
parallelize (bool, optional) – Flag indicating whether to parallelize the execution, by default False.
num_workers (int, optional) – The number of workers for parallel execution, by default we use half the available CPUs.
evaluation_budget (int, optional) – The maximum number of evaluations allowed for the black box function, by default float(“inf”).
Methods
__init__
(wildtype_pdb_path[, experiment_id, ...])Initialize the AbstractBlackBox 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.