Stochastic Simulation.

Similar documents
Lecture 4 The stochastic ingredient

Modelling in Systems Biology

STOCHASTIC CHEMICAL KINETICS

Reaction time distributions in chemical kinetics: Oscillations and other weird behaviors

Biochemical simulation by stochastic concurrent constraint programming and hybrid systems

Lecture 1 Modeling in Biology: an introduction

Modeling Biological Systems in Stochastic Concurrent Constraint Programming

MA 777: Topics in Mathematical Biology

Stochastic Simulation of Biochemical Reactions

Varieties of Stochastic Calculi

Continuous-time Markov Chains

Stochastic Chemical Kinetics

Efficient Leaping Methods for Stochastic Chemical Systems

Formal Modeling of Biological Systems with Delays

Notes for Math 450 Stochastic Petri nets and reactions

Modeling Biological Systems in Stochastic Concurrent Constraint Programming

Kinetic Monte Carlo. Heiko Rieger. Theoretical Physics Saarland University Saarbrücken, Germany

Biomolecular reaction networks: gene regulation & the Repressilator Phys 682/ CIS 629: Computational Methods for Nonlinear Systems

Q1. (a) Define the term activation energy for a chemical reaction. (2)

EVOLUTIONARY DISTANCES

ON THE APPROXIMATION OF STOCHASTIC CONCURRENT CONSTRAINT PROGRAMMING BY MASTER EQUATION

PoissonprocessandderivationofBellmanequations

Universal examples. Chapter The Bernoulli process

Regulation of metabolism

From cell biology to Petri nets. Rainer Breitling, Groningen, NL David Gilbert, London, UK Monika Heiner, Cottbus, DE

Reaction Dynamics (2) Can we predict the rate of reactions?

Link Models for Packet Switching

An Introduction to Stochastic Simulation

Nested Stochastic Simulation Algorithm for Chemical Kinetic Systems with Disparate Rates. Abstract

Partial Differential Equations (PDEs)

Stochastic process. X, a series of random variables indexed by t

Effect of Reactant Size on Discrete Stochastic Chemical Kinetics

Continuous time Markov chains

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

Modelling the Randomness in Biological Systems

Nested Stochastic Simulation Algorithm for KMC with Multiple Time-Scales

When do diffusion-limited trajectories become memoryless?

The exponential distribution and the Poisson process

Finite-Horizon Statistics for Markov chains

Modelling data networks stochastic processes and Markov chains

Advanced Monte Carlo Methods Problems

Reducing The Computational Cost of Bayesian Indoor Positioning Systems

Markov Chain Monte Carlo The Metropolis-Hastings Algorithm

Part I Stochastic variables and Markov chains

SPA for quantitative analysis: Lecture 6 Modelling Biological Processes

Stochastic Simulation Methods for Solving Systems with Multi-State Species

Models of Language Evolution

Birth-Death Processes

Stochastic models of biochemical systems

Time-Dependent Statistical Mechanics 5. The classical atomic fluid, classical mechanics, and classical equilibrium statistical mechanics

Gillespie s Algorithm and its Approximations. Des Higham Department of Mathematics and Statistics University of Strathclyde

Influence of Nuclear Substructure on Gene Regulation and Expression

Stochastic Modelling Unit 1: Markov chain models

Dynamical Monte-Carlo Simulation of Surface Kinetics

Methods of Data Analysis Random numbers, Monte Carlo integration, and Stochastic Simulation Algorithm (SSA / Gillespie)

Stochastic Simulation of Biological Systems with Dynamical Compartments

Collision Theory and Rate of Reaction. Sunday, April 15, 18

From Stochastic Processes to Stochastic Petri Nets

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

Irreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1

Problem Set 5. 1 Waiting times for chemical reactions (8 points)

Program for the rest of the course

Temperature: An increase in temperature increases the rate of reaction.

Markov Reliability and Availability Analysis. Markov Processes

Monte Carlo (MC) Simulation Methods. Elisa Fadda

Finite State Machines. CS 447 Wireless Embedded Systems

Some investigations concerning the CTMC and the ODE model derived from Bio-PEPA

