This is the HP (hydrophobic–polar) lattice-free model of protein folding: each residue is labelled H (hydrophobic, orange) or P (polar, blue). Non-adjacent H residues attract each other, driving the chain to collapse into a compact hydrophobic core — a simplified model of how real proteins fold in water.
F_bond = −k·(|r_i,i+1| − L0) (keeps the chain connected)
F_HH = attraction · (1/d²) for H–H pairs, d < cutoff
F_thermal = random·temperature (Brownian jitter)
Rg² = (1/N)·Σ|r_i − r_com|² (radius of gyration)
- Chain length — number of residues (beads) in the simulated polypeptide.
- Temperature — thermal noise; high temperature keeps the chain an unfolded random coil, low temperature lets attraction dominate and the chain collapses/folds.
- Hydrophobic attraction — strength of the H–H attractive force that drives folding into a compact core.
- Pattern toggle — alternating H-P-H-P sequence vs. a randomly generated sequence, changing which fold is favorable.
- Reshuffle Chain — regenerates a fresh random/alternating sequence and resets positions to an unfolded coil.
Real application: this HP model is a classic teaching and research tool in computational biology for studying the fundamentals of protein structure prediction, energy landscapes, and folding kinetics before scaling up to full atomistic molecular dynamics.