## 1. Introduction

The simulation of systems comprising different types of molecules is of great interest in several fields, notably in chemistry and biological sciences. The conventional approach to simulate biological networks is to write down macroscopic rate equations and solve the corresponding differential equations numerically to obtain the time evolution of molecules concentrations [1-3]. In this method, the system evolution is deterministic, and it is implicitly assumed that the concentrations are large. However, in most biological systems, the concentrations of molecules usually range from nanomolar to micromolar; therefore, the interactions of these molecules are highly stochastic. Recently, various techniques have been developed to take into account the spatial distribution of individual molecules and the stochastic character of reactions between them. Several of these techniques are based on the Green's functions of the Diffusion Equation (DE), and they offer the advantage of being able to follow all the particles in time and space. In this book chapter, this method is applied to simple systems in one, two, and three dimensions. Two applications are discussed. The first is the simulation of ligands molecules near a plane membrane comprising receptors with the possibility of dissociation and initiation of signal transduction. The second application of this theory is the simulation of partially diffusion-controlled chemical reactions.

## 2. Sampling of the Green's functions of the diffusion equation

The Green's functions of the DE in simple systems under different boundary conditions are known from the theory of heat propagation in solids [4], since the DE and the equation for the propagation of heat are the same. With few assumptions, these Green's functions can be used to model particle systems in specific environments.

### 2.1. Diffusion equation and boundary conditions

The DE can be written

where *r0* is the initial position vector[1] - of a particle and *r* is its position vector at time *t*. The diffusion coefficient of a particle (*D*) is used instead of the thermal diffusivity coefficient in the equation of the propagation of heat. In the model presented here, a particle is located at the position *r0* at *t=0*. This is expressed mathematically as:

where *δ(r-r0)=δ(x-x0)δ(y-y0)δ(z-z0)* is the product of three Dirac's delta functions. To complete the description of the model the boundary conditions at the surfaces are specified. One important case is the *radiation* boundary condition at the surface *X=0*:

The limit *ka→∞* is known as the *absorbing* boundary condition. In this case, the boundary condition is written *p(0,y,z,t|x0, y0, z0, t0)=0*. The limit *ka→0* is the *reflecting* boundary condition. The condition *ka>0* implies that particles may bind at the surface; therefore, the Green's function of these systems are generally not normalized to 1. In all systems described in Sections 3 and 4 the boundary conditions on surfaces, if any, are reflecting (*ka=0*). In Section 5 two applications of the theory for which the boundary conditions are different will be discussed.

### 2.2. Sampling of the Green's functions

To simulate the state of a particle system after one time step, the positions of each particle are calculated by sampling the Green's function for the position *r*. The Green's function is written *p(r, t|r0)* to emphasize that it represents the probability of a particle initially located at the position *r0* to be found at the position *r* at time *t*. In the systems presented in Sections 3 and 4, there is no binding of particles to boundaries. Therefore, *p(r,t|r0)* is normalized as follows:

where *Ω* is the domain where the particle can be found. Another important thing to consider is that the simulation of a particle trajectory can be done by using one or several time steps. This can be expressed mathematically as:

That is, the probability of a particle to be found at *r2* after the time steps *Δt1* and *Δt2* is the same as going to the intermediate position *r1* after *Δt1* and then the final position *r2* at *Δt1+Δt2*. The integral over the domain *Ω* covers all intermediate positions. This is the Chapman-Kolmogorov equation, which hold in Markovian systems.

As seen in a previous paper [5], Equations (4) and (5) have to modified in systems where there is a possibility of binding of particles at the boundaries.

## 3. One-dimensional systems

One dimensional (1D) systems are simpler to study than those which are multi-dimensional. They are also of interest since several multi-dimensional systems can be approached as independent 1D systems [6]. In 1D, the DE is:

The initial condition is *p(x,0|x0)=δ(x-x0)*. Three systems are described in this section: free diffusion, diffusion in the half-space *X>0* and diffusion in the space between *X=0* and *X=L*.

### 3.1. Free diffusion

The Green's function of the DE in 1D for a free particle, noted *pfree(x,t|x0)*, is well known:

