Reserve
Reserve: the red blood cell as a control loop
Pharmacogenetics is the principle that a person's genes shape which drugs help them and which cause harm. Reserve models one well-understood case: G6PD deficiency.
Background. A red blood cell spends its whole life holding one variable steady: its redox state. Oxidants keep arriving, from the oxygen it carries, from infections, from drugs, and each one would damage the cell if left unchecked. The defense is a feedback loop. Reduced glutathione neutralizes the oxidant; the pentose phosphate pathway spends NADPH to recharge the glutathione; and the enzyme G6PD sets how hard that pathway can push. NADPH is the reserve the whole loop draws on. Most of the time this runs silently. Then a drug arrives that raises the oxidant load, an antimalarial, dapsone, rasburicase, even fava beans, and two people on the same dose can diverge: one clears it without noticing, the other hemolyzes. The same drug, a different outcome. The difference is G6PD activity.
Hypothesis. If you model the cell as a control loop with two independent knobs, the loop gain (G6PD activity) and the disturbance (the oxidant load), the clinical split should fall out without being written in. A high-gain cell rejects the disturbance and returns to its setpoint. A low-gain cell looks identical at rest, but past a large enough disturbance it cannot make NADPH fast enough: the reserve runs down, glutathione collapses behind it, and the cell tips into hemolysis. Severity should be a property of the loop, not an entry in a lookup table. The deficiency stays silent until the day it is challenged.
How it's modeled. Each key substance in the cell gets an equation describing how fast it rises and falls. The computer steps them forward in time, so you watch the cell behave as it would in motion, not as a snapshot. The G6PD step uses kinetics from published patient data; the surrounding chemistry is simplified, enough to show the behavior honestly, not enough to be a complete model of the cell. On top of that, the cell is treated as a control system: a reserve it holds steady, a stress that spends it, a loop that refills it. The genetic deficiency is a weak point in that loop, where the refill cannot keep pace. That reframes vulnerability as a property of the loop rather than a fact to memorize.
Method. A deterministic system of rate equations for the coupled redox and glycolytic state (NADPH and NADP+, the glutathione couple, ATP, 2,3-BPG, and a cumulative damage marker), integrated with a fixed-step Runge-Kutta solver. The G6PD step uses the published competitive product- and effector-inhibition rate law of Shimo, Nishino & Tomita (2011), driven by their per-patient parameters. The surrounding enzymes and the absolute concentration scales are reduced and illustrative, flagged as such in the source, pending the paper's full supplement. Damage keys off the NADPH reserve, not the glutathione that drains visibly ahead of it. There is no randomness: identical inputs produce an identical trajectory, every run.
Integration. The interactive page runs that engine in your browser: the same code, no server, no recorded video. Compare a healthy cell with a real documented patient under one shared oxidant, or drive a single cell: pick a genotype to set the loop gain, set an oxidant challenge, and watch the four reserves drain and either recover or give out.
Status. Live. The engine and this room are built and the model is deterministic, but the surrounding network and the absolute scales are still illustrative, not yet grounded against the full published model. A reasoning tool for thinking about the loop.
Why this matters. Matching drugs to a person's genetics is already changing how some medicines are prescribed, and G6PD deficiency is one of the clearest cases. A single inherited variant flips an ordinary drug from safe to dangerous. Reserve models just this one pathway, qualitatively, as a way to see the principle at work. Predicting drug safety from a whole genome is a vast, validated, regulated field. This is the small case example that makes the idea tangible, not a tool for any decision about a real person.
A personal, educational project, not affiliated with any employer or institution. Reserve is a simplified educational model. It is not medical advice, not a diagnostic or clinical tool, and not a guide to prescribing for any real patient.