<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JAMP</journal-id><journal-title-group><journal-title>Journal of Applied Mathematics and Physics</journal-title></journal-title-group><issn pub-type="epub">2327-4352</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jamp.2021.98120</article-id><article-id pub-id-type="publisher-id">JAMP-111178</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  A Modified Inhomogeneous Stochastic Simulation Algorithm to Model Reactive Boundary Conditions
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>A.</surname><given-names>Sayyidmousavi</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>S.</surname><given-names>Ilie</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Mathematics, Ryerson University, Toronto, Canada</addr-line></aff><pub-date pub-type="epub"><day>05</day><month>08</month><year>2021</year></pub-date><volume>09</volume><issue>08</issue><fpage>1870</fpage><lpage>1882</lpage><history><date date-type="received"><day>15,</day>	<month>June</month>	<year>2021</year></date><date date-type="rev-recd"><day>7,</day>	<month>August</month>	<year>2021</year>	</date><date date-type="accepted"><day>10,</day>	<month>August</month>	<year>2021</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The present study proposes a stochastic simulation scheme to model reactive boundaries through a position jump process which can be readily implemented into the Inhomogeneous Stochastic Simulation Algorithm by modifying the propensity of the diffusive jump over the reactive boundary. As compared to the literature, the present approach does not require any correction factors for the propensity. Also, the current expression relaxes the constraint on the compartment size allowing the problem to be solved with a coarser grid and therefore saves considerable computational cost. The modified algorithm is then applied to simulate three reaction-diffusion systems with reactive boundaries.
 
