# Target fishing guide: 12-pocket reverse docking test

Reproduction material for the test in `content/guides/target-fishing.mdx`, run on
6 November 2026.

## What was run

Twelve drug-like compounds were each docked into the pocket of each of twelve
protein structures (144 dockings) with AutoDock Vina 1.2.7 on CPU. The ranks of
each compound's own protein were then compared under raw scores and under a
per-pocket calibration.

- `panel.csv`: the twelve structures, their crystal ligands, the chains used and
  the box centre. Each box is a 22 A cube centred on the crystal ligand's
  heavy-atom centroid in that structure.
- `reverse-docking-scores.csv`: all 144 best-pose Vina scores (kcal/mol), the
  leave-one-out z-score of each, and both ranks.

## Settings

- Vina 1.2.7 (Python bindings), `vina` scoring function, exhaustiveness 8, seed 42,
  one CPU per docking, three poses requested, best pose reported.
- Receptors: the chain or chains with an atom within 5 A of the crystal ligand,
  protein atoms only (no waters, ions, cofactors or other ligands). Missing heavy
  atoms were added with PDBFixer 1.12 (no missing residues were modelled; for
  3ERT, 1EVE and 1UYG the missing terminal oxygens were not added, and for 3ERT the
  last residue, A552, was deleted because of a chain gap). Receptors were
  prepared with Meeko 0.7.1 and RDKit 2023.09.6.
- Ligands: the wwPDB ideal-coordinate SDF of each ligand code (RCSB
  `<code>_ideal.sdf`), hydrogens added with RDKit, prepared with Meeko 0.7.1. The
  crystal pose is never used as an input, only to place the box.
- Calibration: for the query compound `i` and pocket `j`, the z-score uses the mean
  and standard deviation of the scores that the other eleven compounds got in pocket
  `j` (the query is left out of its own reference).

## Scripts

Run them in this order with Python 3.11 (RDKit, Meeko, vina, gemmi) and, for the
repair step, an environment with PDBFixer and OpenMM. Paths assume `~/tf-panel`.

1. `prepare_panel.py` downloads the structures and ligands, cuts the receptors and
   writes `panel.json`. It lists 16 candidate complexes. Four were dropped before
   the final run (HIV-1 protease, factor Xa, DPP4 and DHFR) because their
   ligands were too flexible to finish docking within the time budget; the
   exclusion set is at the top of `dock_panel.py` and `analyze_panel.py`.
2. `repair_receptors.py` adds missing heavy atoms. Meeko is then run on each
   `*_fixed.pdb` with `mk_prepare_receptor.py --read_pdb ... -p`.
3. `dock_panel.py` runs the docking matrix and appends to `results.jsonl`.
4. `analyze_panel.py` prints the ranks, the pocket bias, and the self-docking RMSD
   of each compound against its crystal pose.
5. `normalization_variants.py` repeats the ranking with four other normalizations.

## Self-docking check

The top Vina pose of each compound in its own pocket was within 2 A RMSD
(heavy atoms, symmetry-aware, no superposition) of the crystal pose for 6 of the 11
entries that could be measured: ABL1 0.76, EGFR 1.46, p38a 0.60, ERa 1.20,
PR 0.84 and AR 0.63 A. It was not for HSP90a (3.12), NA (4.73), BRD4 (5.01),
PPARg (6.94) and AChE (8.86 A). The GR crystal ligand (dexamethasone) did not match
its template in RDKit and was left out of this check.

Compute: about 2.8 CPU-hours in total with four parallel workers.
