chemart / bigan-conservative-crn

View on GitHub

Conservative random chemical reaction networks — A random reaction network built to be thermodynamically honest. Each abstract chemical gets a random free energy of formation; reactions are drawn as association, dissociation and transformation steps, and every backward…

chemistry official · built in network fidelity: reconstructed #banzhaf-yamamoto

How it works

A random reaction network built to be thermodynamically honest. Each abstract chemical gets a random free energy of formation; reactions are drawn as association, dissociation and transformation steps, and every backward rate is then computed from the forward one so detailed balance holds. The result is a network you can drive out of equilibrium with a nutrient influx and still trust. It is the easiest place to see what the thermodynamic tier costs: consistency is a constraint between forward and reverse rates, not extra data.

S
N abstract chemicals A_0..A_(N-1), each with a random Gibbs free energy of formation · explicit
R
association A_i + A_j -> A_k ; dissociation A_i -> A_j + A_k ; transformation A_i -> A_j ; each kept as a forward/reverse pair · arity 1, 2
A
ode · external nutrient inflow drives the system out of equilibrium

Parameters

namedefaultmeaning
N
int · structural
10 number of chemical species (the paper uses 10, and 20 for checks)
[2, 20]
max_reactions
int · structural
0 stop after this many direct reactions; 0 builds a maximum-sized network (17-96, mean 42 direct reactions for N = 10 in the paper)
[0, ∞]
kinetics
enum · kinetic
"mass-action" saturating kinetics f = k prod [A]/(1 + [A]/K) models molecular crowding
mass-action | saturating
k_avg_mono
float · kinetic
100.0 geometric mean of monomolecular forward constants (1/s): k = k_avg 10^U(-s/2, s/2)
[0, ∞]
k_avg_bi
float · kinetic
10000.0 geometric mean of bimolecular forward constants (1/(M s))
[0, ∞]
s
float · kinetic
0.0 spread of forward rate constants, in orders of magnitude
[0, ∞]
K_avg
float · kinetic
0.01 geometric mean saturation concentration (M) for saturating kinetics
[0, ∞]
p
float · kinetic
0.0 spread of saturation concentrations, in orders of magnitude
[0, ∞]
G_max
float · thermodynamic
15.0 formation free energies are drawn as G_i/RT ~ U(0, G_max)
[0, ∞]
nutrient
int · population
5 index of the species receiving the external flux (the paper uses A5); -1 for a closed system
[-1, ∞]
nutrient_flux
float · population
1.0 external nutrient flux f_nu (M/s)
[0, ∞]
initial_concentration
float · population
0.001 initial concentration of every species (the paper uses 1 mM)
[0, ∞]

Conservative random chemical reaction networks

One of the artificial chemistries of Banzhaf & Yamamoto, Artificial Chemistries (MIT Press, 2015), §11.3.2; first proposed by Bigan, Steyaert & Douady, 2013.

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/bigan-conservative-crn", seed=0)   # same as "bigan-conservative-crn"
print(net.summary())

What to look for

  • at equilibrium one chemical dominates as a function of density (saturating kinetics)
  • under nutrient flux all but one species reach constant concentration while one grows unbounded - a 'directed transformation machine' producing a putative membrane precursor

Implementation decisions

  • Topology follows sec. 2.1: exchange reactions are excluded, candidates are tried in random order, and a candidate is kept while a mass vector m >= 1 with m^T S = 0 exists (checked by linear programming). Once that vector is unique, a candidate is kept iff it is orthogonal to it.
  • Kinetics follow sec. 2.2 with the paper's values: k_avg_mono = 1e2 /s, k_avg_bi = 1e4 /(M s), K_avg = 1e-2 M, G/RT ~ U(0, 15), s = p = 0. The forward direction is the one with decreasing free energy, and the reverse constant is k_forward exp(-|dG|/RT) with c0 = 1 M. The paper's printed reverse formulas for mixed molecularity differ only by the c0 factor, which is 1 here.
  • Forward/reverse reactions are adjacent, with their indices listed in extras.reaction_pairs. extras.energies holds G_i/RT, and extras.conservation holds the admissible mass vector (integers when rational).
  • The old density parameter is not part of the network (the paper sweeps initial density to compute equilibria) and is dropped. The nutrient flux is the network inflow.

Sources

  • Bigan, E., Steyaert, J.-M. & Douady, S. (2013). Properties of random complex chemical reaction networks and their relevance to biological toy models. arXiv:1303.7439, sections 2-3

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

Preview at default parameters

10 species · 46 reactions · status complete · seed 1

A1 + A3 -> A5  [mass-action k=10000.0]
A5 -> A1 + A3  [mass-action k=5852.229125020699]
A2 + A5 -> A0  [mass-action k=10000.0]
A0 -> A2 + A5  [mass-action k=62.318124632246665]
A9 -> A1  [mass-action k=100.0]
A1 -> A9  [mass-action k=8.488690652415743]
2 A1 -> A5  [mass-action k=10000.0]
A5 -> 2 A1  [mass-action k=2865.976715541064]
A2 + A5 -> A4  [mass-action k=10000.0]
A4 -> A2 + A5  [mass-action k=0.5376709375047533]
A3 + A8 -> A2  [mass-action k=10000.0]
A2 -> A3 + A8  [mass-action k=808.6759781342932]
2 A5 -> A8  [mass-action k=10000.0]
A8 -> 2 A5  [mass-action k=0.616710046828746]
A7 -> A6  [mass-action k=100.0]
A6 -> A7  [mass-action k=16.955264910827832]
2 A4 -> A6  [mass-action k=10000.0]
A6 -> 2 A4  [mass-action k=0.8491098585962038]
2 A0 -> A6  [mass-action k=10000.0]
A6 -> 2 A0  [mass-action k=6.320744816337367e-05]
A5 -> 2 A3  [mass-action k=100.0]
2 A3 -> A5  [mass-action k=83.68160770168583]
A1 + A9 -> A5  [mass-action k=10000.0]
A5 -> A1 + A9  [mass-action k=243.28389755254622]
A9 -> A3  [mass-action k=100.0]
A3 -> A9  [mass-action k=4.157115047194698]
A3 + A9 -> A5  [mass-action k=10000.0]
A5 -> A3 + A9  [mass-action k=496.7776266935832]
A1 -> A3  [mass-action k=100.0]
A3 -> A1  [mass-action k=48.972394182036204]
2 A0 -> A7  [mass-action k=10000.0]
A7 -> 2 A0  [mass-action k=0.0003727895051820068]
2 A4 -> A7  [mass-action k=10000.0]
A7 -> 2 A4  [mass-action k=5.007942152846884]
2 A9 -> A5  [mass-action k=10000.0]
A5 -> 2 A9  [mass-action k=20.651617470375662]
A1 + A8 -> A2  [mass-action k=10000.0]
A2 -> A1 + A8  [mass-action k=396.02798766736356]
A0 + A4 -> A7  [mass-action k=10000.0]
A7 -> A0 + A4  [mass-action k=0.04320773399681943]
… 6 more

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