|
1 | 1 | # foldsteer |
2 | 2 |
|
3 | | -Inference-time chemical steering for AF3-style biomolecular structure |
4 | | -prediction. Improves the chemical validity of predicted ligand geometry |
5 | | -(stereochemistry, planarity, bond geometry, steric clash) without retraining |
6 | | -and without modifying the host model's weights. |
7 | | - |
8 | | -Implements the two mechanisms used by Boltz-1x and Protenix-v2: |
| 3 | +Implementes basic chemical steering for OpenFold3-p2. Reimplements methods |
| 4 | +previously developed in Boltz-1x and Protenix-v2: |
9 | 5 |
|
10 | 6 | * **physical guidance** — gradient descent on a flat-bottom chemical energy, |
11 | 7 | applied to the denoiser's `x0` prediction at each diffusion step; |
12 | 8 | * **Feynman-Kac steering** — sample a particle population and resample it |
13 | 9 | toward low-energy trajectories. |
14 | 10 |
|
| 11 | +The package is set up in a model agnostic way. Adaptors can be written for new models. |
| 12 | + |
15 | 13 | ## Benchmark on OF3p2 |
16 | 14 |
|
17 | 15 | OpenFold3-p2 (155k) on the 100 smallest Runs N' Poses post-2025 targets, 1 seed |
18 | 16 | × 5 samples, guidance only (20 GD steps), scored with PXMeter. Rates are over |
19 | | -the 103 ligand chains, each represented by its **top-1 sample ranked by |
20 | | -`chain_pair_iptm`**. |
| 17 | +the 103 ligand chains, each represented by its top-1 sample ranked by |
| 18 | +`chain_pair_iptm`. Ligand success = RMSD < 2 Å and lDDT-PLI > 0.8. |
| 19 | + |
| 20 | + |
21 | 21 |
|
22 | 22 | | | baseline | steered | |
23 | 23 | | --- | --- | --- | |
24 | | -| PoseBusters valid | 66.0% | **89.3%** | |
25 | | -| PB valid & ligand RMSD < 2 Å & lDDT-PLI > 0.8 | 38.8% | **47.6%** | |
26 | | -| ligand RMSD < 2 Å & lDDT-PLI > 0.8 | 49.5% | 50.5% | |
27 | | -| wall clock, 4× GH200 | 9m56s | 17m11s (**1.73×**) | |
| 24 | +| PoseBusters valid | 66.0% | 89.3% | |
| 25 | +| ligand success | 49.5% | 50.5% | |
| 26 | +| PB valid & ligand success | 38.8% | 47.6% | |
| 27 | +| wall clock, 4× GH200 | 9m56s | 17m11s (1.73×) | |
28 | 28 |
|
29 | | -Steering fixes chemistry without moving docking accuracy: paired ligand by |
30 | | -ligand it fixed 25 validity failures and broke 1 (McNemar p < 1e-4), while |
31 | | -accuracy moved by a net +1 (p = 1.0). Nearly all of the gain is sterics — |
32 | | -`minimum_distance_to_protein` failures fall 141 → 3 across all 515 poses; |
33 | | -chirality is second (31 → 13). |
| 29 | +Steering fixes chemistry without moving placement: paired ligand by ligand it |
| 30 | +fixed 25 validity failures and broke 1 (McNemar p < 1e-4), while ligand success |
| 31 | +moved by a net +1 (p = 1.0). Nearly all of the gain is sterics — |
| 32 | +`minimum_distance_to_protein` failures fall 25 → 0; chirality is second |
| 33 | +(9 → 4). |
34 | 34 |
|
35 | 35 | Caveat: 10 of 161 multi-atom ligand chains were skipped because RDKit rejected |
36 | 36 | the molecule rebuilt from `atom_array` (valence errors on quaternary nitrogen |
@@ -132,3 +132,8 @@ OF3 inference input — which turned up three silent failures in it (integer |
132 | 132 | `tests/test_of3_extraction.py`. Guidance is now benchmarked against real OF3 |
133 | 133 | inference (see Benchmark above); Feynman-Kac steering is not, and the formal |
134 | 134 | charge gap in the `AtomArray` rebuild is the clearest outstanding fix. |
| 135 | + |
| 136 | +## Process |
| 137 | + |
| 138 | +Using Claude Science, I wrote a delibrated about what the API should look like. |
| 139 | +Then Claude code implemented the plan. |
0 commit comments