Skip to main content

codecov CI Python PyPI Issues Last commit DOI

OCDocker

OCDocker

OCDocker is a Python toolkit and CLI for molecular docking, virtual screening, pose clustering, rescoring, and OCScore model development. It is designed to run as a command-line tool, Python API, or scheduler-friendly workflow component.

What it provides:

  • Docking workflows for AutoDock Vina, Smina, Gnina, and PLANTS.
  • Pipeline stages for preparation, docking, collection, RMSD clustering, rescoring, and export.
  • Database support for PostgreSQL, MySQL, and SQLite.
  • OCScore training, ablation, cross-validation, SHAP, plotting, and scoring utilities.
  • Reproducibility helpers, environment diagnostics, and Docker/Singularity wrappers.

Documentation

Installation

OCDocker is easiest to run inside a conda or mamba environment.

mamba create -n ocdocker python=3.11 -y
conda activate ocdocker
pip install ocdocker

For development from source:

git clone https://github.com/Arturossi/OCDocker.git
cd OCDocker
mamba create -n ocdocker python=3.11 -y
conda activate ocdocker
./scripts/vendor_oddt.sh
pip install -e ".[all,dev]"

scripts/vendor_oddt.sh pulls in our ODDT fork, which carries fixes on top of upstream ODDT that OCDocker's rescoring depends on. It has to run before pip install -e because the oddt package is bundled as source ([tool.setuptools.packages.find] picks up the local oddt/ directory it creates), not installed as a normal dependency -- PyPI rejects uploads whose metadata references a git dependency, so a plain pip install ocdocker gets the fork the same way, just vendored in at release-build time instead of by hand. Skipping this step leaves import oddt resolving to whatever (if any) vanilla oddt package happens to already be on your PYTHONPATH, which does not have the fixes this project relies on.

Minimal system packages for Ubuntu/Debian:

sudo apt-get install openbabel libopenbabel-dev swig cmake g++

Feature-specific extras:

pip install "ocdocker[docking]"   # docking workflows
pip install "ocdocker[db]"        # PostgreSQL/MySQL storage
pip install "ocdocker[ml]"        # OCScore training and scoring
pip install "ocdocker[analysis]"  # plots, statistics, SHAP helpers
pip install "ocdocker[workflow]"  # Snakemake integration
pip install "ocdocker[all]"       # all runtime stacks

Quick Start

Use SQLite for local tests and quick experiments:

export OCDOCKER_DB_BACKEND=sqlite
ocdocker doctor

Run a single docking engine:

ocdocker vs \
  --engine vina \
  --receptor path/to/receptor.pdb \
  --ligand path/to/ligand.sdf \
  --box path/to/box.pdb \
  --timeout 600

Run the full docking pipeline:

ocdocker pipeline \
  --receptor path/to/receptor.pdb \
  --ligand path/to/ligand.sdf \
  --box path/to/box.pdb \
  --engines vina,smina,plants \
  --outdir runs/example

Run scheduler-friendly pipeline stages:

ocdocker pipeline prepare --help
ocdocker pipeline dock --help
ocdocker pipeline collect --help
ocdocker pipeline cluster --help
ocdocker pipeline rescore --help
ocdocker pipeline export --help

OCScore

OCScore workflows are available under ocdocker ocscore.

ocdocker ocscore reduce --help
ocdocker ocscore train --help
ocdocker ocscore score --help

For the full reproducible protocol, including reduction, training, ablations, statistics, plots, and SHAP analysis, use:

Configuration

Create a starter config:

ocdocker init-config --conf OCDocker.cfg

Common environment variables:

  • OCDOCKER_CONFIG: path to OCDocker.cfg or OCDocker.yml.
  • OCDOCKER_DB_BACKEND: postgresql, mysql, or sqlite.
  • OCDOCKER_SQLITE_PATH: custom SQLite database path.
  • OCDOCKER_TIMEOUT: default external-tool timeout in seconds.
  • OCDOCKER_THREADS: scheduler-provided worker count.
  • OCDOCKER_TMP_DIR: job-local temporary directory.

For server databases, see docs/source/database_setup.md.

Containers

Docker and Singularity helpers live under containers/.

Docker wrapper:

containers/docker/install_docker.sh --install-ocd
export OCDOCKER_DB_PASS='<db_password>'
ocd doctor

Use MySQL instead of the default PostgreSQL service:

export OCDOCKER_DB_BACKEND=mysql
export OCDOCKER_DB_PASS='<db_password>'
export MYSQL_ROOT_PASSWORD='<root_password>'
ocd doctor

More details: docs/source/container_usage.md.

Diagnostics and Reproducibility

Check the environment:

ocdocker doctor --conf OCDocker.cfg

Generate a reproducibility manifest:

ocdocker manifest --conf OCDocker.cfg --output reproducibility_manifest.json

Testing

pytest -q
pytest --cov=OCDocker --cov-report=term-missing

External docking binaries are not required for most unit tests. End-to-end docking runs require the configured tools to be available on the system or in the container.

License

OCDocker is released under the BSD 3-Clause License. Copyright is held by Federal University of Rio de Janeiro (UFRJ), Artur Duque Rossi, and Pedro Henrique Monteiro Torres only (see NOTICE). You may use, modify, and redistribute the software for any purpose, including commercial work, provided you include the BSD license notice. Please credit UFRJ and the copyright holders in publications. Community contributors are acknowledged in COLLABORATORS.md.

Community

Metadata

Release files for OCDocker 0.15.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OCDocker 0.15.4
File Size Uploaded
ocdocker-0.15.4.tar.gz 37.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for OCDocker 0.15.4
File Interpreter ABI Platform
ocdocker-0.15.4-py3-none-any.whl Python 3 none any Details

Total release size: 74.3 MB

Release files / ocdocker-0.15.4.tar.gz

Download URL ocdocker-0.15.4.tar.gz
Size 37.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a12436bdfac494b0d4d12796a04856605299f0e5d5d55f0c6d0d534a473010ed
BLAKE2b-256 checksum
How to use checksums
683caf486e14befb9aebaf873ca798c8fd0b35135459273918b070996eafecf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / ocdocker-0.15.4-py3-none-any.whl

Download URL ocdocker-0.15.4-py3-none-any.whl
Size 37.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ee72773923f852184293618db6b5ba5e582a0e6e138f537853e34fe3fcf4e8e7
BLAKE2b-256 checksum
How to use checksums
e0009e3a4ef7e09e8d565d8e8900b79d319be00119b9c82d4d8901a2ca8d5d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.15.4 This release

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.13.5

2 release files

0.13.4

2 release files

0.13.2

2 release files

0.13.0

2 release files

0.11.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page