OCDocker.API.Pipeline module

Scheduler-friendly API entry points for the OCDocker docking pipeline.

This module is imported as:

from OCDocker.API.Pipeline import run_pipeline

class OCDocker.API.Pipeline.PipelineRunResult(return_code, outdir, summary, done_marker=None)[source]

Bases: object

Result metadata returned by run_pipeline().

Parameters:
  • return_code (int) – Pipeline return code.

  • outdir (Path) – Pipeline output directory.

  • summary (Path) – Expected summary.json path.

  • done_marker (Path, optional) – Optional workflow completion marker path.

return_code: int
outdir: Path
summary: Path
done_marker: Path | None = None
property ok: bool

Return True when the pipeline completed successfully.

Returns:

True if return_code equals zero.

Return type:

bool

OCDocker.API.Pipeline.run_pipeline(*, receptor, ligand, box, outdir, engines=('vina', 'smina', 'plants'), rescoring_engines=None, name=None, all_boxes=False, cluster_min=10.0, cluster_max=20.0, cluster_step=0.1, store_db=False, timeout=None, config_file=None, workers=None, tmp_dir=None, strict_engines=False, done_marker=None, reset_runtime=False, overwrite=False, log_file=None, no_stdout_log=False, no_splash=True)[source]

Run the multi-engine docking pipeline from Python.

Parameters:
  • receptor (str or Path) – Receptor structure path.

  • ligand (str or Path) – Ligand structure path.

  • box (str or Path) – Binding-site box path.

  • outdir (str or Path) – Output directory.

  • engines (str or Sequence[str], optional) – Docking engines to run, by default (vina, smina, plants).

  • rescoring_engines (str or Sequence[str], optional) – Rescoring engines. If None, uses the docking engines.

  • name (str, optional) – Job name. If None, the CLI default is used.

  • all_boxes (bool, optional) – Run all box*.pdb files, by default False.

  • cluster_min (float, optional) – Minimum RMSD clustering threshold, by default 10.0.

  • cluster_max (float, optional) – Maximum RMSD clustering threshold, by default 20.0.

  • cluster_step (float, optional) – RMSD clustering threshold step, by default 0.1.

  • store_db (bool, optional) – Store results in the configured database, by default False.

  • timeout (int, optional) – External tool timeout in seconds.

  • config_file (str or Path, optional) – OCDocker config path.

  • workers (int, optional) – Scheduler-provided worker count. Maps to bootstrap threads.

  • tmp_dir (str or Path, optional) – Job-local temporary directory.

  • strict_engines (bool, optional) – Fail when any requested docking engine fails, by default False.

  • done_marker (str or Path, optional) – Optional completion marker path written atomically.

  • reset_runtime (bool, optional) – Reset global OCDocker runtime before running, by default False.

  • overwrite (bool, optional) – Allow overwriting existing outputs, by default False.

  • log_file (str or Path, optional) – Optional log file.

  • no_stdout_log (bool, optional) – Disable stdout logging, by default False.

  • no_splash (bool, optional) – Disable splash output, by default True.

Returns:

Pipeline return code and expected output paths.

Return type:

PipelineRunResult