2. Mathematical descriptions. (i) the master equation (ii) Langevin theory. 3. Single cell measurements

CS 781 Lecture 9 March 10, 2011 Topics: Local Search and Optimization Metropolis Algorithm Greedy Optimization Hopfield Networks Max Cut Problem Nash

Pattern Recognition and Machine Learning. Bishop Chapter 11: Sampling Methods

MCMC and Gibbs Sampling. Sargur Srihari

Uniformly Uniformly-ergodic Markov chains and BSDEs

Kinetic Monte Carlo (KMC)

A comparative study of no-time-counter and majorant collision frequency numerical schemes in DSMC

Stochastic Petri Net. Ben, Yue (Cindy) 2013/05/08

25.1 Markov Chain Monte Carlo (MCMC)

IV121: Computer science applications in biology

CS 237: Probability in Computing

REACTION KINETICS. Catalysts substances that increase the rates of chemical reactions without being used up. e.g. enzymes.

Proxel-Based Simulation of Stochastic Petri Nets Containing Immediate Transitions

Diffusion. CS/CME/BioE/Biophys/BMI 279 Nov. 15 and 20, 2016 Ron Dror

PROBABILISTIC REASONING SYSTEMS

The story of the film so far... Mathematics for Informatics 4a. Continuous-time Markov processes. Counting processes

Introduction Probabilistic Programming ProPPA Inference Results Conclusions. Embedding Machine Learning in Stochastic Process Algebra.

Modelling data networks stochastic processes and Markov chains

CDA5530: Performance Models of Computers and Networks. Chapter 3: Review of Practical

Exponential Distribution and Poisson Process

So in terms of conditional probability densities, we have by differentiating this relationship:

Stochastic Petri Net

Dynamic Risk Measures and Nonlinear Expectations with Markov Chain noise

AN INTRODUCTION TO DISCRETE-EVENT SIMULATION

Stochastic Simulation of Chemical Kinetics

arxiv: v2 [q-bio.qm] 12 Jan 2017

Dynamic Partitioning of Large Discrete Event Biological Systems for Hybrid Simulation and Analysis

Safety and Reliability of Embedded Systems. (Sicherheit und Zuverlässigkeit eingebetteter Systeme) Fault Tree Analysis Obscurities and Open Issues

Lecture 3. Many reactions happen in steps. Mechanism of reaction. Professor Hicks Inorganic Chemistry (CHE152) A + B C C + 2B D D+ B + E F

CDA6530: Performance Models of Computers and Networks. Chapter 3: Review of Practical Stochastic Processes

On the Interpretation of Delays in Delay Stochastic Simulation of Biological Systems

Particle collisions and decays

Lecture 4a: Continuous-Time Markov Chain Models

Transcription:

Stochastic Simulation. (and Gillespie s algorithm) Alberto Policriti Dipartimento di Matematica e Informatica Istituto di Genomica Applicata A. Policriti Stochastic Simulation 1/20

Quote of the day D.T. Gillespie Exact Stochastic Simulation of Coupled Chemical Reactions J. of Physical Chemistry, 81(25), 1977 There are two formalisms for mathematically describing the time behavior of a spatially homogeneous chemical system: the deterministic approach regards the time evolution as a continuous, wholly predictable process which is governed by a set of coupled, ordinary differential equations (the reaction-rate equations ); the stochastic approach regards the time evolution as a kind of random-walk process which is governed by a single differential-difference equation (the master equation ). Fairly simple kinetic theory arguments show that the stochastic formulation of chemical kinetics has a firmer physical basis than the deterministic formulation, but unfortunately the stochastic master equation is often mathematically intractable. There is, however, a way to make exact numerical calculations within the framework of the stochastic formulation without having to deal with the master equation directly. [...] A. Policriti Stochastic Simulation 2/20

Outline Stochastic Processes 1 Stochastic Processes 2 A. Policriti Stochastic Simulation 3/20

Exponential distribution An exponential distribution models the time of occurrence of a (simple) random event. It is given by a random variable T, with values in [0, ), with density f(t) = λe λt, where λ is the rate of the exponential distribution. The probability of the event happening within time t is P (T t) = 1 e λt. Mean: E[T ] = 1 λ Variance: V AR[T ] = 1 λ 2 λ is the average density of frequency of events per unit of time. A. Policriti Stochastic Simulation 4/20

Continuous Time Markov Chains What happens if we have more than one event competing? In this case, there is a race condition between events: the fastest event is executed and modifies globally the state of the system. Continuous Time Markov Chains The is a discrete set of states, connected by transitions each with an associated rate of an exponential distribution. In each state, transitions compete in a race condition: the fastest one determines the new state and the time elapsed. In the new state, the race condition is started anew (memoryless property). A. Policriti Stochastic Simulation 5/20

Continuous Time Markov Chains What happens if we have more than one event competing? In this case, there is a race condition between events: the fastest event is executed and modifies globally the state of the system. Continuous Time Markov Chains The is a discrete set of states, connected by transitions each with an associated rate of an exponential distribution. In each state, transitions compete in a race condition: the fastest one determines the new state and the time elapsed. In the new state, the race condition is started anew (memoryless property). A. Policriti Stochastic Simulation 5/20

Continuous Time Markov Chains What happens if we have more than one event competing? In this case, there is a race condition between events: the fastest event is executed and modifies globally the state of the system. Continuous Time Markov Chains The is a discrete set of states, connected by transitions each with an associated rate of an exponential distribution. In each state, transitions compete in a race condition: the fastest one determines the new state and the time elapsed. In the new state, the race condition is started anew (memoryless property). A. Policriti Stochastic Simulation 5/20

Continuous Time Markov Chains Equivalent Characterization In each state, we select the next state according to a probability distribution obtained normalizing rates (from S to S 1 r with prob. 1 r 1 +r 2 ). The time spent in a state is given by an exponentially distributed random variable, with rate given by the sum of outgoing transitions from the actual node (r 1 + r 2). A. Policriti Stochastic Simulation 6/20

Stochastic model of a chemical system We have a set of chemical substances S 1,..., S N contained in a volume V, with X i = number of molecules of species i, subject to a set of chemical reactions where each R j is of the form R 1,..., R M, R j : X j1 + X j2 X j 1 +... + X j pj, R j : X j1 X j 1 +... + X j pj, R j : X j 1 +... + X j pj, The system is supposed to be in thermal equilibrium A. Policriti Stochastic Simulation 7/20

Stochastic model of a chemical system Key assumption Each reaction R j has associated a specific probability rate constant c j : c j dt = probability that a randomly chosen combination of R j reactant molecules inside V at time t will react according to R j in the next infinitesimal time interval [t, t + dt). Key observation The next reaction that will happen depends only on the current configuration of the system (number of molecules), not on past history (memoryless property). A. Policriti Stochastic Simulation 8/20

Stochastic model of a chemical system Key assumption Each reaction R j has associated a specific probability rate constant c j : c j dt = probability that a randomly chosen combination of R j reactant molecules inside V at time t will react according to R j in the next infinitesimal time interval [t, t + dt). Key observation The next reaction that will happen depends only on the current configuration of the system (number of molecules), not on past history (memoryless property). A. Policriti Stochastic Simulation 8/20

Deriving kinetic parameters Let s focus on a bimolecular reaction... Problem... it is physically meaningless to talk about the number of molecules whose centers lie inside δv coll in the required limit of vanishingly small δt.... A. Policriti Stochastic Simulation 9/20

The stochastic model Under the hypothesis of thermal equilibrium, molecules are uniformly distributed in space, and velocities follow a Boltzmann distribution. The collision volume swept on average is δv = πr 2 12 v 12 δt. The collision probability is therefore δv V = πr2 12 v 12 δt. V A. Policriti Stochastic Simulation 10/20

The stochastic model Reaction probability p j = def reactant molecules will chemically react probability that a colliding pair of R j according to R j. The basic rate of reaction c j is therefore c j = V 1 πr 2 12 v 12 p j. A. Policriti Stochastic Simulation 11/20

