From 0bf4bdb9d0fe87f5c3a6f2f94a98f821f3d8b181 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 22 Oct 2026 07:58:20 +0200 Subject: [PATCH] still battery: score R-free against the deposited data through the same dimple protocol The published R-free comes from the depositors' own refinement (mostly phenix.refine), while the battery refines with dimple's 8 REFMAC cycles, so the two are not like-for-like: on LCLS 222 (8TDQ) the deposited intensities reach 0.1918 under dimple against a published 0.2012. Every set now carries "R-free deposition (dimple)": the deposition's -sf.cif (intensity_meas, else the mean of the anomalous pair, else F_meas_au squared) refined with the same refine() as our merge - same deposited model, the deposition's free set, cut at its resolution. It is computed once per entry and resolution and kept in the PDB cache (-dimple-/reference.json); `run` and `report` fill in a missing one, `reference` computes or lists them up front. The report gains the difference (ours minus the deposition's) and a quality verdict (win below -0.01, draw within 0.01, loss otherwise); the published R-free stays as an informational column. Reproduces the hand-computed references: 8TDQ 0.1918, 9V3D 0.2220, 31JT 0.1945. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu --- tools/battery/README.md | 12 +++- tools/battery/still_battery.py | 108 ++++++++++++++++++++++++++++++--- 2 files changed, 108 insertions(+), 12 deletions(-) diff --git a/tools/battery/README.md b/tools/battery/README.md index 4fe3d9b79..37ce2a877 100644 --- a/tools/battery/README.md +++ b/tools/battery/README.md @@ -949,8 +949,10 @@ once and its row says what the merge is worth and what it cost: | facility, beamline, detector, dataset, PDB | from the manifest | | images | frames in the input files (rugnux's `IMAGES_PROCESSED`); images (deposition) the deposition's own count, where it is known | | indexed %, d_min, R_split | rugnux's report (`INDEXING_RATE`, `INCLUDE_RESOLUTION_RANGE`, `R_SPLIT`: whole frames go to one half, as in CrystFEL) | -| R_free rugnux | `dimple` of the deposited model against our merge, reindexed into the deposition's space group, with the deposition's own free set, at the deposition's resolution | -| R_free deposited | the entry's published R-free (dark and ground-state entries only) | +| R_free rugnux (dimple) | `dimple` of the deposited model against our merge, reindexed into the deposition's space group, with the deposition's own free set, at the deposition's resolution | +| R_free deposition (dimple) | the same protocol on the deposited data (the entry's `-sf.cif`: `intensity_meas`, else the mean of the anomalous pair, else `F_meas_au` squared): the reference | +| difference, quality | ours minus the deposition's; win where ours is lower by more than 0.01, draw within 0.01, loss otherwise | +| R_free published | the entry's own R-free (dark and ground-state entries only), from its own refinement program: for information, not like-for-like | | time, ms/image | wall clock of the rugnux command, which ends with the model validation | | I/O floor | the input's bytes over `--io-gbps` (default 5 GB/s): the time reading alone would take from an SSD | | page cache | share of the input already in memory when the run started (`fincore`): cold, warm or partial | @@ -966,9 +968,15 @@ still_battery.py run --rugnux build/rugnux/rugnux [--only pal90,sacla236 | --tie still_battery.py compare RUN_A RUN_B still_battery.py report RUN [--out DIR] still_battery.py list +still_battery.py reference [--only pal90,sacla236] still_battery.py keep RUN --as workstation|server ``` +The deposited-data reference is computed once per entry and resolution and kept in the PDB cache +(`/-dimple-/reference.json`, with the dimple run beside it); `run` and +`report` compute a missing one on the way (so `report` of an older run gains the column), and +`reference` computes or lists them all up front. + A run writes `/__still-