Escape of a Sticky Particle

Adsorption to a surface, reversible-binding, and trapping are all prevalent scenarios where particles exhibit"stickiness". Escape and first-passage times are known to be drastically affected, but detailed understanding of this phenomenon remains illusive. To tackle this problem, we develop an analytical approach to the escape of a diffusing particle from a domain of arbitrary shape, size, and surface reactivity. This is used to elucidate the effect of stickiness on the escape time from a slab domain: revealing how adsorption and desorption rates affect the mean and variance, and providing a novel approach to infer these rates from measurements. Moreover, as any smooth boundary is locally flat, slab results are leveraged to devise a numerically efficient scheme for simulating sticky boundaries in arbitrary domains. Generalizing our analysis to higher dimensions reveals that the mean escape time abides a general structure that is independent of the dimensionality of the problem. This letter thus offers a new starting point for analytical and numerical studies of stickiness and its role in escape, first-passage, and diffusion-controlled reactions.

Stickiness can drastically alter the completion time of random processes.A prominent example is the escape problem, also known as the exit problem, where one considers a particle searching for a hole or another way out of a compartment with otherwise impenetrable boundaries [1][2][3][4][5][6][7][8][9][10][11][12][13].The need to account for stickiness in such scenarios was already recognized for receptors diffusing in and out of the postsynaptic density while reversibly binding to scaffold proteins there [14][15][16].Similar issues arise when considering transport through the nuclear pore complex [17,18], the partially reversible trapping of receptors trafficking in dendrites [19], and the reversible binding of calcium ions to sensors and buffer molecules within nerve terminals [20].Explicit account of stickiness was also required in order to explain the extremely prolonged survival times of target proteins in a nanostructured on-chip device that was recently fabricated for selective protein separation using antibody-photoacidmodified Si nanopillars [21,22].As escape and firstpassage times are conceptually equivalent [23][24][25], stickiness is also expected to affect diffusion-controlled reactions, e.g., the time it takes a sticky ligand to find its receptor on the cell membrane.
In this Letter, we develop a general formalism to treat the escape problem of a sticky particle diffusing in a domain of arbitrary dimension, geometry, and surface reactivity (Fig. 1).We derive the partial differential equation that governs the escape time distribution for this general problem, and exemplify its solution for a particle confined to a slab with one absorbing wall and one adsorbing wall.In this prototypical example, we show that the mean escape time is only sensitive to the ratio of adsorption and desorption rates, while its variance is sensitive arXiv:2305.08701v2[cond-mat.stat-mech]23 Oct 2023 to both rates, thus allowing their inference from experimental data of escape time statistics.To gain physical intuition to the sticky escape problem, we further present a renewal approach in the slab case, which we then leverage to construct an accurate simulation scheme for the diffusion of a sticky particle in general domains.Finally, we solve the problems of escape from a sticky annulus and spherical shell, emphasising the universal manner in which stickiness affects the mean escape time.
The general case.-Weconsider normal diffusion with diffusion coefficient D in a d-dimensional domain Ω ⊂ R d (Fig. 1), whose boundary ∂Ω = ∂Ω ab ∪ ∂Ω ad ∪ ∂Ω ref is comprised of three disjoint parts: an absorbing part ∂Ω ab through which the particle can escape, a reflecting part ∂Ω ref , and an adsorbing part ∂Ω ad , allowing for reversible trapping of the particle (see below).The propagator p(r, t|r 0 ), namely the probability density to find a particle at point r ∈ Ω at time t given the initial position r 0 , satisfies the diffusion equation: subject to the initial condition p(r, 0|r 0 ) = δ(r − r 0 ), and the Dirichlet boundary conditions p(r, t|r 0 ) = 0 for every r ∈ ∂Ω ab .Here, ∆ r is the Laplace operator with respect to r.The propagator determines the probability flux density j ab (r, t|r 0 ) = −D∂ n p(r, t|r 0 ) through a point r ∈ ∂Ω ab at time t.This, in turn, yields the probability density function (PDF) of the escape time, J ab (t|r 0 ) = ∂Ω ab j ab (r s , t|r 0 )dr s , which is also equal to the probability flux out of the compartment.The adsorption condition on ∂Ω ad can be formulated by introducing an auxiliary probability density Π(r, t|r 0 ) of the particle to be adsorbed to point r ∈ ∂Ω ad at time t.We impose the following two equations for every r ∈ ∂Ω ad on the adsorbing surface [45,54]: where j ad (r, t|r 0 ) = −D∂ n p(r, t|r 0 ).Here, ∂ n is the normal derivative oriented outwards the domain, k a (r) is the reactivity of the surface at the point r (characterizing the rate of adsorption from a thin reactive layer near the surface), and k d (r) is the desorption rate at that point.Note that the reflecting part of the boundary can be viewed as part of the adsorbing surface with zero reactivity, i.e., we can consistently define ∂Ω ref ⊂ ∂Ω ad , such that k a (r) = 0 for every r ∈ ∂Ω ref .Equation (2a) states that the diffusive flux of particles from the bulk at each point r ∈ ∂Ω ad is proportional to the reactive flux on the surface, k a (r)p(r, t|r 0 ), minus the flux of particles that desorb from the surface.In turn, Eq. ( 2b) is a mass balance equation that simply states that the uptake of adsorbed particles is given by the diffusive flux.Note that Π(r, 0|r 0 ) = 0, since motion starts in the bulk.
The Laplace transform of these two equations allows one to eliminate Π(r, t|r 0 ), and to reduce these equations to a single Robin-like boundary condition.Summarizing, the original problem reads in the Laplace domain as ∂ n p(r, s|r 0 ) + q s (r)p(r, s|r 0 ) = 0, r ∈ ∂Ω ad , (3c) where tilde denotes the Laplace transform, p(r, s|r 0 ) = ∞ 0 dt e −ts p(r, t|r 0 ), and is an s-dependent reactivity parameter.
Conventionally the survival probability for the escape of a particle from a compartment is defined to be the spatial integral of the propagator over the entire compartment, S b (t|r 0 ) = Ω p(r, t|r 0 )dr.Here we added the subscript 'b', standing for bulk, since survival must also include the probability to be adsorbed (hence being neither in the bulk nor escaped).The survival probability is thus given by S ab (t|r 0 ) := S b (t|r 0 ) + Π(t|r 0 ), (5) where the subscript 'ab' stands for the escape through ∂Ω ab , and Π(t|r 0 ) = ∂Ω ad Π(r, t|r 0 )dr is the overall probability to be adsorbed at time t.Taking the time derivative of Eq. ( 5), one can rewrite it in terms of conservation of the probability fluxes: J b := −∂ t S b = J ab +J ad , where we used Eq.(2b).Note that this relation could also be obtained by integrating the diffusion equation (1).In Appendix A we derive the partial differential equations governing the Laplace-transformed probability fluxes Jad (s|r 0 ) and Jab (s|r 0 ).The latter is given by: ∂ n0 Jab (s|r 0 ) + q s (r 0 ) Jab (s|r 0 ) = 0, r 0 ∈ ∂Ω ad .(6c) Solving this boundary value problem for a given compartment Ω and reactivity parameter q s (r) yields the moment-generating function of the escape time T : Its derivatives give the positive integer order moments, ⟨T n ⟩ = (−1) n (∂ n s Jab (s|r 0 )) s=0 , while an inverse Laplace transform yields the PDF of the escape time, J ab (t|r 0 ).Hence, we provided a general framework for studying the statistics of the escape time.
Escape from a slab.-Wenow exemplify the application of the general formalism to the case of a particle diffusing J ab (H,t) z 0 FIG.2: A schematic illustration of a slab domain Ω = R 2 × (0, H) ⊂ R 3 with absorbing wall at z = H and adsorbing wall at z = 0.The particle starts its motion at z = z0. in a slab domain between two parallel planes separated by distance H (Fig. 2).The boundary at z = H is absorbing, while the boundary at z = 0 is adsorbing with k a and k d .For the slab domain, Eq. ( 4) simplifies to This setting is equivalent to diffusion on the interval (0, H) with adsorbing and absorbing endpoints at 0 and H, and we are interested in getting the PDF J ab (t|z 0 ) of the escape time from the slab, i.e., the first-passage time to H.
In this case, equations (3a)-(3c) for the propagator simplify as r = z, q s (r) = q s and ∂ n = −∂ z at z = 0.One divides the solution into two restrictions z > z 0 and z < z 0 and further imposes continuity of the densities and the fluxes at z = z 0 .This yields: where g(x, s) := α cosh (αx) + q s sinh (αx) and α = s/D.Since in the one-dimensional case Jab (s|z for the escape time probability density in the Laplace domain.Note that Jab (s|z 0 ) is a solution of Eq. (6a) under the boundary conditions in Eqs.(6b)-(6c), and we could have bypassed the calculation of the propagator.
The escape time PDF is obtained by inverse Laplace transforming Eq. ( 9) (see details in Appendix B): Figure 3 shows the behavior of J ab (t|z 0 ) for different values of k a , k d and z 0 .Markedly, the rates change the shape of the PDF at intermediate timescales.The short-time behavior is determined by "direct trajectories" going to the absorbing wall (the escape region).One gets the typical Lévy-Smirnov short-time asymptotics , that does not depend on the adsorption/desorption rates.Conversely, the long-time decay is exponential and controlled by the smallest eigenvalue Dβ 2 0 /H 2 .To see that this strongly depends on adsorption kinetics, consider the asymptotic behavior of the transcendental equation as β → 0, from which one gets β 2 0 ≈ κ d /(1 + κ a ).This approximation is valid whenever β 0 is small, i.e., when κ d is small or/and κ a is large.Indeed, the adsorbing wall plays the role of a temporal trap for the particle: when the particle reaches this wall, it can be easily trapped but requires long time for release.As a consequence, the survival probability decays exponentially, with the decay time T = H 2 /(Dβ 2 0 ), which can be very large.In Appendix B, the dependence of β 0 on the adsorptiondesorption rates is further discussed.
As the Laplace transform Jab (s|z 0 ) is the moment generating function of the escape time, we deduce its mean where K := k a /k d is the equilibrium constant.The first term in Eq. ( 11) corresponds to the mean escape time from an interval (0, H) with reflecting endpoint 0 and absorbing endpoint H.In turn, the second term accounts for adsorption-desorption kinetics.A common experimental initial condition is that of uniform distribution.Averaging over the initial position in Eq. ( 9), and calculating the first moment yields where the subscript 'u' denotes the uniform distribution of the initial position.
Renewal Approach.-Togain a deeper understanding of the relation in Eq. ( 11), we stress that the escape time T is the sum of the (random) diffusion time T d on the interval (0, H) with reflecting endpoint 0, and the total waiting time in the adsorbed state.Denoting the random number of adsorption events N and their independent, identically distributed random durations as T 1 w , . . ., T N w , we write Taking mean of both sides we have ⟨T ⟩ = ⟨T d ⟩+⟨N ⟩⟨T w ⟩, where ⟨T w ⟩ denotes the mean of T i w .Comparing this result with Eq. ( 11), we can identify In fact, Eq. ( 13) suggests that the slab case can be readily analyzed using a renewal approach, where the distribution of N is given in terms of the splitting probability E H (z 0 ), namely the probability of escaping the compartment without any adsorption event, given the starting position z 0 .It is thus enough to solve the corresponding problem of diffusion in the slab, but without desorption.For example, we can generally write ⟨N ⟩ = (1 − E H (z 0 )) /E H (0), which admits the following interpretation: Starting from z 0 , there is a probability 1 − E H (z 0 ) that the particle was adsorbed before escaping such that N > 0. If so, the particle will desorb to position z = 0, from which the probability of escaping before re-adsorbing is given by E H (0). Essentially, adsorption at the lower boundary is a renewal moment that will repeat again and again until the particle finally escapes.We have a sequence of trails geometrically distributed with success probability E H (0), and so the mean number of trials, each corresponding to a readsorption event, is simply 1/E H (0). Indeed, by plugging E H (z 0 ) = (D + k a z 0 )/(D + k a H), which is the splitting  probability of the problem considered above, we retrieve ⟨N ⟩ = k a (H − z 0 )/D.For a more detailed discussion of the renewal approach see Appendix C; therein, we generalize the model by allowing for an arbitrary waiting time distribution ψ(t) in the adsorbed state, and different spatial dynamics with general T d and E H (z 0 ).We derive generalized formulas for the PDF, the mean and the variance of the escape time, and the correlation between the diffusion time and the total waiting time.
Inference of the adsorption-desorption rates.-While the mean escape time in Eq. ( 11) is only sensitive to the equilibrium constant K, we find that the variance carries information on the adsorption-desorption rates themselves: Similarly, where the subscript 'u' denotes re-derivation of Eq. ( 14) according to a uniform distribution of the initial position.
As a consequence, one can infer K = k a /k d by measuring the mean in Eq. ( 11), and then extract k a and k d from the measured variance.In Fig. 4, we plot Var{T u } vs K for three different values of k d .It can be appreciated that, for a wide range of K values, the variance changes considerably with different values of k d , thus allowing its inference.The inset demonstrates an application of this inference scheme on simulated data.
Simulating an adsorbing boundary.-Whenthinking of an adsorbing boundary, one usually imagines a surface layer of width ϵ ≪ 1, from which the particle is adsorbed with rate k a /ϵ.A standard Monte Carlo simulation would thus implement such an adsorption event, wait for a random time, and then re-inject the particle into a distanced point in the bulk to resume diffusion.However, this basic scheme misses multiple adsorption events that may occur between the first desorption moment and the escape from the layer of width ϵ.Indeed, the fractal self-similar character of Brownian motion implies that a Brownian path released on a smooth boundary bounces on this boundary infinitely many times before escaping, and accurate modeling of this dynamics would require extremely small simulation time steps.If the waiting time in the adsorbed state was comparable to the simulation time step, such missed multiple adsorptions would not matter.However, in many applications, these waiting times are macroscopically large, and omission of even a single adsorption event can result in considerable errors.
For this reason, an accurate modeling of the diffusive dynamics in the presence of an adsorbing boundary is a challenging problem.We solve it by applying our result for the escape time from an adsorbing slab where we set H = ϵ.In other words, as any smooth boundary is locally flat, the escape time from a thin layer of width ϵ can be accurately approximated by the escape time from a slab of the same width.We can thus account for multiple adsorption events by drawing random times according to the distribution in Eq. (10), with H = ϵ.In Appendix D we exploit insight from the renewal approach to show how this can be done efficiently via a simpler algorithm that is approximate yet highly accurate.This opens the door for accurate simulations of diffusion with adsorbing boundaries in general domains and arbitrary smoothly varying adsorption-desorption rates.
Outlook.-When coming to solve the escape problem for a sticky particle, researchers have so far resorted to simplifying assumptions [15][16][17]21].Here, we tackled this problem rigorously, providing a general framework, and demonstrating its applicability using the paradigmatic problem of escape from a sticky slab domain.
The importance of studying this fundamental example reveals itself in the ease in which we can translate its solution to general insights on the effect of stickiness.For example, dividing the mean escape time in Eq. (11) by the mean diffusion time ⟨T d ⟩ we observe that where ξ = (H + z 0 )/2 is an effective length scale and K is the adsorption-desorption equilibrium constant.Equation (16) which describes the ratio between the mean escape time with and without stickiness generalizes to higher dimensions and other geometries.
In Appendix F, we solve the two-dimensional (escape from a sticky annulus) and three-dimensional (escape from a sticky spherical shell) versions of the problem illustrated in Fig. 2. In both cases we find that the mean escape time follows the form in Eq. ( 16), with an effective length scale ξ determined by the geometry.From an analytical perspective, this is clearly just the tip of the iceberg: detailed analysis of other cases of interest is done elsewhere [73], and we show that the second term in Eq. ( 16) generalizes to n K n /ξ n which accounts for the presence of multiple sticky surfaces.We conclude that this relation for the mean escape time of a sticky particle is rather general.
Our analysis revealed that adsorption and desorption rates, which may be very hard to measure directly, can instead be inferred from the mean and variance of the escape time.This opens the door for the design of experimental setups for this purpose.For example, in a spin-off on fluorescence recovery after photobleaching, one can imagine fluorescent particles in a virtual slab, where a strong laser photobleaches fluorescence above height H.The normalized signal from the remaining particles amounts to the survival probability and can thus be used to extract the mean and variance of the escape time.Similarly, one can think of nuclear magnetic resonance experiments, in which a surface at height H causes strong relaxation that kills the transverse magnetization of the nuclei.These and other methods, e.g., single-particle tracking, can now be coupled with the results reported herein to offer new and promising ways for probing molecular interactions.Then, the residues are given by g(z 0 , s n )/g ′ (H, s n ), where s n = −β 2 n D/H 2 .Hence, applying the residue theorem to the Bromwich integral representation of the inverse Laplace transform, we get which is equivalent to Eq. (10).

