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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocdocker-0.15.4.tar.gz (37.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocdocker-0.15.4-py3-none-any.whl (37.3 MB view details)

Uploaded Python 3

File details

Details for the file ocdocker-0.15.4.tar.gz.

File metadata

  • Download URL: ocdocker-0.15.4.tar.gz
  • Upload date:
  • Size: 37.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ocdocker-0.15.4.tar.gz
Algorithm Hash digest
SHA256 a12436bdfac494b0d4d12796a04856605299f0e5d5d55f0c6d0d534a473010ed
MD5 433b6f038e3810472ad6b84f1c8995b4
BLAKE2b-256 683caf486e14befb9aebaf873ca798c8fd0b35135459273918b070996eafecf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocdocker-0.15.4.tar.gz:

Publisher: publish.yml on Arturossi/OCDocker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ocdocker-0.15.4-py3-none-any.whl.

File metadata

  • Download URL: ocdocker-0.15.4-py3-none-any.whl
  • Upload date:
  • Size: 37.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ocdocker-0.15.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee72773923f852184293618db6b5ba5e582a0e6e138f537853e34fe3fcf4e8e7
MD5 b069500ef341ef5af9b36f5fd5f150a2
BLAKE2b-256 e0009e3a4ef7e09e8d565d8e8900b79d319be00119b9c82d4d8901a2ca8d5d60

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocdocker-0.15.4-py3-none-any.whl:

Publisher: publish.yml on Arturossi/OCDocker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.15.4 This release

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.13.5

2 files

0.13.4

2 files

0.13.2

2 files

0.13.0

2 files

0.12.8.4

2 files

0.11.1

2 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