TensorBoard
spice_data / first_mut /README.md
RedElectricity's picture
Upload folder using huggingface_hub
d6fdbfa verified
|
Raw History Blame Contribute Delete
6.5 kB
# πŸ† 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)
```