Introduction
Many proteins work by switching between distinct structures, and a structure predictor given a sequence and its multiple sequence alignment usually returns only one of them. AlphaFold2 [1], run on the full alignment over its weight sets and random draws, returns the same conformation many times; that is the starter of this task. The question posed is to learn a method that, for a protein it has never seen, returns a ranked ensemble of backbones covering both of its observed states and nominates two structures, one per state.
The field has two broad families of answers. One perturbs what AlphaFold2 sees: shallow random subsamples of the alignment [2], clusters of related sequences [3], frustration-guided subsampling [4], or column masking with dropout at inference [5]. The other changes the model: flow-matching fine-tunes of a predictor that sample ensembles [6], emulators of equilibrium ensembles trained on simulation [7], or AlphaFold2 retrained on a split by conformation [8]. Elastic-network normal modes [9, 10] around a single prediction serve as a physical null.
Two difficulties are shared by all of them, and our method is built around both. First, coverage and nomination are different problems. A pool can contain structures close to the second state and still nominate two members of the first; the primary reading of this task credits only the nominated pair, and per protein only the weaker of its two states. Second, the usual quality signals point the wrong way. A structure in the less populated state is often predicted with lower confidence than the dominant one, so ranking by confidence preferentially discards exactly the structures that are wanted, while unconstrained sampling also produces structures that are far from both states and merely unfolded.
Method
Our method spends each protein's budget in stages that all append to one persistent pool, so that a truncated budget still returns the best ensemble found so far, and then chooses the two nominations by an analysis of that pool. Training is small and is described last.
A pool with provenance
The pool is filled from three kinds of source, in order of the remaining budget as a fraction of the per-protein budget .
- An alignment-subset screen (until ). The alignment is split into sequence clusters with the MSA-Transformer's clustering operation, falling back to a greedy Hamming-distance clustering when that fails. Up to twenty clusters capped at 48 rows and, for alignments deeper than 16 rows, the first ten clusters again capped at 96 rows and three random subsets each of depth 16, 32 and 64, are folded cheaply: AlphaFold2 model 1, one recycle, two draws per subset. Each fold is tagged with the identifier of its subset. Two shallow full-alignment fold requests of two draws each and four folds with 15% of the columns masked and dropout on follow.
- Pretrained generators (until ). BioEmu v1.1 [7] and AlphaFlow [6] (the distilled model first, then the base model with a subsampled alignment), with each call sized from the per-sample cost measured on the previous one.
- Deep refolding (until , then a final refinement). After a first analysis, up to six subsets are promoted, taken in this order from: the three best by a subset score, the three whose fold medoid lies nearest the alternative-state hypothesis, and the subset behind the nominated alternative. Each is refolded with models 1 to 3 at three recycles and three draws per model, and the pool is analysed again.
The subset score rewards a subset whose folds are far from the reference prediction (AlphaFold2 on the unmodified alignment), agree with each other, and are confident:
where is the distance of a fold to , the mean distance between the subset's folds (the mean of their distance matrix, self-distances included) and their mean pLDDT. The reason for deep refolding is reproducibility: a real alternative state comes back when its subset is folded again with other weights, while an artefact of one shallow fold does not.
Distances on the residues that switch
Global RMSD mixes a rigid core with the part that moves, and in our development it merged states that differ only in a domain or loop. We therefore estimate the switching residues from the pool itself. Every candidate is first aligned on all residues to , and the per-residue displacement is
The switch set is the most displaced residues among those with Å, and the core is the rest. Each candidate is re-aligned on the core alone, and distances are measured on the switch set,
with the global Kabsch RMSD kept beside it.
def _switch_geometry(self, cas_k, seed_ca, L):
"""Pairwise switch-residue RMSD in a core-aligned common frame.
Returns (D, d_seed) or (None, None) when the pool shows no clear
switch/core split."""
n = len(cas_k)
if n < 6 or L < 20:
return None, None
allm = np.ones(L, dtype=bool)
X = np.stack([self._align_on(c, seed_ca, allm) for c in cas_k])
disp = np.sqrt((((X - seed_ca[None]) ** 2).sum(-1)).mean(0)) # per-residue RMS displacement
order = np.argsort(-disp)
nsw = max(10, int(round(float(getattr(self, '_sw_frac', 0.5)) * L)))
sw_idx = np.array([r for r in order[:nsw] if disp[r] > 0.8])
if len(sw_idx) < 10:
return None, None
switch = np.zeros(L, dtype=bool)
switch[sw_idx] = True
core = ~switch
if core.sum() < 10:
return None, None
Xc = np.stack([self._align_on(c, seed_ca, core) for c in cas_k])
Xs = Xc[:, switch, :] - seed_ca[None, switch, :]
d_seed = np.sqrt((Xs ** 2).sum((1, 2)) / float(len(sw_idx)))
F = Xc[:, switch, :].reshape(n, -1)
G = (F * F).sum(1)
Dm = np.sqrt(np.maximum(G[:, None] + G[None, :] - 2.0 * (F @ F.T), 0.0) / float(len(sw_idx)))
return Dm, d_seedQuality without trusting confidence alone
Each candidate's quality combines mean pLDDT , a contact-satisfaction term and, for AlphaFold2 folds, a PAE packing fraction:
where is the fraction of residue pairs at sequence separation of at least 6 that the model places with PAE below 5 Å, and is the weighted mean, over the strongest MSA-Transformer contacts, of . The packing fraction separates a folded alternative from confident-looking garbage. Candidates without pLDDT, such as BioEmu samples, have their contact satisfaction mapped through the pLDDT-bearing candidates' satisfaction-to-quality percentiles, and, when the training phase produced one, blended at weight 0.25 with the learned validity score mapped the same way within the 20th to 80th percentile band.
# PAE packing confidence for AF2 candidates: fraction of long-range
# pairs the model places confidently (PAE < 5 A). Distinguishes a
# genuinely folded alternative state from confident-looking garbage.
pae_q = np.full(len(items), np.nan)
for ii, i in enumerate(items):
pae = getattr(pool.preds[i], "pae", None)
if pae is not None:
try:
pa = np.asarray(pae, dtype=np.float64)
if pa.ndim == 2 and pa.shape[0] == L:
iu = np.triu_indices(L, k=6)
pae_q[ii] = float((pa[iu] < 5.0).mean())
except Exception:
pass
base_q = W["plddt"] * np.nan_to_num(pld) / 100.0 + W["sat"] * sat
q = np.where(has_pld & np.isfinite(pae_q),
0.7 * base_q + 0.3 * np.nan_to_num(pae_q),
np.where(has_pld, base_q, sat))
# put pLDDT-less candidates (BioEmu, own) on the same scale: map their
# contact satisfaction (and learned validity score, when trained)
# through the pLDDT candidates' sat->q percentile map
if has_pld.sum() >= 8 and (~has_pld).any():
s_ref = np.sort(sat[has_pld])
q_ref = np.sort(q[has_pld])
pct = np.searchsorted(s_ref, sat[~has_pld]) / max(1, len(s_ref))
q[~has_pld] = np.quantile(q_ref, np.clip(pct, 0.02, 0.98))Alternative-state hypotheses
Candidate centres for the second state come from four mechanisms, because in our development each one failed on some protein where another succeeded:
-
Bimodal axes. We take the principal components of the core-aligned switch coordinates, split each into two groups by one-dimensional two-means, and score an axis by the separation of the groups, by how folded both tails of the axis are, and by balance,
where is the mean foldedness rank in the lowest and highest 15% of the axis and . The medoids of both groups of the two best axes become hypotheses. An axis whose two ends are both folded is a conformational change; an axis with one unfolded end is not.
-
Subset medoids, and separately the medoid of a subset's deep folds when there are at least three of them.
-
Density peaks, up to four, mutually more than 3 Å apart.
-
A far confident pick: among folds whose pLDDT is at least 85% of the best, the one globally farthest from the most confident fold.
scored = []
for k in range(min(6, U.shape[1])):
v = U[:, k] * s[k]
if not np.isfinite(v).all() or v.std() < 1e-9:
continue
c = np.array([np.percentile(v, 25), np.percentile(v, 75)])
lab = np.zeros(n, dtype=int)
for _ in range(50):
lab = (np.abs(v - c[1]) < np.abs(v - c[0])).astype(int)
if lab.sum() == 0 or lab.sum() == n:
break
nc = np.array([v[lab == 0].mean(), v[lab == 1].mean()])
if np.allclose(nc, c):
break
c = nc
if lab.sum() == 0 or lab.sum() == n or min(lab.sum(), n - lab.sum()) < 3:
continue
ss = np.array([v[lab == 0].std(), v[lab == 1].std()])
sep = abs(c[1] - c[0]) / max(1e-9, (ss[0] + ss[1]))
lo = v <= np.percentile(v, 15)
hi = v >= np.percentile(v, 85)
qmin = min(float(fold[lo].mean()), float(fold[hi].mean()))
bal = 1.0 - abs(float(lab.mean()) - 0.5) * 2.0
score = float(sep * qmin * (0.3 + 0.7 * bal))
scored.append((score, lab))Choosing the pair
Each candidate's support is the quality-weighted density of the pool around it in switch space, . The two nominations are the pair, among the reference basin's medoid, the axis medoids, the ten best-scored hypotheses and the far confident pick, that maximises
Selecting a pair, rather than fixing one nomination at the reference prediction and searching for a partner, handles proteins whose reference prediction lies between the two states: two axis medoids can then win together. Separation is measured globally because, in our development, switch-space separation exaggerated floppy tails. The pair member farther from is the alternative nomination; when its hypothesis came from an axis or a subset we nominate that medoid itself, since re-picking the best-quality member of its basin drifted back toward the dominant state. If the two nominations end up less than 1.0 Å apart in switch space, the alternative is replaced by the farthest candidate with . The ranked ensemble lists the reference basin, then the alternative basin, then the rest, each by quality.
# --- pair selection: the two nominations are the pair of candidate
# medoids maximizing min-support x separation. This covers both the
# usual case (seed medoid + alternative mode) and seeds that sit
# between the two states (two axis medoids win instead).
cand_pos = []
for c in [seed_med] + axis_medoids + [cen for _sc, cen, _s, _k in hyp_scores[:10]] \
+ [cen for cen, _s, kd in hyps if kd in ("afs", "axis")]:
if int(c) not in cand_pos:
cand_pos.append(int(c))
_pg = str(W.get("pair_geom", "g"))
Dpair = Dg if _pg == "g" else (_pairwise_tm(cas_k) * 12.0 if _pg == "tm" else D)
# pair selection over candidate medoids (seed medoid included): the
# two nominations maximize min-support x global separation. Includes
# seed-between-states cases where neither mode is the seed basin.
best_pair, best_psc = None, -1.0
for a in range(len(cand_pos)):
for b in range(a + 1, len(cand_pos)):
i, j = cand_pos[a], cand_pos[b]
sc = float(min(support[i], support[j]) ** float(W.get("pair_pow", 0.5))
* min(1.0, float(Dpair[i, j]) / float(W.get("pair_dref", 6.0)))
* (0.5 + 0.5 * min(qk[i], qk[j])))
if sc > best_psc:
best_psc, best_pair = sc, (i, j)
if best_pair is None: # single candidate: pair it with the farthest decent one
cand = [pos for pos in range(n) if qk[pos] > 0.35]
far = max(cand, key=lambda pos: d_seed[pos]) if cand else int(np.argmax(d_seed))
best_pair = (seed_med, int(far))
hyp_scores = [(0.0, int(far), -1, "far")]
p_i, p_j = best_pair
# alt = the pair member farther from the seed structure (seed-side otherwise)
if float(d_seed[p_i]) >= float(d_seed[p_j]):
center, seed_side = int(p_i), int(p_j)
else:
center, seed_side = int(p_j), int(p_i)The training phase
train() fits a CA-trace validity classifier on the corpus: up to 8000 chains, ten length-normalised
trace features (pseudo-bond statistics, closest non-bonded approach, contact density, radius of
gyration, pseudo-angle statistics), real traces as positives and two corruptions as negatives,
Gaussian noise of 1.5 or 3.0 Å and a reversed 20-residue segment. It is a logistic regression fitted
by 300 gradient steps. A second stage mines pairs of structures of the same accession for
inter-state distance and switch-fraction statistics and stores them in the artifact.
for r in recs:
ca = np.asarray(r["ca"], dtype=np.float64)
if len(ca) < 30 or not np.isfinite(ca).all():
continue
X.append(self._trace_feats(ca))
y.append(1.0)
noisy = ca + rng.normal(0, float(rng.choice([1.5, 3.0])), ca.shape)
X.append(self._trace_feats(noisy))
y.append(0.0)
if len(ca) >= 60: # segment-swap corruption
bad = ca.copy()
a = int(rng.integers(10, len(ca) - 30))
bad[a:a + 20] = bad[a:a + 20][::-1]
X.append(self._trace_feats(bad))
y.append(0.0)
got += 1
if got >= 8000:
break
if len(y) < 200:
return
X = np.array(X)
y = np.array(y)
mu, sd = X.mean(0), X.std(0) + 1e-9
Xn = (X - mu) / sd
wgt = np.zeros(X.shape[1])
b = 0.0
for _ in range(300):
z = Xn @ wgt + b
p = 1.0 / (1.0 + np.exp(-np.clip(z, -30, 30)))
g = Xn.T @ (p - y) / len(y) + 1e-3 * wgt
wgt -= 0.5 * g
b -= 0.5 * float((p - y).mean())
np.savez(os.path.join(art, "validity.npz"), w=wgt, b=np.array([b]), mu=mu, sd=sd)Results
| Method | ① | ② | ||
|---|---|---|---|---|
| Nominated-pair score ↑ | Ensemble score ↑ | Nominated-pair score ↑ | Ensemble score ↑ | |
| Muse Wonder Full | 0.063 | 0.100 | 0.067 | 0.063 |
| AlphaFold2, full MSA | 0.004 | 0.034 | 0.062 | 0.019 |
| Elastic-network normal modes | 0.011 | 0.015 | 0.064 | 0.028 |
| Random MSA subsampling | 0.027 | 0.061 | 0.061 | 0 |
| AF-Cluster | 0.022 | 0.043 | 0.034 | 0 |
| AFsample2 | 0.084 | 0.095 | 0.146 | 0.021 |
| BioEmu | 0.044 | 0.106 | 0.071 | 0.102 |
| AlphaFlow | 0.053 | 0.061 | 0.125 | 0.032 |
| ESMFlow | 0.033 | 0.046 | 0.009 | 0.012 |
| Coarse-grained simulation | 0.006 | 0.022 | 0.046 | 0 |
- ① Both states previously observed (frozen board of switching protein pairs)
- ② One state unseen by pretrained models (frozen board of switching protein pairs)
On Both states previously observed (frozen board of switching protein pairs) our nominated-pair score is 0.063, against 0.004 for the starter. Among the published methods only AFsample2 [5] is higher, at 0.084; we are above every other baseline with a published value there, including AlphaFlow (0.053), BioEmu (0.044), AF-Cluster (0.022) and depth-matched random subsampling (0.027). SF-Cluster has no published value on either setting.
On One state unseen by pretrained models (frozen board of switching protein pairs) we reach 0.067, which is above the starter (0.062) by a small margin, slightly below BioEmu (0.071) and well below the two strongest baselines, AFsample2 [5] at 0.146 and AlphaFlow at 0.125. Our pool contains samples from AlphaFlow models, yet on this setting we stay well below what AlphaFlow reaches alone.
Across the two settings the method improves on the starter, by a wide margin on Both states previously observed (frozen board of switching protein pairs) and a narrow one on One state unseen by pretrained models (frozen board of switching protein pairs), and it is not yet better at choosing than the best single source is at sampling.
How we got here
We began by measuring the sources before writing a method. On the first development protein, the plain AlphaFold2 fold reached one state and the flow models the other, which is what made a pooled, multi-source design attractive. Our first version, a staged screen followed by clustering and contact-satisfaction nomination, scored 0.63 on that protein under our local scorer, against 0.00 for BioEmu and 0.70 for AFsample2 run through the same harness. Most of what followed was about nomination. The development figures below are our own, on the development pairs the data interface serves, scored by our own approximation of the task's metric (core-aligned, on switch residues), which may differ from the task's in its details.
- Global distances did not separate states. On eight development proteins the second version, under our first scorer, failed to nominate both states on seven, although the pool often contained the missing state. Rebuilding our scorer with core alignment confirmed this: coverage was there and nomination picked the wrong basin. This led to the pool-estimated switch geometry; on one pool we checked, its distances to the reference correlated at 0.94 with the true ones, so the remaining problem was direction, not distance.
- Confidence ranking rejected the answer. On one failing pool the structures in the true alternative state had a median pLDDT of 57 against 92 for the dominant state. This is why the axis score asks that both ends be folded rather than that the candidate be confident.
- Coevolutionary direction was weak. We looked for predicted contacts that the reference prediction violates, as a signal pointing toward the other state; the contact "gain" term built on that idea was close to zero on every pool. With our own quick coevolution couplings, the strong contacts specific to one state numbered at most ten per protein on six development proteins, and with the real MSA-Transformer contacts on one protein two of them were specific to one state against nine shared by both. The gain term survives in the code but carries little weight.
- Physics-based extrapolation did not reach missing states. In our check the top twenty elastic-network modes captured about 0.76 of the true displacement, which made a guided search in that subspace look promising, but a prototype that morphed along those modes toward violated contacts was unstable and was dropped; extrapolating along the pool's principal axes did not reach the missing state either.
- A learned candidate classifier did not transfer. Since different nomination rules won on different proteins, we trained per-candidate classifiers (logistic regression and gradient-boosted trees) leave-one-protein-out; both gave a mean of 0.084, and we kept hand-built rules.
- Some states are not sampled at all. For two proteins no generator we probed (AlphaFold2 variants, BioEmu versions, AlphaFlow and ESMFlow variants, Cfold) produced the second state, apart from one weak partial hit (0.24 under our scorer) by one BioEmu version; Cfold also cost 86 seconds per sample, which ruled it out within the budget.
- From an anchored nomination to pairs. Anchoring one nomination at the reference prediction failed on a protein whose reference sat between the two states; pair selection by support and separation fixed it offline, and a sweep of the support exponent and separation reference raised the offline mean on six proteins from 0.170 to 0.189. A later live version, which combined the subset hypotheses, the bimodal axes and pair selection, raised the mean on the eight proteins from 0.13 to 0.21. We then found that our subset promotion score was anti-correlated with alternative-state purity and corrected it, moved the generators before promotion, and, on top of those changes, the PAE packing fraction rescued a protein that had failed in our earlier live runs.
- Choices we swept. Over all the development pools, a switch fraction of 0.5 gave a mean of 0.245 against 0.194 at 0.35 and 0.233 at 0.25; TM-score separation in the pair score was worse than RMSD; and support measured in both geometries at once lowered the mean from 0.235 to 0.181. On the development proteins held back for validation, the mean over those whose two states are observable without a partner was 0.50; over the whole development set our final summary put that subset at about 0.41, and all proteins at 0.21 to 0.26, comparable overall to AFsample2 run through the same harness, with wins on different proteins.
- Most of the last changes were reverted. Switching to BioEmu v1.2, adding an ESMFlow block and turning on the validity blend for the first time regressed several proteins together. Our check of the learned validity score found it barely discriminated (median 0.88 for the alternative-state structures against 0.894 for the rest), so we reduced its weight and clipped its range, and reverted the generator changes. In the same step we anchored one pair member to the reference side, because the pair selection had lost that side on pools dominated by BioEmu samples; the anchoring was later reverted in favour of the unanchored pair, which had the better live record.
Limitations
- Below the strongest baselines. On both settings AFsample2 is ahead of us, and on One state unseen by pretrained models (frozen board of switching protein pairs) AlphaFlow is too, by a wide margin, even though our pool contains AlphaFlow samples, as is BioEmu, by a small one. Our development points to nomination, rather than coverage, as the weaker step, but we cannot confirm that from the means alone.
- The learning is thin. The research question asks for a method that learns. Our trained component is a ten-feature logistic regression that enters only for structures without pLDDT, at weight 0.25 within a clipped band, and our own check found it barely discriminates. The mined pair statistics are written to the artifact but never read at generation time: the switch fraction stays at its constant 0.5, and the nomination weights saved by training are the defaults. In substance the method is an inference-time pipeline, the kind of approach the task notes has not recovered other states reliably.
- Hand-set constants tuned on a small development set. The support bandwidth of 1.4 Å, the separation reference of 10 Å, the 0.65 and 0.35 quality weights and the budget fractions were set by hand while developing on the development pairs with our own approximation of the scorer; only some, such as the separation reference, were swept, and several of the sweeps traded one protein for another rather than improving all of them.
- Nomination cannot create coverage. Where no source samples the second state, no choice of pair helps; our development found such proteins, and the method has no mechanism of its own for producing new conformations.
- Means only. The per-setting means above do not say on how many proteins we improve over the starter, or whether the gain on One state unseen by pretrained models (frozen board of switching protein pairs) is more than noise.
References
- John Jumper, Richard Evans, Alexander Pritzel et al. (2021). Highly accurate protein structure prediction with AlphaFold. Nature.
- Diego del Alamo, Davide Sala, Hassane S Mchaourab et al. (2022). Sampling alternative conformational states of transporters and receptors with AlphaFold2. eLife.
- Hannah K. Wayment-Steele, Adedolapo Ojoawo, Renee Otten et al. (2024). Predicting multiple conformations via sequence clustering and AlphaFold2. Nature.
- Hanqun Cao, Zijun Gao, Chunbin Gu et al. (2026). SF-Cluster: Frustration-Guided MSA Subsampling for Alternative Protein Conformation Recovery. ICML.
- Yogesh Kalakoti, Björn Wallner (2025). AFsample2 predicts multiple conformations and ensembles with AlphaFold2. Communications Biology.
- Bowen Jing, Bonnie Berger, Tommi Jaakkola (2024). AlphaFold Meets Flow Matching for Generating Protein Ensembles. ICML.
- Sarah Lewis, Tim Hempel, José Jiménez-Luna et al. (2025). Scalable emulation of protein equilibrium ensembles with generative deep learning. Science.
- Patrick Bryant, Frank Noé (2024). Structure prediction of alternative protein conformations. Nature Communications.
- A.R. Atilgan, S.R. Durell, R.L. Jernigan et al. (2001). Anisotropy of Fluctuation Dynamics of Proteins with an Elastic Network Model. Biophysical Journal.
- Ahmet Bakan, Lidio M. Meireles, Ivet Bahar (2011). <i>ProDy</i> : Protein Dynamics Inferred from Theory and Experiments. Bioinformatics.