Skip to main content
Royal Society Open Science logoLink to Royal Society Open Science
. 2016 Sep 14;3(9):160485. doi: 10.1098/rsos.160485

A hybrid continuous-discrete method for stochastic reaction–diffusion processes

Wing-Cheong Lo 1,†,, Likun Zheng 2,3,, Qing Nie 2,3
PMCID: PMC5043330  PMID: 27703710

Abstract

Stochastic fluctuations in reaction–diffusion processes often have substantial effect on spatial and temporal dynamics of signal transductions in complex biological systems. One popular approach for simulating these processes is to divide the system into small spatial compartments assuming that molecules react only within the same compartment and jump between adjacent compartments driven by the diffusion. While the approach is convenient in terms of its implementation, its computational cost may become prohibitive when diffusive jumps occur significantly more frequently than reactions, as in the case of rapid diffusion. Here, we present a hybrid continuous-discrete method in which diffusion is simulated using continuous approximation while reactions are based on the Gillespie algorithm. Specifically, the diffusive jumps are approximated as continuous Gaussian random vectors with time-dependent means and covariances, allowing use of a large time step, even for rapid diffusion. By considering the correlation among diffusive jumps, the approximation is accurate for the second moment of the diffusion process. In addition, a criterion is obtained for identifying the region in which such diffusion approximation is required to enable adaptive calculations for better accuracy. Applications to a linear diffusion system and two nonlinear systems of morphogens demonstrate the effectiveness and benefits of the new hybrid method.

Keywords: reaction–diffusion systems, stochastic simulation, hybrid method, biological morphogen systems

1. Introduction

Many biological systems are subject to stochastic fluctuations when the copy number of the molecules is relatively small [1,2]. For spatially inhomogeneous systems that involve both reactions and diffusions, the spatial distributions of the molecules are important because local copy number fluctuations may result in phenotypic differences, though the total number of molecules of the relevant species may be high [3].

For a spatially homogeneous system, the Gillespie stochastic simulation algorithm (SSA) tracks each reaction event and updates the state of the system after each occurrence of reactions [4]. Numerous methods have been developed to improve the efficiency of this method for cases involving large sizes for certain species or frequent reactions; examples of such methods include the next reaction method [5], τ-leaping [68], the hybrid methods for simulating fast and slow reactions [911] and the adaptive multi-level simulation algorithm [12].

For a spatially inhomogeneous system, the SSA can be applied by first partitioning the spatial domain into many compartments. In each compartment, reactions are treated as in the homogeneous case; however, molecules may jump between adjacent compartments through diffusion [13]. In this approach, the size of each compartment must be sufficiently small that diffusive jumps occur more rapidly than reactions and the inhomogeneity inside each compartment can be ignored [14,15]. Also, the time scale for the molecule to diffuse throughout a compartment should be much faster than the time scale for the fastest bimolecular chemical reaction [14,16,17].

In the case of frequent diffusive jumps, the spatial SSA may become computationally inefficient. Consequently, modifications have been made to accelerate the SSA, as in the next sub-volume method [18] and the null process [19], or to develop a new computational algorithm that optimizes the search process in the SSA [20], or to approximate diffusion, as in the multinomial simulation algorithm [21], the diffusive finite state projection method [22] and adaptive algorithms [23,24]. These approximation methods share a common feature: reaction and diffusion processes are simulated independently, and the diffusive jumps occur at predetermined time intervals, between which the reactions are simulated. As a result, the time step depends on the fastest diffusion rate, leading to excessive computational cost, in particular, for the case of fast diffusion.

Several hybrid methods were developed for solving stochastic reaction–diffusion systems [2528]. The most common approach is a spatially hybrid method between the SSA and deterministic approach. Noise effect in high concentration region is relativity small so deterministic approach such as using partial differential equations is sufficient to ensure the accuracy of simulations. However, small noise effect in high concentration region may still result in large fluctuations in low concentration region because of communication between the regions, so the development of a hybrid method which combines two or more stochastic approaches without involving any deterministic approach becomes an important and effective approach.

Here, we introduce a hybrid continuous-discrete method to simulate spatially inhomogeneous systems with better efficiency and accuracy. As in the Central Limit Theorem, a continuous Gaussian random variable can be used to approximate the change in the number of molecules introduced by a large number of independent diffusive jumps. A brief overview of the algorithm is listed below:

  1. Calculating the time of the next occurring reaction based on the SSA.

  2. Approximating the numbers of diffusive jumps using Gaussian random vectors with time-dependent means and covariances by assuming no reactions during the period of time.

  3. If the approximated number of diffusive jumps at some compartments is large enough, the approximation is then applied at that locations; otherwise the SSA is applied. Since the number of diffusive jumps may be different at each time period between reactions, so the locations at which the approximation is applied are set adaptively over time.

As a result, the updating takes place only when a reaction occurs, and the time step is then determined by the reaction rates. Because the correlation among diffusive jumps is considered in our method, the approximation of the diffusion is reliable, and its effect on the reactions is small.

