🦠 Virus Lytic Cycle
A cellular automaton of host cells and diffusing virions: attachment, eclipse period, replication and lysis release new virions that infect neighbours — spatial infection dynamics at the single-cell scale.
How it Works
Every host cell on the grid cycles through five states. A Susceptible cell becomes Attached when a randomly walking free virion collides with it and a per-contact attachment probability succeeds. After a short binding delay the cell enters the Eclipse phase, a silent period during which the viral genome is replicating but no new virions exist yet. Once the eclipse timer expires the cell switches to Producing, actively assembling virus particles for a fixed duration. When the producing timer runs out the cell lyses: it becomes permanently empty (Lysed) and releases a burst of new free virions outward into the surrounding space, which then diffuse and can attach to nearby Susceptible cells, repeating the cycle.
Free virions are simulated as particles performing a random walk across the canvas independent of the grid, colliding with cells as they drift. A small immune fraction of cells is marked Resistant at the start and can never be attached or infected, acting as spatial firebreaks that can locally stall or entirely extinguish the outbreak depending on their density and arrangement relative to the initial infection sites.
Attached --(bind delay)--> Eclipse (duration τ_E)
Eclipse --(τ_E elapsed)--> Producing (duration τ_P)
Producing --(τ_P elapsed)--> Lysed, release B virions
Virion motion: x(t+1) = x(t) + N(0,σ), reflecting boundaries
About this simulation
A handful of infected cells seed the grid, and within a few seconds the eclipse period gives way to a burst of amber Producing cells that suddenly go dark as they lyse — each lysis event firing dozens of virion particles outward like a tiny explosion. Watching one infection wavefront meet a patch of blue immune cells and simply stop shows herd immunity playing out cell by cell.
🔬 What it shows
A 32×18 grid of host cells cycling through Susceptible, Attached, Eclipse, Producing and Lysed states, overlaid with free virion particles that random-walk across the canvas and attach to susceptible cells on contact.
🎮 How to use
Click any grey cell to seed a new infection there, tune Burst Size, Eclipse Duration, Producing Duration and Attach Probability to change how fast the outbreak spreads, adjust Immune Fraction to test herd immunity, and press P/R to pause/reset.
💡 Did you know?
A single lysed cell in a real bacteriophage infection can release anywhere from tens to hundreds of new virions in one burst, which is exactly the "burst size" parameter this simulation lets you control directly.
Frequently asked questions
What is the lytic cycle?
The lytic cycle is a viral reproduction strategy in which a virus attaches to a host cell, injects its genome, hijacks the cell's machinery to build new virus particles, then bursts (lyses) the cell open to release those particles so they can infect neighbouring cells.
What do the five cell states represent?
Susceptible cells can still be infected, Attached cells have a virion bound to their surface, Eclipse cells contain replicating viral genome but no assembled virions yet, Producing cells are actively assembling new virions, and Lysed cells have burst and are permanently empty.
How does burst size affect the outbreak?
Burst size sets how many free virions are released when a Producing cell lyses. A larger burst size floods the grid with more virions per lysis event, increasing the chance nearby susceptible cells become infected and accelerating the spread of the outbreak.
What is the eclipse period?
The eclipse period is the phase after infection during which the viral genome is replicating inside the host cell but no infectious virions have been assembled yet, so the cell is infected but not yet producing or releasing new virus particles.
How does the immune fraction slider work?
The immune fraction slider marks a random percentage of cells as permanently resistant at the start of the simulation. Immune cells can never be attached, infected, or lysed, acting as firebreaks that slow or block the spread of free virions through the grid.
A cellular automaton of host cells and diffusing virions: attachment, eclipse period, replication and lysis release new virions that infect neighbours — spatial infection dynamics at the single-cell scale.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install