</p></abstract><kwd-group><kwd>Reactive Boundary</kwd><kwd> Stochastic Simulation Algorithm</kwd><kwd> Reaction-Diffusion Systems</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Two of the most important events taking place in biochemical systems are diffusion and reactions. Particles constantly diffuse throughout the system as a result of their thermal energy. In the meantime, particles also have collisions with one another, some of which may lead to chemical reactions. As long as there are a large number of reactive particles, the behavior of the system may be modeled using reaction-diffusion partial differential equations. However, a deterministic model may be inaccurate or even inapplicable for systems with a small abundance of particles [<xref ref-type="bibr" rid="scirp.111178-ref1">1</xref>]. A remedy to this problem is to use stochastic models, which can take into consideration the innate randomness in the number of particles.</p><p>Different simulation algorithms for stochastic models of biochemical systems have so far been developed [<xref ref-type="bibr" rid="scirp.111178-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref4">4</xref>]. In modelling stochastic reaction-diffusion systems, the problem domain is usually divided into the so-called subcells or compartments and each compartment is assumed to be a well-mixed system in which particles can interact with one another. Particles can also move to their neighboring compartments. Such mesoscopic algorithms can be either time-driven or event-driven [<xref ref-type="bibr" rid="scirp.111178-ref5">5</xref>]. In a time-driven algorithm, a fixed time step Δt is chosen during which at most one event, a reaction or a diffusion, can take place depending on a scaled uniform random number. In an event-driven algorithm, the system evolves by choosing the time step until the next event which is either a reaction or a diffusive jump. The most commonly used event-driven algorithms are the Gillespie algorithm [<xref ref-type="bibr" rid="scirp.111178-ref2">2</xref>], the next reaction method [<xref ref-type="bibr" rid="scirp.111178-ref6">6</xref>] and the next subvolume method [<xref ref-type="bibr" rid="scirp.111178-ref7">7</xref>]. These compartment-based algorithms produce exact realizations of the Chemical Master Equation (CME) and the Reaction Diffusion Master Equation (RDME). Other stochastic simulation algorithms for the RDME have also been reported in the literature [<xref ref-type="bibr" rid="scirp.111178-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref10">10</xref>].</p><p>The particles in a system also interact with the boundaries. In the deterministic regime, the governing partial differential equation of the system may be subject to different boundary conditions. Three main types of boundary conditions are defined for partial differential equations as follows:</p><p>(i) u (ii) ∂ u ∂ n (iii) ∂ u ∂ n + C (1)</p><p>where ∂ u ∂ n denotes the derivative of u perpendicular to the boundary. Type (i) is called a Dirichlet boundary condition. Type (ii) is known as a Neumann boundary condition and type (iii) is referred to as a Robin boundary condition. When using stochastic techniques, these boundary conditions need to be translated from their deterministic to a stochastic framework [<xref ref-type="bibr" rid="scirp.111178-ref11">11</xref>]. Certain types of the above-mentioned boundary conditions can be readily implemented in a stochastic regime. For instance, the Neumann boundary condition ∂ u ∂ n = 0 , also called the zero-flux condition, is represented as a reflective boundary, meaning that a particle gets reflected whenever it hits the boundary. The Dirichlet boundary condition u = 0 , also called a fully-adsorbing boundary, is modelled such that upon hitting the boundary, the particle is totally removed from the system. However, other types of boundary conditions, in particular the so-called mixed or Robin boundary conditions, may not be easily implemented within a stochastic framework. The reason is that upon hitting this type of boundary, some particles are removed and some are reflected. As a result, the Robin boundary condition is also referred to as a radiative or a partially adsorbing boundary. Examples of Robin boundary condition in biology are cell membranes with receptors [<xref ref-type="bibr" rid="scirp.111178-ref12">12</xref>] and polymer coating of a virus surface [<xref ref-type="bibr" rid="scirp.111178-ref13">13</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref14">14</xref>].</p><p>In accordance with Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>], in a stochastic framework, any boundary condition may be formulated as follows: whenever a molecule hits the boundary, it is reflected with some probability, and removed (adsorbed) otherwise. As such, this probability is one and zero for the zero-flux and fully-adsorbing boundaries, respectively. Partially adsorbing boundary conditions have been implemented in both microscopic and mesoscopic stochastic algorithms. Andrew and Bray [<xref ref-type="bibr" rid="scirp.111178-ref3">3</xref>] and Singer et al. [<xref ref-type="bibr" rid="scirp.111178-ref16">16</xref>] derived expressions for the relationship between the particle adsorption probability of the boundary with the deterministic Robin boundary constant κ for Brownian Dynamics. Sayyidmousavi and Rohlf [<xref ref-type="bibr" rid="scirp.111178-ref17">17</xref>] modelled partial adsorption of the boundary in the Reactive Multi Particle Collision (RMPC) method by drawing an analogy between the RMPC and Brownian Dynamics through the mean free path of particles. Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>] calculated the probability of a particle being adsorbed by the boundary to be</p><p>R = κ h D (2)</p><p>by developing a position jump process that corresponds to a time-driven mesoscopic stochastic algorithm. Here h denotes the compartment size, i.e., the distance between jumping positions, and D and κ represent the diffusion coefficient of the particle and the reactivity constant of the boundary, respectively. Lier and Marquez-Lago [<xref ref-type="bibr" rid="scirp.111178-ref18">18</xref>] argued that the probability R being bounded by the value of one from above imposes an upper limit on the size of the compartment h as h ≤ D κ .</p><p>This restriction on the compartment size will therefore result in excessive computational cost for low ratios between the diffusion coefficient and the Robin boundary constant. In addition, this upper limit may even require h to be too small for the RDME to be valid. To resolve this shortcoming, Lier and Marquez-Lago [<xref ref-type="bibr" rid="scirp.111178-ref18">18</xref>] presented an alternative approach by introducing a discretization permeability factor β for diffusive jumps across the partially adsorbing boundary such that the new propensity for diffusive jumps from the very subcell next to the boundary is given by β D h 2 . Note that β is calculated by imposing that the steady-state stochastic mean summed over all subcells be equal to a pre-defined value. In this paper, we have modified the derivation proposed by Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>] through the position jump process, to obtain an adsorption probability of the boundary which relaxes the restriction on the compartment size to a great extent. This probability can be readily incorporated into the Gillespie algorithm for reaction-diffusion systems with reactive boundaries. The paper is organized as follows: Section 2 gives an overview of the Inhomogeneous Stochastic Simulation Algorithm. In Section 3, the adsorption probability of the reactive boundary is obtained through a modified position jump process. In Section 4, the obtained probability is applied to model three reaction-diffusion systems with partially adsorbing boundaries, and finally, the paper is concluded with a summary and discussion in Section 5.</p></sec><sec id="s2"><title>2. Materials and Methods</title><sec id="s2_1"><title>2.1. Inhomogeneous Stochastic Simulation Algorithm</title><p>First, confirm that you have the correct template for your paper size. This template has been tailored for output on the custom paper size (21 cm * 28.5 cm). Stochastic Simulation Algorithm (SSA), initially developed by Gillespie [<xref ref-type="bibr" rid="scirp.111178-ref2">2</xref>], is one of the most commonly used stochastic algorithms for well-mixed biochemical systems. Other scholars [<xref ref-type="bibr" rid="scirp.111178-ref19">19</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref20">20</xref>] extended the SSA to account for the spatial variations in particle numbers in the problem domain and developed the so-called Inhomogeneous Stochastic Simulation Algorithm (ISSA) to solve the Reaction-Diffusion Master Equation. The ISSA has been enhanced in terms of speed through the development of hybrid and adaptive algorithms [<xref ref-type="bibr" rid="scirp.111178-ref21">21</xref>] - [<xref ref-type="bibr" rid="scirp.111178-ref27">27</xref>]. Some scholars have also utilized the ISSA to simulate delayed reactions [<xref ref-type="bibr" rid="scirp.111178-ref28">28</xref>] [<xref ref-type="bibr" rid="scirp.111178-ref29">29</xref>]. In the RDME, the problem domain is discretized into N<sub>V</sub> cubic subvolumes of length h, each being considered a well-mixed system. The system consists of N<sub>sp</sub> species subject to M reactions. R<sub>jk</sub> represents reaction R<sub>j</sub> in subvolume Ω<sub>k</sub> that can occur with the propensity of a j k ( x ∗ k ) . x<sub>ik</sub> denotes the number of particles of type S<sub>i</sub> in subvolume Ω<sub>k</sub>, in the current state of the system. The occurrence of reaction R<sub>jk</sub> changes the state of the system from x to x + v j k ⋅ e k . Here, v<sub>jk</sub> is an N<sub>sp</sub> dimensional column vector that represents the system state due to reaction R<sub>jk</sub>, while e<sub>k</sub> is an N<sub>V</sub> dimensional row vector with all entries being zero except for the k-th entry which is equal to 1.</p><p>Diffusion events are modeled as unimolecular reactions such that R i k l d indicates the movement of one particle of species S<sub>i</sub> between two adjacent subvolumes k and l. The propensity of such a unimolecular reaction is denoted by a i k l d ( x i ∗ ) , which amounts to D i x i k h 2 with D<sub>i</sub> representing the diffusion constant for species S<sub>i</sub>. Each diffusion event changes the state of the system from x to x + E i ν i k l d , where E<sub>i</sub> is an N<sub>sp</sub> dimensional column vector with all entries being zero except the i-th entry which is equal to 1. The state change vector ν i k l d is characterized by an N<sub>V</sub> dimensional row vector. An inhomogeneous system can be modeled as a finite state continuous Markovian process. If P ( x , t | x 0 , t 0 ) is the probability of the system being in the state x at time t, provided that at time t<sub>0</sub>, the system was at state x<sub>0</sub>, the master equation for a system including only reactions and no diffusion may be written as:</p><p>d d t P ( x , t | x 0 , t 0 ) = M P ( x , t | x 0 , t 0 ) = ∑ j = 1 M ∑ k = 1 N V [ a j k ( x ∗ k − ν j k ) &#215; P ( x 1 ∗ , ⋯ , x k ∗ − ν j k , ⋯ , x N ∗ , t | x 0 , t 0 )       − a j k ( x ∗ k ) &#215; P ( x , t | x 0 , t 0 ) ] (3)</p><p>For a system in which only diffusions and no reactions occurs, the master equation is</p><p>d d t P ( x , t | x 0 , t 0 ) = D P ( x , t | x 0 , t 0 ) = ∑ i = 1 N s p ∑ k = 1 N V ∑ l = 1 N V [ a i k l d ( x i ∗ − ν i k l d ) &#215; P ( x 1 ∗ , ⋯ , x i ∗ − ν i k l d , ⋯ , x N ∗ , t | x 0 , t 0 )       − a i k l d ( x i ∗ ) &#215; P ( x , t | x 0 , t 0 ) ] (4)</p><p>Subsequently, for a system in which both reactions and diffusions happen. The dynamics of the Markov Process is governed by the Reaction Diffusion Master equation as follows:</p><p>d d t P ( x , t | x 0 , t 0 ) = M P ( x , t | x 0 , t 0 ) + D P ( x , t | x 0 , t 0 ) (5)</p><p>At each step of the ISSA, two uniformly distributed random numbers r<sub>1</sub> and r<sub>2</sub> between 0 and 1 are generated. With a<sub>0</sub>(x) representing the sum of the propensities for all the events in the system at state x including both reactions and diffusions, the time until the next event, δt, is calculated as</p><p>δ t = 1 a 0 ( x ) ln 1 r 1 (6)</p><p>with a<sub>0</sub> being</p><p>a 0 ( x ) = ∑ j = 1 M ∑ k = 1 N V a j k ( x ∗ k ) + ∑ i = 1 N s p ∑ l = 1 N V ∑ k = 1 N V a i k l d ( x i ∗ ) (7)</p><p>The next event is predicted as follows: if the index (j, k) is the minimum such that</p><p>∑ j ′ = 1 j ∑ k ′ = 1 k a j ′ k ′ ( x ∗ k ′ ) &gt; r 2 a 0 ( x ) (8)</p><p>then the reaction R<sub>jk</sub> occurs first. If, however, the index follows</p><p>∑ j ″ = 1 M ∑ k ″ = 1 N V a j ″ k ″ ( x ∗ k ′ ) + ∑ i ′ = 1 i ∑ l ′ = 1 l ∑ k ′ = 1 k a i ′ k ′ l ′ d ( x i ′ ∗ ) &gt; r 2 a 0 ( x ) (9)</p><p>then diffusion event R i k l d will take place first.</p></sec><sec id="s2_2"><title>2.2. Modified Position Jump Process</title><p>As previously mentioned, diffusion or position jump in the ISSA is modelled as a unimolecular reaction, the probability of which is equal to D i δ t h 2 . As a result, in a one dimensional case, a particle of type S<sub>i</sub> in subvolume Ω<sub>k</sub>, at time t + δt, can stay in its current position with a probability equal to 1 − 2 D h 2 δ t or it can jump to its adjacent right or left subvolume, each with a probability of D h 2 δ t . Now, if a particle is located in a subvolume Ω<sub>k</sub> adjacent to a partially adsorbing boundary on its left side, the probability of the particle remaining in its current position at time t + δt can be calculated as:</p><p>p k ( t + δ t ) = ( 1 − D h 2 δ t − P a d s ) p k ( t ) + ( D h 2 δ t ) p k + 1 ( t ) (10)</p><p>P<sub>ads</sub> in the above-given equation is the adsorption probability of the boundary. It can be seen that P<sub>ads</sub> = 0 and 1 will correspond to a fully reflective and fully adsorbing boundary, respectively. Equation (10) can be rearranged as follows:</p><p>p k ( t + δ t ) − p k ( t ) δ t = D h ( p k + 1 ( t ) − p k ( t ) h − h P a d s D δ t p k ( t ) ) (11)</p><p>In order to comply with the diffusive limit [<xref ref-type="bibr" rid="scirp.111178-ref30">30</xref>], both sides of this equation are multiplied by δ t and by letting both h and δt approach zero while δ t h is kept constant, the term in the right-hand side parenthesis of Equation (11) approaches zero which is analogous to the following deterministic Robin boundary condition with n(x,t) representing the particle density:</p><p>D ∂ n ∂ t = κ n (12)</p><p>This analogy will result in the adsorption probability being</p><p>P a d s = κ δ t h (13)</p><p>Unlike κ h D obtained by Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>], the above-calculated probability imposes a lower bound on the compartment size h relaxing the restriction on the compartment size. However, it should be noted that, in order to ensure spatial variations in the system, h is restricted from above, i.e., h ≪ L where L denotes the size of the domain. Also, h has to be significantly larger than the binding radius for the molecular based Smoluchowski model [<xref ref-type="bibr" rid="scirp.111178-ref19">19</xref>], that is h ≫ ρ .</p><p>The ISSA can therefore be modified such that the propensity of diffusion jump over a partially adsorbing boundary is set equal to κ h . Therefore, in Equation (7), the diffusive propensity is calculated as:</p><p>a i k l d ( x i ∗ ) = { 0                   fully reflective boundary k x i k h       Partially adsorbing boundary (14)</p><p>As can be seen, using Equation (14), the partially adsorbing boundary condition can be easily implemented into the ISSA algorithm as opposed to the probability approach developed by Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>]. In fact, in the latter approach, for each iteration, an additional uniformly distributed random number needs to be generated and compared to the adsorption probability in Equation (2).</p></sec></sec><sec id="s3"><title>3. Results and Discussions</title><sec id="s3_1"><title>3.1. Case Study I: Diffusion</title><p>The first system contains a number of particles that can diffuse throughout the domain. For this purpose, we assume that 100,000 particles exist in a computation domain [0, 5] such that initially, 75,000 of the particles are at x = 1 and the remaining 25,000 are at x = 2. The domain is discretized into 50 subvolumes of length h = 0.1. The left boundary, i.e., x = 0 is assumed to be subject to a Robin boundary condition with κ = 2. The boundary at x = 5 is considered to be fully reflective. The diffusion coefficient of the particles is set equal to D = 1. The given values of h, κ and D correspond to an adsorption probability of κ h D = 0.2 for the left hand-side boundary according to Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>]. Following Equation (13) obtained in this paper, the propensity of the diffusion jump over the partially adsorbing boundary in the ISSA algorithm is calculated to be κ h = 20 . <xref ref-type="fig" rid="fig1">Figure 1</xref> shows the distribution profile, obtained using the modified ISSA, at t = 1 compared to the PDE solution.</p><p>Now, if the diffusion coefficient is changed to D = 0.1, the adsorption probability of the boundary, as calculated by Equation (2), will be equal to κ h D = 2 &gt; 1 , making it physically meaningless unless the compartment size h is considerably refined (h &lt; 0.05) which results in additional computational cost. However, according to Equation (13), the new diffusion jump propensity over the left hand-side boundary remains κ h = 20 , with h = 0.1, resulting in the distribution given in <xref ref-type="fig" rid="fig2">Figure 2</xref> when applied to the ISSA. <xref ref-type="fig" rid="fig3">Figure 3</xref> shows the distribution profiles obtained through the present method with h = 0.1 compared to using Equation (2) with h = 0.04. The results are seen to be in good agreement with one another. However, the use of the present method has resulted in a decrease of 87% in the computational time.</p></sec><sec id="s3_2"><title>3.2. Case Study II: Reaction and Diffusion</title><p>In the second example [<xref ref-type="bibr" rid="scirp.111178-ref18">18</xref>], we consider a square domain of [0, 1] &#215; [0, 1] in which the particles of type A can diffuse with a constant coefficient of D = 0.1. The system also consists of a production reaction as follows:</p><p>∅ → k s A (15)</p><p>where k s = 100 . Such a system can be described by the following PDE in the deterministic framework</p><p>∂ n ( x , y , t ) ∂ t = D A ∇ 2 n ( x , y , t ) + k s (16)</p><p>The left and right boundaries of the domain are subject to fully reflective and fully adsorbing conditions, respectively. The top and bottom boundaries satisfy the Robin condition with κ t o p = 0.1 and κ b o t t o m = 5 . In order for the adsorption probability formula in [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>] to be used, h &lt; 1 50 . In this paper, the problem is solved with h = 1 30 applying the proposed formula. <xref ref-type="fig" rid="fig4">Figure 4</xref> shows the solution to this system obtained with the modified ISSA at t = 10 compared to the PDE solution.</p></sec><sec id="s3_3"><title>3.3. Case Study III: Schnakenberg System</title><p>The third system follows the Schnakenberg kinetics consisting of species U as the activator and V as the inhibitor, which undergoes the following reactions:</p><p>∅ → k 1 U ,         k 1 = 2 Ω   sec − 1 (17a)</p><p>U → k 2 ∅ ,         k 2 = 6   sec − 1 (17b)</p><p>∅ → k 3 V ,           k 3 = 8 Ω (17c)</p><p>2 U + V → k 4 3 U ,           k 4 = 3 Ω 2   sec − 1 (17d)</p><p>In addition, species U and V diffuse throughout the domain [0, 1] with diffusion constants D U = 1 and D V = 0.1 , respectively [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>]. The system is described by a system of reaction-diffusion equations:</p><p>∂ u ∂ t = D U ∂ 2 u ∂ x 2 + 2 − 6 u + 3 u 2 v (18)</p><p>∂ v ∂ t = D V ∂ 2 v ∂ x 2 + 8 − 3 u 2 v (19)</p><p>The boundary condition at x = 1 is assumed to be fully reflective; whereas Robin boundary conditions are imposed at x = 0 , namely:</p><p>∂ u ∂ x ( 0 , t ) = 10 u ( 0 , t ) ,     ∂ v ∂ x ( 0 , t ) = 10 v ( 0 , t ) (20)</p><p>The initial condition is defined as</p><p>u ( x , 0 ) = Ω h 3 ,     v ( x , 0 ) = Ω h 3 (21)</p><p>The problem domain is discretized into 50 subvolumes of length h = 0.02 . Through comparison with Equation (12), the values for the reactivity constant κ are obtained; κ U = 10 and κ V = 1 . Ω = 250 particles of each species, i.e., U and V are initially placed in each subvolume. <xref ref-type="fig" rid="fig5">Figure 5</xref> shows how the particles of type U and V are distributed through the system at t = 1. It can be seen that the results from the modified ISSA are in very good agreement with the PDE solution.</p></sec></sec><sec id="s4"><title>4. Conclusion</title><p>Motivated by the existence of partially permeable boundaries in cell biology, the present paper proposed a modified position jump process leading to an expression for the propensity of a diffusion jump over a partially adsorbing boundary, which can be readily implemented into the ISSA. The proposed formula imposes a lower bound on the compartment size which relaxes the additional restriction on the compartment size as proposed by Erban and Chapman [<xref ref-type="bibr" rid="scirp.111178-ref15">15</xref>]. It is noteworthy that the usual upper and lower bounds for the compartment size, i.e., h ≫ ρ and h ≪ L , will guarantee that the adsorption probability remains bounded between zero and unity. As indicated in case studies I and II, using the proposed formula, one can solve the problem with a larger compartment size, thus saving considerable computational cost. Also, the use of the present approach is computationally much simpler than calculating the factor β for diffusive jumps, which requires imposing that the steady-state stochastic mean summed over all subvolumes be equal to a pre-defined value as in reference [<xref ref-type="bibr" rid="scirp.111178-ref18">18</xref>]. As can be seen in case study III, since the derivation of the propensity depends solely on the diffusive jump process, the existence of higher order reactions does not affect the boundary conditions. Another important point to notice is that, in general, for a small number of particles, the average stochastic solution of reaction-diffusion systems can be compared with deterministic, i.e., the PDE solution, only when the reactions are of zeroth and first orders [<xref ref-type="bibr" rid="scirp.111178-ref31">31</xref>]. In the Schnakenberg model simulated in this paper, the number of particles has been chosen large enough to make such a comparison possible.</p></sec><sec id="s5"><title>Acknowledgements</title><p>The authors would like to acknowledge the financial support provided by a grant (RGPIN/05723-2015) from the Natural Sciences and Engineering Research Council of Canada (NSERC).</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Sayyidmousavi, A. and Ilie, S. (2021) A Modified Inhomogeneous Stochastic Simulation Algorithm to Model Reactive Boundary Conditions. Journal of Applied Mathematics and Physics, 9, 1870-1882. https://doi.org/10.4236/jamp.2021.98120</p></sec></body><back><ref-list><title>References</title><ref id="scirp.111178-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Fedoroff, N. and Fontana, W. (2002) Small Numbers of Big Molecules. Science, 297, 1129-1131. https://doi.org/10.1126/science.1075988</mixed-citation></ref><ref id="scirp.111178-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Gillespie, D.T. (1977) Exact Stochastic Simulation of Coupled Chemical Reactions. Journal of Physical Chemistry, 81, 2340-2361. https://doi.org/10.1021/j100540a008</mixed-citation></ref><ref id="scirp.111178-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Andrews, S.S. and Bray, D. (2004) Stochastic Simulation of Chemical Reactions with Spatial Resolution and Single Molecule Detail. Physical Biology, 1, 137-151. https://doi.org/10.1088/1478-3967/1/3/001</mixed-citation></ref><ref id="scirp.111178-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Cao, Y., Gillespie, D.T. and Petzold, L.R. (2007) Adaptive Explicit-Implicit Tau-Leaping Method with Automatic Tau Selection. Journal of Chemical Physics, 126, Article ID: 224101. https://doi.org/10.1063/1.2745299</mixed-citation></ref><ref id="scirp.111178-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Smith, C.A. and Yates, C.A. (2018) Spatially Extended Hybrid Methods: A Review. Journal of the Royal Society Interface, 15, Article ID: 20170931. https://doi.org/10.1098/rsif.2017.0931</mixed-citation></ref><ref id="scirp.111178-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Gibson, M. and Bruck, J. (2000) Efficient Exact Stochastic Simulation of Chemical Systems with Many Species and Channels. Journal of Physical Chemistry, 104, 1876-1889. https://doi.org/10.1021/jp993732q</mixed-citation></ref><ref id="scirp.111178-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Elf, J. and Ehrenberg, M. (2004) Spontaneous Separation of Bi-Stable Biochemical Systems into Spatial Domains of Opposite Phases. Systems Biology, 1, 2230-2236. https://doi.org/10.1049/sb:20045021</mixed-citation></ref><ref id="scirp.111178-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Lampoudi, S., Gillespie, D.T. and Petzold, L.R. (2009) The Multinomial Simulation Algorithm for Discrete Stochastic Simulation of Reaction-Diffusion Systems. Journal of Chemical Physics, 130, Article ID: 094104. https://doi.org/10.1063/1.3074302</mixed-citation></ref><ref id="scirp.111178-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Drawert, B., Lawson, M.J., Petzold, L.R. and Kammash, M. (2010) The Diffusive Finite State Projection Algorithm for Efficient Simulation of the Stochastic Reaction-Diffusion Master Equation. Journal of Chemical Physics, 132, Article ID: 074101. https://doi.org/10.1063/1.3310809</mixed-citation></ref><ref id="scirp.111178-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Koh, W. and Blackwell, K.T. (2012) An Accelerated Algorithm for Discrete Stochastic Simulation of Reaction-Diffusion Systems Using Gradient-Based Diffusion and Tau-Leaping. Journal of Chemical Physics, 134, Article ID: 154103. https://doi.org/10.1063/1.3572335</mixed-citation></ref><ref id="scirp.111178-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Boccardo, G., Sokolov, I.M. and Paster, A. (2018) A Second Order Scheme for a Robin Boundary Condition in Random Walk Algorithms. Journal of Computational Physics, 374, 1152-1165. https://doi.org/10.1016/j.jcp.2018.08.009</mixed-citation></ref><ref id="scirp.111178-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Hoffmann, M. and Schawrz, U.S. (2014) Oscillations of Min-Proteins in Micropatterned Environments: A Three-Dimensional Particle-Based Stochastic Simulation Approach. Soft Matter, 10, 2388-2396. https://doi.org/10.1039/C3SM52251B</mixed-citation></ref><ref id="scirp.111178-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Erban, R., Chapman, S.J., Fisher, K., Kevrekidis, I. and Seymour, L.W. (2007) Dynamics of Polydisperse Irreversible Adsorption: A Pharmacological Example. Mathematical Models and Methods in Applied Sciences, 17, 759-781. https://doi.org/10.1142/S0218202507002091</mixed-citation></ref><ref id="scirp.111178-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Fisher, K., Stallwood, Y., Green, N., Ulbrich, K., Mautner, V. and Seymour, L.W. (2011) Polymer-Coated Adenovirus Permits Efficient Retargeting and Evades Neutralizing Antibodies. Gene Therapy, 8, 341-348. https://doi.org/10.1038/sj.gt.3301389</mixed-citation></ref><ref id="scirp.111178-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Erban, R. and Chapman, S.J. (2007) Reactive Boundary Conditions for Stochastic Simulations of Reaction-Diffusion Processes. Physical Biology, 4, 16-28. https://doi.org/10.1088/1478-3975/4/1/003</mixed-citation></ref><ref id="scirp.111178-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Singer, A., Schuss, Z., Lumsden, C., Osipov, A. and Holcman, D. (2008) Partially Reflected Diffusion. SIAM Journal on Applied Mathematics, 68, 844-868. https://doi.org/10.1137/060663258</mixed-citation></ref><ref id="scirp.111178-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Sayyidmousavi, A. and Rohlf, K. (2018) Reactive Multi-Particle Collision Dynamics with Reactive Boundary Conditions. Physical Biology, 15, Article ID: 046007. https://doi.org/10.1088/1478-3975/aabc35</mixed-citation></ref><ref id="scirp.111178-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Lier, A. and Marquez-Lago, T.T. (2011) Correction Factors for Boundary Diffusion in Reaction-Diffusion Master Equations. Journal of Chemical Physics, 135, Article ID: 134109. https://doi.org/10.1063/1.3634003</mixed-citation></ref><ref id="scirp.111178-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Isaacson, S.A. and Peskin, C.S. (2006) Incorporating Diffusion in Complex Geometries into Stochastic Chemical Kinetics Simulations. SIAM Journal on Scientific Computing, 28, 47-74. https://doi.org/10.1137/040605060</mixed-citation></ref><ref id="scirp.111178-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Fange, D. and Elf, J. (2006) Noise-Induced Min Phenotypes in E. coli. PLOS Computational Biology, 2, 637-648. https://doi.org/10.1371/journal.pcbi.0020080</mixed-citation></ref><ref id="scirp.111178-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Gillespie, D.T. (2001) Approximate Accelerated Stochastic Simulation of Chemically Reacting Systems. Journal of Chemical Physics, 155, 1716-1733. https://doi.org/10.1063/1.1378322</mixed-citation></ref><ref id="scirp.111178-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Chatterjee, A. and Vlachos, D.G. (2005) Binomial Distribution Based τ-Leap Accelerated Stochastic Simulation. Journal of Chemical Physics, 122, Article ID: 024112. https://doi.org/10.1063/1.1833357</mixed-citation></ref><ref id="scirp.111178-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Chiam, K.H., Tan, C.M., Bhargava, V. and Rajagopal, G. (2006) Hybrid Simulations of Stochastic Reaction-Diffusion Processes for Modeling Intracellular Signaling Pathways. Physical Review E, 74, Article ID: 051910. https://doi.org/10.1103/PhysRevE.74.051910</mixed-citation></ref><ref id="scirp.111178-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Rossinelli, D., Bayati, B. and Koumoutsakos, P. (2008) Accelerated Stochastic and Hybrid Methods for Spatial Simulations of Reaction-Diffusion Systems. Chemical Physics Letter, 451, 136-140. https://doi.org/10.1016/j.cplett.2007.11.055</mixed-citation></ref><ref id="scirp.111178-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Ferm, L., Hellander, A. and Lotstedt, P. (2010) An Adaptive Algorithm for Simulation of Stochastic Reaction-Diffusion Processes. Journal of Computational Physics, 229, 343-360. https://doi.org/10.1016/j.jcp.2009.09.030</mixed-citation></ref><ref id="scirp.111178-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Strehl, R. and Ilie, S. (2015) Hybrid Stochastic Simulation of Reaction-Diffusion Systems with Slow and Fast Dynamics. Journal of Chemical Physics, 143, Article ID: 234108. https://doi.org/10.1063/1.4937491</mixed-citation></ref><ref id="scirp.111178-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Padgett, J.M.A. and Ilie, S. (2016) An Adaptive Tau-Leaping Method for Stochastic Simulations of Reaction-Diffusion Systems. AIP Advances, 6, Article ID: 035217. https://doi.org/10.1063/1.4944952</mixed-citation></ref><ref id="scirp.111178-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Barrio, M., Burrage, K., Leier, A. and Tian, T. (2006) Oscillatory Regulation of Hes1: Discrete Stochastic Delay Modelling and Simulation. PLOS Computational Biology, 2, 1017-1030. https://doi.org/10.1371/journal.pcbi.0020117</mixed-citation></ref><ref id="scirp.111178-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">Sayyidmousavi, A. and Ilie, S. (2017) An Efficient Hybrid Method for Stochastic Reaction-Diffusion Biochemical Systems with Delay. AIP Advances, 7, Article ID: 125305. https://doi.org/10.1063/1.5001760</mixed-citation></ref><ref id="scirp.111178-ref30"><label>30</label><mixed-citation publication-type="other" xlink:type="simple">Taylor, P.R., Baker, R.E. and Yates, C.A. (2014) Deriving Appropriate Boundary Conditions and Accelerating Position-Jump Simulations of Diffusion Using Non-Local Jumping. Physical Biology, 12, Article ID: 016006. https://doi.org/10.1088/1478-3975/12/1/016006</mixed-citation></ref><ref id="scirp.111178-ref31"><label>31</label><mixed-citation publication-type="other" xlink:type="simple">Smith, S., Cianci, C. and Grima, R. (2015) Analytical Approximations for Spatial Stochastic Gene Expression in Single Cells and Tissues. Journal of the Royal Society Interface, 13, Article ID: 20151051. https://doi.org/10.1098/rsif.2015.1051</mixed-citation></ref></ref-list></back></article>