Real proteins that fold correctly show coevolution: if residue i mutates, a spatially contacting residue j often mutates too, to keep the pair chemically compatible. Across a deep multiple sequence alignment (MSA) of homologous sequences, this leaves a statistical footprint even though i and j can be far apart along the chain.
Mutual information between columns i, j:
MI(i,j) = ฮฃ_a ฮฃ_b p(a,b) ยท logโ[ p(a,b) / (p(a)ยทp(b)) ]
a, b = residue states observed at columns i, j
p(a,b) = joint frequency across the M sequences
High MI โ i and j are statistically coupled โ likely in 3D contact
This simulator generates a toy helix-turn-helix protein (32 residues) with a known 3D fold, then synthesizes an MSA where a subset of true contact pairs carry a coevolution signal, corrupted by the noise slider. It ranks all distant residue pairs (|iโj| โฅ 4) by MI and keeps the top-K as predicted contacts โ exactly the pairwise "distogram" signal that AlphaFold's Evoformer extracts from real MSAs.
Those predicted contacts are then fed into a live physics relaxation: backbone springs hold consecutive residues at the correct bond length, contact springs pull predicted-contact pairs together, and a soft repulsion keeps the chain from collapsing โ turning a 2D contact map back into a 3D structure, the same job AlphaFold's structure module performs from its predicted distances.
- MSA depth โ more sequences average out sampling noise, so MI estimates converge to the true coupling and precision rises (just as real structure prediction needs deep alignments).
- Mutation noise โ degrades both the background signal and the coevolutionary coupling strength; push it high enough and even a deep MSA can't recover the fold.
- Top-K โ how many of the highest-MI pairs are trusted as contacts; too few underconstrains the fold, too many admits false positives that distort it.