The method is applied to 3 one-dimensional reaction–diffusion systems for morphogen gradients in addition to a two-dimensional morphogen system. The efficiency of the method improves as the diffusion coefficients increase or the number of diffusing molecules increases, yielding more than 60% savings in computational cost compared with the standard spatial SSA. In addition, because of the new time-adaptive criterion for identifying the region for the diffusion approximation, our hybrid method allows for zero initial conditions (i.e. an initial state without any molecules) in the simulations, unlike many other existing stochastic methods, which need to start with a certain level of molecules in order to obtain good approximations.

2. Material and methods

2.1. Chemical master equations for spatially inhomogeneous systems

Consider a system along a one-dimensional domain with length L, where N molecular species {S1,S2,…,SN} are involved in the following M reactions {R1,R2,…,RM}:

Rj:sj1rS1++sjNrSNγjsj1pS1++sjNpSN.

Here, sjir and sjip are the stoichoimetric coefficients of the reactant and product species, respectively, and γj is the macroscopic rate constant of Rj. Although we describe the method on a one-dimensional domain, it is worth noting that it is easy to extend this method in a higher dimensional domain. The examples in one- and two-dimensional domains will be discussed in the Simulation results section.

If the system is spatially inhomogeneous, then the domain is partitioned into K identical compartments with uniform length h, where h=L/K. The subsystem in each compartment is assumed to be homogeneous. Molecules in different compartments are treated as different species, denoted by {S11,S12,…,Ski,…,SKN}, where Ski is the ith species in the kth compartment. The system state is denoted by

X(t)=(X11(t),X12(t),,Xki(t),,XKN(t)),

where Xki is the number of molecules of Ski.

Only molecules in the same compartment can react. The jth reaction in the kth compartment Rkj is as follows:

Rkj:sj1rSk1++sjNrSkNγkjsj1pSk1++sjNpSkN,

where γkj is the reaction rate constant of reaction Rkj.

Diffusion is treated as a reaction in which a molecule in one compartment jumps to one of its neighbouring compartments at a constant rate. Without loss of generality, we assume that only species S1 diffuses in the algorithm description. Assume that species S1 diffuses with the coefficient D1 with reflective boundary conditions on the boundary of the domain. Then, the diffusive jumps obey the following chain reactions:

S11D1/h2D1/h2S21D1/h2D1/h2S31D1/h2D1/h2SN1.

Multiple diffusive species can be easily treated using the same approach, and an example of such a case is presented in the Simulation results section.

Consider X(t) as a variable x, the probability that the reaction Rkj will fire in the next time interval [t,t+dt) is akj(x) dt, where akj is called the propensity function of Rkj. The state of the system transfers from one state to another through reaction firing. The net change of the state of the system caused by one occurrence of reaction Rkj is denoted as νkj and so

νkj=(0,,0,sj1psj1r,,sjNpsjNrfrom((k1)N+1)thtokNth,0,,0).

In addition, denote as akL(x) and akR(x) the propensity functions of diffusion jumps JkL:Sk1S(k1)1 and JkR:Sk1S(k+1)1, respectively. Denote as νkL and νkR the net change of the state of the system caused by JkR and JkL, respectively. As diffusion is treated as mono-molecular reactions, we have

akL(x)=D1h2Xk1,for 2<kK,andakR(x)=D1h2Xk1,for 1k<K1

and the elements of νiL and νiR equal 1, −1 or 0.

The chemical master equation (CME) that governs the temporal evolution of the probability density function p(x,t) that the state of the system is x at time t is as follows:

tp(x,t)=k=2KakL(x)p(x,t)+k=2KakL(xνkL)p(xνkL,t)Leftjumpk=1K1akR(x)p(x,t)+k=1K1akR(xνkR)p(xνkR,t)Rightjumpk=1Kj=1Makj(x)p(x,t)+k=1Kj=1Makj(xνkj)p(xνkj,t)Reaction. 2.1

2.2. Diffusion approximation

For most biological systems, the state space and the dimension of the CME are large or infinite, rendering the CME impossible to solve. The stochastic process underlying the CME can be simulated by the spatial SSA (details can be found in appendix A). Similar to the existing methods [1417], the compartment size is first appropriately chosen such that diffusive jumps are usually more frequent than reactions because of the assumption of the homogeneity of reactions in each compartment. In the case of frequent diffusive jumps, the spatial SSA may become computationally inefficient. Here we shall approximate the diffusion processes using Gaussian random vectors with time-dependent means and covariances.

Given X(t0)=x0=(x011,x012,…,x0ki,…,x0KN), let nkL(t) and nkR(t) denote the numbers of leftward and rightward diffusive jumps of molecules from the kth compartment between time t0 and time t. Under the assumption that a large number of diffusive jumps occurs between reactions in each compartment, we can approximate the numbers of diffusive jumps as follows:

nkL(t)Λ=ϕkL(t)+ξkLΛ+O(1Λ) 2.2

and

n(k1)R(t)Λ=ϕ(k1)R(t)+ξ(k1)RΛ+O(1Λ), 2.3

