Biochemistry — Enzyme Kinetics
Learning objective: See how Petri nets naturally model chemical reactions, recovering classical equations.
The previous chapters applied the continuous semantics of Chapter 3: From Discrete to Continuous to domains that borrowed it — resource flows, games, puzzles, optimization. This chapter returns to the domain that rate law came from: chemistry. Enzyme kinetics is the study of how enzymes catalyze reactions, and the Michaelis-Menten equation is its central rate law.
Textbooks start from four rate equations, assume the enzyme-substrate complex sits at a quasi-steady state, and do the algebra. A 4-place Petri net with mass-action rates gives you those four rate equations without anyone typing them, and the solver integrates them as they stand, with no steady-state assumption. Michaelis-Menten is still an approximation of that system, and it still comes from the algebra; what the net changes is that the system being approximated is the model itself rather than a hand transcription of it.
Substrate, Enzyme, Product
An enzyme catalyzes the conversion of substrate to product in three steps:
- Binding: enzyme and substrate combine to form a complex (rate )
- Unbinding: the complex falls apart without producing product (rate )
- Catalysis: the complex converts substrate to product, releasing the enzyme (rate )
The enzyme is not consumed; it cycles between free and bound states, and that cycle maps directly onto token flow.
The Petri Net
Four places, three transitions:
| Place | Initial | Role |
|---|---|---|
substrate | 100 | Free substrate molecules |
enzyme | 10 | Free enzyme molecules |
complex | 0 | Enzyme-substrate complex |
product | 0 | Converted product |
| Transition | Rate | Arcs |
|---|---|---|
bind | substrate + enzyme → complex | |
unbind | complex → substrate + enzyme | |
catalyze | complex → product + enzyme |
The arc structure encodes the chemistry directly. bind consumes a free enzyme, and both unbind and catalyze give one back. The enzyme is not an input of catalyze; it is a catalyst because every path out of complex returns it.
The net is declared as services/enzyme-kinetics.json in the source of sim.pflow.xyz (a private repository; sim itself is retired): the four places and three rates above, and nine arcs, all of weight 1. The public net you can open is the Enzyme Kinetics example on pflow.xyz (source: examples/landing/enzyme-kinetics.jsonld). It has the same four places and the same nine weight-1 arcs, but it starts from 50 substrate and stores no rate constants, so its curves are not the ones quoted in this chapter.
In Code
The same net in go-pflow’s builder API (petri/builder.go). There is no enzyme example in go-pflow’s examples/, so this snippet is not a file in the repository and has not been run:
net, rates := petri.Build().
Place("substrate", 100).
Place("enzyme", 10).
Place("complex", 0).
Place("product", 0).
Transition("bind").
Transition("unbind").
Transition("catalyze").
Arc("substrate", "bind", 1).
Arc("enzyme", "bind", 1).
Arc("bind", "complex", 1).
Arc("complex", "unbind", 1).
Arc("unbind", "substrate", 1).
Arc("unbind", "enzyme", 1).
Arc("complex", "catalyze", 1).
Arc("catalyze", "product", 1).
Arc("catalyze", "enzyme", 1).
WithCustomRates(map[string]float64{
"bind": 0.01,
"unbind": 0.1,
"catalyze": 0.5,
})
WithCustomRates returns the net and the rate map together; WithRates takes a single default rate for every transition, which is not what this model needs.
Mass-Action Kinetics as Native Semantics
With mass-action kinetics, each transition fires at a rate proportional to the product of its input concentrations:
Every input arc here has weight 1, so go-pflow’s first-power rate law and textbook chemical mass action coincide for this net (Chapter 3 explains where they differ). The ODE system follows from the topology as , with the incidence matrix (rows are places, columns are transitions) and the vector of the three rates:
Nobody writes these equations into the simulation. go-pflow’s solver builds each derivative from the arcs (solver/ode.go: flux is the rate times the product of the input markings), as Chapter 3 describes. The service definition does carry the four equations as metadata, for people to read; the solver never sees them.
Michaelis-Menten as an Approximation
Set (the quasi-steady-state assumption):
Solving for the reaction rate and using :
where and .
This is the Michaelis-Menten equation, and it comes from the algebra, not from the solver. The solver integrates the full four-equation system; Michaelis-Menten approximates it well when is small against (at the defaults below, 10 against 160).
The saturation curve itself, rate against initial substrate, would come from a sweep: integrate the net across a range of initial substrate, take the initial rate at each, and plot it against . The expectation is a close match at and a drift as approaches . No code in the pflow repositories runs that sweep yet, so this is a prediction, not a result.
The Saturation Effect
Why does the rate saturate? The Petri net makes it visible through token flow.
At low substrate, most enzyme tokens are in the enzyme place (free). Increasing [S] means more bind events, so the rate climbs linearly. But at high substrate, almost all enzyme tokens are tied up in complex. Adding more substrate can’t speed things up — there’s no free enzyme to bind with.
is the substrate concentration at half-maximum rate. With the default parameters, . It is often read as binding affinity, but that reading holds only when . Here is five times , and the dissociation constant is 10, so most of is turnover rather than loose binding.
is the rate with all enzyme bound. With 10 enzyme molecules and , .
Both values are the two formulas above applied to the rate constants. Neither is fitted to a simulated curve.
Simulation Readouts
A browser demo built from the same net and default rates (now retired) integrated it with Tsit5 at a fixed step over a 30-second window and reported four readouts. Its source is frontends/enzyme-kinetics/main.js in petri-pilot (runODE and computePredictions). With the demo retired, no live page reproduces the table:
| Readout | Default Value | What It Is |
|---|---|---|
| Time to 50% conversion | ~17s | First time free substrate falls to half its initial value |
| Peak reaction rate | ~2.95 | Largest finite-difference d[P]/dt in the run |
| Final yield | ~70% | Product as a percentage of initial substrate at the end of the window |
| / | 60 / 5.0 | Computed from the rate constants, not measured from the run |
The first three come out of the integration. They are the demo’s readouts at the default settings and have not been re-run for this edition.
One of them can be checked by hand. Since and can never exceed the 10 enzyme molecules, the peak rate is bounded by . The Michaelis-Menten approximation gives a closer estimate: at it predicts , and free substrate only falls from there. A peak of about 2.95 sits just under that estimate, as expected when some substrate is already tied up in complex by the time the rate peaks. That is a derivation, not a run.
The concentration curves show the familiar pattern: substrate depletes as product accumulates, with the enzyme-substrate complex rising quickly and then falling as substrate runs out.
Conservation Laws from P-Invariants
The net’s structure carries two conservation laws.
Enzyme conservation:
Free enzyme plus bound enzyme always equals the initial enzyme count. Nothing in the model states this as a constraint; it follows from the arcs. The enzyme circulates through enzyme → complex → enzyme but never leaves the system.
Check via P-invariant: the weight vector (for places [substrate, enzyme, complex, product]) satisfies :
bindcolumn:unbindcolumn:catalyzecolumn:
Mass conservation:
Substrate is either free, bound in complex, or converted to product. The weight vector is :
bindcolumn:unbindcolumn:catalyzecolumn:
Both checks are by hand, against the nine arcs of the service definition. Because , the exact ODE gives , so both sums are constant along every trajectory. The demo did not check them during a run. They make a useful test: if drifts in a simulation, an arc is missing, a weight is wrong, or the solver has a bug. go-pflow’s solver tests make that check for small nets (TestSolveConservation in solver/solver_test.go), not for this one.
Parameter Exploration and Sensitivity
Changing the rate constants explores the model. The values below follow from the formulas; none of these scenarios has been re-run for this edition.
High enzyme, low substrate (): there is plenty of enzyme, so the reaction runs much faster. This is also where the Michaelis-Menten constants stop meaning much. With 50 enzyme against , the quasi-steady-state condition fails, and the formula’s is unreachable: by the second conservation law, the complex can hold at most the 20 substrate molecules there are, so never exceeds .
Low (): binding becomes the bottleneck. , six times the default initial substrate.
High (): the enzyme turns over faster and rises to 20, but also rises, to . Faster catalysis empties the complex faster, so more substrate is needed to keep it populated.
Equal and (): a complex is equally likely to unbind or to catalyze, so half the binding events are “wasted” on unbinding. , higher than the default.
Each scenario is a different set of rate constants on the same net; the structure does not change.
Beyond Chemistry
The shape — a limited resource cycling between free and occupied, with throughput capped by how much of it there is — resembles processes and cores, callers and agents, jobs and machines. None of those has been built as a net here, and the mapping is looser than swapping labels. A call center has no obvious unbind (a caller abandoning mid-service, perhaps), and a context switch is overhead on the core rather than a reversible binding. What should carry over is the enzyme invariant, free plus busy is constant, and the ceiling that comes with it: throughput cannot exceed rate × servers, for the same reason cannot exceed .
The enzyme net is a ComputationNet in the sense of Chapter 4: The Token Language: continuous quantities, rate-based firing, and conservation laws carried by the arcs. It is small enough to understand completely. What it establishes is that the net generates the mass-action ODE system without anyone writing it and carries two conservation laws in its structure; the Michaelis-Menten equation is the quasi-steady-state reduction of that system.