This is a Gaussian distribution, with variance *σ2=2Dt*. This distribution can be sampled by using, for example, the Box-Muller method [7].

**Algorithm 1: Sampling algorithm for pfree(x,Δt|x0) (free 1D diffusion)**

GENERATE N as a standard Normal |

RETURN X. |

The sampling algorithm is used to generate the positions of 1,000,000 particles after one time step. The results are stored in histograms and normalized. The Green's functions and the results of sampling are illustrated[1] - in Figure 1.

Because the sampling algorithms use random numbers, the simulation results vary from one simulation to another. Usually, the larger the number of histories, the smaller the statistical fluctuation of the results. The algorithms presented in this book chapter are exact, i.e. the simulation results are expected to converge to the analytical Green's function at the limit of an infinite number of histories. In practice, 1,000,000 particle histories are usually sufficient to converge to the analytical Green's function and to confirm the validity of the algorithm. The time discretization property of the Green's function can also be used to validate the algorithm: since a simulation can be done in several time steps, the positions of the particles obtained after the first time step are used as the initial positions for the next step.

### 3.2. Diffusion in the half-space x>0

As it will be seen in the applications, this system may be used to represent the motion of particles near a membrane. The reflective boundary condition at *x=0* is given by

The solution of the DE in 1D for this system, noted *pref(x,t|x0)*, is given in ref. [8]:

This Green's function is the sum of two Gaussian distributions. It can be sampled by the method described in Algorithm 2 (given in ref. [8]):

**Algorithm 2: Sampling algorithm for pref(x,Δt|x0) (free 1D diffusion with reflection at x=0)**

SET | |

GENERATE uniform [0,1] random variatesU,V | |

IF (U<N_{0}) | |

ELSE | |

RETURN X |

where *Erfc(x)* is the complementary error function [9]. The Green's functions and the result of sampling are illustrated in Figure 2.

### 3.3. Diffusion of a particle between *x=0* and *x=L*

This system is used to simulate the motion of particles in a confined space. In this case, the reflective boundary conditions at *x=0* and *x=L* are given by

The Green's function of the DE in 1D for a particle between the boundaries, noted *pconf(x,t|x0)*, is [4]:

This function is complicated by an infinite sum. However, it is possible to use the following algorithm to generate trajectories of particles in this environment [10]. The algorithm is based on a series method, as described in [11]. For this section the functions *f(x)* and *fn(x)* are defined:

The algorithm is:

**Algorithm 3A: Generation of random variateX distributed as pconf(x,Δt|x0) (particle between x=0 and x=L in 1D)**

DEFINE | |

REPEAT | |

{ | |

GENERATE U,V uniform on [0,1] and X uniform on [0,L] | |

SET Y ← VH | |

} | |

UNTIL Y≤f(X) | |

RETURN X |

The verification of *Y≤f(X)* is dose by using the second part of the algorithm:

**Algorithm 3B: Verification of Y<f(X)**

SET S ← 1/L+2f1(X), k ← 1 (S holds the approximation sum) | |

REPEAT FOREVER | |

{ | |

T = (L/π2kDΔt)exp(-π2k2DΔt/L2) | |

IF (Y ≥ S+T) THEN RETURN "Y ≥ f(X)" and EXIT | |

IF (Y ≤ S-T) THEN RETURN "Y ≤ f(X)" and EXIT | |

k ← k+1 | |

S ← S+2fk(X) | |

} |

The Green's function and the result of sampling for 1,000,000 histories of particles initially located at *x0=5* are shown in Figure 3.

When time evolves, as illustrated in Figure 3, the particles become uniformly distributed between *x=0* and *x=10*.

## 4. Two-dimensional systems

Two dimensional (2D) systems are interesting, because the particles trajectories can be visualized in a plane. The DE in 2D can be written:

The initial condition is *p(x,y,t=0|x0, y0)=δ(x-x0)δ(y-y0)*. In several cases, the Green's function can be written as the product of the functions *px(x,t|x0)* and *py(y,t|y0)* (see ref. [6]):

This property of the Green’s function allows the simulation of the motion of particles in the direction x and y independently.

### 4.1. Free diffusion

