Skip to Content
Pipeline StagesOverview

Pipeline Overview

HEDGEHOG implements a sequential molecular filtering pipeline that progressively narrows a large set of generated molecules down to high-quality drug candidates. Each stage applies domain-specific filters, and only molecules that pass all enabled stages reach the final output.

Pipeline Stages

Retention rates are approximate and depend heavily on the input molecule set and configuration thresholds.

#StagePurposeTypical Retention
1PreprocessingStandardize molecules; remove salts/fragments; preserve charge and stereo by default70—95%
2DescriptorsCompute physicochemical descriptors and filter by threshold ranges25—40%
3Structural FiltersCalculate liability diagnostics; enforce the configured hard gate (default: PAINS + NIBR + Lilly160 + MolGraph + protecting groups + undefined stereo)15—30%
4Synthesis FeasibilityEvaluate synthetic accessibility scores and optional AiZynthFinder retrosynthesis35—60%
5Molecular DockingDock surviving molecules into the target protein binding site50—75%
6Three-Dimensional FiltersFilter poses by search-box containment, clashes, interactions, and conformer deviation35—60%
7’Final DescriptorsRecompute descriptors on the final molecule set for reporting100% (no filtering)

Data Flow

input/sampled_molecules.csv | v [Stage 1: Mol Prep] | filtered_molecules.csv v [Stage 2: Descriptors] | filtered_molecules.csv v [Stage 3: Structural Filters] | filtered_molecules.csv v [Stage 4: Synthesis Analysis] | filtered_molecules.csv v [Stage 5: Molecular Docking] | gnina/gnina_out.sdf, smina/smina_out.sdf, matcha/matcha_out.sdf v [Stage 6: Docking Filters] | filtered_molecules.csv v [Stage 7': Final Descriptors] | v output/final_molecules.csv

Sequential Filtering Approach

The pipeline is designed as a funnel: cheap, fast filters run first (descriptors, structural alerts), and expensive operations (retrosynthesis, docking) run later on a smaller molecule set. This ordering minimizes computational cost while maximizing coverage.

Any stage can be requested with --stage <name>, which is useful for debugging or re-running a single step. Only the selected stages run; Mol Prep is not forced automatically. Include --stage mol_prep if you want standardization first. All configuration files are snapshotted into a configs/ directory at the start of each run, and a RUN_INFO.md is generated at completion.

Every stage config includes a run: true/false flag that controls whether it executes. See the Configuration Reference for full details.

output/final_molecules.csv is the final filtered output file.

.RUN_INCOMPLETE is a transient marker file written at the start of a run. It is removed on successful completion. If it remains in the run folder, the pipeline was interrupted or failed and the run log should be reviewed.

Stage Dependencies

StageNeedsReads From by DefaultWrites
mol_prepRaw molecule tablegenerated_mols_path or sampled inputstages/01_mol_prep/filtered_molecules.csv
descriptorsMolecule tablepreprocessing output, sampled inputstages/02_descriptors_initial/metrics/ and stages/02_descriptors_initial/filtered_molecules.csv
struct_filtersDescriptor or molecule tableDescriptors output, then preprocessing or sample fallbackstages/03_structural_filters_post/filtered_molecules.csv
synthesisMolecule tableStructural filters, descriptors, preprocessing output, or sampled inputstages/04_synthesis/filtered_molecules.csv
dockingMolecules plus receptor or reference ligandLatest usable filtered tablestages/05_docking/{tool}/{tool}_out.sdf
docking_filtersDocking posesstages/05_docking/...stages/06_docking_filters/filtered_molecules.csv
final_descriptorsFinal survivor tableDocking filters or latest usable filtered tablestages/07_descriptors_final/...

Stage Configuration

Each stage has its own YAML configuration file referenced from the master config.yml:

config_mol_prep: src/hedgehog/configs/config_mol_prep.yml config_descriptors: src/hedgehog/configs/config_descriptors.yml config_structFilters: src/hedgehog/configs/config_structFilters.yml config_synthesis: src/hedgehog/configs/config_synthesis.yml config_docking: src/hedgehog/configs/config_docking.yml config_docking_filters: src/hedgehog/configs/config_docking_filters.yml config_moleval: src/hedgehog/configs/config_moleval.yml config_weighted_score: src/hedgehog/configs/config_weighted_score.yml
Last updated on