for k=2,3,…,K. The functions ϕkL(t) and ϕkR(t) characterize the macroscopic features of the diffusive jumps. When the copy number of molecules is large enough, the system of the average of molecule concentration will approach a deterministic diffusion system. The macroscopic features of the diffusive jumps are determined by the solution of the deterministic system. The second terms ξkL and ξkR are real random numbers, measuring the fluctuations around ϕkL(t) and ϕkR(t). The means of these random numbers are zero and the covariances can be determined by the formula presented later in this section. The constant Λ is the number of molecules per unit concentration in a compartment. For example, if the concentration 1 μM corresponds to 600 molecules in each compartment, then Λ=600 μM−1. When Λ≫1, ϕkL(t) and ϕkR(t) are considered to be continuous functions of t.

Let Π(ξ1L,ξ2L,ξ2R,…,ξnL,t) be the probability density function of ξ1L, ξ2L, ξ2R,…,ξnL at time t. The function Π for molecule concentrations can be obtained from a rescaling of the probability density function p, which is for the number of molecules. The formula for Π is as follows:

Π(ξ1L,ξ2L,ξ2R,,ξnL,t)=1Λ2n2p(x0+k=1K1nkRνkR+k=2KnkLνkL,t|x0,t0),

where p(x,t | x0,t0) is the probability density function that the state of the system is x at time t with the condition X(t0)=x0.

By performing the standard systematic expansion of the master equation equation (2.1) [29], we obtain the following equation:

ΠtΛ(Πξ1R,Πξ2L,,ΠξKL)(ϕ1R(t)t,ϕ2L(t)t,,ϕKL(t)t)=Λ[D1h2(c011ϕ1R+ϕ2L)Πξ1RD1h2(c0K1ϕKL+ϕ(K1)R)ΠξKLD1h2k=2K1(c0k1ϕkRϕkL+ϕ(k+1)L+ϕ(k1)R)ΠξkRD1h2k=2K1(c0k1ϕkRϕkL+ϕ(k+1)L+ϕ(k1)R)ΠξkL]+D1h2k=1K1ξkR(ξkRΠξ(k+1)LΠ)+D1h2k=2K1ξkR(ξkLΠξ(k1)RΠ)+D1h2k=2KξkL(ξkLΠξ(k1)RΠ)+D1h2k=2K1ξkL(ξkRΠξ(k+1)LΠ)+D12h22ξ1R2((c011ϕ1R+ϕ2L)Π)+D12h22ξKL2((c0K1ϕKL+ϕ(K1)R)Π)+D12h2k=2K12ξkR2((c0k1ϕkRϕkL+ϕ(k+1)L+ϕ(k1)R)Π)+D12h2k=2K12ξkL2((c0k1ϕkRϕkL+ϕ(k+1)L+ϕ(k1)R)Π)l=1Kj=1Malj(Λ(c0+k=1K1ϕkRνkR+k=2KϕkLνkL))Π+O(1Λ),

where c0=(c011,c012,…,c0KN)=x0/Λ. Assuming

Λ1andmax1jM,1kKakjD1h2min1kK1{ΠξkR,Πξ(k+1)L}, 2.4

and comparing the order term Λ, we have

t(ϕ1Rϕ2Lϕ2RϕKL)=D1h2(c011ϕ1R+ϕ2Lc021ϕ2Rϕ2L+ϕ3L+ϕ1Rc021ϕ2Rϕ2L+ϕ3L+ϕ1Rc0K1ϕKL+ϕ(K1)R),(ϕ1R,ϕ2L,ϕ2R,,ϕKL)=0at t=t0.

Letting

Πs=Πexp(t0tl=1Kj=1Malj(Λ(c0+k=1K1ϕkR(τ)νkR+k=2KϕkL(τ)νkL))dτ) 2.5

and defining the vector variable (y1,y2,y3,…,y2K−2)′=(ξ1R,ξ2L,ξ2R,…,ξKR)′, we obtain the following Fokker–Planck equation:

Πst=i,jAijyi(yjΠs)+12i,jBij(t)2Πsyiyj+O(1Λ),

where

A=D1h2(1111111111111111111111111111)

and

B(t)=D1h2(c011ϕ1R+ϕ2Lc021ϕ2Rϕ2L+ϕ1R+ϕ3Lc021ϕ2Rϕ2L+ϕ1R+ϕ3Lc0K1ϕKL+ϕ(K1)R).

So the corresponding covariance matrix is

ρ=0tY(t)Y1(τ)B(τ)(Y1(τ))Y(t)dτ,

where Y(t)=exp(At).

