From 69b3390458e1d17101d6db70dc1c6fb700e2fb44 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 21 Oct 2026 13:31:58 +0200 Subject: [PATCH] still battery: take the deposited model as mmCIF where the RCSB has no PDB-format file Entries too large or too new for the PDB format exist only as mmCIF, and rugnux and dimple read both; such a set ran without --model and without the dimple refinement. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu --- tools/battery/still_battery.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/battery/still_battery.py b/tools/battery/still_battery.py index fd2fa6c68..67276774b 100644 --- a/tools/battery/still_battery.py +++ b/tools/battery/still_battery.py @@ -197,11 +197,18 @@ def free_flags(sf_cif, out_mtz, free): return f"{col}={val}" +def deposited_model(pdb, cache): + """The deposited coordinates: PDB format where the RCSB serves it, else mmCIF (entries too large or + too new for the PDB format exist only as mmCIF; rugnux and dimple read both).""" + return (model_check.fetch(model_check.RCSB + pdb + ".pdb", os.path.join(cache, pdb + ".pdb")) + or model_check.fetch(model_check.RCSB + pdb + ".cif", os.path.join(cache, pdb + ".cif"))) + + def refine(wd, e, cache): """dimple of the deposited model against our merge, reindexed into the deposition's group, with the deposition's free set, cut at the deposition's resolution. (R_work, R_free, note).""" pdb = e["pdb"].lower() - xyz = model_check.fetch(model_check.RCSB + pdb + ".pdb", os.path.join(cache, pdb + ".pdb")) + xyz = deposited_model(pdb, cache) sf = model_check.fetch(model_check.RCSB + pdb + "-sf.cif", os.path.join(cache, pdb + "-sf.cif")) if not (xyz and sf) or not os.path.exists(os.path.join(wd, "p.mtz")): return None, None, "no model, structure factors or merge" @@ -235,7 +242,7 @@ def run_one(run_dir, binary, e, st, opts): model = None if e.get("pdb"): pdb = e["pdb"].lower() - model = model_check.fetch(model_check.RCSB + pdb + ".pdb", os.path.join(st["pdb_cache"], pdb + ".pdb")) + model = deposited_model(pdb, st["pdb_cache"]) cmd, short = command(binary, e, st["data_root"], opts, model) io_bytes = sum(os.path.getsize(f) for f in files) if opts["cold"]: