In order to show how the proposed methodology works, we consider here two distinct examples at two different scales. On one hand, we show how the technique works for the simulation of gene regulatory networks, even in the lack of knowledge about some parameters in the reactions. Secondly, we analyze how the multi-dimensional methodology proposed so far can be efficiently applied to the simulation of macro-scale problems such as liver palpation.

### A PGD approach to gene regulatory network simulation

The PGD approach to the problem of efficiently simulating gene regulatory networks begins by assuming that the probability of being at a particular state *z* at time *t* can be approximated as a finite sum of separable functions, i.e.

{P}^{N}(z,t)=\sum _{j=1}^{N}{F}_{1}^{j}\left({z}_{1}\right)\xb7{F}_{2}^{j}\left({z}_{2}\right)\xb7\dots \xb7{F}_{D}^{j}\left({z}_{D}\right)\xb7{F}_{t}^{j}(t),

(4)

where, as mentioned before, the variables *z*_{
i
} represent the number of molecules of species *i* present at a given time instant. This particular choice of the form of the basis functions allows for an important reduction in the number of degrees of freedom of the problem, *N* × *n*_{nod} × (*D* + 1) instead of (*n*_{nod})^{D}, where *D* is the number of dimensions of the state space and *n*_{nod} the number of degrees of freedom of each one-dimensional grid established for each spatial dimension. For this to be useful, one has to assume that the probability is negligible outside some interval and therefore substitute the infinite domain by a subdomain [0,…,*m* - 1]^{D}, *m* being the chosen limit number of molecules for any species in the simulation. A similar assumption is behind other methods in the literature, such as the Finite State Projection algorithm, for instance, [28].

Another important point to be highlighted is the presence of a function depending solely on time, {F}_{t}^{j}(t). This means that the algorithm is not incremental. Instead, it solves for the whole time history of the chemical species at each iteration of the method. If one then assumes that *n* terms of the sum given by Equation (4) are already known,

{P}^{n+1}(z,t)={P}^{n}(z,t)+{F}_{1}^{n+1}\left({z}_{1}\right)\xb7{F}_{2}^{n+1}\left({z}_{2}\right)\xb7\dots \xb7{F}_{D}^{n+1}\left({z}_{D}\right)\xb7{F}_{t}^{n+1}(t),

(5)

and look for the *n* + 1-th term, by substituting Equation (5) into the CME, Eq. (1) gives a non-linear problem in {F}_{1}^{n+1},\dots ,{F}_{D}^{n+1},{F}_{t}^{n+1} that is solved by means of a fixed point, alternating directions algorithm, see [39].

To show how this technique works, consider one of the simplest and most studied examples of gene regulatory networks, that of *λ*-phage. When a bacteriophage *λ* infects a cell, it either stays dormant or it reproduces until the cell dies. The resulting behavior depends crucially on two competing proteins that inhibit mutually each other, see a schematic representation in Figure 2. The so-called toggle switch is composed of a two-gene co-repressive network. For this case, the governing CME has the form [7]

\frac{\partial P}{\partial t}=\mathcal{\text{AP}},

(6)

with \mathcal{A}={\mathcal{A}}_{1}+{\mathcal{A}}_{2}, two operators, one for each reaction in the system. The form of these operators, following [7] is

\begin{array}{ll}\phantom{\rule{6.5pt}{0ex}}{\mathcal{A}}_{1}P\left({z}_{1},{z}_{2}\right)& =\frac{\alpha \beta}{\beta +\gamma {z}_{2}}P\left({z}_{1}-1,{z}_{2}\right)+\delta \left({z}_{1}+1\right)\xb7P\left({z}_{1}+1,{z}_{2}\right)-\left(\frac{\alpha \beta}{\beta +\gamma {z}_{2}}+\delta \xb7{z}_{1}\right)\\ \phantom{\rule{1em}{0ex}}\times P\left({z}_{1},{z}_{2}\right),\end{array}

and {\mathcal{A}}_{2} equivalent with *z*_{1} and *z*_{2} interchanged. We computed the solution for *δ* = 0.05, *α* = 1.0, *γ* = 1.0 and *β* = 0.4.

The simulation started from a non-physiological state in which both proteins showed a very high probability around *z*_{1} = *z*_{2} = 15. Despite this initial state, after *t* = 100 *s* (Figure 3a), one has a case where both average values of both proteins and small levels of the one protein combined with higher level of the other protein are quite likely, and this remains the case for the stationary distribution as well [7], Figure 3b.

But what should be highlighted about this technique is not only its ability to solve gene regulatory network simulations in a reasonable amount of time, which is extended easily to problems with some 20 different species involved, see [39], for instance. Very often, there is an important lack of experimental data concerning constants of the reactions (propensities), or simply we want to adopt the meta-modeling strategy introduced before. In that case, it is very convenient to set up the problem in parametric form and to convert it in a multi-dimensional one. Considering parameters as new state space dimensions opens the door to designing *in silico* experiments in which one readily (in real time) observes the behavior of the system under different conditions. The transient solution for a particular value of the propensity can then be computed by restricting the general solution to each particular value of this extra-coordinate. Even if the dimensionality of the problems increases even more than that demanded by the CME itself, this does not constitute major difficulty for PGD techniques that have easily solved problems in dimension 100 and more [35].

To illustrate this feature, we have simulated, for the ease of exposition, a cascade of only two terms. The operator related to a cascade is of the form \mathcal{A}={\mathcal{A}}_{1}+{\mathcal{A}}_{2}, with {\mathcal{A}}_{1} of the same form of the previous example and operator {\mathcal{A}}_{2} takes the form