This approximation is valid under the assumption (2.4), which is true when the number of diffusive molecules and the value of diffusion coefficient are large. Overall, we approximate the numbers of diffusive jumps by obtaining (i) the macroscopic features of the diffusive jumps, Φ:=(ϕ1R,ϕ2L,ϕ2R,…,ϕKL)′; (ii) the distributions of the fluctuations, Ξ:=(ξ1L,ξ2L,ξ2R,…,ξKL)′ and (iii) the probability, PR(t), that no reaction will occur until time t. These three components can be solved as follows:

  1. Φ satisfies the following equations:
    dΦdt=AΩ+(D1h2)CandΩ=0at t=t0,} 2.6
    where C=(x011,x021,…,x0k1,…,x0K1)′/Λ. Based on the study of Othmer & Scriven [30], the eigenvalues and eigenvectors of A can be obtained analytically and used to solve the system directly.
  2. Ξ is a Gaussian random vector with a mean of zero and a covariance of
    ρ=0tY(t)Y1(τ)B(τ)(Y1(τ))Y(t)dτ, 2.7
    where Y(t)=exp(At) and B(t)=diag(∂Φ/∂t) is a diagonal matrix with the diagonal elements equal to ∂Φ/∂t.
  3. PR(t) takes the form
    PR(t)=exp(t0tl=1Kj=1Malj(x0+Λk=1K1ϕkR(τ)vkR+Λk=2KϕkL(τ)νkL)dτ),
    where alj is the propensity function of reaction Rlj for l=1,2,…,K and j=1,2,…,M.

2.3. Adaptivity of the time step and the spatial partitioning of the compartments

To determine the next time step after time t0, we generate a random number r that is uniformly distributed in [0,1] and find t such that PR(t)=r. To update the numbers of diffusive jumps at time t, we calculate Φ and generate Ξ, a random vector that has a multivariate normal distribution with a mean of zero and a covariance of ρ. However, because t is chosen as a random number, the interval between t and t0 might be short; this would allow only a small number of diffusive jumps to occur among compartments with a low copy number of molecules, leading to poor accuracy of the Gaussian approximation. In such compartments where the Gaussian approximation fails due to a low copy number of molecules, we simulate the diffusive jumps using the SSA method. To determine which compartments fit this criterion, we compare the Poisson distribution with mean μ to the Gaussian distribution with mean μ and variance μ. It is known that as μ increases, the difference between the two distributions decreases. For example, when μ is larger than 10, we have

maxn0|12πμexp[(nμ)22μ]exp(μ)μnn!|0.01. 2.8

Therefore, we apply the SSA method for diffusion in those compartments where the mean number of diffusive jumps is small (e.g. fewer than 10). For the case in which the amount of species S1 decreases monotonically towards the Kth compartment in the deterministic model, we use the SSA method in all compartments with an index larger than or equal to kg(t), which is the smallest integer such that

Λϕkg(t)L(t)TAorΛϕkg(t)R(t)TA, 2.9

where Λϕ approximates the mean value of diffusive jump and TA is the cut-off threshold for determining the region for the Gaussian approximation. We set TA=10 to ensure that the absolute difference between the Poisson and Gaussian distributions is less than 0.01, as seen in (2.8). When TA increases, the SSA is applied in more compartments and it may increase the CPU time cost in our hybrid method. For two or more types of diffusive molecules, we can still apply (2.9) as long as the diffusion process of each type of molecules is independent of each other. As a result, different types of diffusive molecules have different kg values.

2.4. Algorithm overview

Given x(t0)=x0, we perform the following steps:

  1. Generate two independent random numbers r1 and r2 that are uniformly distributed in [0,1].

  2. Find t such that PR(t)=r1

    and let
    α¯lj=t0talj(x0+Λk=1K1ϕkR(τ)vkR+Λk=2KϕkL(τ)νkL)dτ.
  3. Evaluate kg using equation (2.9) to determine the compartments for which the SSA method will be used. If kg=1, simulate diffusion in all compartments using the SSA method; if kg>1, perform the following steps:
    • (a) simulate diffusion between the kgth compartment and the Kth compartment using the SSA method, and treat the kgth compartment as a reflective boundary;
    • (b) calculate Φ and ρ in equation (2.6) and equation (2.7) at time t; remove rows 2kg−2,2kg−1,…,2K−2 and columns 2kg−2,2kg−1,…,2K−2 in the matrix ρ, and let ρs be the remaining submatrix;
    • (c) generate a (2kg−3)-variate Gaussian random vector Ξ with a mean of zero and a covariance of ρs;
    • (d) evaluate nkL and nkR in equations (2.2) and (2.3) at time t, and update xk1 using nkL and nkR for 1≤kkg−2;
    • (e) add n(kg−2)Rn(kg−1)Ln(kg−1)R+ΛϕkgL to x(kg−1)1, and add n(kg−1)RΛϕkgL to xkg1; and
    • (f) round the xk1 values to their nearest non-negative integers.
  4. Find the smallest values of m and q such that
    l=1q1j=1Mα¯lj+j=1mα¯qjr2l=1Kj=1Mα¯lj.
    Then, let the mth reaction occur in the qth compartment, and update x in accordance with reaction Rqm.
  5. Advance the time to t. Then, go back to step 1 until the simulation time reaches the stop criterion.

In this algorithm, the calculations of α¯lj in step 2 and ρ in step 3(b) are the most computationally expensive steps among all steps. α¯lj and ρ can be estimated using simple numerical integration quadratures such as the trapezoidal rule, which we use in the test cases presented below. In step 3(b), Φ can be solved directly and efficiently using the eigenvalues and eigenvectors of A. Negative values and non-integers may appear in the Gaussian approximation so we round the values to their nearest non-negative integers in step 3(f). This step may lead to loss of mass. However, the error introduced by this rounding can be reduced by increasing the number of molecules.

