The 3D companion parametrically interpolates monomer positions between a hand-placed folded shape and a coil, driven directly by a denaturation formula. This 2D version instead runs an actual bead-spring particle simulation: every monomer is a physics body with backbone bonds, excluded-volume repulsion, thermal (Brownian) kicks, and — depending on molecule type — real attractive or pairing forces. Folding and denaturation emerge from those competing forces each frame; nothing about the final shape is pre-authored.
ΔG_fold = ΔH − T·ΔS
attraction_strength ∝ (1 − denature)
denature = min(1, max(0,(T−55)/45) + max(0,(|pH−7|−2)/5))
- Protein — hydrophobic (dark) beads attract every other hydrophobic bead within range (an HP model); enough surviving contacts collapse the chain into a compact globule.
- Carb — a stiff i↔i+2 "bend spring" biases the backbone into a helical coil; carbohydrates resist true denaturation, so only thermal jitter grows with temperature.
- Lipid — several short tails self-assemble: hydrophobic tails attract each other while charged heads repel, so the chains spontaneously cluster into a micelle. Heat softens the tail-rigidity spring (membrane fluidity) instead of denaturing it.
- DNA — two backbones are pulled together base-pair by base-pair by an explicit pairing spring; push temperature or pH far enough and the pairing spring weakens until the strands melt apart.
Radius of gyration Rg = √(mean squared distance of every bead from the centroid) is plotted live below the molecule — watch it drop as a chain collapses and shoot up as it denatures, exactly the observable real biophysicists track in unfolding experiments.