Rate functions Stochastic Processes c j gives the rate of reaction for a single pair of molecules involved in R j. To determine the global rate of reaction R j, we need to count how many pairs of reacting molecules we have. We do this with the rate function h j (c j, X). Reactants of different species X j1 + X j2 h j (c j, X) = c j X j1 X j2 Reactants of the same species 2X j1 h j (c j, X) = c j X j1 (X j1 1) 2 A. Policriti Stochastic Simulation 12/20

Chemical Master Equation From rate functions, we can derive a differential equations saying how the probability of being in different states (of having different number of molecules) varies over time. It is called the chemical master equation: dp (X, t) dt M ( ) = h j(c j, X ν j)p (X ν j, t) h j(c j, X)P (X, t) }{{}}{{} j=1 A reaction R j happened in time [t, t + dt] No reaction happened in [t, t + dt] Pro This equation is everything we need to know about the stochastic process. Cons This equation is very difficult to solve, even numerically. A. Policriti Stochastic Simulation 13/20

The approach of Gillespie The central notion becomes the following definition of reaction probability density function: P (τ, j) = def probability that, given the state X = (X 1,..., X N ) at time t, the next reaction in V will occur in the infinitesimal time interval (t + τ, t + τ + dt), and will be an R j reaction A. Policriti Stochastic Simulation 14/20

The approach of Gillespie Explicit form of P (τ, j) P (τ, j) = h 0(X)e h 0(X)τ hj(cj, X) }{{} h 0(X) time elapsed }{{} next reaction Intuitively... The equation says that the next reaction is chosen with probability h j h 0, while the time elapsed to see this reaction happen is exponentially distributed with rate h 0. This stochastic process is a Continuous Time Markov Chain. A. Policriti Stochastic Simulation 15/20

Numerically simulating P (τ, µ) Numerically simulating P (τ, µ) A random number generator can be used to draw random pairs (τ, µ) whose probability density function is P (τ, µ). Given r 1 and r 2 randomly generated, determine τ and µ such that: τ = (1/h 0 ) log (1/r 1 ) Σ j 1 ν=1 h ν < r 2 h 0 Σ j ν=1 h ν The method A general Monte Carlo technique called inversion method: x will be randomly drawn with probability density function P (x) if x = F 1 (r) with r randomly drawn with uniform probability density function in [0, 1] and F is the probability distribution function ( x P (y)dy). A. Policriti Stochastic Simulation 16/20

The algorithm Stochastic Processes A. Policriti Stochastic Simulation 17/20

Gillespie Algorithm and Petri Nets 2P P 2 h 1 (1, X) = 1 (27 28)/2 = 378 h 2 (2, X) = 2 12 = 24 h 0 (X) = 378 + 24 = 402 p 1 = 0.94 p 2 = 0.06 time = 1/402 A. Policriti Stochastic Simulation 18/20

Gillespie Algorithm and Petri Nets 2P P 2 h 1 (1, X) = 1 (27 28)/2 = 378 h 2 (2, X) = 2 12 = 24 h 0 (X) = 378 + 24 = 402 p 1 = 0.94 p 2 = 0.06 time = 1/402 A. Policriti Stochastic Simulation 18/20

Gillespie Algorithm and Petri Nets 2P P 2 h 1 (1, X) = 1 (27 28)/2 = 378 h 2 (2, X) = 2 12 = 24 h 0 (X) = 378 + 24 = 402 p 1 = 0.94 p 2 = 0.06 time = 1/402 A. Policriti Stochastic Simulation 18/20

Gillespie Algorithm and Petri Nets 2P P 2 h 1 (1, X) = 1 (27 28)/2 = 378 h 2 (2, X) = 2 12 = 24 h 0 (X) = 378 + 24 = 402 p 1 = 0.94 p 2 = 0.06 time = 1/402 A. Policriti Stochastic Simulation 18/20

Gillespie Algorithm and π-calculus Each channel has a basic rate λ associated to it. The global rate of a channel depends on how many agents are ready to communicate on it. In this example: λmn The functions h i are determined implicitly by the semantics of the language. Gillespie can be used to simulate stochastic π-calculus as well!!! A. Policriti Stochastic Simulation 19/20

An example: genetic regulatory networks Genes as logical gates Repressilator A. Policriti Stochastic Simulation 20/20