3. Simulation results

In this section, we will compare the performance of the hybrid method and the SSA using different morphogen models. First a one-dimensional simple morphogen system with different values of diffusion coefficients is considered. Next, we extend our study to a morphogen–receptor system, a morphogen system containing two types of diffusive molecules, a two-dimensional morphogen system and a Turing system to show that the results are consistent with the one-dimensional simple morphogen system we consider in the first part. All the numerical tests are implemented in Matlab.

3.1. Example I: morphogen system with linear degradation

First, we consider a one-dimensional morphogen system in which morphogens diffuse out from a local production region and undergo degradation throughout the entire domain (figure 1a). This model was used to study the stochastic effect on patterning of the Drosophila wing disc [31,32]. The deterministic dynamics of morphogen concentration [M] can be described by the following PDE system with no-flux boundary conditions:

[M]t=DM2[M]x2dM[M]+V(x),

where DM is the diffusion coefficient, dM is the degradation rate coefficient and V (x) is the production rate of morphogen. We define the production rate as

V(x)=vMif 0xxpro;V(x)=0if xpro<xxmax.

The one-dimensional domain [0,xmax] is divided into 100 compartments with 2 μm width which is based on the cell size of the Drosophila wing disc, so that the domain size we consider is xmax=200μm. The initial condition for simulations is [M](0,x)=V (x)/dM. The parameters are listed in table 1.

Figure 1.

Figure 1.

Morphogen models used for numerical tests in examples I–IV. (a) Examples I and IV: morphogen system with linear degradation. (b) Example II: morphogen–receptor system. (c) Example III: morphogen system with two types of diffusive molecules.

Table 1.

List of parameter values used in examples I–IV. The values are based on [32].

parameters definitions values
DM diffusion coefficient of free morphogens 5 μm2 s−1−40 μm2 s−1
DC diffusion coefficient of morphogen–receptor complexes 5 μm2 s−1−10 μm2 s−1
vM production rate of morphogens 10−4 μM s−1
vR production rate of receptors 10−4 μM s−1
vN production rate of non-signalling receptors 2×10−4 μM s−1
dM degradation rate coefficient of morphogens 10−2 s−1
dR degradation rate coefficient of receptors 10−4 s−1
dN degradation rate coefficient of non-signalling receptors 10−4 s−1
dW degradation rate coefficient of receptors 10−4 s−1
dC degradation rate coefficient of non-signalling receptors 10−4 s−1
α1 binding rate coefficient for morphogen–receptor complexes 5×10−2 μM s−1
β1 dissociation rate coefficient for morphogen–receptor complexes 5×10−4 μM s−1
α2 binding rate coefficient for morphogen–non-receptor complexes 5×10−2 μM s−1
β2 dissociation rate coefficient for morphogen–non-receptor complexes 5×10−4 μM s−1
ΛM number of morphogens per unit concentration in a compartment 1.8×104 μM−1
ΛR (ΛN) number of receptors (non-receptors) per unit concentration in a compartment 2×102 μM−1
xpro size of morphogen production region 14 μm

Figure 2ad displays the means and standard deviations of the number of morphogens in each compartment at simulation time 100 s, based on both the SSA and the hybrid method with different diffusion coefficients DM=10 μm2 s−1 and DM=40 μm2 s−1. In the results, 500 simulations were used to calculate the statistical quantities for each case.

Figure 2.

Figure 2.

Simulation results for example I with different values of DM. In the results, 500 simulations were used to calculate the statistical quantities for each case. The parameters are listed in table 1. (a,b) Model with diffusion coefficient 10 μm2 s−1: (a) means of the number of morphogens and (b) standard deviations of the number of morphogens. (cd) Model with diffusion coefficient 40 μm2 s−1: (c) means of the number of morphogens and (d) standard deviations of the number of morphogens. (e) Relative differences of means and standard deviations for the simulations with diffusion coefficient 40 μm2 s−1. (f) CPU time costs for two stochastic methods with different values of diffusion coefficients.

As observed in figure 2ad, there is good agreement between the results of the two methods throughout the simulations. For systematic comparison, we calculate the relative differences between the simulations by the SSA and the hybrid method, (MSSAMHybrid)/MSSA. Figure 2e shows that the relative differences of means and standard deviations are less than 0.15 when DM=40 μm2 s−1. Then we calculate the averages of CPU time costs in the 500 simulations of each case. Figure 2f shows that the CPU time cost of the SSA is linearly increasing with the value of DM, and is much higher than the cost of the hybrid method when DM=40 μm2 s−1. Although the CPU time cost of the hybrid method is also increasing with the value of DM, the increasing rate is much lower than the SSA. When the diffusion coefficient DM increases, the morphogen system becomes a diffusion-dominant system that highlights the advantage of the diffusion approximation which allows a larger time step for each time iteration in our hybrid method.

