Get from Ico-github-logo

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Gillespie Stochastic Simulation Algorithm

  • Gillespie.directMethod( s...
    DIRECTMETHOD Implementation of the Direct Method variant of the Gillespie algorithm
  • Gillespie.firstReactionMe...
    FIRSTREACTIONMETHOD Implementation of the First-Reaction Method variant of the Gillespie algorithm
  • ssa_example()
    Simulate a two-state model of gene expression
  • View all files
4.5 | 4 ratings Rate this file 67 Downloads (last 30 days) File Size: 176 KB File ID: #34707 Version: 1.3
image thumbnail

Gillespie Stochastic Simulation Algorithm


Nezar (view profile)


20 Jan 2012 (Updated )

Simulate discrete stochastic models of chemical reaction networks.

| Watch this File

File Information

The kinetics of chemical reaction networks are often modeled using differential equations, treating the amounts of chemical species as continuous and deterministic quantities. If the number of reacting molecules is small, random molecular fluctuations become significant and a discrete, stochastic modeling approach is often more appropriate. Under assumptions of a "well-mixed" environment, such a system can be modeled as a continuous-time Markov process, whose probability distribution obeys what is called a chemical "master equation". The Gillespie algorithm (or SSA) is a discrete-event simulation algorithm that produces single realizations of the stochastic process that are in exact statistical agreement with the master equation.
This submission includes simple implementations of the two original versions of the SSA (Direct and First-Reaction Method). The user provides a model consisting of a matrix of reaction stoichiometries, a handle to a function that computes reaction propensities (probability/unit time), an initial state vector, and initial/final times. The ssa functions returns the sequence of event times and species amounts.

MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
02 Jan 2017 Alexander Andreychenko

13 Sep 2014 anuj sirohi

12 Aug 2013 yun

yun (view profile)

28 Jan 2013 Mariana

29 May 2012 1.1

Minor bug fix for logging the last event. Removed package folder.

17 Aug 2015 1.3

linked to Github

Contact us