Chemical Oscillators, also known as chemical clocks, are chemical systems in which the concentrations of one or more reactants undergoes periodic changes.
These Oscillatory reactions can be modelled using moose. The examples below demonstrate different types of chemical oscillators, as well as how they can be simulated using moose. Each example has a short description, the code used in the simulation, and the default (gsl solver) output of the code.
Each example can be found as a python file within the main moose folder under
In order to run the example, run the script
in command line, where
filename.py is the name of the python file you would like to run. The filenames of each example are written in bold at the beginning of their respective sections, and the files themselves can be found in the aformentioned directory.
In chemical models that use solvers, there are optional arguments that allow you to specify which solver you would like to use.
python filename.py [gsl | gssa | ee]
- gsl: This is the Runge-Kutta-Fehlberg implementation from the GNU Scientific Library (GSL). It is a fifth order variable timestep explicit method. Works well for most reaction systems except if they have very stiff reactions.
- gssl: Optimized Gillespie stochastic systems algorithm, custom implementation. This uses variable timesteps internally. Note that it slows down with increasing numbers of molecules in each pool. It also slows down, but not so badly, if the number of reactions goes up.
- Exponential Euler:This methods computes the solution of partial and ordinary differential equations.
All the following examples can be run with either of the three solvers, each of which has different advantages and disadvantages and each of which might produce a slightly different outcome.
Simply running the file without the optional argument will by default use the
gsl solver. These
gsl outputs are the ones shown below.
Slow Feedback Oscillator¶
File name: slowFbOsc.py
This example illustrates loading, and running a kinetic model for a delayed -ve feedback oscillator, defined in kkit format. The model is one by Boris N. Kholodenko from Eur J Biochem. (2000) 267(6):1583-8
This model has a high-gain MAPK stage, whose effects are visible whem one looks at the traces from successive stages in the plots. The upstream pools have small early peaks, and the downstream pools have large delayed ones. The negative feedback step is mediated by a simple binding reaction of the end-product of oscillation with an upstream activator.
We use the gsl solver here. The model already defines some plots and sets the runtime to 4000 seconds. The model does not really play nicely with the GSSA solver, since it involves some really tiny amounts of the MAPKKK.
Things to do with the model:
- Look at model once it is loaded in:: moose.le( '/model' ) moose.showfields( '/model/kinetics/MAPK/MAPK' ) - Behold the amplification properties of the cascade. Could do this by blocking the feedback step and giving a small pulse input. - Suggest which parameters you would alter to change the period of the oscillator: - Concs of various molecules, for example:: ras_MAPKKKK = moose.element( '/model/kinetics/MAPK/Ras_dash_MKKKK' ) moose.showfields( ras_MAPKKKK ) ras_MAPKKKK.concInit = 1e-5 - Feedback reaction rates - Rates of all the enzymes:: for i in moose.wildcardFind( '/##[ISA=EnzBase]'): i.kcat *= 10.0
Turing Pattern Oscillator in One Dimension¶
File name: TuringOneDim.py
This example illustrates how to set up a oscillatory Turing pattern in 1-D using reaction diffusion calculations. Reaction system is:
s ---a---> a // s goes to a, catalyzed by a. s ---a---> b // s goes to b, catalyzed by a. a ---b---> s // a goes to s, catalyzed by b. b -------> s // b is degraded irreversibly to s.
in sum, a has a positive feedback onto itself and also forms b. b has a negative feedback onto a. Finally, the diffusion constant for a is 1/10 that of b.
This chemical system is present in a 1-dimensional (cylindrical) compartment. The entire reaction-diffusion system is set up within the script.
File name: relaxationOsc.py
This example illustrates a Relaxation Oscillator. This is an oscillator built around a switching reaction, which tends to flip into one or other state and stay there. The relaxation bit comes in because once it is in state 1, a slow (relaxation) process begins which eventually flips it into state 2, and vice versa.
The model is based on Bhalla, Biophys J. 2011. It is defined in kkit format. It uses the deterministic gsl solver by default. You can specify the stochastic Gillespie solver on the command line
``python relaxationOsc.py gssa``
Things to do with the model:
* Figure out what determines its frequency. You could change the initial concentrations of various model entities:: ma = moose.element( '/model/kinetics/A/M' ) ma.concInit *= 1.5 Alternatively, you could scale the rates of molecular traffic between the compartments:: exo = moose.element( '/model/kinetics/exo' ) endo = moose.element( '/model/kinetics/endo' ) exo.Kf *= 1.0 endo.Kf *= 1.0 * Play with stochasticity. The standard thing here is to scale the volume up and down:: compt.volume = 1e-18 compt.volume = 1e-20 compt.volume = 1e-21
File name: repressilator.py
This example illustrates the classic Repressilator model, based on Elowitz and Liebler, Nature 2000. The model has the basic architecture
where TetR, Lac, and Lcl are genes whose products repress
eachother. The circle symbol indicates inhibition. The model uses the
Gillespie (stochastic) method by default but you can run it using a
deterministic method by saying
python repressillator.py gsl
Good things to do with this model include:
* Ask what it would take to change period of repressillator: * Change inhibitor rates:: inhib = moose.element( '/model/kinetics/TetR_gene/inhib_reac' ) moose.showfields( inhib ) inhib.Kf *= 0.1 * Change degradation rates:: degrade = moose.element( '/model/kinetics/TetR_gene/TetR_degradation' ) degrade.Kf *= 10.0 * Run in stochastic mode: * Change volumes, figure out how many molecules are present:: lac = moose.element( '/model/kinetics/lac_gene/lac' ) print lac.n`` * Find when it becomes hopelessly unreliable with small volumes.