Authority Separation & Realised-Geometry Gates
The Silent-Corruption Problem in Docking → MD Hand-Offs
Section titled “The Silent-Corruption Problem in Docking → MD Hand-Offs”Most structure-based pipelines hand ligands across formats that discard chemistry:
- Vina / Smina / GNINA
.pdbqtdrops bond orders, aromaticity, and formal charges (keeping only AutoDock atom types and polar hydrogens). - Plain
.pdbcomplexes omit reliable bond multiplicities and explicit hydrogens. - Conventional converters (
obabel, unguarded template assignment) either infer bond orders from 3D bond lengths or silently overwrite stereochemical tags without checking the actual 3D coordinates written to disk.
When that silently fails, downstream tools (PLIP, ACPYPE, GROMACS) do not crash — they happily finish with exit code 0 on the wrong stereoisomer, wrong protonation state, or wrong-face explicit hydrogen.
How Authority Separation Works
Section titled “How Authority Separation Works”Dock2MD splits every reconstruction into two strictly separated authorities:
| Authority | Source File | Controls | Never Controls |
|---|---|---|---|
| Coordinate Authority | Pose (.pdbqt, .pdb, .sdf, .dlg) |
3D heavy-atom (x, y, z) positions |
Bond orders, formal charges, tautomer/protonation state |
| Chemistry Authority | Reference ligand (-l, .sdf/.mol2) |
Molecular graph, bond orders, formal charge, protonation, declared stereocentres (R/S, E/Z) |
Docked 3D coordinates |
Step-by-Step Reconstruction Pipeline
Section titled “Step-by-Step Reconstruction Pipeline”- Graph & Atom Mapping: Maps pose heavy atoms onto the reference molecular graph (via atom-name matching or subgraph isomorphism, handling symmetric automorphisms safely).
- Coordinate Transfer: Copies exact 3D heavy-atom positions from the pose onto the reference topology.
- Explicit-Hydrogen Placement & MMFF Optimization: Adds explicit hydrogens matching the reference’s exact protonation state and optimizes hydrogen coordinates while restraining heavy atoms.
- Realised-Geometry Verification Gates (Fail-Loud):
- Tetrahedral (
R/S) & Double-Bond (E/Z) Gate: Reads stereochemistry directly from the realised 3D output coordinates and compares every declared stereocentre against the reference. Contradictions raiseChiralInversionError; near-planar centres (|v_norm| < 0.10) or twisted double bonds (60°–120°) raiseStereochemicalAmbiguityError. - Explicit Stereogenic-H Face Gate (
verify_hydrogen_geometry): Verifies that explicit hydrogens on tetrahedral stereocentres sit on the chemically correct face — closing a silent wrong-face-H defect (39.61%across pre-fix DEKOIS Vina builds) that H-stripping guards and default PoseBusters (ignore_hydrogens=True) miss completely.
- Tetrahedral (
Measured Evidence (v0.5.0)
Section titled “Measured Evidence (v0.5.0)”- Reference-Discrepancy Registry (
N = 138): Pre-gate tag checks passed 11 wrong-isomer outputs and 1 geometrically inconsistent output with exit code0; the realised-geometry gate refused 12 / 12. - Large-Scale Inversion Stress Test (
5,371CLI runs): Refused 3,026 / 3,026 synthetic inversions (704docked +2,322crystal) with 0 / 2,339 stereochemical false positives. - Explicit-H Audit (
8,795DEKOIS +460Pop B builds): Cut wrong-face explicit hydrogens to 0 / 4,183 (0.00%) and 0 / 447.