Appendix C: Renewal approach
For an interval, one can implement a renewal approach.In fact, the PDF of the escape time can be written as where j H (t|z 0 ) and j 0 (t|z 0 ) are the probability fluxes from the bulk at z = H and z = 0, and ψ(t) is the probability density of the waiting time in the adsorbed state.We emphasize that these are the fluxes from the bulk, i.e., j 0 (t|z 0 ) here does not contain the contribution from desorption (unlike j ad (t|z 0 ) defined in the main text) -this contribution is taken care of by ψ(t).Thus, the fluxes from the bulk can be equivalently defined as the fluxes out of an interval (0, H) with absorbing endpoint at H and partially reactive (k a > 0, k d = 0) endpoint at 0. The first term in Eq. (C1) represents trajectories that escaped the domain without any adsorption, the second term accounts for a single adsorption, the third term for two adsorptions, and so on.In Laplace domain, one gets Jab (s|z 0 ) = jH (s|z 0 ) + j0 (s|z 0 ) ψ(s) jH (s|0) + . . .= jH (s|z 0 ) + j0 (s|z 0 ) ψ(s) jH (s|0) where we summed the geometric series.

Mean and variance of the escape time
In the limit s → 0, we get where are the splitting probabilities on the endpoints H and 0 (e.g., E H (z 0 ) is the probability of absorption on the endpoint H; evidently, E H (z 0 ) + E 0 (z 0 ) = 1), and are the conditional mean absorption times to the endpoints 0 and H, respectively (e.g., ⟨T H (z 0 )⟩ is the MFPT to the endpoint H, which is conditioned by the arrival onto this endpoint).Note that the conditional form is necessary here because j H (t|z 0 ) is not normalized to 1 since the particle may be absorbed on the endpoint 0. Substituting these expansions into Eq.(C2), we get where we used ψ(s) = 1 − s⟨T w ⟩ + O(s 2 ), and ⟨T w ⟩ is the mean waiting time in the adsorbed state.Using 1 − E 0 (0) = E H (0), we then get Jab (s|z 0 ) = 1 − ⟨T (z 0 )⟩s + O(s 2 ), with The first term is the (unconditional) mean escape time from an interval (0, H) with absorbing endpoint at H and partially reactive (k a > 0, k d = 0) endpoint at 0. This is equal to and note that one recovers the results for a fully reflecting and fully absorbing boundaries at z = 0 by setting E 0 (z 0 ) = 0 and E 0 (z 0 ) = H−z0 H , respectively.As a consequence, we have where in going from the first to second line we used Eq.(C12).Thus, despite the complexity of the general relation (C11), most contributions compensate each other, yielding a remarkably simple expression: where q = k a /D.The first term is the MFPT from an interval (0, H) with absorbing endpoint at H and reflecting endpoint at 0. In turn, the second term incorporates all contributions from the adsorption/desorption events.The proportionality of this term to ⟨T w ⟩ suggests that it can be interpreted as the mean cumulative waiting time in the adsorbed state, whereas the first term is the mean cumulative diffusion time in the bulk.
To justify this interpretation, let us examine a random trajectory of a particle that started from z 0 and arrived onto the endpoint H.As previously, one can distinguish two cases by whether the diffusing particle has or has not been adsorbed on the endpoint 0 before the escape.In the second case, there is no waiting time, and the only contribution comes from the diffusion time.We therefore focus on the first case where the particle has been adsorbed (at least once) on 0 before escaping the interval.Between the first adsorption on 0 and the escape from the interval through the endpoint H, the particle experienced multiple reflections from the endpoint 0. After a number of reflections, it may be re-adsorbed, spend some time on 0, be desorbed, and so on.However, if we cut off all the waiting periods in the adsorbed state (we treat them below), the adsorption/desorption mechanism does not affect the diffusive dynamics of the particle, as if the endpoint 0 was purely reflecting.In other words, if ⟨T w ⟩ = 0 (or, in the Markovian setting, for k d = ∞), there is no effect coming from adsorption/desorption, and one retrieves the results for a reflecting boundary.As a consequence, the diffusion time in the free state is given by the first term in Eq. (C14).
For ⟨T w ⟩ ̸ = 0, the diffusion time should be complemented by the total waiting time that the particle has spent in the adsorbed state.According to our derivation, the mean total waiting time is E 0 (z 0 )⟨T w ⟩/E H (0). How can one interpret this relation?First of all, if the particle has escaped without any adsorption, there is no such contribution.This explains the presence of the splitting probability E 0 (z 0 ), i.e., the probability that at least one adsorption occured before escaping.After each desorption, the particle starts from 0 and can escape the interval with the probability E H (0). Let χ i denote a Bernoulli random variable, which takes the value 0 (re-adsorption at i-th trial, i.e., failure to escape) with probability 1 − E H (0) and the value 1 (successful escape) with probability E H (0). As all escape trials are independent, the number of Bernoulli trials before escape has a geometric distribution, with the mean 1/E H (0). As the particle spends in each adsorbed state on average ⟨T w ⟩ units of time, the total mean waiting time is E 0 (z)⟨T w ⟩/E H (0), in agreement with the second term in Eq. (C14).
Let us extend the above rational to represent the escape time T as the sum of the (random) diffusion time T d on the interval (0, H) with reflecting endpoint 0, and the (random) total waiting time T ad in the adsorbed state: T = T d + T ad .The latter can be formally defined as where ψ k (t) = (ψ • ψ • . . .ψ)(t) is the probability density function of τ k , which is defined as a sum of k independent waiting times (note that τ 1 = T w ).This time is obtained as the k-order convolution of PDF ψ(t).In other words, if N is the (random) number of trials before escape, governed by the geometric law with E H (0), T ad is equal to τ N (apart from the value 0, which corresponds to no adsorption with probability E H (z)).
It is important to emphasize that the random variables T d and N (and thus T ad ) are not independent.In fact, one can intuitively expect that large values of N would correspond to large values of T d (i.e., more escape trials imply longer diffusion times).The mean values ⟨T d ⟩ and ⟨T ad ⟩, whose sum yields the mean escape time, can be computed independently, despite correlations between T d and T ad , as we did above.In contrast, correlations affect higher-order moments and the whole distribution.In particular, the variance of the escape time has three contributions: The first term is well-known: We compute the mean by direct computation To compute variance we use the law of total variance and obtain where in moving to the second line we have plugged in the first two moments of N , which are derived in detail in Appendix D (see Eq. (D6)).
Comparing Eqs.(C16, C17, C19) with the variance of T , that we obtain directly from the small-s expansion of Jab (s|z 0 ), we conclude that In this way, we managed to characterize correlations between the diffusion time T d and the total waiting time T ad .While the mean escape time in Eq. (C14) depends only on q⟨T w ⟩, the variance of the escape time in Eq. (C20) depends on both q⟨T w ⟩ and q⟨T 2 w ⟩.For the Markovian case, the distribution of the adsorption time is exponential and one has ⟨T w ⟩ = 1/k d and ⟨T 2 w ⟩ = 2/k 2 d , that implies separate dependence on k a and k d in the variance: where K = k a /k d .
Splitting probabilities in terms of the Laplace transforms of the fluxes from the bulk The splitting probability E H (z 0 ) is the probability that a diffusing particle, initially at z 0 , is absorbed at H, without adsorbing to the surface at 0 beforehand.The complementary splitting probability E 0 (z 0 ) is the probability that the particle is adsorbed at 0 before it manages to escape.Note that E 0 (z 0 ) accounts for at least one adsorption.Thus, for the purpose of the calculation of the splitting probabilities, the adsorbing boundary can be safely replaced with a partially absorbing boundary with reactivity k a (and no desorption).In other words, one only needs the fluxes from the bulk to get E H (z 0 ) = ∞ 0 J H (t|z 0 )dt = JH (s = 0|z 0 ) and E 0 (z 0 ) = ∞ 0 J 0 (t|z 0 )dt = J0 (s = 0|z 0 ).Note that this result was already used in Eqs.(C5)-(C6).We thus see that all the previously derived expressions that contained splitting probabilities can be written in terms of the Laplace transform J0 (s = 0|z 0 ) and/or JH (s = 0|z 0 ).In fact, the renewal approach allows one to express the solution for the problem in a compartment with an adsorbing boundary in terms of the solution for the simpler problem where the adsorbing boundaries are replaced with partially reactive boundaries of reactivity k a and a waiting time distribution, ψ(t), in the adsorbed state.ε FIG.D: Simulation of an adsorbing surface of a higher-dimensional domain and of complex morphology: As any smooth boundary is locally flat, the escape time from a thin layer of width ϵ can be accurately approximated by the escape time from a slab of the same width.
fluctuations in the escape time from the boundary layer are mostly due to fluctuations in the time spent in the adsorbed state.Thus, it is enough to retain only the effect of fluctuations in the waiting times T 1 w , . . ., T N w .Indeed, by setting H = ϵ in Eq. (C20) and taking this limit we are left only with the last two terms, which are equal to Var{T ad }.
First, one performs a Bernoulli trial to decide whether N = 0 (with probability E ϵ (z) = (1 + qz)/(1 + qϵ)) or N > 0. In the former case, the particle is relocated to a new position z = ϵ, while the time counter is incremented by (ϵ 2 −z 2 )/(2D), i.e., the mean time needed to escape the interval (0, ϵ) with reflecting endpoint 0 and absorbing endpoint ϵ.In turn, in the latter case, we generate the random number N = n of adsorptions from the geometric distribution E 0 (0) n−1 E ϵ (0) for n = 1, 2, ....The particle is again relocated at z = ϵ, while the time counter is incremented by where T 1 w , . . ., T N w are independent waiting times generated from the exponential law with the rate k d in accordance with the first-order desorption kinetics described by the last term in Eq. (2a).Since a geometric sum of independent and identically distributed exponential random variables is itself exponentially distributed, one can replace the sum in Eq. (D7) by a single exponential variable with the rate E ϵ (0)k d .Note that Eq. (D7) captures the mean escape time from the boundary layer exactly.It also captures the variance of the escape time to second order in the layer's width ϵ, with errors being O(ϵ 3 ).A generalization for non-exponential waiting times is trivial: one has to generate T i w according to the given probability density ψ(t).As any smooth boundary is locally flat, we can use the above procedure when simulating higher-dimensional domains (Fig. D).All we have to do is make sure that the simulation step size is small enough such that the surface can be locally approximated as a flat surface.Then, a thin subsurface layer of width ϵ can be approximated by a slab of height ϵ.
An example Matlab code Below we supply an example Matlab code for simulating the escape of a diffusing particle from an interval with an adsorbing boundary at 0, and an absorbing boundary at H (see Fig. 2).The simulation output is the escape time.
In fact, we have used this code to simulate data shown in Fig. 3 and Fig. 4. Green text denotes commentary, as we supply a short explanation of each simulation step.Note that we do not claim that the following code is of optimal performance.

