BespokeExecutor

class openff.bespokefit.executor.executor.BespokeExecutor(n_fragmenter_workers: int = 1, fragmenter_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), n_qc_compute_workers: int = 1, qc_compute_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), n_optimizer_workers: int = 1, optimizer_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), directory: Optional[str] = 'bespoke-executor', launch_redis_if_unavailable: bool = True)[source]

Bases: object

The main class for generating a bespoke set of parameters for molecules based on bespoke optimization schemas.

Methods

__init__([n_fragmenter_workers, ...])

Parameters
  • n_fragmenter_workers -- The number of workers that should be launched to

retrieve(optimization_id)

Retrieve the current state of a running bespoke fitting workflow.

submit(input_schema)

Submits a new bespoke fitting workflow to the executor.

__init__(n_fragmenter_workers: int = 1, fragmenter_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), n_qc_compute_workers: int = 1, qc_compute_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), n_optimizer_workers: int = 1, optimizer_worker_config: BespokeWorkerConfig = BespokeWorkerConfig(), directory: Optional[str] = 'bespoke-executor', launch_redis_if_unavailable: bool = True)[source]
Parameters
  • n_fragmenter_workers – The number of workers that should be launched to handle the fragmentation of molecules prior to the generation of QC data.

  • n_qc_compute_workers – The number of workers that should be launched to handle the generation of any QC data.

  • n_optimizer_workers – The number of workers that should be launched to handle the optimization of the bespoke parameters against any input QC data.

  • directory – The direction to run in. If None, the executor will run in a temporary directory.

  • launch_redis_if_unavailable – Whether to launch a redis server if an already running one cannot be found.

static retrieve(optimization_id: str) BespokeExecutorOutput[source]

Retrieve the current state of a running bespoke fitting workflow.

Parameters

optimization_id – The unique ID associated with the running optimization.

static submit(input_schema: BespokeOptimizationSchema) str[source]

Submits a new bespoke fitting workflow to the executor.

Parameters

input_schema – The schema defining the optimization to perform.

Returns

The unique ID assigned to the optimization to perform.

static submit(input_schema: BespokeOptimizationSchema) str[source]

Submits a new bespoke fitting workflow to the executor.

Parameters

input_schema – The schema defining the optimization to perform.

Returns

The unique ID assigned to the optimization to perform.

static retrieve(optimization_id: str) BespokeExecutorOutput[source]

Retrieve the current state of a running bespoke fitting workflow.

Parameters

optimization_id – The unique ID associated with the running optimization.