PyCellChemistry 2.0 Online Reference Manual
Basic classes:
Located in the src/artchem/ folder, these python modules are not meant to be invoked directly. Instead, they are imported from the modules implementing the chemistries that need them. These modules contain classes that implement the core functionalities of artificial chemistries. So far only well-mixed and compartment-based chemistries are available.
- BinaryStrings.py: routines to manipulate binary strings in the form of arbitrarily long integers.
- Multiset.py: a bag of chemicals represented as a multiset of objects; these objects are typically strings, often binary strings.
- KeyMultiset.py: a multiset indexed by a given key; the key is usually a substring of the molecule, akin to a binding site, but it can also be a shorter tag that is computed from the information within the molecule.
- Reaction.py: explicit representation of chemical reactions using multisets: a reaction is made of an educt multiset, a product multiset, and a rate coefficient k.
- ReactionParser.py parses chemical reactions in text format, such as:
"A + 2 B --> 3 C , k=2.5"
, and translates them into Reaction objects.
- ReactionVessel.py:
a reaction vessel for well-mixed ACs with a fixed set of molecular species and reactions. Two algorithms are included: WellStirredVessel (for deterministic ODE integration), and GillespieVessel (for stochastic simulations).
- Cell.py: an implementation of hierarchical compartments that grow and divide.
Non-spatial AC Examples:
Located in the src/ folder, these python modules implement various examples of artificial chemistries found in the literature.
- Chameleons.py: a colored chameleon chemistry, where molecules are chameleons that change color when they meet each other.
- Dimer.py: a reversible dimerization reaction, where two monomers combine into a dimer, then the dimer breaks down again into monomers.
- DimerStoch.py: stochastic implementation of the reversible dimerization example.
- NumberChem.py: a number chemistry in which molecules are integer numbers that decompose each other in reactions, converging to a "soup" of prime numbers.
- MatrixChem.py: a chemistry where molecules are binary strings that "fold" into 2D matrices that multiply each other
[Banzhaf1993];
this is a constructive AC that may result in the formation of closed and self-maintaining molecule sets (organizations,
[Dittrich2007]).
- Logistic.py: an AC implementation of the logistic equation, with comparison between ODE and SSA.
- Lotka.py: an AC implementation of the classical predator-prey Lotka-Volterra system, ODE or SSA.
- Repressilator.py: stochastic simulation of the repressilator genetic regulatory network (GRN)
[Elowitz2000].
- Evolution.py: evolutionary dynamics with ACs (not invoked directly, but from the Quasispecies.py and Tournament.py examples).
- Quasispecies.py stochastic implementation of a quasispecies evolutionary dynamics
[Eigen1977], on top of Evolution.py.
- Tournament.py: genetic algorithm with tournament selection implemented as an artificial chemistry, on top of Evolution.py.
- NKlandscape.py: a simple implementation of Kauffman's NK model of rugged fitness landscapes
[Kauffman1993].
- Fraglets.py: an interpreter for the Fraglets language
[Tschudin2003].
- NetFraglets.py: networked Fraglets, with CDP example.
- Disperser.py: an artificial chemistry for load balancing in distributed systems
[Meyer2009].
- 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
(not to be invoked directly, but to be used to build other chemistries on top of it, as illustrated so far by NumberChemHO.py and MolecularTSP.py).
- NumberChemHO.py: a reimplementation of NumberChem using HighOrderChem.
- MolecularTSP.py: a reimplementation of the Molecular Travelling Salesman algorithm
[Banzhaf1990]
using HighOrderChem.
Shell scripts to run the examples:
Located in the src/scripts/ folder, these shell scripts (bash) automate the process of invoking the corresponding python programme for the chemistry and plotting the obtained results.
chameleons.sh
: to run Chameleons.py
dimer.sh
: to run Dimer.py
dimerstoch.sh
: to run DimerStotch.py
numchem.sh
: to run NumberChem.py or NumberChemHO.py
matchem.sh
: to run MatrixChem.py
logistic.sh
: to run Logistic.py
lotka.sh
: to run Lotka.py
repressilator.sh
: to run Repressilator.py
quasispec.sh
: to run Quasispecies.py
tournament.sh
: to run Tournament.py
nk.sh
: to run NKlandscape.py
disperser.sh
: to run Disperser.py
moltsp.sh
: to run MolecularTSP.py
Spatial AC examples: Reaction-Diffusion
Located in the src/RD/ folder, these examples use VPython to display two-dimensional reaction-diffusion patterns on the screen.
The RD demos are supported by the following underlying implementation modules:
Last updated: September 26, 2015, by Lidia Yamamoto