Other than changing the value of the diffusion coefficient DM, we test how the value of TA in (2.9) affects the CPU time cost and the performance of the hybrid method. For the simulations in figure 3, we apply the setting used in figure 2, but with different values of TA. The simulations in figure 3ad show that the accuracy of the hybrid method improves when TA increases. Figure 3e displays that the relative differences of means and standard deviations between the simulations by the hybrid method and the SSA decrease significantly in the region of low copy number of molecules when TA increases from 5 to 20. By contrast, figure 3f shows a trade-off in which the CPU time cost is increasing with the value of TA.

Figure 3.

Figure 3.

Simulation results for example I with different values of TA in (2.9). In the results, 500 simulations were used to calculate the statistical quantities for each case. The parameters are listed in table 1 and DM= 40 μm2 s−1. (ab) Model with TA=5: (a) means of the number of morphogens and (b) means of the number of morphogens in the region of lower copy number of morphogens. (cd) Model with TA=20: (c) means of the number of morphogens and (d) means of the number of morphogens in the region of lower copy number of morphogens. (e) Relative differences of means and standard deviations for the simulations with TA=5 and TA=20. (f) CPU time costs for the hybrid methods with different values of TA.

3.2. Example II: morphogen–receptor system

Here we consider a one-dimensional morphogen–receptor system in which receptors are produced in the entire region and bind with morphogen to induce morphogen degradation (figure 1b). This model involves the stochastic effect in a binding process between two kinds of molecules [32,33]. The deterministic dynamics of three kinds of molecule concentrations (morphogen [M], receptor [R] and morphogen–receptor complex [W]) can be described by the following PDE system with no-flux boundary conditions:

[M]t=DM2[M]x2α1[M][R]+β1[W]+V(x),[R]t=α1[M][R]+β1[W]dR[R]+vR,and[W]t=α1[M][R]β1[W]dW[W].

The morphogen production function V (x), the domain and its discretization are defined as in example I. The initial conditions for simulations are [M](0,x)=V (x)/dM, [R](0,x)=V R/dR and [W](0,x)=0. The parameters are listed in table 1.

Figure 4 displays the means and standard deviations of the numbers of morphogens, receptors and morphogen–receptor complexes in each compartment at simulation time 1000 s, based on both the SSA and the hybrid method with DM=5 μm2 s−1. In this case, 200 simulations were used to calculate the statistical quantities. The means calculated using both stochastic methods agree well with each other, and the standard deviations are consistent between the two stochastic methods. The simulation results with DM=10 μm2 s−1 and DM=20 μm2 s−1 also have good agreement between the SSA and the hybrid method. For studying time cost, we calculate the averages of CPU time costs in the 200 simulations of each case. Table 2 shows that the CPU time cost of the SSA is much higher than the cost of the hybrid method when DM=5 μm2 s−1, 10 μm2 s−1 or 20 μm2 s−1. In particular, the CPU time cost of the hybrid method is around 20% of that of the SSA when DM=20 μm2 s−1.

Figure 4.

Figure 4.

Simulation results for example II. (a) Means of the numbers of morphogens, receptors and morphogen–receptor complexes. (b) The corresponding standard deviations. In the results, 200 simulations were used to calculate the statistical quantities for each case. In this simulation, we take DM= 5 μm2 s−1 and the remaining parameters are listed in table 1.

Table 2.

CPU time cost of SSA and hybrid methods for examples II–III.

example II
example III
DM(μm2 s−1) 5 10 20 5 10 20
DC(μm2 s−1) 5 10 20
CPU time (SSA) 251.6 s 495.5 s 949.8 s 757.0 s 1481.2 s 2868.4 s
CPU time (hybrid) 126.3 s 177.7 s 187.6 s 457.8 s 703.6 s 926.7 s

3.3. Example III: morphogen system with two types of diffusive molecules

In this example, we want to study the performance of the hybrid method for the system with two types of diffusive molecules. Many studies on morphogen system were based on reaction–diffusion models with only one diffusion term in either free or non-signalling bound-morphogens [3133]. However, this type of one-diffusion model is not biologically complete because it is possible to have more than one type of diffusion transport. Morphogen models with two types of diffusive molecules have been proposed and studied in [3436]. Here we consider a morphogen model with both diffusion of free morphogens and movement of non-signalling morphogen complexes through a ‘bucket brigade’ process [35] (figure 1c). The deterministic dynamics of five kinds of molecule concentrations (morphogen [M], receptor [R], non-signalling receptor [N], morphogen–receptor complex [W] and diffusive non-signalling morphogen complex [C]) can be described by the following PDE system with no-flux boundary conditions:

[M]t=DM2[M]x2α1[M][R]+β1[W]α2[M][N]+β2[C]+V(x),[R]t=α1[M][R]+β1[W]dR[R]+vR,[W]t=α1[M][R]β1[W]dW[W],[N]t=α2[M][N]+β2[C]dN[N]+vN,and[C]t=DC2[C]x2+α2[M][N]β2[C]dC[C].

