-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
140 lines (84 loc) · 4.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
PyCellChemistry, www.artificial-chemistries.org
===============================================
Artificial Chemistry simulations in Python
by Lidia Yamamoto, Belgium, July 2013
version 1.0: July 2015
version 2.0: September 2015
version 2.1: October 2015: committed to GitHub
Basic system (src/artchem folder):
============
- Multiset.py: a bag of chemicals represented as a multiset of objects
- KeyMultiset.py: a multiset indexed by a given key; the key can be a
substring representing part of the molecule (akin to a binding site)
or any value that tags a particular molecule or groups of related
molecules, such that it can be moreq uickly located.
- Reaction.py: explicit chemical reactions composed of an educt
multiset and a product multiset.
- ReactionParser.py: parser for explicit reactions represented as
strings in the format "A + B --> C , k=2"
- ReactionVessel.py: ODE integration and Gillespie SSA implementations
for explicit, non-constructive artificial chemistries
- BinaryStrings.py: routines to manipulate binary strings as
arbitrarily long integers
- Cell.py: an implementation of hierarchical comopartments akin to P
Systems; cells may contain multisets of chemicals and other cells
inside.
---------------------------------------------------------------------------
Example applications (src folder):
====================
- Dimer.py: simple reversible dimerization example (chapter 2)
- Chameleons.py: colored chameleon chemistry (chapter 2)
- NumberChem.py: prime number chemistry (chapter 2)
- MatrixChem.py: Matrix Chemistry (chapter 3)
- Logistic.py: logistic equation (chapter 7), with comparison between
ODE and SSA
- Lotka.py: Lotka-Volterra example (chapter 7), ODE or SSA
- Repressilator.py: stochastic simulation of the repressilator GRN
(chapter 19)
- Evolution.py: implentation of basic evolution elements, used by
Quasispecies.py and Tournament.py
- Quasispecies.py: stochastic implementation of a quasispecies
evolutionary dynamics (chapter 7)
- Tournament.py: genetic algorithm with tournament selection
implemented as an artificial chemistry
- NKlandscape.py: a simple implementation of Kauffman's NK model of
rugged fitness landscapes (chapter 18)
- Fraglets.py: interpreter for the Fraglets language (chapter 16)
- NetFraglets.py: networked Fraglets, with CDP example (chapter 16)
- Disperser.py: an artificial chemistry for load balancing in
distributed systems (chapter 17)
- HighOrderChem.py: a simplified high-order chemistry in which the
reaction rules are also molecules in a multiset, and are written as
strings containing a python method call.
- NumberChemHO.py: a reimplementation of NumberChem using HighOrderChem
- MolecularTSP.py: a reimplementation of the Molecular TSP algorithm
(chapter 17) using HighOrderChem
Running:
-------
python [example.py] > output1.txt 2> output2.txt
depending on the example chosen, the output file(s) will contain
execution traces or data to be plotted (in tab-separated format).
---------------------------------------------------------------------------
Reaction-diffusion implementation and demos (src/RD folder):
==================
Reaction-diffusion demos:
- GrayScott.py: a demo of pattern formation in the Gray-Scott system
- ActivatorInhibitor.py: the Gierer & Meinhardt's activator-inhibitor system
- ActivatorSubstrate.py: activator-depleted substrate model by Meinhardt
- DichotomousBranching.py: Dichotomous leaf branching pattern by Meinhardt
Underlying implementation:
- ReactionDiffusion.py: implementation of numerical PDE integration
- WritePNG.py: library of functions to generate PNG files (3rd party code)
Running the reaction-diffusion demos:
-------
* with VPython (vpython.org):
- simply invoke
python [demo.py]
- more concretely:
python GrayScott.py
python ActivatorInhibitor.py
python ActivatorSubstrate.py
python DichotomousBranching.py
* without VPython:
- comment out the rsys.animate(...) line in the corresponding demo
- use rsys.writepng(...) instead, to generate PNG files periodically