# ๐Ÿ† SPICE first_mut โ€” First survivors from the clean-code pipeline > **Milestone date: 2026-08-14** > The first time the SPICE end-to-end loop (Pre-train โ†’ RL โ†’ pseudo-label reflow) produced > real, MD-validated surviving mutants under the **clean, fixed codebase**. > (All earlier attempts were blocked by the q-metric bug, NaN contamination, or the Head B' > blob โ€” this run had the q-fix + NaN guards + the 0.5-config new pre-train all in place.) --- ## Protein - **7QF3** = miniSOG (R57Q mutant), *Arabidopsis thaliana*, a **flavoprotein photosensitizer** (binds FMN/riboflavin, produces singlet oxygen) - 116 residues (the modeled chain used by the pipeline), 1.10 ร… X-ray crystal - Reference: Lafaye et al. 2022, *Photochem. Photobiol. Sci.* 21, 1545 (paper ref 21) ## Rescue environment (Env_fail) - **pH 7.5โ€“8.0 / 330 K / ionic 0** โ€” mild thermal + weakly alkaline stress (not extreme pH) - 7QF3 collapses here; the mutants below survive the full 20-step window here ## Eight surviving mutants (two episodes, two collapse environments) ### Group 1 โ€” episode 1 (pH 7.5โ€“8.0 collapse) โ†’ Figure 3 (main paper) The first clean-code episode produced **5 survivors** in Env_fail (pH 7.5โ€“8.0 / 330 K). Mutations converge on a small set of **hotspot rescue positions** (50 / 100 / 102 / 103). | File | Mutations | Q | steps | Strategy | |---|---|---|---|---| | `pseudo_7qf3_0_20.npz` | 50:Q>Y; 102:V>Y | 0.91 | 20 | aggressive | | `pseudo_7qf3_1_20.npz` | 52:T>N; 104:L>N | 0.90 | 20 | aggressive | | `pseudo_7qf3_2_20.npz` | 50:Q>Y; 100:I>N | 0.93 | 20 | aggressive | | `pseudo_7qf3_3_20.npz` | 50:Q>W; 100:I>M; 102:V>E | 0.91 | 20 | aggressive | | `pseudo_7qf3_4_20.npz` | 50:Q>W; 102:V>Y; 103:Q>S | 0.92 | 20 | aggressive | - **Q-gate threshold 0.5; all scored 0.90+** โ†’ genuine fold retention, not "fell apart but didn't crash" ### Group 2 โ€” later episodes (pH 10.0 alkaline collapse) After episode 1, the run probed an **alkaline** collapse environment (**pH 10.0 / 330 K**) and produced **3 more survivors**, rescued by a *different* mechanism โ€” **N-terminal substitutions** at residues 1โ€“3 (rather than the central hotspot cluster). | File | Mutations | Q | steps | Strategy | |---|---|---|---|---| | `pseudo_7qf3_5_20.npz` | 1:M>A; 2:E>L; 3:K>T | 0.91* | 20 | aggressive | | `pseudo_7qf3_6_20.npz` | 1:M>P; 2:E>K | 0.91* | 20 | aggressive | | `pseudo_7qf3_7_20.npz` | 1:M>W; 2:E>Q | 0.91* | 20 | aggressive | \* **Q re-derived, not from logs**: the per-mutant Q for these later episodes was not captured in the run logs (HPC outputs cleaned before download). It was re-computed from the archived time-averaged coordinates using the run's exact native-contact definition (`native_contact_q`, reference = wild-type 7QF3 Cฮฑ, cutoff 8 ร…); the method was validated by reproducing the five episode-1 survivors' logged Q (0.90โ€“0.93) to within 0.02. - Reflow: 8 survivors total โ†’ confidence-weighted ร—8 โ†’ `pseudo.tfrecord` ## Structure quality (MD time-averaged Cฮฑ, `analysis_metrics.csv`) | Metric | Value | Reading | |---|---|---| | Rg | 14.47โ€“14.56 ร… | correct compact size for 116 aa (random coil โ‰ˆ 22 ร…) โœ… | | Adjacent Cฮฑ bond | 3.94โ€“3.96 ร… | proper chain geometry โœ… | | Helix content | 23.3โ€“27.6% | plausible ฮฑ-helical level for a flavoprotein โœ… | | Nearest non-adjacent pair | 3.89โ€“4.19 ร… | no clashes โœ… | | Consistency across the 8 | highly consistent | one shared folded state โœ… | > Metrics recomputed uniformly for all 8 survivors (helix: d(Cฮฑแตข,Cฮฑแตขโ‚Šโ‚ƒ) < 6.5 ร…; > contact: non-adjacent Cฮฑ pairs < 7 ร…). Q for survivors 5โ€“7 was not archived (see above). ## Mutation hotspots (ES convergence signal) - **Residue 50 (Qโ†’Y/W): 4/5** โ€” aromatic packing stabilization - **Residue 102 (Vโ†’Y/E): 3/5** โ€” V102โ†’E adds surface negative charge (deprotonated at pH 8), charge-balance mechanism (m5) - **Residue 100 (Iโ†’N/M): 2/5** - **Easter egg**: `103:Q>S` hits the Q103 position that the miniSOG literature independently identifies as a functional hotspot (Q103L markedly raises singlet-oxygen yield, via an oxygen-access channel) โ€” independent convergence on a biochemically meaningful site ### Group 2 (alkaline) โ€” N-terminal charge relief - **Common target: residue 2 (Glu), 3/3** โ€” the sole acidic residue in the N-terminal region; all three remove or reverse its negative charge at pH 10: - M6: E2โ†’L (charge โˆ’1โ†’0) plus K3โ†’T (+1โ†’0) โ€” neutralizes the E2โ€“K3 charge pair - M7: E2โ†’K (โˆ’1โ†’+1) โ€” charge reversal (net +2) - M8: E2โ†’Q (โˆ’1โ†’0) โ€” removes the charge (net +1) - **Direction tied to pH**: the alkaline mirror of the episode-1 charge signal โ€” episode 1 *adds* negative charge at pH 7.5โ€“8 (V102โ†’E); the alkaline trio *eliminates* the N-terminal negative charge at pH 10. Precise framing: "eliminate the acidic terminus charge", not a uniform net-charge balance (M7 actually *adds* +1; M6 nets 0). Hypothesis pending single-mutant controls (does E2โ†’Q alone rescue? E2โ†’K alone?) ## Honest caveats - The Q-gate validates **structural** retention, not **function** (cofactor binding / photosensitizer activity unverified) - First-episode results from an ongoing run; cross-episode survival, ฮ”ฮ”G, and baselines still pending - For the pH-10 survivors (5โ€“7), per-mutant Q was **re-derived** from the archived coordinates (run logs not captured; method validated against survivors 0โ€“4, see Group 2 table) - Construction currently falls back to the wild-type backbone + sidechain rebuilding: Head B' (= Head A fold of the mutant) yields a real fold but still carries local Cฮฑ clashes that are not yet engine-buildable, so a geometric sanity guard (Rg + local-clash check) rejects it and falls back (2026-08-14) ## Paper placement - `articles/SPICE_paper.md` ยง3.3 "End-to-end operation (first results)" โ€” written up - Reference added: ref 21 (Lafaye 2022) ## Reproduce ```bash # Pseudo-label structure analysis cd /Users/redelectricity/Documents/Projects/SPICE python - <<'PY' # see the analysis script (Rg/bond/helix/contact/clash) PY ``` ## Files ``` first_mut/ โ”œโ”€โ”€ README.md # this milestone record โ”œโ”€โ”€ analysis_metrics.csv # structure-quality metrics โ”œโ”€โ”€ run_log.txt # raw HPC run-log excerpt โ”œโ”€โ”€ pseudo_7qf3_{0..7}_20.npz # 8 pseudo-labels (seq + env + coords) โ””โ”€โ”€ 7QF3.pdb # native reference (if downloaded) ```