Contents lists available atScienceDirect
Journal of Computational Physics
www.elsevier.com/locate/jcp
A hybrid stochastic method with adaptive time step control for reaction–diffusion systems
Wing-Cheong Lo
∗, Shaokun Mao
DepartmentofMathematics,CityUniversityofHongKong,Kowloon,HongKongSpecialAdministrativeRegion
a rt i c l e i n f o a b s t ra c t
Articlehistory:
Received15August2018
Receivedinrevisedform29November2018 Accepted30November2018
Availableonline12December2018
Keywords:
Reaction–diffusionsystems Stochasticsimulation Hybridmethod Biologicalpatterning
Randomnessoftenplaysanimportantroleinthespatialandtemporaldynamicsofbiolog- icalsystems.General stochasticsimulationmethods mayleadtoexcessivecomputational costforasysteminwhichalargenumber ofmoleculesinvolved.Therefore,multi-scale hybridsimulationmethodsbecomeimportantforstochasticsimulations.Herewebuilda spatiallyhybridmethodwhichcouplestwoapproaches:discretestochasticsimulationand continuousstochasticdifferentialequations.Inourmethod,thelocationsoftheinterfaces betweenthetwo approachesare changingaccording tothe distributionofmoleculesin aone-dimensional domain.To balancethe accuracyand efficiency, thetime stepofthe numericalmethodfor the continuousstochastic differentialequations is adaptedto the dynamicsofthemoleculesneartheadaptiveinterfaces.Thesimulationresultsforalinear systemandtwononlinearbiologicalsystemsindifferentone-dimensionaldomainsdemon- stratetheeffectivenessandadvantageofournewhybridmethodwiththeadaptivetime stepcontrol.
©2018ElsevierInc.Allrightsreserved.
Introduction
Many modelsofbiological patternformationare describedby thereaction anddiffusionprocesses.The stochasticbe- haviors inthe processes often havesubstantial effect when the numbers ofthe molecules involved inthe reactions are relatively small[2,9,24,32]. Themechanismsforachievingrobustbiologicalpatternsagainstthenegativeeffectsofanoisy environmentwerediscussedindepthinsomecurrentstudies[3,20,24].Besidesthenegativeeffects,spatialstochasticper- turbations mightprovide positive effectsforachievinga robust cell polarization [21] and forminga sharper boundaryof geneexpressiondomains[33].Therefore,thedevelopmentofanumericalmethodforstudyingstochasticeffectsinbiological systemsbecomesmuchmoreimportantinourfuturestudy.
Forspatiallyinhomogeneoussystems,thereaction–diffusionstochasticsimulationalgorithm(SSA)isthepopularmethod tosimulatestochasticjumpsandreactionstoobtainthestateofthesystemaftereachoccurrenceofstochasticevents[12].
AlthoughtheSSA isconvenientintermsofitsimplementation,itscomputational costbecomeslarge whenthestochastic eventsinsomeregionsoccursignificantlymorefrequentlythantheeventsinotherregions,asinthecaseofsomeregions whichhaverelativelylargecopynumbersofmolecules.
Forimprovingtheefficiency,severalhybridmethodswereproposedforstimulatingthestochasticdynamicsofspatially inhomogeneous systems[8,10,11,16,23,26–28].Themostusual approachisaspatiallyhybridmethodwhichcombinesthe
*
Correspondingauthorat:DepartmentsofMathematics,CityUniversityofHongKong,HKSAR.E-mailaddress:wingclo@cityu.edu.hk(W.-C. Lo).
https://doi.org/10.1016/j.jcp.2018.11.042
0021-9991/©2018ElsevierInc.Allrightsreserved.
SSAandpartialdifferentialequationswhichprovideamean-fieldapproximationforthestochasticbehaviors[13,30].How- ever,arelatively smallstochasticeffectinthehighconcentrationregion mayresultinrelativelylarge perturbationinthe lowconcentrationregionbecauseofthediffusionprocessinspace.Sosomecurrentstudiesmovedtheirfocustodeveloping afullstochastichybridmethod[28].Thecontinuousapproachusingstochasticpartialdifferentialequationscanbeapplied toapproximatethestochasticsystematarelativelyhighconcentrationandprovidesanadditionalabilitytoincorporatethe stochasticityintheentirespatialdomain.Nevertheless,thecouplingofthediscreteandcontinuousapproachesandtheset- tingofthetimestepusedinthecontinuousapproachcanbeimprovedtobeadaptivetodifferentsystemsformaintaining highaccuracyandefficiency.Here,wewillfocusonthesetwoissuestodevelopamethodwhichiseasilyimplementedand adaptivetothesettingsofdifferentone-dimensionalreaction–diffusionsystems.
Inthispaper,webuildanadaptivespatiallyhybridmethodcouplingcontinuousstochasticdifferentialequationsandthe SSA. In ourhybrid method,the locationsofthe interfacesbetweenthe two numericalmethods are adapted to thecopy numbers ofmolecules in each compartment. Tobalance the accuracy andthe efficiency,the time step of the numerical methodforthecontinuousstochasticdifferentialequationsischangingaccordingtothedynamicsofthemoleculesnearthe adaptiveinterfaces.Then we applyour methodtoa linearsystemandtwononlinear biologicalsystemsin differentone- dimensionaldomainstoverifytheeffectivenessofournewapproach.Thesimulationresultsdemonstratethat,comparing withtheSSA,ourhybridmethodhasasignificantimprovementinefficiencyandtheadaptivetimestepcontrolprovidesa betterbalancebetweentheaccuracyandefficiencythanusingfixedtimestep.
Methods
Spatiallyinhomogeneousreaction–diffusionsystem
Consider a system with N molecular species {S1,S2,· · ·,SN} which are involved in the following M reactions {R1,R2,· · ·,RM}:
Rj
:
srj1S1+ · · · +
srjNSN γj−→
spj1S1+ · · · +
spjNSN.
Here, srji andspji are thestoichiometric coefficients ofthereactant andproductspecies, respectively, and
γ
j is thecorre- spondingmacroscopicrateconstant.When we are interested in the spatial distribution ofthe molecules on a one-dimensional domain, the domain with lengthLcanbepartitionedinto K compartmentswithuniformlengthh,whereh=L/K.
Assumption1.Thediffusionprocessisfastenoughtoassumethatthesubsystemineachcompartmentisspatiallyhomoge- neous.Inotherwords,thesizeofeachcompartmentmustbesufficientlysmallthatdiffusivejumpsoccurmorerapidlythan reactionsandtheinhomogeneityinsideeachcompartmentcanbeignored[14,15,17].Moleculesindifferentcompartments aretreatedasdifferentspecies,denotedby
{
S11,
S12,· · · ,
Ski,· · · ,
SK N},
where Ski representstheithspeciesinthekthcompartment.The systemstate attimet isdenotedby K×N-component vector
X
(
t) = (
X11(
t),
X12(
t), · · · ,
Xki(
t), · · · ,
XK N(
t)),
where Xki isthenumberofmoleculesofSki.
Assumption2.Weassumethat onlymoleculesinthesamecompartment canreactwitheachother.The M reactionscan beconsideredasK×Mreactionsinthespatialsystemanddenotedby Rkj,the jthreactioninthekthcompartment:
Rkj
:
srj1Sk1+ · · · +
srjNSkN γkj−−→
spj1Sk1+ · · · +
spjNSkN,
where
γ
kj is the reaction rateconstant of the reaction Rkj.The state of the systemtransfers fromone state to another throughreactionfiring.ThenetchangeofthestateofthesystemcausedbyoneoccurrenceofRkj isdenotedasν
kj:ν
kj= (
0, · · · ,
0,
spj1−
srj1, · · · ,
spjN−
srjNfrom ((k−1)N+1)th tokNth
,
0, · · · ,
0).
Assumption3. Diffusion process is treated as a reaction in which a molecule in one compartment jumps to one of its neighboringcompartments.AssumethatspeciesSi diffuseswithadiffusioncoefficient Di andtheboundaryconditionsof theone-dimensionaldomainareconsidered asreflectiveboundaryconditionsatbothends.Therefore,thediffusive jumps obeythefollowingchainreactions:
JikL
:
S1i Di/h2←−−−
Di/h2S2i Di/h
←−−−
2 Di/h2S3i
· · · ←−−−
Di/h2Di/h2
SK i
,
JikR:
S1iDi/h2
−−−→
Di/h2 S2i Di/h2−−−→
Di/h2 S3i· · · −−−→
Di/h2Di/h2 SK i
.
We denotetheleft jumpofSi fromthekthcompartmentby JikL andtherightjumpof Si fromthekthcompartmentby JikR.
The probabilitythatthereaction Rkj willhappeninthenext timeinterval[t,t+dt)is
α
kj(X(t))dt,whereα
kj iscalled thepropensityfunctionofRkj andisdefinedasα
kj(
X(
t)) = γ
kjXsr j1 k1Xs
r j2 k2
· · ·
Xsr jN kN
;
theprobabilitiesforthejump JikL and JikRare
α
ikL(X(t))dtandα
ikR(X(t))dt,respectively,whereα
ikL(
X(
t)) =
Dih2Xki
,
for 1<
kK, α
ikR(
X(
t)) =
Dih2Xki
,
for 1k<
K.
This system can be simulatedthrough the stochastic simulation algorithm (SSA) [12]. At time t, X(t) is given. We first generatetwoindependentrandomnumbersr1 andr2,whichareuniformlydistributedin[0,1]andthencalculatethenext reactionorjumptime
τ
bythefollowingformulaτ = −
1α
0ln
(
r1),
where
α
0 isthesumofallpropensityfunctionsofthejumps J andthereactions R.At timet+τ
,areaction Rqmoccurs whenthesmallestqandmexistforaninequalityq−1
k=1
M j=1α
kj+
mj=1
α
qjr2
α
0;
(1)ifq andmdonotexist,aleftjump Jw1q1L mayoccurwhenthesmallestq1andw1 existforaninequality
K k=1 M j=1α
kj+
q
1−1 k=1 N i=1α
ikL+
w1
i=1
α
iq1Lr2α
0;
(2)ifq,m,q1 andw1 donotexist,arightjump Jw2q2R mayoccurwhenthesmallestq2 andw2existforaninequality
K k=1 M j=1α
kj+
K k=1 N i=1α
ikL+
q
2−1 k=1 N i=1α
ikR+
w2
i=1
α
iq2Rr2α
0.
(3)Thenthestate X(t+
τ
)isupdatedaccordingtothecorrespondingstatechange.Thisprocessisrepeateduntilitreachesthe stopcriterion.Approximationbystochasticdifferentialequations
Letube X/hwhichrepresentsthedistributionsofthemolecularconcentrations,whereuki=Xki/hineachcomponent.
Assumethatthenumbersofthemoleculesineachcompartmentarelarge,wecanapproximatethestochasticsystembya systemofstochasticdifferentialequations(SDE)foru[18,22]:
duki
=
Di h2 u(k−1)i−
2uki+
u(k+1)i dt+
Mj=1 rki j
(
u)
dt+
n(k−1)i(
u)
dW(k−1)J R+
n(k+1)i(
u)
dW(k+1)J L−
nki(
u)
dWk J R−
nki(
u)
dWk J L+
Mj=1
nki j
(
u)
dWkj,
for 2
≤
k≤
K−
1,
(4)whererki j(u)isthe[(k−1)N+i]thcomponentof
ν
kjα
kj(uh)/h;nki j(u)isthe[(k−1)N+i]thcomponentofν
kjα
kj(uh)/h;nki(u) equals to Di
h2uki/h; the variables W’s are the Wiener processes which are independent to each other. For the reflectiveboundaryconditions,whenk=1,thefirsttermoftherighthandsideinEq. (4) isreplacedby Dh2i(−u1i+u2i)dt andthetwotermsn(k−1)i(u)dW(k−1)J R andnki(u)dWk J L areremoved;whenk=K,thefirsttermoftherighthandsidein Eq. (4) isreplacedby hD2i
u(K−1)i−uK i
dtandthetwotermsn(k+1)i(u)dW(k+1)J Landnki(u)dWk J R areremoved.
Fornumericalsimulation,we simplyusethe Euler–Maruyamamethodtocalculatethe solutionforthesystemofSDE [18]:
uki
(
t+
t) −
uki(
t) ≈
Di h2 u(k−1)i(
t) −
2uki(
t) +
u(k+1)i(
t)
t+
M j=1rki j
(
u(
t))
t+
n(k−1)i(
u(
t)) √
t
ζ
(k−1)J R+
n(k+1)i(
u(
t)) √
t
ζ
(k+1)J L−
nki(
u(
t)) √
tζ
k J R−
nki(
u(
t)) √
t
ζ
k J L+
Mj=1
nki j
(
u(
t)) √
tζ
kj,
for 2
≤
k≤
K−
1,
(5)whereζ’sareindependentstandardnormalrandomvariables.Whenk=1,thefirsttermoftherighthandsideinEq. (5) is replacedby Dh2i(−u1i+u2i) t,andn(k−1)i(u(t))√
tζ(k−1)J R andnki(u(t))√
tζk J Lareremoved;whenk=K,thefirstterm oftherighthandsideinEq. (5) isreplacedby Dh2i
u(K−1)i−uK i
t,andn(k+1)i(u(t))√
tζ(k+1)J Landnki(u(t))√
tζk J Rare removed.
Herewe applytheEuler–Maruyamamethodasitiseasy tobenumericallyimplemented.Actually,wecanapply other higherorder numericalmethods to improvethe accuracy [4,18,31]. Although thenumerical SDEapproach isan efficient methodtoapproximatethe stochasticprocesseswithhighmolecularconcentrations,theaccuracymaynot behighwhen thenumberofmoleculesbecomeslow.Inthelatersections,wewilldevelopthehybridmethodwhichcouplestheSSAand numericalSDEtobalancetheaccuracyandefficiencyinthesimulation.
AdaptiveinterfacesbetweenSSAandnumericalSDE
Todecidea methodto capturetheadvantages oftheSSA andnumericalSDE,we firstconsider awayto separatethe domain intotwo regions that satisfies:1) the methodis efficientinthe region withlarge numbersofmolecules; 2) the methodisaccurateintheregionwithsmallnumbersofmolecules.WeconsidertoapplythenumericalSDEtoapproximate thedynamicsinthekthcompartmentif
1≤i≤minN;1≤j≤M
⎧ ⎨
⎩
Xkispji
−
srji⎫ ⎬
⎭ >
Nint;
(6) inothercompartments,wewillapplytheSSAforthesimulations.IfNintislarge,theconditioncanreducetheprobabilitythattheapproximationprovidesanegativenumberofmolecules inthekthcompartment aftereachiteration.Aset IC isdefinedasasetofall theindexesk satisfyingtheinequality(6);
aset ID isdefinedas{1,2,...,K}\ID; IB R andIB L arethesetsoftheleftboundarypointsandtherightboundarypoints, respectively,inallintervalsinIC.AsampleofthesefoursetsisillustratedinFig.1.Herewesimulatethefluxbetweenthe tworegionsbytheSSA.Therefore,thefiringtimeofthejumpbetweenIC andID arestochastic.
IntheIC region,weusethenumericalSDEtoapproximatethestochasticdynamics.Ifeachintervalin IC islargerthan onecompartment,weusetheEuler–Maruyamamethod,like(5),tobuildthefollowingiterationfork∈IC:
uki
(
t+
t) −
uki(
t) ≈
Di h2 u(k−1)i(
t) −
2uki(
t) +
u(k+1)i(
t)
t+
M j=1rki j
(
u(
t))
t+
n(k−1)i(
u(
t)) √
t
ζ
(k−1)J R+
n(k+1)i(
u(
t)) √
t
ζ
(k+1)J L−
nki(
u(
t)) √
t
ζ
k J RFig. 1.IllustrationofthedomaindecompositionbetweentheSSAandthestochasticdifferentialequations.ID(yellow)representstheregionfortheSSA;
IC(blue,pink,green)representstheregionfortheSDE;IB R(green)andIB L(blue)aretheleftboundarypointsandtherightboundarypoints,respectively, inallintervalsinIC.(Forinterpretationofthecolorsinthefigures,thereaderisreferredtothewebversionofthisarticle.)
−
nki(
u(
t)) √
t
ζ
k J L+
Mj=1
nki j
(
u(
t)) √
tζ
kj,
fork
∈
IC\ (
IB R∪
IB L);
(7)fork∈IB L,thefirsttermoftherighthandsideinEq. (7) isreplacedby Dh2i
−uki+u(k+1)i
t,andn(k−1)i(u(t))√
tζ(k−1)J R and nki(u(t))√
tζk J L are removed; for k ∈ IB R, the first term of the right hand side in Eq. (7) is replaced by Di
h2
u(k−1)i−uki
t, and n(k+1)i(u(t))√
tζ(k+1)J L and nki(u(t))√
tζk J R are removed. If an interval in IC has only one compartment,weapplyEq. (7) withoutthediffusionterm.
Timestepselectionfornumericaldifferentialequations
The selectionofthetime stept=tC forthenumericalSDE(7) wasnotdiscussedinthepreviousstudiesofhybrid methods. Based on thestudyforthe efficient
τ
-selection fortheτ
-Leapingmethod [5], we considerthat the meanand varianceoftherelativechangeofthemolecularpopulationsineachiterationisboundedbycertainthreshold :| <
tCXki> | ≤
max{
Xki,
1} ,
var{
tCXki} ≤
max{
Xki,
1} ,
(8) forallk∈IC.Tosatisfythepreviousconditionsandtheconditionforthestabilityofcentraldifferencescheme[18]tC
≤
t0=
min1≤i≤N
h2 2Di,
weobtainthefollowingsettingfortC selection:
tC
=
min1≤i≤N,k∈IC
max{
huki,
1}
μ
ki(
u) , (
max{
huki,
1} )
2σ
ki(
u) ,
t0(9)
where
μ
ki(
u) =
Di h2 u(k−1)i(
t) −
2uki(
t) +
u(k+1)i(
t)
h+
M j=1rki j
(
u(
t))
h,
and
σ
ki(
u) =
Di h2 u(k−1)i(
t) +
2uki(
t) +
u(k+1)i(
t)
h+
M j=1 nki j(
u(
t))
h2,
fork∈IC\(IB R∪IB L).Fork∈IB L,thefirsttermsoftherighthandsidesof
μ
ki(u)andσ
ki(u)arereplacedby Dih2
−
uki+
u(k+1)i hand Di h2 uki+
u(k+1)i h,
respectively;
fork∈IB R,thefirsttermsoftherighthandsidesof
μ
ki(u)andσ
ki(u)arereplacedby Dih2
u(k−1)i−
uki hand Di h2 u(k−1)i+
uki h,
respectively.
If ismuchlessthan1,ourtimestepsettingcanguaranteethattherelativechangesofthenumbersofthemoleculesare smallenoughtoensurethenumericalstabilityfortheapproximation.Inthenumericaltests,wewilltake =0.1 whichis smallenoughtoensurethenumericalstabilityoftheEuler–Maruyamamethod.
ItisworthtoremarkthatalthoughthetimestepsizetC iscontrolledtoreducetherelativeerror,anegativevaluemay still appearintheiteration(7) withsmallprobability.Whenanegative value appears,thetime steptC canbe reduced throughdividingbytwo;ifthenegativevaluestillexistsaftertC decreases,theprocesscanberepeateduntilthenegative valuedoesnotexistintheiteration(7).
Whenajumpofamolecule(theprocessismodeledbytheSSA)happensacrossaninterface,themolecularpopulation willchangeinthe IC region.Tomaintaintheaccuracyoftheapproximation,weconsiderthatifajumpacrossaninterface happens,wewillresetthevalueoftC tolettheiterationrunsimultaneouslywiththejump.Thedetailswillbeexplained inthealgorithmoverview.
Algorithmoverview
Forasysteminaone-dimensionaldomainwithlengthL,givenaninitialtimet=t0,aninitialcondition X(t0)=X0 and afinaltimeT,weperformthefollowingsteps:
1. Setavalue hforthespatialsizeofeach compartmentsuchthat thenumberofcompartmentsisan integer K=L/h.
Assignanindexfrom{1,2,...,K}foreachcompartment.Setanerrorparameter andaninterfacethresholdNintwhich willbeusedinEqs. (6) and(9),respectively.
2. ByEq. (6) withNint,divides{1,2,...,K}intofoursetsofindexes ID,IC,IB LandIB R.
3. If IC isnotempty,useEq. (9) tocalculatetC andsetTC=t+tC;otherwise,settC=TC= ∞andruntheSSAfor theentirespatialdomainuntilIC isnotempty.
4. If ID is not empty, generate two independent random numbers r1 andr2 whichare uniformly distributed in[0,1]. Calculate the next reaction time tD= −α10ln(r1) forthe SSA, where
α
0 isthe sum ofthe propensity functions of the right jumps JikR (for k∈ID∪IB R), the left jumps JikL (for k∈ID∪IB L) and the reactions Rki (for k∈ID) for i∈ {1,2,...,M}.SetTD=t+tD.UsetheSSAmethodwiththesecond randomnumberr2 tofindthecorresponding reactionorjump.IfID isempty,settD=TD= ∞.5. (a) Case1:IfTC<TD,runtheiteration(7) witht=tC forallthecompartmentsin IC.Sett=TC.
(b) Case2:IfTC=TD,runtheiteration(7) witht=tC forallthecompartmentsinIC.Sett=TC.RuntheSSAfor updating X inaccordancewiththereactionorjumpfoundinStep 4.
(c) Case3:IfTC>TD andajumpacrossthe interfacesisselectedforthefiringreactionintheSSAmethod,runthe iteration (7) with t=tC −(TC −TD) forall ith compartment, where i∈IC. Runthe SSA forupdating X in accordancewiththereactionorjumpfoundinStep 4.Sett=TD.
(d) Case4:Cases1–3arenotsatisfied,update X inaccordancewiththereactionorjumpfoundinStep 4.Sett=TD. 6. For Cases 1, 2 and3,reset the foursets IB L, IB R, ID and IC according toEq. (6). If IC is not empty, useEq. (9) to
calculatenewtC andsetTC=t+tC;otherwise,settC=TC= ∞.ForCase4,ifIC isempty,thesimilarupdateof thesetsisneeded;ifIC isnotempty,theupdateofthesetsisnotneeded.
7. GobacktoStep 4 untilt≥T. Numericalresults
Linearsystem
Hereweapplyasimplelinearsystemtocomparetheperformanceofthehybridmethodwithdifferenttimestepsettings.
Inthelinearsystem,thereisonlyonetypeofmolecules, S1,inaone-dimensionaldomainoflengthL=50.Wedividethe domaininto100compartmentswithuniformsizeh=50/100=0.5.Therearetwotypesofreactionslistedas
Rk1
:
S1 γ1−→ φ
fork∈ {
1,
2, ...,
100}
andRg2: φ −→
γ2 S1forg∈ {
1,
2, ...,
20} .
Themolecule S1 diffuseswithacoefficientD withreflectiveboundaryconditions.Weset
γ
1=1,γ
2=500 andthediffusion coefficient D=10.Theinitialconditionfor Xk1 whichrepresentsthenumberofS1inthekthcompartmentis:Xk1
(
0) =
55−
0.
5k,
fork=
1, ...
100.
Forthislinearsystem, wecanexplicitlyobtaintheexactsolutionsofthemeanandthestandard deviation,whichwillbe usedtocalculatetheerrortoverifytheaccuracy.Also,thistype ofsimplemodelwasoftenappliedtostudythestochastic effectinbiologicalpatterning[20,24].
Ifwe usetheSSAtosimulatethesystemfromt=0 tot=6,theaveragecomputationalcostpersimulationisover60 secondsamong5,000 simulations.Whenweapply ourhybridmethodwith =0.1 andNint=10,thecomputationalcost isreducedto8secondwhichis13% ofthecostoftheSSA.
Fig. 2.Thesimulationresultsatt=6 forthelinearsystembythehybridmethodwithdifferenttC settings:fixedtC=0.1h2/D,0.01h2/Dandan adaptivetC definedin(9).A)Themeanvaluesofthegradients.B)Thestandarddeviationsofthegradients.Foreachcase,5,000simulationsarecollected toobtainthestatisticalresults.Thedashedlinesrepresenttheexactsolutionsofthemeanandthestandarddeviation.
Fig. 3.TheaccuracyandtheefficiencyofthehybridmethodwithdifferenttCsettings.A)Thesumsoftheerrorofthemean.B)Thesumsoftherelative errorofthemean.C)Thesumsoftheerrorofthestandarddeviation.D)Thesumsoftherelativeerrorofthestandarddeviation.E)Thecomputational costsatdifferenttimet.
To show the advantage ofthe adaptive tC, we compare the performance ofthe hybrid method with differenttC settings.Fig.2showsthatthemeanvaluesandthestandarddeviationsofthecaseswithafixedtC=0.1h2/D,0.01h2/D andanadaptivetC definedin(9).Foreachcase,5,000simulationsarecollectedtoobtainthestatisticalresults.
Fig.2Ashowsthatallthreecaseshaveasimilaraccuracywhenthesolutionsarecomparedwiththeexactmeansolution;
thestandarddeviationsshowninFig.2BdemonstratethatthecasewithafixedtC=0.1h2/D doesnotperformasgood as theother two cases.Toquantify the results,we measure the sumofthe error (the absolutedifferencesbetween the approximationandtheexactsolutionineachcompartment)inallcompartmentsandtheresultsareshowninFig.3.
Fig.3AshowsthatthesumsoftheerrordonothaveahugechangewithdifferenttC settings.Thisresultisconsistent whenweconsiderthesumsoftherelativeerror(theabsolutedifferencesbetweentheapproximationandtheexactsolution dividedbytheexactsolutionineachcompartment)showninFig.3B.Whenwemeasuretheerrorinthestandarddeviation (Figs.3C,D),thecasewithafixedtC =0.1h2/D hasalarger error,alsoarelativeerror,thantheother twocaseswhich havesimilarperformance inapproximatingthestandarddeviation. However,theefficiencyofthecasewithafixedtC = 0.1h2/D is the best among all three cases (Fig. 3E). The average computational cost for this case is around 6 seconds.
Betweentheothertwocases,theadaptivetime stepsettinghaslesscomputationalcostthanthecasewithafixedtC = 0.01h2/D (the former is 7 secondsper simulation andthe latteris over 8 seconds per simulation) although they have similar performance in the accuracy. Compared withthe SSA (60 seconds per simulation), the hybrid method with the
Fig. 4.Thesimulationresultsforthesystemofmorphogen-mediatedpatterningbytheSSAandthehybridmethodwith=0.1 andNint=5.Foreach case,1,000simulationsarecollectedtoobtainthestatisticalresults.
adaptive time step setting saves over 80% of computational cost and provides an advantage on balancing between the accuracyandefficiency(Figs.3C–E).
Systemofmorphogen-mediatedpatterning
In[19], thesystemofmorphogen-mediated patterninginvolvesthree typesofmolecules, L, E and W,whichare free ligand,receptorandligand-receptorcomplex,respectively.Wedividethedomainoflength100 μm into100compartments withsizeh=1 μm andacompartmentrepresentsasinglecell.Freemorphogensareproducedinalocalregion[0,10]and diffuseinthedomainwitha diffusioncoefficient D1=10 μm2s−1;receptors andligand-receptorcomplexesare fixedon thecellmembrane.Ineachcompartment,thereactionsarelistedas
Rg1
: φ −→
γ1 L,
forg∈ {
1, ...,
10},
Rk2
:
L+
E−→
γ2 W,
Rk3:
W−→
γ3 L+
E,
Rk3:
W−→
γ4φ,
fork∈ {
1, ...,
100} .
Assumethat thenumberoftotalreceptorsislarge enough,thenthefrustrationof E+W isrelatively small.We simplify the system by assuming R+W is a constant number ET =500 ineach compartment. The parameter values are listed asfollows:
γ
1=10 s−1,γ
2=10−4s−1,γ
3=γ
4=10−2s−1.The initial conditionsfor Xk1 and Xk2, whichrepresentthe numbersofLandW inthekthcompartment,respectively,are:Xk1
(
0) =
Xk2(
0) =
100−
k,
fork=
1, ...
100.
Fig.4showstheresultsofthemeansandthestandarddeviationsofthesolutionsatt=10 s,whichareobtainedfrom the SSA and thehybrid method with
=0.1 and Nint=5.For each case, 1,000 simulations are collected to obtain the statisticalresults.Fromthesimulationresults,wefindthatthehybridmethodhasagoodperformanceastheSSA.Onthe other hand,theaveragecomputational costofthe hybridmethodpersimulation is3.42 s butthe averagecomputational costoftheSSAis15.49 swhichis4timeslongerthanthatofthehybridmethod.Wealsoapplythehybridmethodwith twolargerthresholdvaluesNint=10 andNint=20 andfindthattheaccuracydoesnothaveanysignificantchangebutthe computationalcostincreasesfrom3.42 sto8.74 swhen Nint increasesfrom5to20.Moreover,whenthesmaller Nint=2 isconsidered,thecomputationalcostincreasesfrom3.42 sto5.29 sasasmallertimesteptC isrequiredformaintaining theaccuracy oftheapproximation when Nint decreases.ComparedwiththeSSA, thehybrid methodwithasuitable Nint cansaveover75%ofcomputationalcostforthissimulation.
Systemofyeastpolarity
In [1], thestochastic model ofcell polarization showedthat a positive feedbackalone is sufficientto account forthe spontaneousestablishmentofasingle siteofpolarity.Weapply themodelin[1] to verifytheaccuracyofourmethod.In
Fig. 5. TheaccuracyandtheefficiencyofthehybridmethodwithdifferentnumbersofsignalingmoleculesNs.A)Asamplesimulationatt=20 min throughthehybridmethodwithNs=4000.B)Asamplesimulationatt=20 min throughtheSSAmethodwithNs=4000.C)Thepercentageofpolarized caseswithin1,000independentsimulationsfordifferentNsvalues.D)Theaveragecomputationalcostwithin1,000independentsimulationsfordifferent Nsvalues.
the model,thereis onlyone type ofsignalingmolecules, S1,andthecomputational domainrepresents thecrosssection ofcellmembranewhichisconsideredasaone-dimensionaldomainwithlength10
π
μm (theradiusofcellis5 μm).The domain is partitionedinto 50 identical compartmentswithuniform length 0.2π
μm. Signalingmoleculesmove between cytoplasmic states and membrane-bound states. In each compartment, there are three types of reactions: spontaneous membraneassociation(fromcytoplasmicstate tomembrane-boundstate),positive-feedbackassociation (fromcytoplasmic state tomembrane-bound state) andspontaneous membranedisassociation (from membrane-boundstate tocytoplasmic state).LetXk1bethenumberofS1inthekthcompartment.Ineachcompartment,wehaveSpontaneous membrane associationRk1
:φ
k1(Ns−
kXk1)
−−−−−−−−−→
S1,
Positive-feedback associationRk2:φ
k2(Xk1/h)(Ns−
kXk1)
−−−−−−−−−−−−−−→
S1,
Spontaneous membrane disassociationRk3:
S1k3
−→ φ,
withthepropensityfunctions
α
k1=
k1(
Ns−
k
Xk1
),
α
k2=
k2(
Xk1/
h)(
Ns−
k
Xk1
)
andα
k3=
k3Xk1,
whereNsisthetotalnumberofsignalingmolecules.TheinitialconditionisXk1=10 forallk.Forourhybridmethod,weset
=0.1 and Nint=5;forthebiologicalparameters,weset D=1.2 μm2/min,k1/k2=10−4,k3=9/min andk2/k3=0.9Ns [1].TheinitialconditionforS1is
Xk1
(
0) =
10δ
k,
fork=
1, ...
100,
where δk’sare independentrandomnumbersgeneratedfromthe uniformdistributionon[0,1].Figs.5AandBshowtwo samplesimulationsatt=20 min,obtainedbythehybridmethodandtheSSA,respectively.
In[1],thestochasticmodelofcellpolarizationdemonstratedthatthefrequencyofpolarizationinverselydependsonthe numberofsignalingmoleculesNs.Figs.5CandDshowthatthehybridmethodandtheSSAcancapturethisfeatureofthe system.Weassumethatpolarizationinsimulationsatt=20 min isdeterminedbywhetheranintervalof10%ofthewhole domaincontainsmorethan50%ofthetotalnumberofsignalingmolecules(asthesamplesinFigs.5AandB).Fig.5Cshows thepercentageofpolarizedcaseswithin1,000independentsimulationsfordifferentNsvalues(redlinerepresentsthehy- bridmethod;thebluelinerepresentstheSSA).Thefrequencyofpolarizationisdecreasingfrom0.65to0whenthenumber