chemart / flow-ac

View on GitHub

Flow artificial chemistry — What happens when molecules are carried rather than stirred. An ordinary reaction network is placed in a two-dimensional domain and every molecule is advected along a vector field, reacting only with neighbours within a …

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

How it works

What happens when molecules are carried rather than stirred. An ordinary reaction network is placed in a two-dimensional domain and every molecule is advected along a vector field, reacting only with neighbours within a radius. Local reactions and transport then produce strongly inhomogeneous distributions - patches, and a shell of one species around a core of another - that the same network does not show when well mixed. The complement to swarm chemistry: here motion is imposed from outside rather than generated by the particles.

S
ordinary molecular species placed in a 2D domain and moved along a vector field · explicit
R
Book figure 11.23 network (a, b, c, d): a + b -> a + 2b ; a + d -> a + 2d ; b + c -> 2c ; c -> b ; b + d -> c ; b -> ; c -> ; d -> . Molecules move x -> x + V(x) each iteration and react only with neighbours within a radius. · arity 1, 2, 3
A
continuous-space · none

Parameters

namedefaultmeaning
example
enum · structural
"swirl" which example of the paper: swirl (book figure 11.23) and radial use network R1; membrane is a membrane-forming core (R2); compartments is rock-scissors-paper (R3) in two stirred regions
swirl | radial | membrane | compartments
k
float · kinetic
1.0 mass-action rate constant for every reaction (the paper's PDE example uses 1)
[0, ∞]

Flow artificial chemistry

One of the artificial chemistries of Banzhaf & Yamamoto, Artificial Chemistries (MIT Press, 2015), §11.4.3; first proposed by Kreyssig & Dittrich, 2011.

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

What to look for

  • strongly inhomogeneous species distributions that a well-stirred or diffusive system does not show (patches of b in the swirl)
  • a membrane of m around a producer core, matching the organisations {m} and {m, p1, p2, p3}
  • two compartments forming from rock-scissors-paper competitors

Implementation decisions

  • The book gives no reactions. The networks R1, R2 and R3 are the paper's; R1's mass-action form is confirmed by the paper's PDE reaction terms (all k = 1), which the tests reproduce. The fourth example (E. coli central sugar metabolism, 92 species and 198 reactions) is not reproduced in the paper and is not offered.
  • R2 is printed as alpha p1 + beta p2 + gamma p3 -> m for alpha, beta, gamma in {0, 1}. The all-zero case (-> m) is excluded, because with it the empty set would not be closed, contradicting the paper's organisations O = {{}, {m}, {m, p1, p2, p3}}.
  • Vector fields and simulation settings (molecules n, initial radius rad, reaction radius r, reacting fraction u, iterations) are recorded per example in extras.space, as strings and numbers; Chemart does not simulate them. The swirl field's square roots were lost in the PDF text and are read as V1 = (1/sqrt 2)((1 - sqrt 2) x - y, x + (1 - sqrt 2) y), an inward spiral. For the swirl example the paper states both 2500 starting molecules and n = 1600; 2500 is recorded.
  • The previous parameters reactions, flow_field, diffusion and n_species are replaced by `example` and `k`: the paper uses flow instead of diffusion, and the networks are fixed per example. R2 and R3 carry no rates in the paper; they use the same k.

Sources

  • Kreyssig, P. & Dittrich, P. (2011). Reaction flow artificial chemistries. Proc. ECAL 2011, MIT Press, 431-437. Preprint: https://web.archive.org/web/2015/http://www.personal.uni-jena.de/~lo94wav/rfac.pdf

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

Preview at default parameters

4 species · 8 reactions · status complete · seed 1

a + b -> a + 2 b  [mass-action k=1.0]
a + d -> a + 2 d  [mass-action k=1.0]
b + c -> 2 c  [mass-action k=1.0]
c -> b  [mass-action k=1.0]
b + d -> c  [mass-action k=1.0]
b -> ∅  [mass-action k=1.0]
c -> ∅  [mass-action k=1.0]
d -> ∅  [mass-action k=1.0]

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