The solution of the DE is the product of two Gaussian functions:

Therefore, sampling of this Green's function can be done by sampling two Gaussian functions:

**Algorithm 4: Sampling algorithm for pfree(x,y,Δt|x0,y0) (free 2D diffusion)**

GENERATE N1,N2 as a standard Normals |

RETURN (X,Y). |

Plotting the Green's functions in X and Y would give figures identical to Figure 1. However, in 2D, it is useful to use polar coordinates. That is, the following transformation is used:

The same transformation is done with *x0* and *y0* to obtain *r0* and *θ0*. The Green's function may be rewritten:

This form yields an alternate method to sample the Green's function in polar coordinates:

**Algorithm 5: Sampling algorithm for r*pfree(r,θ,Δt|r0,θ0) (free 2D diffusion)**

CALCULATE | ||

REPEAT | ||

GENERATE V,W uniform on [0,1], E1 as standard exponential. | ||

SET | ||

IF_{2} is standard exponential | ||

ELSE SET R ←ρ+N, where N is standard normal | ||

UNTIL R>0 and log(Max(R,ρ)/R)+Rρ(1-cos(Θ-θ0))<E1 . | ||

RETURN (R,Θ). |

Algorithm 5 generates variates *r* and *θ* distributed as *r*pfree(r,θ,t|r0,θ0)*. The factor *r* originates from the differential area in polar coordinates: *dxdy* is replaced by *rdrdθ*.

It is possible to obtain related distributions such as *p(r,t|r0)* and *p(θ,t|θ0)*. They are found by integrating the Green's function:

where *I0(x)* is the Modified Bessel Function of the First Kind of order 0 (see ref. [9]). The angular distribution *p(θ,t|θ0)* is obtained by integrating over *r*:

The factor *r* is also included in the integral. The result is:

where *Erf(x)* is the error function [9]. The distributions *p(r,t|r0)* and *p(θ,t|θ0)* for *x0=2.5* and *y0=2.5* are illustrated in Figure 4.

Similar results are found using either algorithm 4 or 5. In 2D, it is possible to represent the time evolution of the particle system (Figure 5).

### 4.2. The rectangular corner *x>0*, *y>0*

As in section 4.1, the solution of the DE is the product of two independent 1D reflective Green's functions:

The positions of the particles can be sampled by using two applications of Algorithm 2 (for X and Y). An example of the time evolution of 1,000,000 particles is illustrated in Figure 6.

### 4.3. The rectangle *0<x<a*, *0<y<b*

The solution of the DE is also the product of two independent 1D Green's functions:

Therefore the positions of the particles can be sampled by using Algorithm 3 for the coordinates x and y.

The particle system depicted in Figure 7 illustrates how particles initially located in a given position will diffuse and eventually become uniformly distributed in the rectangular area.

### 4.4. The particles outside a disk of radius R

This problem is of interest to simulate how particles move and/or bind to curved cell membranes comprising receptors. In this section, only the case of the reflective boundary condition is discussed. In polar coordinates, the DE can be written

The reflective boundary condition at *r=R* is:

The Green's function for a particle initially located at (*r0,θ0*) is:

where

*Jn(x)* and *Yn(x)* are the Bessel Functions of the First and Second Kind, respectively (see ref. [9]). The parameters of this distribution are *R>0*, *0≤θ0≤2π*, *r0>R* and *Dt>0*. The variates of this distributions are *r>R* and *0≤θ≤2π*.

The normalization of this function is:

We have not been able so far to develop a sampling algorithm for the distribution function *p(r,θ,t|r0, θ0)*. An approximate algorithm to sample the positions can be done by using free diffusion and reflecting particles which are inside the disk (*r<R*). The results given by this simulation are illustrated in Figure 8.

In this example, since an approximate method is used to simulate the motion of particles, the distributions of *r* and *θ* do not verify the time discretization equations, as an exact sampling algorithm of *p(r,θ,t|r0, θ0)* would (results not shown). Therefore, this example illustrate that the time discretization property of the Green’s function is a very powerful way to verify the validity of the sampling algorithms.

