The Loch Ness Monster

Implementation the Chemical Master Equation, \begin{equation} \frac{d\left|\psi(t)\right>}{dt} = H\left|\psi(t)\right> \end{equation} \begin{equation} H = \sum_{\tau \in T} r_\tau(a^{\dagger t_\tau} - a^{\dagger s_\tau})a^{s_\tau} \end{equation} in a direct way for a single species and an arbitrary number of reactions.

The example program requires the `hmatrix` package to be installed and can be built with,

cabal install hmatrix
ghc -O2 --main MasterEx.lhs
ghc -O2 --main Dissipation2.lhs

For a simple dissipation equation, \begin{equation} A \rightarrow \emptyset \end{equation} and starting with some initial probability distribution of a 25% chance of finding each of 10, 100, 200 or 300 particles, we get a time evolution of the distribution that looks like this,

./dissipation.gif

Here is what happens with different matrix sizes for the more complicated but still dissipative system with the same initial conditions, \begin{equation} \begin{array}{ccc} \emptyset &\rightarrow& A\\ 2A &\rightarrow& \emptyset \end{array} \end{equation} The purple line is for matrix of size 301, just large enough to accomodate the input distribution, the filled green circles are 400, the red circles are 500 and the blue lines and crosses are 600 suggesting diminishing returns for matrix sizes with dissipative systems.

./dissipation2_0001.png

Generated by Org version 7.9.3f with Emacs version 24 by tardis.ed.ac.uk!wwaites at 2014-11-30T13:11+0000