Similar to the previous examples, the morphogen production function V (x), the domain and its discretization are defined as in example I. The initial conditions for simulations are [M](0,x)=V (x)/dM, [R](0,x)=V R/dR, [W](0,x)=0, [N](0,x)=V N/dN and [C](0,x)=0. The parameters are listed in table 1.

Figure 5 reveals that the statistical quantities obtained using the hybrid method agree well with those obtained using the SSA with diffusion coefficients DM=DC=5 μm2 s−1 at simulation time 2000 s. Table 2 displays the CPU cost of the hybrid method is only 60%, 48% and 32% of that of the SSA when the diffusion coefficients are DM=DC=5μm2s1, DM=DC=10μm2s1 and DM=DC=20μm2s1, respectively. Our hybrid method works very well for such systems with more than one type of diffusive molecules.

Figure 5.

Figure 5.

Simulation results for example III. (a) Means of the numbers of morphogens, receptors, morphogen–receptor complexes, non-signalling receptors and diffusive non-signalling morphogen complexes. (b) The corresponding standard deviations. In the results, 200 simulations were used to calculate the statistical quantities. In this simulation, we take DM=DC=5μm2s1 and the remaining parameters are listed in table 1.

3.4. Example IV: two-dimensional morphogen system

Here, we study the performance of hybrid method for a two-dimensional morphogen system which is based on example I (figure 1a). The two-dimensional domain [0,xmax]×[ymax,ymax] is divided into 250 compartments with uniform dimension 2×2 μm, which is based on the cell size of Drosophila wing disc. The domain size we consider is xmax=100μm and ymax=5μm. We define the morphogen production function as

V(x,y)=vMif 0xxpro;V(x)=0if xpro<xxmax. 3.1

The initial condition for simulations is [M](0,x,y)=V (x,y)/dM. The parameters for this example are equal to the set we used in example I. Five hundred simulations were used to calculate the statistical quantities. In this case, the number of morphogens decreases monotonically along the x-axis in the deterministic model, so the condition (2.9) is applied on x-direction.

Figure 6a,b displays the means and standard deviations of the number of molecules in each 2 μm×2 μm compartment at simulation time 10 s, based on both the SSA and the hybrid method with different diffusion coefficients DM=10 μm2 s−1 and DM=40 μm2 s−1. The figures support that the two stochastic methods have good agreement in two-dimensional simulations. This result is consistent with the one-dimensional simulations shown in figure 2. The CPU time cost of the SSA is linearly increasing with the value of DM, and the cost of the hybrid method is around 50% of the SSA when DM=40 μm2 s−1 (figure 6c).

Figure 6.

Figure 6.

Simulation results for example IV. (a) Means of the numbers of morphogens for the system with DM=5 μm2 s−1 and DM= 40 μm2 s−1. (b) The corresponding standard deviations. (c) CPU time costs for different methods and different values of diffusion coefficients. In the results, 200 simulations were used to calculate the statistical quantities for each case. Other than the diffusion coefficient, the remaining parameters are listed in table 1.

3.5. Example V: non-monotone pattern

In general, the adaptive method can be applied for some types of non-monotone pattern. Similar to example I, when the morphogen production region is considered at the centre of the domain as

V(x)=vMif 94x106;V(x)=0 otherwise,

in the one-dimensional domain [0,200], the same setting used in example I can generate a single-peak solution as in figure 7a. We reformulate the condition (2.9) by considering the largest region [kg1,kg2] near the peak such that for all j∈[kg1,kg2], we have

ΛϕjL(t)>TAorΛϕjR(t)>TA. 3.2

This condition ensures the accuracy of the Gaussian approximation in the region at the centre. Figure 7a,b displays the means and standard deviations of the number of molecules in each compartment at simulation time 20 s with D=40 μm2 s−1. In the results, 500 simulations were used to calculate the statistical quantities for each case. Figure 7c,d shows that the relative differences of means and standard deviations between the simulations by the hybrid method and the SSA are less than 0.15. For efficiency, the CPU time cost of the hybrid method is around 57% of that of the SSA. The adaptive method can be extended to patterns consisting of multiple peaks if the peaks can be determined by the deterministic system.

Figure 7.

Figure 7.

Simulation results for example V in which the morphogen production region is located at the centre of the domain. In the results, 500 simulations were used to calculate the statistical quantities for each case. The parameters are listed in table 1 and DM=40 μm2 s−1. (a) Means of the number of morphogens. (b) Standard deviations of the number of morphogens. (c) Relative differences of means for the simulations by the SSA and the hybrid method. (d) Relative differences of standard deviations for the simulations by the SSA and the hybrid method.

3.6. Example VI: Turing system

In the last example, we consider an activator-substrate Turing system consisting of a short-range diffusion for the activator and a long-range diffusion for the substrate. The normalized one-dimensional activator-substrate Turing system [37] can be described by the following two-equation system with the no-flux boundary conditions:

[A]t=DA2[A]x2+α[S][A]2β[A]+ρA,[S]t=DS2[S]x2α[S][A]2+ρS,

