Skip to main content

Hierarchical Evaluation of Drug GEnerators tHrOugh riGorous filtration

Project description

🦔 HEDGEHOG

Hierarchical Evaluation of Drug GEnerators tHrOugh riGorous filtration

PyPI version CI License: MIT Python 3.10+

HEDGEHOG Pipeline

Comprehensive benchmark pipeline for evaluating generative models in molecular design.

Pipeline Stages:

Each stage takes the output of the previous one, progressively filtering the molecule set:

  1. Mol Prep (Datamol): salts/solvents & fragments cleanup, largest-fragment selection, metal disconnection, uncharging, tautomer canonicalization, stereochemistry removal → produces standardized “clean” molecules (molPrep folder)
  2. Molecular Descriptors: 22 physicochemical descriptors (logP, HBD/HBA, TPSA, QED, etc.) → molecules outside thresholds are removed (descriptors folder)
  3. Structural Filters: 6 criteria with ~2500 SMARTS patterns (PAINS, Glaxo, NIBR, Bredt, etc.) → flagged molecules are removed (structural filters folder)
  4. Synthesis Evaluation: SA score, SYBA score, AiZynthFinder retrosynthesis → unsynthesizable molecules are removed (synthesis folder)
  5. Molecular Docking: SMINA and/or GNINA → binding affinity scoring (docking folder)
  6. Docking Filters: post-docking pose quality filtering → poor binders are removed
  7. Final Descriptors: recalculation on the filtered set

Post-pipeline analysis: MolEval generative metrics

Setup & Run

Install from PyPI

python -m pip install hedgehog
hedgehog --help

Base install is intentionally lightweight and works on modern Python versions (including Python 3.13) without optional heavy docking extras.

Optional extras:

# Legacy PoseCheck backend for docking filters
python -m pip install 'hedgehog[docking-legacy]'

# Shepherd-Score Python dependency only (may be unavailable on some ABIs, e.g. cp313)
python -m pip install 'hedgehog[shepherd]'

Recommended Shepherd setup is an isolated worker environment:

uv run hedgehog setup shepherd-worker --yes

Install from source (recommended for development)

# Clone repository
git clone https://github.com/LigandPro/hedgehog.git
cd hedgehog


# Install AiZynthFinder (for synthesis stage)
./modules/install_aizynthfinder.sh
#
# Alternatively (recommended), install via CLI:
# uv run hedgehog setup aizynthfinder --yes

# Install package with uv
uv sync

You are ready to use 🦔 HEDGEHOG for your purpose!

Usage

# Run full pipeline on a proposed small test data from `data/test/`
uv run hedgehog run

# Alternatively, using the short-name alias:
uv run hedge run

# Run specific stage
uv run hedge run --stage descriptors

# Enable live progress bar in CLI
uv run hedge run --progress

# Get help
uv run hedge --help

Terminal UI (TUI)

For interactive configuration and pipeline management, use the TUI:

cd tui
npm install
npm run tui

See tui/README.md for details.

Unified verification pipeline

Use one command entry point for local/CI checks:

# Quick local smoke (CLI + TUI build + TUI startup/quit in PTY)
uv run python scripts/check_pipeline.py --mode quick

# CI smoke profile (same checks, no full production run)
uv run python scripts/check_pipeline.py --mode ci

# Full local verification (quick checks + full production pipeline run)
uv run python scripts/check_pipeline.py --mode full

--mode full runs uv run hedgehog run with the default production config, so it can be long-running and requires external stage dependencies (for example docking/synthesis tooling) to be installed in your local environment.

Documentation Site

cd docs && pnpm install && pnpm dev

The docs site is built with Nextra and available at http://localhost:3000.

HTML Reports

After each pipeline run, an interactive HTML report is automatically generated as report.html in the results folder. The report includes:

  • Pipeline summary and molecule retention funnel
  • Per-stage statistics and visualizations
  • Descriptor distributions
  • Filter pass/fail breakdowns
  • Synthesis scores and docking results

Configure your run Edit config for each stage in configs folder based on metrics you want to calculate.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

hedgehog-1.0.3.tar.gz (11.5 MB view details)

Uploaded Source

Built Distribution

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

hedgehog-1.0.3-py3-none-any.whl (11.5 MB view details)

Uploaded Python 3

File details

Details for the file hedgehog-1.0.3.tar.gz.

File metadata

  • Download URL: hedgehog-1.0.3.tar.gz
  • Upload date:
  • Size: 11.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hedgehog-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1bca49d88103c85d2b7b0d7575a9a5cea07b6a8dd0cbced7508c20bb50f9f087
MD5 cce4d99411a160b5f87c74f77d5a72d8
BLAKE2b-256 1a8f81cbe66f4106fb02f84cdd01c40582c9a18db5b499b6624dba36f60dfdf7

See more details on using hashes here.

File details

Details for the file hedgehog-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: hedgehog-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hedgehog-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d3bd56638220de39d6c632dec9e7a3437c37d238faec57d14ab79ce6755d2325
MD5 90d616d441e01a9f8a03f9e1d1965004
BLAKE2b-256 c4ab571c34edc0a61ac9126118088584a98e19ea818e217d71c19ea74daa7851

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page