It is interesting to note that for *R→0*, *Cn(u,r)→Jn(ur)*; in this case, the integral can be evaluated by using Weber's formula (Watson P. 395 [12], Gradsteyn 6.633, Equation 2 [13]):

The series which is obtained can be evaluated (http://functions.wolfram.com/ 03.02.23.0007.01):

Thus, for *R→0*, *pref*(*r,θ,t|r0,θ0*) → *pfree*(*r,θ,t|r0,θ0*), as expected.

## 5. Three-dimensional systems

Three dimensional systems are more complex and harder to visualize. In 3D, the DE can be written in cartesian coordinates as:

The initial condition is *p(x,y,z,t=0|x0, y0, z0)=δ(x-x0)δ(y-y0)δ(z-z0)*. As in 2D, in several cases, the Green's function can be written as the product of the functions *px(x,t|x0)*, *py(y,t|y0)* and *pz(z,t|z0)*:

### 5.1. Free diffusion

The solution of the DE for free particles is the product of three Gaussian functions:

Since the Gaussian functions are independent, the positions *x, y* and *z* can be obtained by sampling the Gaussian distribution for each variate*X, Y* and *Z*:

**Algorithm 6: Sampling algorithm for pfree(x,y,z,Δt|x0,y0,z0) (free 3D diffusion)**

GENERATE N_{1}, N_{2}, N_{3} as a standard Normals |

RETURN (X,Y,Z). |

In 3D, it is useful to use spherical coordinates (*r,θ,ϕ*)[1] -. That is, the following transformation is used:

The differential volume element is given by

The DE can be written in spherical coordinates as:

Using the transformation to spherical coordinates, the Green's function of the DE for free particles can be rewritten as:

The angle between the vectors (*r,θ,ϕ*) and (*r0,θ0,ϕ0*) is given by *cos(γ)*:

Therefore, Eq. (36) can be written in the compact form:

In spherical coordinates, as in 2D, it is possible to obtain related distributions such as *p(r,t|r0)*. It is obtained by integrating the Green's function over the angles:

### 5.2. The corner *x>0*, *y>0*, *z>0*

The Green's function is the product of three independent 1D Green's functions:

As it is the case in 2D, the coordinates *x,y* and *z* can be treated independently. Therefore, the positions of the particles can be generated by using Algorithm 2 for each of the coordinates.

### 5.3. The parallelipiped *0<x<a*, *0<y<b*, *0<z<c*

The Green's function is also the product of three independent 1D Green's functions:

Therefore, the positions of particles can be generated by using Algorithm 3 for each of the coordinates. This sampling algorithm can be used to simulate the trajectories of particles confined into a box of sides *a*, *b* and *c*. At equilibrium, as it is the case in 2D (Figure 7), the particles are uniformly distributed within the volume.

## 6. Applications

Two applications of the approach described in the previous sections are presented. The first is the simulation of particles near a membrane comprising receptors. The second one is the simulation of chemical reactions. These applications will eventually be used to study the evolution of the chemical species created by ionizing radiations in biological media [14].

### 6.1. Particle near a 1D membrane comprising receptors

To apply the theory described in the chapter to cell culture simulations, it is necessary to make some assumptions. The details of the model presented here and more results are given in ref. [5]. Similar models have been used to study autocrine and paracrine signals in cell culture assays [15], ligand accumulation in autocrine cell cultures [16] and the spatial range of autocrine signaling [17].

#### 6.1.1. Model and assumptions

A particle is assumed to be located in the proximity of a plane membrane comprising receptors, corresponding to the plane *X=0*. The particle can move freely in the Y and Z directions, and can bind reversibly to receptors located on the membrane and initiate signal transduction. This is illustrated in Figure 9:

The binding rate constant (*ka*) is obtained from the ligand-receptor association rate constant and the density of receptors on the surface, which are assumed to be uniformly distributed on the membrane [16]. The ligand-receptor complex has the rate constants *kd* for dissociation and *ke* for initiation of signal transduction. As a first approximation, this is equivalent to the problem

Since the particles are moving freely in the Y and Z direction, the Green's function can be written as the product of the independent functions *px(x,t|x0)*, *py(y,t|y0)* and *pz(z,t|z0)*. But *py(y,t|y0)* and *pz(z,t|z0)* are Gaussians functions, which can be sampled as described in section 4.1; therefore, only the sampling of *px(x,t|x0)* will be discussed here. For convenience, the index "x" will be omitted in this section.

A particle can be free at position *x>0*, in a reversible bound state (*) at *x=0* or activating signal transduction (**). The boundary condition at *x=0* can be written:

where *p(*,t|x0)* is the probability of a particle initially located at *x0* to be in the reversible bound state at time *t*. The time evolution of *p(*,t|x0)* is:

Similarly, the time evolution of *p(**,t|x0)* is:

#### 6.1.2. Green's functions

This problem can be solved analytically by using Laplace Transforms [18]. The solutions are expressed using three coefficients *α*, *β* and *γ*. They are the roots of a cubic polynomial[1] -, for which the coefficients are given by the rate constants *ka*, *kd* and *ke* as follows:

The mathematical expressions of the Green's function for a particle in this system are quite long. To simplify the following expressions, the variables

where *pref(x,t|x0)* is the Green's function for a reflective membrane, given in Section 3.2. The functions *W(x,y)* and *Ω(x)* are defined as:

It is possible for two of the roots to be complex conjugates. Nevertheless, it is still possible to use the Green's function given in Equation (47) by implementing the numerical evaluation of W(x,y) for complex numbers [19].

The probability of survival for a free particle is obtained by integrating *p(x,t|x0)* on [0,∞):

The probability of a particle initially at *x0>0* to be reversibly bound at time *t* is:

A particle initially at *x0>0* can also be found in an irreversibly bound state at time *t*. The probability to be found in this state is given by *p(**,t|x0)=1-p(*,t|x0)-Q(t|x0)*, which can be written as:

To obtain the Green's function of a particle in a reversibly bound state, the material balance condition *kap(x,t|*)=kdp(*,t|x)* (given in ref. [18,20]) is used. This yields the Green's function for the dissociation of a bound particle:

The probability of dissociation of a particle that was initially in a reversibly bound state *Q(t|*)* is found by integrating *p(*,t|x)* over [0,∞):

The probability of a particle initially in a reversibly bound state to stay in this state is given by (ref. [18]):

Finally, the probability of a particle initially in a reversibly bound state to activate signal transduction is:

For some particular values of *α*, *β* and *γ*, the Green's functions of this section have singularities (0/0). In these cases, the Green's functions take slightly different forms, but it is still possible to use the approach described here (see ref. [5]).

#### 6.1.3. Time discretization equations

A simulation is usually done by dividing the final simulation time in a finite number of time steps. If the simulation can be done in two time steps such as *t=Δt1+Δt2*, a particle initially located at position *x0* can:

go to position

*x1*during*Δt1*and then go to its final*x*position during*Δt2*,go to position

*x1*during*Δt1*and reversibly bind to the membrane during*Δt2*,go to position

*x1*during*Δt1*and activate signal transduction during*Δt2*,reversibly bind to the membrane during

*Δt1*and stay in this state during*Δt2*,reversibly bind to the membrane during

*Δt1*and dissociate during*Δt2*,reversibly bind to the membrane during

*Δt1*and activate signal transduction during*Δt2*,

or

activate signal transduction during

*Δt1*.

From this the following time discretization equations are obtained:

The first of these equations is similar to the Chapman-Kolmogorov equation, to which a term has been added to account for the possibility of dissociation. Each term of these equations can be associated with the possibilities i-vii. Similarly, a particle initially in a reversibly bound state can:

dissociate to position

*x1*during*Δt1*and go to its final position x during*Δt2*,dissociate to position

*x1*during*Δt1*and re-bind reversibly during*Δt2*,dissociate to position

*x1*during*Δt1*and initiate signal transduction during*Δt2*,stay reversibly bound during

*Δt1*and dissociate to position*x*during*Δt2*,stay reversibly bound during

*Δt1*and*Δt2*,stay reversibly bound during

*Δt1*and initiate signal transduction during*Δt2*, orinitiate signal transduction during

*Δt1*.

This yields the time discretization equations for the bound particle:

These equations are proven in the supplemental material of ref. [5].

#### 6.1.4. Brownian dynamics algorithm

Using the Green's functions, it is possible to construct a Brownian Dynamics algorithm to simulate the motion and binding of the ligand and the possible initiation of signal transduction. First, it should be noted that *p(x,t|x0)* is a sub-density[1] -. Since *p(x,t|x0)≤pref(x,t|x0)*, the rejection method can be used [21]. This yields the following algorithm:

**Algorithm 7a: sampling of p(x,Δt|x0) (free particles)**

REPEAT | |

{ | |

GENERATE U uniform on [0,1], X distributed as pref(x,Δt|x0) | |

} | |

UNTIL p(X,Δt|x0)≤U*pref(X,Δt|x0) | |

RETURN X |

There are also particles which are bound to the membrane. These particles may dissociate with probability *Q(Δt|*)*. If this is the case, the position *x* of the particle is distributed as *p(x,Δt|*)*, which can be written with a Gaussian factor in evidence:

This form is convenient because it is the product of a Gaussian function by a function *g(x)* with three terms in *Ω(x)*. Since *0≤Ω(x)≤1*, *p(x,Δt|*)* can be sampled by a rejection method:

**Algorithm 7b: sampling of p(x,Δt|*) (reversibly bound particles)**

CALCULATE H = |α/(γ-α)(α-β)|+|β/(α-β)(β-γ)|+|γ/(β-γ)(γ-α)| | |

REPEAT | |

{ | |

GENERATE U uniform on [0,1], | |

} | |

UNTIL UH≤g(X) | |

RETURN X |

#### 6.1.5. Simulation results

A simulation has been done by using *ka=6*, *kd=10* and *ke=1*. The results are shown in Figure 10. It should also be noted that the time discretization equations (56) and (57) were used to validate the simulation results. In this case, it is possible to verify that the simulation results for free particles corresponds to *p(x,t|x0)*, but also that the number of bound particles can be accurately predicted after several time steps.

### 6.2. Bimolecular reactions

Bimolecular reactions are an important application of the theory described in the book chapter. Let the particles A and B initially at the positions *rA0* and *rB0*. They can react with the reaction rate *ka*:

#### 6.2.1. Green's functions for the particles

The probability distribution is solution of the following equation [2]:

It is convenient at this point to use a transformation of coordinates, similar to a center of mass transformation:

The same transformation is done to *rA0* and *rB0* to obtain *r0* and *R0*. The operators *∇R=∂/∂R* and *∇r=∂/∂r* are also defined. Using the transformation, Equation (60) can be rewritten as:

where *D=DA+DB*, the sum of the diffusion coefficients of the particles. Therefore, *p(R,r,t|R0,r0)* can be factorized as follows:

Using this factorization, two DE are obtained in *r* and *R*:

This equation describes two independent random processes - diffusion in the coordinates *r* and *R*. The initial condition for Equation (64a) is *pR(R,t|R0)=δ(R-R0)*, and the boundary condition is *pR(|R|→∞,t|R0)=0*. As seen in Section 5.1, Equation (64a) represents free diffusion in 3D:

This function can be sampled for *R* as in Algorithm 3, by using three Gaussian random numbers. Equation (64b) is the diffusive motion of the separation vector between particles. The initial condition is *pr(r,t|r0,t0)=δ(r-r0)*, and the outer boundary condition is *pr(|r|→∞,t|r0,t0)=0*. The possibility of a chemical reaction is introduced as the inner boundary condition

where *σ* is the reaction radius. As it is the case for free particles, Equation (66) is the *radiation* boundary condition. The limit *ka→0* is the *reflecting* boundary condition (no reactions between particles), whereas the limit *ka→∞* is the *absorbing* boundary condition. In the latter case, the boundary condition is written *pr(|r|=σ,t|r0)=0*.

The exact solution for this problem is given in ref. [4]:

where *Pn(x)* are the Legendre polynomials,

and *γ* is the angle formed by (*r,θ,ϕ*), the origin and (*r0,θ0,ϕ0*). In this expression, it is possible to evaluate *Pn(cosγ)*, knowing that

where *Pnm(x)* are the associated Legendre polynomials (ref. [9]). For *θ0=0* and *ϕ0=0*, *Pn(cosγ)=Pn(cosθ)*. It is also interesting to note that for *ka=0* and *σ→0*, *Fn+1/2(u,r) →Jn+1/2(ur)*. In this case, *p(r,θ,ϕ,t|r0,,θ0,ϕ0)* can be written:

The integral can be evaluated using Weber's formula (ref. [13], section 6.633, eq 2):

This equation can be further simplified by using

(ref. [12], p. 368; ref. [13], section 8.511). This yields the following equation:

Therefore, *p(r,θ,ϕ,t|r0,θ0,ϕ0)* is equivalent to free 3D diffusion (Equation 38) for *ka=0* and *σ=0*.

We were not able to develop a sampling algorithm for *p(r,θ,ϕ,t|r0,θ0,ϕ0)*. However, it is possible to use the radial component of the DE in 3D:

with the boundary condition given by Equation 66. The solution is much simpler in this case:

where *α=-(ka+4πσD)/(4πσ2D)*. Therefore, this approximation is widely used in chemistry and biophysics [22]. The survival probability of a pair of particles, *Q(t|r0)*, is well known and can be calculated by integrating *p(r,t|r0)* over space:

For this system, the time discretization equations takes the form:

where p(*,t|r_{0})=1-Q(t|r_{0}).

#### 6.2.2. Sampling algorithm

The objective is to generate random variates from *f(r)≡4πr2p(r,t|r0)* (ref. [23]). It can be noted that *f(r)* is composed by the sum of two Gaussians and a negative term, since *ka≥0*. Thus, *f(r)≤h(r)*, where

Since *f(r)* is bound by the sum of two Gaussian functions, it can be sampled by a rejection method. To do so, *h(r)* is written as the sum of four terms, which, after rearrangement and truncation to the positive ranges, are:

where 1_{[condition]} takes the value 1 when the condition is true, and 0 when it is false. A related function is also defined:

Thus, *h(r)*, since *h(r)* is a mixture of known probability distribution functions. To do so, the weight of the contributions of *h1*, *h2* and *h3+h4* are needed:

where *Φ(x)* is the normal distribution function:

From this algorithm 8a is obtained:

**Algorithm 8a**

CALCULATE p1 , p2 and p'. SET s=p1+p2+p‘ |

GENERATE a uniform [0,1] random variateU |

IF sU∈ [0,p1], SETE is standard exponential. |

IF sU∈ (p1,p2], SETE is standard exponential. |

IF sU∈ [p1+p2,s], use algorithm 8b to generate X |

RETURN X |

The second part is given by Algorithm 8b:

**Algorithm 8b**

REPEAT |

GENERATE N as standard normal, U uniform on [0,1] |

Set |

UNTIL X>σ, or jointly X<σ, Dt<2σ2 and U≤(2σ-r0)/r0 |

In the former case, RETURN X |

In the latter case, RETURN 2σ-X |

Algorithm 8 generates numbers with density probability proportional to *h(r)*. However, random numbers distributed as *f(r)* are needed. Since *f(r)* is bound by *h(r)*, a rejection method is used as the final step, i.e. the overall algorithm generate pairs of random numbers (*X,U*) with *X* having density distribution proportional to *h* and *U* uniform on [0,1] until *Uh(X)≤f(X)* and returns *X*. Results obtained by using this algorithm are shown in Figure 11.

The time discretization property of the Green’s functions (Equations 77) are also used to validate the simulation results and the sampling algorithm.

This algorithm is used to sample the length of the separation vector r. To fully caracterize the vector its direction should be specified by the angles *θ* and *ϕ* in a spherical coordinate system. An exact answer including the angles could be obtained by sampling the multi-variate Green's function given by Equation 67. An approximate method to obtain the deflection angles, which can be used here, is given by [24].

After sampling of the vectors *r* and *R*, the new positions of the particles *rA* and *rB* are obtained by inverting the transformation given by Equation (61):

#### 6.2.3. Application to radiation chemistry

Ionizing radiation interacts with water molecules and creates radiolytic species, which react with cellular components and eventually lead to biological effects [14]. The precise location of the created radiolytic species are highly dependent of the type and energy of ionizing radiation. Therefore, considerable effort has been devoted to the Monte-Carlo simulation of ionizing radiation tracks, which provides such information [25]. After their formation, the radiolytic species react with each other and with other cellular molecules. Hence, radiation chemistry is a very important link between the radiation track structure and cellular damage and biological effects [26].

The simulation of radiation chemistry is difficult for several reasons. One important problem is the calculation time. Since the number of interactions between *N* particles is *N(N-1)/2*, the calculation time increases as *~N2*. Therefore, simulation of systems comprising over 10000 particles is difficult, even in modern computers. For example, Uehara and Nikjoo [27] reported that the simulation of time-dependent yields of chemical species produced by five 1-MeV electron tracks comprising about 1,500 particles from 10^{-12} to 10^{-6} s requires about 250 h of calculation time. One promising approach is the new hardware called general purpose graphic processing units (GPGPU), which are special cards comprising a large number of processors designed to perform a large number of calculations simulaneously. Regarding this, the sampling algorithms proposed in this book chapter do not require much memory and could be implemented on a GPGPU, which could allow the simulation of large particle systems.

We conclude this section by showing a simulation result of water radiolysis by a ^{12}C^{6+} ion of 25 MeV/amu [28] in Figure 12. Briefly, the track structure and the position of all the radiolytic species (^{.}OH, H^{.}, e^{-}_{aq}, H_{2}, H_{2}O_{2},..) at ~10^{-13} s are calculated by the code RITRACKS, described in [25] and references therein. The time evolution of the radiolytic species are calculated by using a step-by-step Monte-Carlo simulation code of radiation chemistry [28-30]. Each dot in Figure 12 represents a radiolytic species. The changes in the colors of the dots indicates that chemical reaction occurs. The number of chemical reactions (the radiolytic yields) which are calculated by the program have been validated with experimental data [30].

## 7. Conclusion

The simulations based on the Green's function of the DE are able to accurately describe the evolution of particles in time and space in various geometries, even if the number of particles is small. In fact, this approach is now used in several fields. Of particular interest in radiobiology is the study of radiation chemistry, biochemical networks and bimolecular reactions.

The Green's functions and their respective sampling algorithms have been presented for simple systems in one, two and three dimensions. Obviously, it is difficult to develop sampling algorithm even for simple systems because of the complex mathematical form of the Green’s functions. However, it is very useful to develop sampling algorithms for systems for which analytical solutions are known, because they can be used to validate future models which will be based on numerical solutions of the DE. The DE can be solved easily by numerical methods such as finite-difference schemes, but these techniques may have restrictions for computational stability and the boundary conditions are often difficult to implement [31]. The systems with complex boundary conditions are particularly relevant to study biological networks. However, as seen in the applications, since the Green's functions of systems with complex boundary conditions are often subdensities of the Green's functions for the corresponding system with reflective boundary conditions, the rejection method can be used.

The algorithms developed in this chapter are already used to simulate the radiation chemistyoccuring in liquid water [28-30]. In the future, they will allow the validation and verification of future calculations, which will use the numerical solution of the diffusion equation. Eventually, the approach depicted in this book chapter will be used to simulate the time evolution of radiolytic species created by ionizing radiation and their reactions with molecules in biological media [23].

## Acknowledgments

This work was support by the NASA Space Radiation Risk Assessment Program. The help of Dr. Luc Devroye (McGill University) with sampling algorithms is greatly acknowledged.## Notes

- Through the book chapter, variables written in bold are vectors.
- Through this book chapter, the diffusion coefficient is set to D=1 in Figures.
- The following notation is used: (radial, azimutal, polar). r: [0,∞),θ: [0,π],ϕ: [0,2π).
- At least one of the roots of a third-order polynomial is real, the two other roots being either real or complex conjugates.
- A sub-density means that P=∫0Lf(x)dx≤1, and f(x)≥0. In this case, a random variate with the density f/p is generated with probability P.