Skip to Content
Pipeline Stages3D Filters

Three-Dimensional Filters

Stage 6 applies a cascade of pose quality checks, then deduplicates to unique molecules. When inputs are SDF, model-provided coordinates are the primary pose source.

Coordinate Sources

For SDF model inputs, HEDGEHOG preserves original coordinates in input/ligands.sdf, intersects their mol_idx values with the latest completed upstream stage, and evaluates those poses in the main Stage 6 output.

Set evaluate_docked_coordinates: true in the master config or pass --evaluate-docked-coordinates to also evaluate docking output under stages/06_docking_filters/docked/. That option requires docking.run: true and at least one selected docking tool.

Every pose-level table and SDF carries pose_source as input or docked. At molecule level, the two branches use pass-if-either semantics; a molecule that passes both is marked input+docked in the root filtered_molecules.csv. For non-SDF inputs, docking output remains the available primary coordinate source.

Filter Cascade

When aggregation.mode is all (default), early filters can short-circuit: poses that fail skip later heavy filters.

Filter 1: Search-Box Containment

Checks that the pose lies inside the docking search box.

ParameterDefaultDescription
enabledtrueEnable this filter
max_outside_fraction0.0Maximum fraction of atoms allowed outside the box
short_circuittrueSkip later filters on fail when mode is all

The box comes from docking config: explicit center/size, or autobox_ligand + autobox_add.

Filter 2: Pose Quality (posecheck-fast)

Fast intermolecular checks from LigandPro/posecheck-fast : clash, volume overlap, and protein distance.

ParameterDefaultDescription
enabledtrueEnable this filter
clash_cutoff0.75Relative VDW distance cutoff for clash detection
volume_clash_cutoff0.075ShapeTverskyIndex overlap threshold
max_distance5.0Maximum minimum ligand–protein distance (Å)
short_circuittrueSkip later filters on fail when mode is all

Legacy PoseCheck keys such as strain_forcefield and clash_tolerance are not used. This stage runs posecheck-fast only.

Filter 3: Interaction Analysis (ProLIF)

Uses ProLIF  interaction fingerprints.

ParameterDefaultDescription
enabledtrueEnable this filter
reference_ligandnullSDF path for fingerprint similarity; required when similarity_threshold > 0
min_hbonds0Minimum hydrogen bonds required
required_residues[]Residues that must have at least one interaction
forbidden_residues[]Residues that must not interact
interaction_types[HBDonor, HBAcceptor, Hydrophobic, VdWContact]Interaction types to detect
reporting.enabledtrueWrite interaction reporting artifacts
similarity_threshold0.0Tanimoto to the reference ProLIF fingerprint (0 disables similarity)

similarity_threshold and reference_ligand are a pair:

  • similarity_threshold: 0.0 — similarity check off.
  • similarity_threshold > 0 with a valid SDF — Tanimoto is computed on ProLIF bits vs the reference.
  • similarity_threshold > 0 without reference_ligand — warning only; the similarity gate does not filter.

Residue identifiers must match ProLIF column labels for your prepared receptor (for example SER45 or SER:45). Inspect the interaction report before locking required_residues.

Filter 4: Shepherd-Score (3D Shape Similarity)

Gaussian-overlap shape Tanimoto vs a reference ligand.

ParameterDefaultDescription
enabledfalseRequires a reference ligand
backendautoauto = worker → in-process → soft-skip; worker; inprocess
auto_install_workertrueAuto-install .venv-shepherd-worker when missing
worker_pythonnullOptional interpreter for auto-install
reference_ligandnullPath to reference ligand SDF
min_shape_score0.5Minimum shape Tanimoto
alpha0.81Gaussian width
align_before_scoringtrueAlign each pose onto the reference with RDKit AlignMol / GetBestRMS before scoring; false scores unaligned coordinates

If no Shepherd backend is available, HEDGEHOG soft-skips this filter (warning; pass_shepherd_score=true).

uv run hedgehog setup shepherd-worker --yes

Filter 5: Conformer Deviation

Generates ETKDG conformers and measures RMSD to the evaluated pose.

ParameterDefaultDescription
enabledtrueEnable this filter
use_nvmolkittruePrefer nvMolKit when available; fall back to RDKit
backendsymmetry_rmsdsymmetry_rmsd or naive
num_conformers50Number of conformers
conformer_methodETKDGv3ETKDG, ETKDGv2, or ETKDGv3
max_rmsd_to_conformer3.0Maximum RMSD (Å) to the closest conformer
random_seed42Conformer seed
include_hydrogensfalseInclude hydrogens in RMSD matching
max_matches10000Cap for GetBestRMS symmetry matching
early_stop_on_passtrueStop once any conformer passes
optimize_conformersfalseUFF-relax generated ETKDG conformers before RMSD, not the docked pose. Failed UFF steps are skipped; they are not fatal

High minimum RMSD means the pose is far from accessible low-energy conformers.

uv run hedgehog setup nvmolkit-worker

Output Files

FileDescription
filtered_molecules.csvUnique molecules (best pose per molecule) passing filters
filtered_poses.csvAll passing poses with metrics
filtered_poses.sdfPassing poses as SDF
metrics.csvPer-pose metrics for the primary coordinate branch
docked/Optional docked-coordinate artifacts

After filtering, poses are sorted by affinity and deduplicated to one best pose per mol_idx. SMILES are taken from the original ligand table, not regenerated from 3D.

Usage

uv run hedgehog uv run hedgehog --stage docking_filters --mols input/generated_3d.sdf uv run hedgehog --mols input/generated_3d.sdf --evaluate-docked-coordinates uv run hedge --stage docking_filters
Last updated on