FIG. 1 :
FIG. 1: (a)A schematic illustration of a general domain Ω with an adsorbing (sticky) surface ∂Ω ad (green), a reflecting surface ∂Ω ref (black), and an absorbing surface ∂Ω ab (red), through which the particle (blue) can escape the domain.

FIG. 3 :
FIG.3: PDF J ab (t|z0) of the escape time from the slab domain illustrated in Fig.2.Here, we fix units of length and time by setting H = 1, D = 1, and values for ka and k d are given in the legend.Solid lines (resp., dashed lines) are the PDFs for z0 = 0.1 (resp., z0 = 0.9).Symbols come from Monte Carlo simulations with 10 6 particles and a simulation time step ∆t = 10 −6 (see Appendix D for details).

− 1 ,
where β n are the positive solutions of the transcendental equation β tan(β) = (κ d −β 2 )/κ a , with κ a = k a H/D and κ d = k d H 2 /D standing for the dimensionless adsorption and desorption rate constants.

2 FIG. 4 :
FIG.4: Variance of the escape time vs. the equilibrium constant K = ka/k d for different values of k d , with H and D set to 1. Here, we mimic common experimental conditions by taking the initial position distribution to be uniform.The solid lines are plotted using Eq.(15).Symbols come from Monte Carlo simulations with 10 7 particles.The black curve represents the fast desorption limit (k d → ∞), for which the fourth term in Var{Tu} vanishes.The inset shows a successful implementation of the suggested inference scheme.To come closer to experimental conditions, we only simulated 10 4 particles (here again ∆t = 10 −6 ).The relative error of the inferred k d values is plotted vs. the true k d s that were fed into the simulations.All k d values share the same K = 0.43, marked by the red strip.Error bars were calculated by repeating this procedure 10 2 times.A detailed analysis of the statistical error can be found in Appendix E.
FIG. B:The first solution β0 of Eq. (B1) that determines the smallest eigenvalue β 2 0 /H 2 of the Laplace operator on the interval (0, H).