<<ssa.m

SSA 0.1 (22-March-2006) loaded 23-March-2006 13:29:42.292283 using Mathematica 5.2 for Mac OS X (June 20, 2005)

<<xlr8r.m

MathSBML 2.5.8 (9 February 2006) loaded 23-March-2006 12:57:57.959049 using Mathematica 5.2 for Mac OS X (June 20, 2005)

xlr8r 0.22 (10-September-2005) loaded 23-March-2006 12:57:58.132428 using Mathematica 5.2 for Mac OS X (June 20, 2005)

Simple Enzymatic Reaction
Single realization

reactions = {{s + e→ se, a}, {se→ s + e, d}, {se→ p + e, k}} ;

ic = {s→  50, e→ 12, se→ 0, p→ 0} ;

r = {k→ 1, d→ 1, a→ 1} ;

sim = SSA[reactions, 10, ic, r] ;

Plot all variables

SSAPlot[sim] ;

[Graphics:HTMLFiles/index_11.gif]

Plot specific variables, and specify formats

splot1 = SSAPlot[sim, {s, p, se}, SSAPlotStyles→ {Red, Green, Blue}] ;

[Graphics:HTMLFiles/index_13.gif]

SSADotPlot[sim, {s, p, se}, SSAPlotStyles→ {{Red, PointSize[.005]}, Green, {Blue, PointSize[.003]}}, ImageSize→ 700] ;

[Graphics:HTMLFiles/index_15.gif]

Simple Enzymatic Reaction
Multiple realizations

simulations = Table[SSA[reactions, 50, ic, r], {25}] ;

[Graphics:HTMLFiles/index_18.gif]

Compare results with continuous simulations

<<xlr8r.m

xlr8r 0.22 (10-September-2005) loaded 23-March-2006 12:54:19.664014 using Mathematica 5.2 for Mac OS X (June 20, 2005)

n = run[reactions, {0, 10}, initialConditions→ic, rates→ r]

pd = runPlot[n, {p, s, se}, holdLegend→ True, PlotRange→ {{0, 10}, {0, 50}}, PlotStyle→Table[ {Black, Thickness[.01]}, {3}]] ;

[Graphics:HTMLFiles/index_24.gif]

comparison = Show[{plots, pd}, Background→ GrayLevel[.9]] ;

[Graphics:HTMLFiles/index_26.gif]

Export["comparison.png", comparison, ImageSize→ 700]

comparison.png

Reactions with repeated variables

sim = SSA[{{A + A→ B, k}}, 1, {A→ 100, B→ 0}, {k→ 1}] ;

p1 = SSAPlot[sim, SSAPlotType→ "Dot", SSAPlotStyles→ {Red, Blue}, PlotRange→ {{0, .05}, {0, 100}}] ;

[Graphics:HTMLFiles/index_31.gif]

s2 = run[{{A + A→ B, k}}, {0, .1}, initialConditions→ {A→ 100, B→ 0}, rates→ {k→ 1}] ;

p2 = runPlot[s2, holdLegend→ True, PlotRange→ {{0, .05}, {0, 100}}] ;

[Graphics:HTMLFiles/index_34.gif]

Show[p1, p2]

[Graphics:HTMLFiles/index_36.gif]

-Graphics -

Unimolecular reactions

<<src/ssa/ssa.m

SSA 0.1 (22-March-2006) loaded 23-March-2006 13:24:16.640479 using Mathematica 5.2 for Mac OS X (June 20, 2005)

sim = SSA[{{0→ A, k}, {A→B, k2}, {B→ 0, k3}}, 1, {A→ 100, B→ 0}, {k→ 1, k2→ 5, k3→ 1}] ;

p1 = SSAPlot[sim, {A, B}, SSAPlotType→ "Dot", SSAPlotStyles→ {Red, Blue}, PlotRange→ {{0, 1}, {0, 100}}] ;

[Graphics:HTMLFiles/index_42.gif]

s2 = run[{{Ø→ A, k}, {A→B, k2}, {B→ Ø, k3}}, {0, 1}, initialConditions→ {A→ 100, B→ 0}, rates→ {k→ 1, k2→ 5, k3→ 1}] ;

p2 = runPlot[s2, {A, B}, holdLegend→ True, PlotRange→ {{0, 1}, {0, 100}}, PlotStyle→ Black] ;

[Graphics:HTMLFiles/index_45.gif]

Show[p1, p2] ;

[Graphics:HTMLFiles/index_47.gif]


Created by Mathematica  (March 23, 2006) Valid XHTML 1.1!