Skip to content

Refusal Contracts & SHA-256 Provenance

In Dock2MD, anticipated chemical, structural, or configuration faults never produce a raw Python traceback and never silently proceed. Instead, Dock2MD stops with:

  1. Non-zero exit code (1)
  2. Structured diagnostic block on stderr:
    • ERROR: concise root cause
    • Expected: what the contract requires
    • Found: what the actual input contained
    • Suggestion: exact actionable fix
  3. Machine-readable outcome marker (DOCK2MD_OUTCOME: <category>) so scripts, batch orchestrators, and autonomous LLM agents can distinguish a typed refusal from an unexpected crash.

In multi-compound library runs (batch, interactions, run), a single failing compound is logged with its exact stage and exception type in interactions.summary.csv and run_manifest.json while the rest of the library continues cleanly.

Surface Trigger Point What It Guards
Surface 1 · Configuration Contracts Load time (validate-config, command preflight) Unknown YAML keys, unedited A:*** / CHEMBL*** placeholders, mistyped receptor residues, invalid profile_csv bands, engine/metric mismatches, empty docking boxes, invalid MD timesteps
Surface 2 · Realised Ligand Chemistry reconstruct-ligand, prepare-complex, build Missing reference in --mode md, atom/graph mismatch, tetrahedral R/S & E/Z inversions, planar/twisted stereo ambiguity, wrong-face explicit hydrogens
Surface 3 · Pre-MD Receptor & System Integrity md prepare, md run Backbone chain gaps (NEG-003), covalent ligand–protein contacts (NEG-004), non-standard residues like MSE (NEG-005), unsupported metal ions (NEG-006), severe ligand–protein steric clashes (X1), stretched ligand bonds (X2), missing side-chain atoms (X3), exact plip==3.0.0 environment pin

Creation-Time Provenance & Reproducibility

Section titled “Creation-Time Provenance & Reproducibility”

Every configured workflow writes auditable artifacts alongside scientific outputs:

  • run_manifest.json — Resolved configuration (including effective normalized ranking weights), stage funnel counts, failure-reason tallies, timings, and SHA-256 fingerprints of inputs/outputs.
  • PROVENANCE.md — Human-readable Methods summary recording invoked dependency versions (RDKit, PLIP 3.0.0, Open Babel, GROMACS, etc.) and protocol parameters.
  • CITATION.txt — Ready-to-cite software list covering only the tools actually invoked during that run.
  • Crash-safe resume (md run) — Atomic checkpointing verified across SIGINT / SIGKILL interruptions.