Three biochemical models — a Lotka-Volterra oscillator, the Elowitz-Leibler repressilator, and stochastic dimerization — wrapped as process-bigraph Processes via tellurium / libroadrunner. Each configuration demonstrates how an SBML/Antimony model composes into a PBG Composite with lazy RoadRunner instantiation.
Predator-prey dynamics with sustained oscillations
A classic two-species oscillator: prey (P) grows exponentially, predators (W) consume prey, and predators die off without food. The coupled ODEs produce stable closed orbits in the (P, W) plane. A canonical test for ODE integrators and phase-space visualization.
model lotka // Predator-prey oscillator P = 10; W = 5 J1: -> P; kg*P J2: P -> W; kc*P*W J3: W -> ; kd*W kg = 1.0; kc = 0.1; kd = 1.0 end
Three-gene ring oscillator (Elowitz & Leibler 2000)
A synthetic gene network of three mutually repressing genes arranged in a ring. Each protein represses the next gene via Hill kinetics, producing limit-cycle oscillations in all three protein species with 120° phase shifts. Demonstrates bigraph wiring of a multi-species biochemical network.
model repressilator // Elowitz & Leibler 2000 ring oscillator: three mutually repressing genes m1 = 0; m2 = 0; m3 = 0 p1 = 5; p2 = 0; p3 = 15 // mRNA production with Hill-type repression + basal rate Rm1: -> m1; alpha * (K^n / (K^n + p3^n)) + alpha0 Rm2: -> m2; alpha * (K^n / (K^n + p1^n)) + alpha0 Rm3: -> m3; alpha * (K^n / (K^n + p2^n)) + alpha0 // mRNA degradation Dm1: m1 -> ; beta_m * m1 Dm2: m2 -> ; beta_m * m2 Dm3: m3 -> ; beta_m * m3 // Protein production and degradation Rp1: -> p1; beta_p * m1 Rp2: -> p2; beta_p * m2 Rp3: -> p3; beta_p * m3 Dp1: p1 -> ; beta_p * p1 Dp2: p2 -> ; beta_p * p2 Dp3: p3 -> ; beta_p * p3 // Oscillatory regime: n=3 cooperativity pushes past the Hopf // bifurcation for alpha=216, K=40 (Elowitz-Leibler parameters). alpha = 216; alpha0 = 0.2; K = 40; n = 3 beta_m = 1.0; beta_p = 0.2 end
Gillespie SSA trajectory of M + M ⇌ D
Reversible dimerization of a small monomer pool simulated with the Gillespie stochastic algorithm. The noisy trajectory reveals fluctuations around the equilibrium that the deterministic ODE would smooth over. Shows integrator selection and stochastic simulation support in the wrapper.
model dimer // Reversible dimerization — stochastic-friendly small system M = 80; D = 0 Jf: 2 M -> D; kf*M*(M-1)/2 Jr: D -> 2 M; kr*D kf = 0.01; kr = 0.1 end