in 0≤x≤10. The constants DA and DS measure the diffusion coefficients of activators and substrates, respectively. In order to generate a spatial inhomogeneous steady-state solution, the diffusion coefficient DA needs to be much less than DS. Here we use DS=50 and DA=0.1. For other parameters, we take α=β=ρS=1 and ρA=0.01. The one-dimensional domain [0,10] is divided into 50 compartments. The number of molecules per unit concentration in a compartment is ΛA=ΛS=500. The initial condition for simulations is the homogeneous steady-state solution [A](0,x)=1.01 and [S](0,x)=(1.01)−2.

The Gaussian approximation is used only for the fast diffusion in substrates. Since the chemical gradients may not be monotonic in space, the time-adaptive criterion (2.9) is not used in this example, and instead, the Gaussian approximation for the diffusion process of substrates is applied everywhere in space. Since the number of substrates is large enough in each compartment, the approximation has a good accuracy in the entire space.

The study using different methods (figure 8) indicates that two stochastic methods show a similar pattern for A at t=10. The averages of CPU time costs in the 500 simulations for different methods indicate that the SSA costs 5.61×103 s for each simulation and the hybrid method costs 2.16×103 s, suggesting a 50% speed-up of the hybrid method.

Figure 8.

Figure 8.

Example simulations obtained by the SSA (dashed line)and the hybrid method (solid line) for the one-dimensional activator-substrate Turing system in example VI. In the hybrid method, the Gaussian approximation is applied for simulating the diffusion processes of substrates which have rapid diffusion processes.

4. Discussion

We have introduced a new algorithm to accelerate the stochastic simulation of reaction–diffusion systems. In this hybrid approach, the numbers of diffusive jumps in regions with a high level of molecules are calculated using Gaussian vectors, whereas the diffusive jumps in regions with a low level of molecules, along with the reaction events, are simulated using the SSA. Because of the diffusion approximation, the size of the time step, which predominantly depends on rate of reactions, can be significantly larger than that allowed by the existing approaches. Thus, the hybrid method is particularly effective for diffusion-dominant systems. Moreover, the diffusion approximations for different diffusing species are performed independently, which makes the method particularly advantageous for application to systems with multiple diffusing species.

To determine the compartments for which the diffusion approximation is applied, we use a macroscopic quantity that can be easily calculated. In addition, the approximation region can be adaptively specified in both space and time with a good control of approximation errors. Thus, the hybrid method is effective in dealing with spatial distributions of molecules that may vary significantly over time or may not be monotonic in space.

The Gaussian random vector is directly related to the matrix whose non-zero location is determined by the communication among compartments. The partitioning of a domain with an irregular geometry may be achieved using existing software (COMSOL or URDME [38]) to enable application to complex domains. To extend our method for the system incorporating rapid and slow reactions, we can accelerate the simulation of rapid reactions by coupling our method with the hybrid SSA/τ-Leaping strategy [6] to create a hybrid diffusion approximation + SSA/τ-Leaping strategy. The overall approach introduced in this work will be an efficient and accurate algorithm for simulating biological and physical systems in which number of molecular copies has a large range within the spatial domain and diffusion is dominant comparing with other types of reactions.

Acknowledgements

The authors thank Yang Cao for helpful discussions.

Appendix A

A.1. Spatial stochastic simulation algorithm

The stochastic process underlying the CME can be simulated by the SSA. In SSA, two random numbers r1 and r2, that are uniformly distributed in [0, 1], are generated for determining the time and the index of the next reaction, respectively. The time for the next reaction is t+τ, with

τ=lnr1a0(x),

where a0(x) is the sum of all propensity functions:

a0(x)=k=1Kj=1Makj(x)+k=2KakL(x)+k=1K1akR(x).

The index of the next reaction is obtained by finding the smallest m and q such that

k=1q1j=1Makj+j=1maqjr2a0 A 1
ork=1Kj=1Makj+k=2qakLr2a0 A 2
ork=1Kj=1Makj+k=2KakL+k=1qakRr2a0. A 3

If the condition (A 1) is satisfied, then the reaction Rqm happens and the state of the system is updated as X(t+τ)=X(t)+νqm; or if the condition (A 2) is satisfied, then the diffusion jump JqL happens and the state of the system is updated as X(t+τ)=X(t)+νqL; or if the condition (A 3) is satisfied, then the diffusion jump JqR happens and the state of the system is updated as X(t+τ)=X(t)+νqR.

The simulation repeats the above process until it reaches the stop criterion.

Authors' contributions

W.-C.L., L.Z. and Q.N. contributed to the method design and wrote the manuscript. W.-C.L. and L.Z. performed the numerical tests and Q.N. supervised the project.

Competing interests

The authors declare no competing interests.

Funding

This study was partially supported by the NSF grant nos DMS1161621 and DMS1562176 and by the NIH grant nos P50GM76516 and R01GM107264. W.-C.L. was partially supported by a grant from the Research Grants Council of the Hong Kong Special Administrative Region, China (Project No. 9048043) and a CityU StUp Grant (Project No. 7200437).

References


Articles from Royal Society Open Science are provided here courtesy of The Royal Society

RESOURCES