chemart / okamoto-switch

View on GitHub

Okamoto's biochemical switch — A biochemical flip-flop. Two enzyme cofactors interconvert, each conversion driven by one of two input-derived substrates, so whichever input dominates pushes the pair into the corresponding state and holds it there. The…

chemistry official · built in application fidelity: book+decisions #banzhaf-yamamoto

How it works

A biochemical flip-flop. Two enzyme cofactors interconvert, each conversion driven by one of two input-derived substrates, so whichever input dominates pushes the pair into the corresponding state and holds it there. The result is bistability with a sharp transition: the outputs swap within seconds of the inputs crossing, and how fast depends on how quickly inputs are converted. An early demonstration that chemistry can hold a bit.

S
inputs I1, I2; substrates X1..X4; enzyme cofactors A and B (the outputs) · explicit
R
I1 -> X1 ; I2 -> X3 ; A + X3 --k2--> B + X4 ; B + X1 --k1--> A + X2 ; X2 --k3--> ; X4 --k4--> ; plus I1 -> I2 to drive the inputs across each other · arity 1, 2
A
ode · X2 and X4 decay out

Parameters

namedefaultmeaning
k1
float · kinetic
50000.0 B + X1 -> A + X2
[0, ∞]
k2
float · kinetic
50000.0 A + X3 -> B + X4
[0, ∞]
k3
float · kinetic
10.0 decay of X2
[0, ∞]
k4
float · kinetic
10.0 decay of X4
[0, ∞]
k_in
float · kinetic
1.0 production of X1 from I1 and of X3 from I2
[0, ∞]
k_conv
float · kinetic
0.006 conversion I1 -> I2; sets when the inputs cross and hence the switching time
[0, ∞]
I1_0
float · population
100.0 initial concentration of input I1
[0, ∞]
I2_0
float · population
80.0 initial concentration of input I2
[0, ∞]

Okamoto's biochemical switch

One of the artificial chemistries of Banzhaf & Yamamoto, Artificial Chemistries (MIT Press, 2015), §17.4.1; first proposed by Okamoto, Sakai & Hayashi, 1987-1993.

Its generator ships with the chemart library, so loading it runs no code from the hub and needs no trust_remote_code.

import chemart

net = chemart.generate_network("chemart/okamoto-switch", seed=0)   # same as "okamoto-switch"
print(net.summary())

What to look for

  • bistability: A and B flip within seconds of the inputs crossing
  • switching time tunable via the input conversion rate
  • composable into chemical neurons, logic gates, finite state machines and a Turing-universal chemical computer

Implementation decisions

  • Inputs are 'controlled externally ... not affected although consumed' (book), so input reactions are written I1 -> I1 + X1 and I2 -> I2 + X3, with rate k_in (not given in the book; default 1).
  • The book's I1/I2 profiles are reproduced as in its simulation: I1(0) = 100, I2(0) = 80 and an irreversible I1 -> I2. k_conv = 0.006 makes the inputs cross at about 17.5 s, as in figure 17.5 (top).
  • Known discrepancy: with the reactions as printed, X1 (X3) is never lost while A (B) is saturated, so surplus substrate accumulates and the flip lags the crossing by ~18 s at the defaults, instead of 'a few seconds' in figure 17.5. The original cyclic-enzyme model [633] has reversible enzyme steps and substrate influx/efflux that the book omits; the paper was not accessible, so the book's scheme is kept.
  • Other initial concentrations are the book's: X1 = X3 = 0, X2 = X4 = 8, A = 1, B = 0.

Banzhaf & Yamamoto, Artificial Chemistries (2015), §17.4.1

Preview at default parameters

8 species · 7 reactions · status complete · seed 1

I1 -> I1 + X1  [mass-action k=1.0]
I2 -> I2 + X3  [mass-action k=1.0]
A + X3 -> B + X4  [mass-action k=50000.0]
B + X1 -> A + X2  [mass-action k=50000.0]
X2 -> ∅  [mass-action k=10.0]
X4 -> ∅  [mass-action k=10.0]
I1 -> I2  [mass-action k=0.006]

Generated by the uploader with chemart push; the hub never runs uploaded code.