This is the 2D mean-field companion to the stochastic single-channel simulator: instead of animating 400 individual Markov-chain molecules on a membrane patch, it integrates the exact same four-state ChR2 kinetic scheme as a system of ordinary differential equations for the population fractions C1, O1, O2, C2 (their sum is conserved at 1 for all time):
dC1/dt = -F·C1 + Gr·C2
dO1/dt = F·C1 - (Gd1+e12)·O1 + e21·O2
dO2/dt = e12·O1 - (Gd2+e21)·O2
dC2/dt = Gd1·O1 + Gd2·O2 - Gr·C2
F = photon absorption rate ∝ irradiance × cross-section σ
The left diagram is a reaction-network view: each node's area is its occupancy fraction, and glowing tokens flow along each arrow at a rate proportional to the instantaneous flux (rate constant × source occupancy) — the same six transitions (F, e12, e21, Gd1, Gd2, Gr) as the single-molecule model, but read as population flow rather than per-molecule dice rolls. The right plot is a phase portrait: the trajectory of (pO1, pO2) through state space, which spirals out from the origin during a flash and relaxes back as the pulse ends — the mean-field limit of the same stochastic process (by the law of large numbers, N·pO1(t) → the whole-cell open count as N → ∞). The whole-cell photocurrent uses the identical Ohmic form as the single-channel model:
I(t) = N · g · (pO1 + γ·pO2) · (Vm − Erev)
- Flash — a single 500 ms light pulse: the phase portrait traces an outward arc into O1/O2 space and spirals back to the C1 corner.
- Hold Light / Light Off — continuous illumination drives the system to a steady-state fixed point instead of relaxing back to C1; light off pins F to zero and the trajectory decays home.
- Irradiance — sets F; higher light pushes the fixed point further from the C1 corner and shortens the time to reach it.
- Membrane voltage — scales and flips the sign of the photocurrent exactly as in the single-channel model, since it enters only through the Ohmic term, not the kinetics.
Real-world relevance: the ODE picture is what electrophysiologists actually fit to whole-cell voltage-clamp recordings — the stochastic single-molecule picture and this mean-field ODE picture are two mathematically equivalent descriptions of the same photocycle, related by the law of large numbers over the channel population.