@article {Sauro181446, author = {Herbert M Sauro}, title = {A Portable Software Library that Implements the Gillespie Direct Method}, elocation-id = {181446}, year = {2017}, doi = {10.1101/181446}, publisher = {Cold Spring Harbor Laboratory}, abstract = {A common approach to simulating chemical reaction systems is to formulate the problem as a set of ordinary differential equation and solve them using standard numerical procedures. Such a formulation works well when the number of molecules involved in the simulation is large and assumes a deterministic formulation for the underling chemical kinetics. However for systems such as gene regulatory networks where the number of molecules of a specific species can be of the order of 10s of molecules, the deterministic approach fails to capture important dynamical features. At low molecular numbers stochastic events dominate the dynamics. As a result much research has been devoted to developing numerical algorithms for computing the stochastic trajectories. One of the most common approaches is based on Gillespie{\textquoteright}s stochastic simulation algorithm, for example the direct method. Due to its simplicity the direct method has been implemented many times in software. However, unusually, there does not appear to be a C based reusable software library. This article describes the development of such a library. All source code is licensed under the liberal Apache 2.0 open source license and is available at Github: https://github.com/sys-bio/libStochastic}, URL = {https://www.biorxiv.org/content/early/2017/08/29/181446}, eprint = {https://www.biorxiv.org/content/early/2017/08/29/181446.full.pdf}, journal = {bioRxiv} }