Skip to content

Tutorial 5

Tim Vaughan edited this page May 19, 2015 · 6 revisions

In this tutorial we tackle the problem of specifying models involving many reactions, where "many" can mean hundreds or thousands.

Consider a system containing particles of type undergoing a one-dimensional random walk on an array of locations:

This corresponds to a set of reactions of the form

for and

for .

Thus, the random walk model requires the specification of individual reactions.

Input file

Using only what we've learned in previous tutorials, constructing a MASTER XML describing this model quickly becomes tiresome even when is small. For instance, the following describes a random walk model with =5:

<model spec='Model'>
<populationType spec='PopulationType' typeName="X" dim="5"/>
<reaction spec='Reaction' rate="1.0">
    X[0] -> X[1]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[1] -> X[2]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[2] -> X[3]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[3] -> X[4]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[1] -> X[0]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[2] -> X[1]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[3] -> X[2]
</reaction>
<reaction spec='Reaction' rate="1.0">
    X[4] -> X[3]
</reaction>
</model>

This problem rapidly grows worse as the number of cells increases. While one could of course produce the necessary input files automatically using some simple text manipulation tools, the resulting models are clearly no longer "human readable" in any useful sense.

To address this, MASTER provides a way of algorithmically specifying large numbers of reactions.

IN PROGRESS