# Three-state SNR 0.05 benchmark for multi-state solve3D This package is for building a nightly test of de novo multi-state `solve3D`: `nstates=3`, starting from a random split of the particles into states. Hans considers the current code good enough on this data set. The package holds the data, the exact commands, a scoring script, and the statistics of five runs on the code that produced them (HEAD 1c12bb4eb, 2026-11-11), to set the test's expectations. Location: dell2, `/data2/multistate_bench/snr005_nightly_package/` (5.1 GB, almost all of it the particle stack). ## Contents | Path | What it is | |---|---| | `data/particles_f05.mrcs` | 80,000 simulated particles: 128 x 128 px at 3 Å/px, with CTF, SNR 0.05 (4.9 GB) | | `data/labels_f05.txt` | the true state of each particle, one per line in stack order (1, 2 or 3) | | `data/truth_f05.txt` | the simulator's truth, one `key=value` line per particle: true `e1 e2 e3 x y`, CTF and `state` | | `data/truth_maps/class{1_8c9c,2_8c96,3_8c8x}.mrc` | the three maps the particles were simulated from | | `commands.sh` | the command chain: simulate, project, solve2D, solve3D, score | | `tools/acc3.py` | scores a states file against the truth: accuracy, recall per state, ARI, verdict. Python standard library only | | `tools/f05_tables.py` | turns `truth_f05.txt` into the import tables (`oritab_zero.txt` for de novo, `oritab_true.txt`) and the labels file | | `results/summary.tsv` | one line per run: wall time, final accuracy, recall, ARI, populations, accuracy per stage, verdict | | `results/run{1..4}/` | each run's command, `metrics.txt` (per stage and per iteration), `solve3D.log`, `states_stage{0..5}.txt`, the final `states_iter*.txt`, `dock_eval.txt` (final maps against the truth maps) | | `results/run4/pose_by_stage.txt` | median pose error per state at each stage end, against the true poses | | `results/run5_stopped/` | a fifth run, stopped at iteration 82 of 85 (the labels files only) | | `results/simulate.log` | the simulation's log | ## The data The three states are three Ribosembly assemblies from CryoBench (Jeon et al. 2024; the maps were reconstructed with SIMPLE from Afan's SNR 0.01 benchmark in `/data2/multistate_bench`): | State | Assembly | Particles | |---|---|---| | 1 | 8C9C (smallest) | 24,000 (30 %) | | 2 | 8C96 (medium) | 48,000 (60 %) | | 3 | 8C8X (largest) | 8,000 (10 %, the rare state) | The particles were simulated with SIMPLE's own `simulate_particles`: - populations 0.3 / 0.6 / 0.1, SNR 0.05; - orientations uniform over SO(3), shifts uniform within 10 px; - CTF at 300 kV, Cs 2.7 mm, amplitude contrast 0.07, defocus 1-2 µm, astigmatism about 0.05 µm; - seed 20261109, set through `SIMPLE_SEED` for this command only. `bash commands.sh simulate` regenerates `data/`. Whether a later build reproduces the stack bit for bit has not been checked; the stack here is the one every run used. ## Commands `commands.sh` holds the exact chain. In short: ``` simple_exec prg=new_project projname=PZ05 simple_exec prg=import_particles projfile=PZ05.simple stk=particles_f05.mrcs oritab=oritab_zero.txt \ ctf=yes smpd=3 kv=300 cs=2.7 fraca=0.07 mkdir=no simple_exec prg=solve2D projfile=P2_05.simple ncls=30 mskdiam=300 nthr=16 mkdir=no # ~23 min simple_exec prg=solve3D pgrp=c1 mskdiam=300 nstates=3 nparts=2 nthr=8 print_states=yes projfile=P2_05.simple ``` - `oritab_zero.txt` keeps the true CTF and sets poses, shifts and state to zero / 1. `f05_tables.py` makes it. - All five runs started from copies of one `solve2D` project, made once with the same build. - `SIMPLE_SEED` was unset for `solve2D` and `solve3D`, so every run had a different random start. - `print_states=yes` writes the labels into `1_solve3D/`: - `states_stage.txt` at each stage end, one state per line in row order; - `states_iter.txt` per iteration, with the header `# pind state updatecnt`. - The last `states_iter` file is the final assignment (all particles, posterior at beta 1). That file is the result. ## Scoring ``` python3 -I tools/acc3.py 1_solve3D/states_iter085.txt --truth data/labels_f05.txt ``` How the score is computed: - The found states are matched one to one to the true states by the best of the six permutations. - **Accuracy** is the fraction of particles in their matched state. - **Recall** of a true state is the fraction of its particles in its matched state. - **ARI** is the adjusted Rand index. - **Verdict:** - *separated*: accuracy at least 0.90 and every recall at least 0.75; - *partial*: accuracy at least 0.75, or exactly two states recovered; - *failed*: otherwise. The thresholds are options (`--acc-sep`, `--acc-part`, `--recall`). `--tsv` prints one line for a test to parse. The script reproduces the verdicts below exactly. ## Results on HEAD 1c12bb4eb Machine: dell2 (16 cores: 4 P, 8 E and 4 low-power E, no hyperthreading; 61 GB), one run at a time, Release build. | Run | Final accuracy | Recall (1 / 2 / 3) | ARI | Verdict | Wall time | |---|---|---|---|---|---| | 1 | 0.9962 | 0.998 / 0.995 / 0.999 | 0.988 | separated | 7 h 27 min | | 2 | 0.8628 | 0.837 / 0.950 / 0.416 | 0.728 | partial | 7 h 26 min | | 3 | 0.9690 | 0.999 / 0.949 / 1.000 | 0.912 | separated | 6 h 08 min | | 4 | 0.9686 | 0.990 / 0.953 / 1.000 | 0.917 | separated | 6 h 30 min | | 5 | 0.9692 at iteration 82 (stopped) | 0.990 / 0.954 / 1.000 | 0.919 | separated so far | – | Accuracy at each stage end. The low-pass limit is planned from `mskdiam`: 30, 24, 18, 12 and 6 Å. Stages 3 and 4 are promoted one rung by the FSC=0.5 rule, so they actually run at 12 and 6 Å. | Run | Stage 1 (30 Å) | 2 (24 Å) | 3 (12 Å) | 4 (6 Å) | 5 (6 Å) | |---|---|---|---|---|---| | 1 | 0.789 | 0.665 | 0.992 | 0.995 | 0.996 | | 2 | 0.726 | 0.754 | 0.748 | 0.765 | 0.824 | | 3 | 0.866 | 0.961 | 0.965 | 0.967 | 0.969 | | 4 | 0.861 | 0.959 | 0.961 | 0.966 | 0.968 | | 5 | 0.871 | 0.957 | 0.964 | 0.967 | – | Iterations and time per stage (run 4; the others are within about 10 %, except stage 5 of runs 1 and 2 at about 3 h 45 min): | Stage | 1 | 2 | 3 | 4 | 5 | |---|---|---|---|---|---| | Iterations | 20 | 20 | 17 | 15 | 13 | | Time | 5 min | 14 min | 58 min | 1 h 32 min | 2 h 59 min | **Maps.** Each final map was docked onto each truth map in both hands; `dock_eval.txt` lists the correlation and FSC. | Run | 8C9C (state 1) | 8C96 (state 2) | 8C8X (state 3) | |---|---|---|---| | 1 | **wrong** (best match cc 0.35) | cc 0.995 | cc 0.971 | | 3 | **wrong** (best match cc 0.27) | cc 0.990 | cc 0.941 | | 4 | cc 0.988 | cc 0.993 | cc 0.918 | Where a map is right, its FSC=0.5 to the truth is at 6.0-6.1 Å. Run 2's wrong labels come with a wrong 8C8X map. So a run can be *separated* on labels while one state's map is wrong. `run4/pose_by_stage.txt` shows how this happens. The 8C9C model starts wrong in stage 1 (median pose error 39°; 60° in run 5) and corrects itself in stages 2-3 (2.7° after stage 3). In runs 1 and 3 it did not recover. The pose files for runs 1-3 compare final poses only. ## Notes for the test design - **Success rate.** Labels separated in 4 of 5 runs. All three maps were right in 1 of the 3 separated runs that were docked. Five runs are too few for a floor under the test policy's floor rule (`doc/policies/test_environment_policy.md`); a 20-seed profile would be needed for that. - **Run time.** A full run takes 6-7.5 h at `nparts=2 nthr=8`, against the 1.5-2 h of today's whole nightly on this machine. Runs 1, 3, 4 and 5 were separated by the end of stage 3, about 1 h 20 min in; run 2 was failed there (0.748) and ended partial. A test that stops after stage 3 has not been run. Note that `nstages=3` changes the ladder, so it is not the same thing. - **Run-to-run variation.** The runs differ only through their random start (no seed). A nightly entry would set a seed as the other high-level entries do. Whether a fixed seed lands on a separating run has not been tried. - **Code version.** These numbers belong to 1c12bb4eb. Since then: - `simulated_workflow_6vxx` has been failing in the nightly since 3d097187a (the `mskdiam` ladder), with a wrong single-state model of the same kind; - f2e907c24 changed single-state trailing reconstruction. Rerun a few seeds on the build the test goes in with before fixing any threshold.