{\mathcal{A}}_{2}P(z)=\frac{\beta {z}_{1}}{\beta {z}_{1}+\gamma}P\left(z-{e}_{2}\right)+\delta \left({z}_{2}+1\right)P\left(z+{e}_{2}\right)-\left(\frac{\beta {z}_{1}}{\beta {z}_{1}+\gamma}+\delta {z}_{2}\right)P(z),

(7)

where s *e*_{2} is the second standard basis of {\mathbb{R}}^{2}. In order to check the proposed technique, and for the ease of illustration, we have considered a cascade of only two terms, with the parameter *δ* as an unknown. Note that the solution (obtained in one execution of the program), see Figure 4, provides the solution for different values of *δ* that reproduces the ones in the literature [7]. These examples run (off-line phase) on some minutes in a laptop, while they can be evaluated (on-line phase, parametric phase) at kilohertz rates with no special hardware requirements.

These examples show how an efficient simulation of gene regulatory networks can be incorporated into surgical simulators even within the operating room. In the new section, we show how a similar parametric, multi-dimensional strategy can be developed for macroscopic descriptions of surgery.

### Simulation of liver palpation

As a representative example of the performance of the proposed technique at a macroscopic, continuum level, we have chosen a classical example of liver palpation during hepatic endoscopic resections [3]. For a detailed description of how resection could be simulated under MOR settings, we refer the interested reader to our former work [19]. For the sake of simplicity, we focus on the simulation of the interaction of surgical tools and organ, without the presence of cuts.

The problem of determining the response of an organ to the load transmitted by the contact with a surgical tool could be formulated as to determine the displacement at any point of the model, *u*(*x*,*y*,*z*), for any load position *s* and for any force vector orientation and module, *t*, thus rendering a problem defined in the physical space ({\mathbb{R}}^{3}), plus a six-dimensional state space ({\mathbb{R}}^{6}). Following the previous developments, we propose an iterative scheme that works by finding the *n* + 1-th term of the separated approximation in the form:

{u}_{j}^{n+1}(x,s)=\sum _{k=1}^{n}{X}_{j}^{k}(x)\xb7{Y}_{j}^{k}(s)+{R}_{j}(x)\xb7{S}_{j}(s)={u}_{j}^{n}(x,s)+{R}_{j}(x)\xb7{S}_{j}(s),

(8)

where we have assumed, for the sake of simplicity on the exposition, that the load is unitary and directed along the *z* axis (thus, no dependence on *t* is considered here). The term *u*_{
j
} refers to the *j*-th component of the displacement vector, *j* = 1,2,3 and where *R*(*x*) and *S*(*s*) are the sought functions that improve the approximation. Again, this iterative scheme is solved by introducing approximation given by Equation (8) into the weak form of the problem. This renders a non-linear problem on *R* and *S* that is solved, in our implementation, by using a fixed point, alternating directions algorithm. At each direction of the fixed point algorithm, we face again a non-linear problem, due to the non-linear constitutive equations of the liver tissue. In [40, 41], two distinct approaches have been pursued, namely an explicit one and a combination of PGD and asymptotic expansions on the variables of interest. The interested reader is committed to read these references for more details on the implementation.

Although the literature on the mechanical properties of the liver is not very detailed, we have assumed a Kirchhoff-Saint Venant material with Young’s modulus of 160 kPa, and a Poisson coefficient of 0.48, thus nearly incompressible [2]. Model’s solution was composed by a total of *N* = 167 functional pairs {X}_{j}^{k}(x)\xb7{Y}_{j}^{k}(s) (see Equation (8)). The third component (thus *j* = 3) of the first six modes {X}_{3}^{k}(x) is depicted in Figure 5. The same is done in Figure 6 for functions *Y*, although in this case they are defined only on the boundary of the domain.

### Performance of the technique

Both problems introduced before can be solved off-line in standard computing facilities in reasonable amounts of time. In our case, the solution to the problem of liver palpation, for instance, was solved in a workstation equipped with two Nehalem cores at 2.33 Ghz, 24 Gb RAM and 64 bits. The simulations took some 20 h to complete.

The solution provided by the method agrees well with reference FE solutions obtained employing full-Newton-Raphson iterative schemes. But, notably, the computed solution can be stored in a so compact form that the on-line evaluation of the parametric solution (meta-model) is possible on handheld devices such as smartphones and tablets. For instance, for Android-operated devices, an application has been developed (we call it iPGD and is freely downloadable from [42]) that runs the model on a Motorola Xoom tablet running Android 3.0 without problems (only the surface of the model is represented for simplicity, given the limitations of the Android OS), see Figure 7. The 25-Hz feedback rate necessary for continuous visual perception is achieved without problems.

For more sophisticated requirements, such as those dictated by haptic peripherals, a simple laptop (in our case a MacBook pro running MAC OSX 10.7.4, equipped with 4-Gb RAM and an Intel core i7 processor at 2.66 GHz) is enough to achieve this performance. Even performances higher than 500 Hz have been reported for some implementations [43] Additional file 1.

Additional file 1:**Movie: performance of the proposed technique for the liver problem.** This avi file shows the performance of the proposed method on a test implementation of the technique. In it, the load position is controlled with the help of the mouse, whereas the load orientation is controlled by a Wii joystick. (AVI 2 MB)