Life Science & Environment

Protein folding, neural oscillations, epidemic networks, and the carbon cycle — four simulations that let you explore the mathematics at the heart of living systems, from the molecular scale of a single polypeptide chain to the planetary scale of atmospheric carbon exchange.

Biology is, at its core, a physical science operating under constraints of energy, information, and time. The same differential equations that govern heat flow govern the spread of an epidemic. The same network theory that describes social connections describes the synaptic wiring of a brain. This spotlight gathers four simulations that make those connections vivid — not as metaphors, but as working computational models you can probe and perturb in real time.

Protein Folding: Shape as Destiny

How a Chain Becomes a Machine

A protein is a linear chain of amino acids that spontaneously collapses into a precise three-dimensional shape within milliseconds of leaving the ribosome. That shape is its function: haemoglobin's pocket binds oxygen because it is shaped to do so; an enzyme's active site fits its substrate the way a key fits a lock. When folding fails — as it does in Alzheimer's disease, Parkinson's disease, and type 2 diabetes — misshapen proteins aggregate into toxic fibrils that damage cells.

The Protein Folding simulator models folding on a 2D lattice using the HP (hydrophobic-polar) model introduced by Ken Dill in 1985. Each amino acid in the chain is assigned to one of two types: hydrophobic (H) residues, which avoid water, and polar (P) residues, which interact favourably with it. The chain folds to minimise the number of hydrophobic residues exposed to the surrounding solvent, driving them into a compact core — a simplified version of the same hydrophobic effect that folds real proteins. A Monte Carlo search explores the conformational space, reporting the energy at each step. You can adjust chain length, the H/P sequence, and the temperature, and watch the search converge on lower-energy conformations.

The folding problem: Cyrus Levinthal pointed out in 1969 that a 100-residue chain has roughly 1047 possible conformations. If the protein sampled them randomly, folding would take longer than the age of the universe. That it folds in milliseconds implies a funnel-shaped energy landscape that guides the chain toward the native state — the central insight of modern protein-folding theory.

Neural Oscillations: The Brain's Internal Clock

Rhythms That Bind Cognition Together

The brain generates rhythmic electrical activity across a wide range of frequencies: delta waves (1–4 Hz) during deep sleep, theta waves (4–8 Hz) during memory encoding, alpha waves (8–12 Hz) during relaxed wakefulness, and gamma waves (30–100 Hz) during focused attention. These oscillations are not mere by-products of neural activity; they appear to coordinate the timing of spikes across distant brain regions, binding together the features of a percept into a unified conscious experience.

The Neural Oscillations simulator implements a network of Hodgkin-Huxley neurons — the biophysically realistic model that earned Alan Hodgkin and Andrew Huxley the Nobel Prize in 1963. Each neuron integrates input currents through voltage-gated sodium and potassium channels, firing an action potential when its membrane potential crosses threshold. Connect enough neurons with inhibitory interneurons and they synchronise into a gamma oscillation; add a slower modulatory current and theta rhythm emerges, with gamma nested inside it — the theta-gamma coupling observed in the hippocampus during spatial navigation and memory. You can adjust synaptic coupling strength, external drive, and the ratio of excitatory to inhibitory cells, watching the power spectrum update in real time as the network transitions between regimes.

Epidemic Networks: How Disease Moves Through Communities

Beyond the SIR Model

The classic SIR (susceptible-infected-recovered) model treats a population as a well-mixed fluid: every individual is equally likely to encounter every other. This produces the familiar epidemic curve — a rapid rise, a peak, a decline — and gives the basic reproduction number R₀ its clean interpretation as the average number of secondary cases per primary case in a fully susceptible population. When R₀ > 1, an epidemic grows; when R₀ < 1, it fades.

But real populations are not well-mixed. They are networks: households, workplaces, schools, transport hubs, each with a characteristic contact rate and degree distribution. The Epidemic Network simulator places an SIR process on a configurable contact network. You can choose between random (Erdős–Rényi), scale-free (Barabási–Albert), and small-world (Watts–Strogatz) topologies, each of which produces qualitatively different epidemic dynamics. Scale-free networks — where a few superspreader hubs have very many connections — sustain epidemics at R₀ values far below 1 in the well-mixed model, and targeted removal of the highest-degree nodes dramatically reduces outbreak size. This is the mathematical basis for contact-tracing strategies: find the hubs and isolate them early.

Carbon Cycle: The Planet's Slow Breath

Reservoirs, Fluxes, and Feedback

Carbon cycles through five major reservoirs — atmosphere, ocean surface, deep ocean, terrestrial biosphere, and geological sediments — on timescales ranging from days (photosynthesis) to millions of years (silicate weathering). The concentration of CO₂ in the atmosphere is determined by the balance of fluxes between these reservoirs. Fossil fuel combustion adds carbon to the atmosphere roughly 100 times faster than volcanic outgassing did before the industrial era, overwhelming the natural feedback mechanisms that stabilised atmospheric CO₂ over geological time.

The Carbon Cycle simulator implements a five-box model with physically motivated flux equations. Ocean uptake depends on the partial pressure difference between atmosphere and surface water, modulated by the solubility pump and the biological pump. Terrestrial uptake depends on net primary productivity, which increases with CO₂ (the fertilisation effect) but decreases with temperature (the respiration feedback). You can dial in emission trajectories matching historical data or IPCC scenarios, and watch how long the pulse of anthropogenic carbon persists — the answer, roughly 20–30% remaining after 1,000 years, is one of the most important and least appreciated facts in climate science.

Explore the Simulations

All four simulations run entirely in the browser with no installation required. Ukrainian language versions are available at the /uk/ prefix. For a full list of biology and environment simulations, visit the category index.