Introducing the Stochastic Simulation of Chemical Reactions Using the Gillespie Algorithm and MATLAB: Revisited and Augmented
The stochastic simulation of chemical reactions, specifically, a simple reversible chemical reaction obeying the first-order, i.e., linear, rate law, has been presented by Martínez-Urreaga and his collaborators in this journal. The current contribution is intended to complement and augment their work in two aspects. First, the simple reversible chemical reaction is explicitly modeled as a stochastic process—specifically, as a birth-death process. The resultant model yields the master, i.e., governing, equation of the process whose solution renders it possible to analytically obtain the process’ expected means and variances. Second, the master equation is stochastically simulated through the Monte Carlo method by resorting to the time-driven approach in addition to the event-driven approach adopted by Martínez-Urreaga and his collaborators on the basis of the Gillespie algorithm. The process’ means and variances have been numerically computed by implementing these approaches, the results from which are compared with the analytical solutions of the stochastic model for validation. In addition, they are compared with the solution of the deterministic model as presented by Martínez-Urreaga and his collaborators. The two approaches for stochastic simulation by the Monte Carlo method are further illustrated with the photoelectrochemical disinfection of bacteria also obeying the first-order rate law. The results are validated by comparing them with the available experimental data.