Department of Computer Science, University of California, Santa Barbara, California 93106, USA

Department of Information Technology, Uppsala University, Uppsala 75105, Box 337, Sweden

UPMARC, Uppsala Programming for Multicore Architectures Research Center, Uppsala, Sweden

Abstract

Background

Experiments

Results

We have developed URDME, a flexible software framework for general stochastic reaction-transport modeling and simulation. URDME uses **U**nstructured triangular and tetrahedral meshes to resolve general geometries, and relies on the **R**eaction-**D**iffusion **M**aster **E**quation formalism to model the processes under study. An interface to a mature geometry and mesh handling external software (Comsol Multiphysics) provides for a stable and interactive environment for model construction. The core simulation routines are logically separated from the model building interface and written in a low-level language for computational efficiency. The connection to the geometry handling software is realized via a Matlab interface which facilitates script computing, data management, and post-processing. For practitioners, the software therefore behaves much as an interactive Matlab toolbox. At the same time, it is possible to modify and extend URDME with newly developed simulation routines. Since the overall design effectively hides the complexity of managing the geometry and meshes, this means that newly developed methods may be tested in a realistic setting already at an early stage of development.

Conclusions

In this paper we demonstrate, in a series of examples with high relevance to the molecular systems biology community, that the proposed software framework is a useful tool for both practitioners and developers of spatial stochastic simulation algorithms. Through the combined efforts of algorithm development and improved modeling accuracy, increasingly complex biological models become feasible to study through computational methods. URDME is freely available at

Background

Stochastic simulation of reaction kinetics has emerged as an important computational tool in molecular systems biology. In cases for which mean-field analysis has been shown to be insufficient, stochastic models provide a more accurate, yet computationally tractable alternative

If the system can be assumed to be spatially homogeneous, or well-stirred, simulations are simplified considerably compared to a spatially varying setting. However, there are many phenomena inside the living cell for which spatial effects play an important role

Modern experimental techniques can provide information not only on the total copy numbers but also on the spatial localization of individual molecules

For most applications, a large number of sample realizations need to be generated to allow for a useful statistical analysis. Exploring parameter regimes or estimating responses to different stimuli adds to the complexity so that the generation of tens of thousands of independent realizations is not uncommon. Computational efficiency is therefore an important concern and has motivated research in many types of approximate or optimized methods (see for example

Despite advances in the development of approximate methods, spatial stochastic simulation in realistic geometries is still challenging. One of the main reasons is the complexity involved in handling the 3D geometry and the associated mesh. The purpose with this paper is to introduce URDME, a modular software framework for spatial stochastic simulation. The goal of URDME is twofold: firstly, it provides applied users with a powerful and user-friendly modeling environment that supports realistic geometries. Secondly, URDME facilitates the development of new computational methods by taking care of the technical details concerning the geometry, the mesh generation, and the assembly of local rate constants. By providing a well-defined interface to the modeling environment, new algorithms can be incorporated into the URDME framework as plug-in solvers. We anticipate that this modular structure will facilitate the development and dissemination of advanced simulation methodologies to real-world molecular biology applications.

URDME differs from other public domain software for mesoscopic simulations such as MesoRD

Implementation

In this section we describe how the URDME framework is structured, how it is used to simulate a model, and how to interface with it to add new simulation algorithms. For more details we refer to the software manual

**urdme.tar.gz.** The current release of URDME. Also available for download via

Click here for file

Overview

The URDME framework consists of three logical layers connected by well-defined interfaces (see Figure

**The URDME framework consists of three loosely coupled layers.** Solvers reside at the bottom level and are most often written in a compiled language like ANSI-C. The middle layer provides for interfaces between the solvers and the top-level mesh-generation infrastructure. Both the top- and the bottom-layer may be replaced by other software as long as the middle level is extended appropriately

**The URDME framework consists of three loosely coupled layers.** Solvers reside at the bottom level and are most often written in a compiled language like ANSI-C. The middle layer provides for interfaces between the solvers and the top-level mesh-generation infrastructure. Both the top- and the bottom-layer may be replaced by other software as long as the middle level is extended appropriately.

With this modular structure, the top level can be replaced by other mesh generation software such as for example Gmsh

The default core solver at the bottom level is an optimized implementation of the Next Subvolume Method (NSM)

Using URDME for model development and simulation

The process of analyzing a reaction-diffusion model with URDME begins with the creation of a Comsol model file that defines the geometry of the domain, including (optionally) the subdomains where specific

**Summary of the URDME software infrastructure.** (**A**) URDME flow diagram for the complete simulation process. (**B**) Process flow diagram for the stochastic simulation step of (A) using the NSM solver. (**C**) DFSP solver flow diagram, an alternative to (B) for the stochastic simulation step

**Summary of the URDME software infrastructure.** (**A**) URDME flow diagram for the complete simulation process. (**B**) Process flow diagram for the stochastic simulation step of (A) using the NSM solver. (**C**) DFSP solver flow diagram, an alternative to (B) for the stochastic simulation step.

Apart from defining the geometry, the user also needs to create two additional program files to be used by URDME. The first is a Matlab function (referred to as the

The second program file a user must create is a templated C-program file that defines the propensity functions for the chemical reactions of the model. This file defines one function for each chemical reaction in the system and are called by the core solver routines to calculate the propensity for each reaction in each voxel. The propensity function template requires the output to depend only on the system state at the current time, but is unique to a voxel and allows for additional data to be passed on to the function. The propensity function file is later automatically compiled and linked with the core solver, resulting in a highly efficient solution procedure.

Once the model data structure has been exported to Matlab and the model and propensity functions have been defined, the next step is to let URDME execute a simulation of the model. From the users’ perspective, simulation now only requires to invoke the urdme function in Matlab with the proper arguments,

>> model = urdme(model,@model_file, {’Propensities’,’propensity_file’});

The arguments passed are the Comsol data structure, the model function, the propensity functions, and various optional arguments. URDME now invokes GCC to compile the propensity function file with the specified solver (defaulting to NSM) to create a dedicated executable for the model. This executable is then invoked using the model and geometry data structure as inputs. Note that compilation and execution of the low-level components of the system is fully automatic, and requires no additional action from the user. Following a successful execution of the core solver the urdme function returns a modified model data structure with a single stochastic solution trajectory attached to it.

Since the layers of URDME are decoupled, it is also possible to execute the solvers in non-interactive batch mode to allow for more flexible result generation and distribution of computations on a multicore platform. For example, to conduct the simulation in background mode and write the resulting trajectory to the file ‘output.mat’ one simply invokes urdme with a few additional arguments,

>> model = urdme(model,@model_file, {’Propensities’,’propensity_file’, ... ’Mode’,’bg’,’Output’,’output.mat’});

Here, control returns to Matlab directly after execution of the solver executable, without waiting for it to complete.

Visualization and post-processing are important components in most simulation software. Once a URDME simulation is complete, users can easily visualize the spatially varying concentration of biochemical species in their model by using Matlab’s interface to the Comsol graphics routines. Examples of this will be presented in the Results section. Similarly, most modeling and simulation projects require custom data analysis once the simulation data has been generated. To facilitate this, URDME supports the creation of post-processing scripts in Matlab using its native high-level scripting language and computational libraries. Examples of complex post-processing routines implemented as Matlab functions and scripts are available as part of the example directories in the URDME software distribution package, and in Additional file

**minsweep.tar.gz.** Model files required to run the first example in the main paper.

Click here for file

**benchmark.tar.gz.** Model files required to run the second example in the main paper.

Click here for file

**neuron.tar.gz.** Model files required to run the third example in the main paper.

Click here for file

Structure and implementation of core simulation algorithms

Taken together, the components of URDME that was introduced in the previous section create a flexible and expandable platform. While an applied user need not know any details about how a core solver is implemented, a developer of a new simulation algorithm can use the infrastructure to develop a plug-in solver to URDME. Figure

The source code of the solver itself can formally consist of any number of files in any language as long as the Makefile can create the final executable called by the middle-level interface. To enable a seamless integration with the URDME Matlab interface, the URDME C API contains library routines to read and parse the data structures generated by the URDME model files. These API routines will parse all data-structures required by the core NSM solver. A plug-in solver that needs additional input will have to make sure that these are parsed correctly as part of the solver main routines. To pass such additional data to the solver, it need only be appended to the ‘model.urdme’ field, either by the Matlab model file, or by a pre-execution script (compare Figure

All current solvers are written in ANSI-C and use GNU-style Makefiles. The process of integrating a simulation algorithm in the URDME framework is described in more detail in

In conclusion, when all the components of a solver is in place as described above, the only difference to an end-user of URDME is a single additional argument

>> model = urdme(model,@model_file, {’Propensities’,’propensity_file’, ... ’Solver’,’dfsp’});

The use of the URDME framework to implement and analyze the performance of a simulation algorithm will be further exemplified in the Results section.

Results

In this section we will use three different examples to illustrate how the design of URDME makes the software framework a useful tool to accomplish different simulation tasks.

In the first example we show how an established model from the molecular systems biology literature is simulated in URDME. This example illustrates the powerful nature of the URDME scripting environment in setting up and conducting a parameter sweep.

In the second example we demonstrate how URDME can aid in the development of efficient simulation algorithms by explaining how a novel method, the Diffusive Finite State Projection (DFSP)

As a final example we simulate a model of molecular transport in a neuron. Here, the unstructured mesh is a critical feature in order to be able to resolve the complex geometry with a feasible number of voxels. We also show with this example how a model of active, molecular motor driven transport as proposed in

Simulating Min oscillations in

In

To illustrate how to use URDME to conduct a parameter sweep we will simulate the Min-system for increasing lengths of the bacterium and observe the behavior of the oscillations. The example is representative for how experiments using different sets of parameters can be defined and organized with the current version of URDME. A detailed account for how to create all model files to run simulations of the model from

**Simulating Min oscillations in****for varying length of the cell.** (**A**) Geometry and mesh modeling of an **B**) Temporal average concentration of MinD protein as a function of position along the long axis of the **C**) Six **D**) Parameter sweep shows how the relative concentration of MinD changes as the bacterium grows

**Simulating Min oscillations in****for varying length of the cell.** (**A**) Geometry and mesh modeling of an **B**) Temporal average concentration of MinD protein as a function of position along the long axis of the **C**) Six **D**) Parameter sweep shows how the relative concentration of MinD changes as the bacterium grows.

Below we show a Matlab script that simulates the Min

% Generate the E. coli cell by

% merging two cells with separation

% xsep(i) along the positive x-axis

fem = coli_model(xsep(i));

% run an instance of URDME in

% background mode

fem = urdme(fem,@huang,

{’Propensities’,’huang’, ...

’Mode’,’bg’, ...

’Outfile’,sprintf

(’results/out%d.mat’,i)});

% save input separately for later use

save(sprintf(’results/in%d.mat’,i)

,’fem’);

end

The results of the parameter sweep is summarized in Figure

For values of the parameter ‘xsep’ less than about 2

In this example, URDME is invoked in background mode allowing for several parameter cases to be run in parallel on a multicore workstation. Instead of returning the results directly in the workspace, we direct URDME to store the result files and the input files on disk for later post-processing.

Developing and benchmarking a new algorithm for spatial stochastic simulation

Generally, a large fraction of the effort in developing simulation tools goes into software infrastructure as opposed to code pertaining to the underlying solver algorithms. URDME is designed to provide that infrastructure. The first two layers of the framework provides handling of geometry and meshing, assembly of diffusion jump-rate constants, model integration, pre- and post-processing and data visualization. In this section we will illustrate how to use URDME’s infrastructure to enhance the development and benchmarking of a new stochastic simulation algorithm, DFSP

Since the diffusion intensity scales differently than the reaction propensities with increasing mesh resolution, diffusion events often occur on a faster time scale than the reactions in the system. Effectively, as the mesh becomes finer a larger and larger percentage of the simulation events will be diffusion jumps. A similar phenomenon, stochastic stiffness, often occurs in simulations of well-stirred models and has led to extensive methods development _{D}, and then samples from this distribution to redistribute the molecules. DFSP can in this way give great enhancements in simulation speed at the cost of approximation errors which can be controlled (see

Integration of a new solver into the URDME framework is designed to be a simple process, with the largest fraction of the required new code being specific to the underlying solver algorithm. URDME solvers have three main components: the solver source code, a Makefile, and an optional pre-execution script. The Makefile creates a standalone Unix executable from the source code. The DFSP solver uses a pre-execution script in Matlab to calculate data specific to the algorithm. This data is then added to the input file that URDME creates upon execution of the solver. Table

**Directory**

**File**

**Description**

^{This structure shows the design pattern for solver integration into the URDME framework (see 30).}

urdme/build

Makefile.dfsp

Solver Makefile.

urdme/src/dfsp

dfsp.c

Solver entry point and data initialization.

dfsp.h

DFSP header file.

dfspcore.c

Main entry point for the solver.

dfsp_reactions.c

Simulates reaction events.

dfsp_diffusion.c

Simulates diffusion events.

urdme/msrc

urdme_init_dfsp.m

Matlab pre-execution script.

% DFSP Performance and Error benchmark

% code

tic;

solution = urdme(fem,@fange,{’Solver’, ’nsm’,’Propensities’,’fange’}); nsm_simulation_time = toc

nsm_period= find_mincde_period(solution) for tau_D = [ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5 ]

tic;

solution = urdme(fem,@fange,

{’Propensities’,’fange’,’Solver’,

’dfsp’,...

’tau’,tau_D,’max_jump’,10,

’DFSP_cache’,

dfsp_cache_filename});

dfsp_simulation_time = toc

dfsp_period = find_mincde_period

(solution)

error = abs(dfsp_period-nsm_period)/

nsm_period

end

In addition to the lower integration overhead of implementing a new algorithm in the URDME framework, URDME allows developers to easily benchmark their solvers. The code block above shows a Matlab script that sets up a benchmarking experiment to assess the performance and error of the DFSP solver when simulating the model for Min-oscillations described in the first example in this paper. This code also illustrates the calling signature for the function when used with the NSM and DFSP solvers. The DFSP solver takes the additional arguments ‘tau’ as the time-step, ‘max_jump’ as the maximum spatial jump distance, and ‘DFSP_cache’ as the cache file used to store the data specific to the DFSP algorithm. The utility function finds the peak period of the oscillations through straightforward spectral analysis using built-in routines in the Matlab scripting environment, again illustrating the advantage of using the scripting layer’s post-processing capabilities. Figure _{D}<0.1 produces simulation results faster than NSM and with good accuracy in the oscillation period.

**DFSP benchmark results.** (**A**) Performance of DFSP shows a comparison of simulation times for DFSP at varying _{D}values (red) and NSM (blue), and the DFSP speedup factor (green). For this model, DFSP outperforms NSM for _{D}>0.01. (**B**) Error in DFSP shows the relative error in MinCDE oscillation period (red) and the oscillation patterns for three simulations. Simulations with _{D}<0.1 produces coherent oscillation patterns and result in a negligible error. The system was simulated to a final time 900s. Simulations were performed on a 1.8 Ghz Intel Core i7 processor

**DFSP benchmark results.** (**A**) Performance of DFSP shows a comparison of simulation times for DFSP at varying _{D}values (red) and NSM (blue), and the DFSP speedup factor (green). For this model, DFSP outperforms NSM for _{D}>0.01. (**B**) Error in DFSP shows the relative error in MinCDE oscillation period (red) and the oscillation patterns for three simulations. Simulations with _{D}<0.1 produces coherent oscillation patterns and result in a negligible error. The system was simulated to a final time 900s. Simulations were performed on a 1.8 Ghz Intel Core i7 processor.

Active transport in a neuron

Diffusion is the dominating mechanism of molecular transport in prokaryotes such as

Due to the ubiquity of active transport in biological systems, it is important that simulation software have the capability to handle mesoscopic models with general transport mechanisms. In

Active transport of cellular cargo is of fundamental importance to maintain the highly polarized state of a healthy neuron. In the axon, microtubules are uniformly oriented with plus-end towards the soma and minus-end towards the synapse. Kinesin transports cargo in the anterograde direction, from the cell body to the synapse. For example, kinesin drive the transport of synaptic vesicles from the cell body through the axon where they are subsequently docked to the plasma membrane in the presynaptic terminus. Dynein drives transport in the opposite direction (retrograde transport) in the axon, and may aid in transporting for example RNA from the cell body to the dendrites

To illustrate how diffusion and active transport can simultaneously be modeled with URDME in the neuron geometry shown in Figure ^{Vk} or with a dynein motor as ^{Vd}(R2–R5). When bound to a filament, _{kd}/_{dk} then dictates the direction of net transport. Finally,

**Geometry and mesh for a model of a neuron.** The neuron geometry (**A**) is based on a artistic CAD rendering generated with the public domain version of the software Blender (**B**). For a mathematical background on how to obtain these constants on the unstructured mesh, see

**Geometry and mesh for a model of a neuron.** The neuron geometry (**A**) is based on a artistic CAD rendering generated with the public domain version of the software Blender (**B**). For a mathematical background on how to obtain these constants on the unstructured mesh, see

**Reaction**

**Description**

**Cellular location**

^{Model of active transport of a cargo species V that is transported on microtubule filaments in a direction determined by the orientation of the fibers (as modeled by a velocity field) and the current motor protein bound to the fiber (kinesin or dynein).}

(R1)

Creation of cargo

Cell body

(R2–R5)

Binding of

All domains

(R6,R7)

Reversal of direction

Microtubule

(R8)

Degradation of

All domains

To illustrate the ability of cargo to localize to different compartments of the cell depending on the dominating motor protein we consider the following scenario. First, we let _{dk}=10_{kd}, so that on the average, kinesin will spend more time bound to the microtubule than dynein will do. In this case, the cargo will travel through the axon and eventually localize to the axon terminus. After half of the total simulation time has elapsed, the situation is reversed and _{kd}=10_{dk}such that the cargo will localize to the dendrites.

Figure

**Localization as a function of the binding rates to microtubules for the different motor proteins.** Normalized concentration of _{kd}=10_{dk}and cargo localizes to the axon due to the larger fraction of time spent in the kinesin binding state. At time

**Localization as a function of the binding rates to microtubules for the different motor proteins.** Normalized concentration of _{kd}=10_{dk}and cargo localizes to the axon due to the larger fraction of time spent in the kinesin binding state. At time

In order to setup this simulation in URDME, a Matlab function for the velocity field modeling the average orientation of the fibers at any point in the domain needs to be provided. Obviously, specification of this velocity field requires biological knowledge. The ability to work in the Matlab environment greatly simplifies parametrization of the velocity field. Since this geometry was given as a surface mesh, which is also often the case when the domain is obtained from cell imaging, we have no analytical expression for the parametrization of the geometry to rely on. In this example we want the velocity field to trace the axon and dendrite structures. To achieve this, we first compute surface normals to all triangles on the surface of the neuron. An interpolation table containing vectors with base in the centroids in the triangles of the surface mesh and pointing in the direction of suitably chosen reference points was thus constructed. For simplicity, we only used two different reference points, one near the center of the cell body and the other beyond the axon terminus along the long axis of the axon. The smoothness of the velocity field can easily be improved by adding more reference points. For any point inside the domain, we evaluate the velocity by nearest neighbor interpolation using the interpolation table. From this description of the microtubule network and the information about the mesh, utility routines available as add-ons to the basic URDME package can be used to assemble jump rate constants to be used in the definition of the stochastic transport process in much the same way as for diffusion

Discussion

The design of URDME is motivated by both modeling and algorithm development. Systems biology investigations are typically computational intensive, and often require large ensembles of trajectories spanning parameter space to match data, or to conduct a sensitivity and robustness analysis.

Development of more efficient simulation methods is needed to make such large scale investigations feasible. However, due to the overhead of handling complex geometries, mesh generation and visualization of results, algorithm developers often tend to consider only simple test models in simple geometries, often restricted to one or two spatial dimensions. While this can be enough to illustrate the potential benefits of a new method, the resulting software is often not general enough for use on complex biological models. URDME aims to bridge this gap by facilitating for method developers by providing a large part of the infrastructure needed for simulation of realistic models. We exemplified this in the paper by the extension of the approximate algorithm DFSP to a full 3D simulation.

The theory and methodology for spatial stochastic simulation is still undergoing extensive development, and no single mathematical modeling framework or method has emerged as a

Another benefit of the modular architecture is that it simplifies the use of different execution models for the simulations. As part of work on methods for enactment of computation in grid environments, we are developing a URDME server module that enables remote execution in distributed computing environments

Comparison of spatial stochastic software packages

To further illustrate the design of our software, we have compared its features to two other publicly available packages for mesoscopic spatial stochastic simulation. Table

**URDME 1.1**

**MesoRD 1.0**

**STEPS 1.3**

^{This table summarizes the main differences and similarities between the software packages URDME, MesoRD and STEPS.}

Interface

Matlab & Comsol

Command line

Python

Simple GUI (Windows)

Visualization

Matlab & Comsol

OpenGL tool

PyOpenGL tool

Matlab toolbox

Post-processing

Matlab

3rd party

Python

SBML support

Conversion tool

SBML L2v4

Import module

(no geometry)

+ CSG geometry

(no geometry)

Edit Geometry

Comsol

SBML

3rd party

Mesh Type

Vertex centered

Uniform Cartesian

Body centered

Tetrahedrons

Tetrahedrons

Algorithms

NSM, DFSP

NSM

Spatial-SSA

+ extendable

+non-local extension

Propensity types

All

SBML (MathML)

Mass-action

Model Features

compartments

compartments

compartments

surfaces

surfaces

volume diffusion

volume diffusion

volume diffusion

surface diffusion

directed transport

There are three significant ways a user interacts with a spatial stochastic software package: the environment for model development, execution of a simulation, and post-processing and analysis of the data generated by the simulation.

The interface and model development environment used by URDME and STEPS are similar in that both are closely tied to a programming language environment: Matlab in the case of URDME and Python for STEPS. URDME provides a single function entry point, and models are developed in external programming files. This design pattern follows that of the Matlab ODE suite. STEPS provides an object oriented Python interface for creation, simulation and post-processing of models. STEPS claims that a programmatic interface offers significant advantages over non-interactive software interface

The major differences between URDME and STEPS are the feature set and the performance. The execution platform of URDME is the Matlab-Comsol environment, thus URDME has full access to the scientific libraries of Matlab as well as the advanced geometry and mesh handling interface of Comsol. Another major difference is one of aim. URDME is developed by a team of biological model developers as well as of algorithm developers, and it aims itself at both communities. This is reflected in its expandable solver interface and performance centric design.

In contrast to the design pattern used in URDME and STEPS, MesoRD functions as a command line program that uses an input file in the Systems Biology Markup Language (SBML)

The post-processing environment of URDME is closely integrated into Matlab. MesoRD provides a Matlab toolbox for analyzing the simulation data files. STEPS utilizes the Python programming environment and packages such as NumPy, SciPy, and Matplotlib for post-processing and analysis.

Compared to static XML input files, the programmatic paradigm used by URDME and STEPS provides a more powerful but also more complex modeling environment. Constructing model files using a complete programming language reduces the restrictions imposed on the software by the model format. For example, the model of the neuron presented in the Results section could not have been described by an SBML document, nor the extended SBML format used by MesoRD. Since propensities in URDME are defined in a program file, any type of functional propensity can be used in URDME models, including Michaelis-Menten and Hill term style propensities, and even arbitrary logical expressions can be employed.

This offers great flexibility in terms of the models that can be simulated, but also places more responsibility on the end-user. MesoRD uses MathML as part of the SBML definition, which allows the use of any mathematical expression in the propensities and facilitates handling of units and error checking. This is a powerful and robust, but also a computationally very expensive strategy. The STEPS reaction object only supports mass action kinetics, which results in an efficient but less flexible strategy.

In addition to having the most efficient and expandable design of the model propensity, URDME also provides the largest set of geometry and mesh model features of the three software packages. URDME supports volume compartments with internal and external 2D surfaces embedded in the 3D geometry, as well as diffusion and reactions on surfaces and in the 3D volume. URDME also supports directed transport (convection) in 3D through an add-on module. STEPS 1.3 supports 3D compartments and volume diffusion. It is capable of localizing species to a curved surface embedded in 3D, but does not support surface diffusion. MesoRD 1.0 supports 3D compartments and volume diffusion only. To represent cellular membranes, their models typically use a small 3D volume on the exterior of the domain.

In summary, as a consequence of the design of the model environment, MesoRD is simpler to learn and use than both URDME and STEPS and also offers a better support for e.g. handling units, but the latter two offer a much more flexible and efficient modeling and simulation environment. In addition to the programmatic environment, both URDME and STEPS provide limited support for SBML. URDME has an experimental conversion utility that will create templates for the model and propensity file from an SBML description of the chemical reactions, see Additional file

**urdme_sbml_converter.tar.gz.** SBML conversion tool to create URDME model files from a SBML model file describing chemical reactions.

Click here for file

Simulation performance

To compare the performance of the software packages, we implemented the model of Min oscillations in

**validation.pdf.** Simulation results for a simple diffusion problem on the surface of a sphere and for the Min system

Click here for file

**urdme_software_comparision.tar.gz.** Model files and scripts used to conduct the performance benchmark in the discussion section and the simulations described in Additional file

Click here for file

**Performance comparison of the three software packages for an increasing number of voxels.** Each point shows the mean and the error bars show the standard deviation of a ensemble of

**Performance comparison of the three software packages for an increasing number of voxels.** Each point shows the mean and the error bars show the standard deviation of a ensemble of

The numerical treatment of mesoscopic diffusion

URDME emphasizes the use of unstructured tetrahedral and triangular meshes to discretize the geometry. Unstructured meshes offer distinct advantages over Cartesian meshes for resolving complex geometries with non-trivial boundaries and they are more flexible than cut-cell approaches when it comes to describing processes occurring on a curved boundary embedded in 3D space, such as the cell membrane of a spherical cell or the nuclear membrane

The quality of the tetrahedral mesh is an important aspect of a numerical discretization. An in-depth discussion of the requirements on the mesh for use in the mesoscopic model is given in

The influence of mesh quality on RDME simulations on unstructured meshes in 3D was studied for several different discretization schemes in

Using MesoRD, surfaces in a 3D model are modeled as volume geometry objects by ensuring that the thickness of the membrane is small compared to its size, approaching a true 2D model as the thickness of the membrane becomes small. Unless one desires to resolve some dynamics on such high level of detail as to consider vertical movement of molecules in the membrane, this will be unnecessarily expensive since the mesh elements has to be sufficiently small to resolve the narrow 3D volume. The mesh generation in MesoRD needs several grid points in the extent of a membrane to give a fully connected diffusion volume ^{05} molecules to compute the mean absorption time, the error was ≈0.2

For complex models with both volume diffusion, surface diffusion, and reactions, it is difficult to predict what impact different sources of error in the diffusion will have on the output metric of interest. For example, for the Min system used to benchmark the different software packages in Figure

In addition to errors caused by the discretization, errors intrinsic to the RDME mathematical model arise for highly diffusion limited reactions when the voxels become very small

Conclusions

As demonstrated by the examples in this paper, the URDME infrastructure offers great flexibility at the stage of model construction and execution. Using a simple script in Matlab, URDME was used to set up and conduct a series of experiments in which the geometry of an

The URDME software framework offers unique features for both model and methods developers in computational systems biology. The support of unstructured meshes provides the capability to create models with a complex geometry that closely match the physical descriptions of the systems under study. URDME integrates easily with widely used scientific computing software to provide a versatile platform for mathematical and computational modeling, allowing for the implementation of complex and customized models and pre- and post-processing routines. The modular design ensures extensibility and interchangeability of the third-party tools used for model specification and mesh generation, as well as of the core simulation algorithms.

Availability and requirements

· Project name: URDME.

· Project home page:

· Operating systems: Linux, MacOS X.

· Programming language: C, Matlab, Bash shell script.

· Other requirements: GNU GCC version ≥ 4.2, Matlab, Comsol Multiphysics 3.5a.

· License: GNU General Public License, version 3.

· Any restrictions to use by non-academics: none.

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

BD, SE and AH contributed equally to the design and implementation of the software and to the preparation of this paper. All authors read and approved the final manuscript.

Funding

The Swedish Graduate School in Mathematics and Computing (AH, SE), the Swedish Research Council and the Linnaeus centre of excellence UPMARC (SE), the Royal Swedish Academy of Sciences FOA08H-109, FOA09H-63, FOA09H-64 (AH), SSF grant A3 02:124 (AH), U.S. NSF grant DMS-1001012, U.S DOE award DE-FG02-04ER25621, U.S. NSF IGERT DGE-02-21715, Institute for Collaborative Biotechnologies grant W911NF-09-0001 from the U.S. Army Research Office (BD) and the National Institute of Biomedial Imaging And Bioengineering of the National Institute of Health under Award Number R01 EB014877 (BD,AH). The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute of Health.

Acknowledgements

We would like to acknowledge the contribution by Josef Cullhed to the implementation of an early version of the software and Mark Sturrock for his thorough testing of the beta-release. The authors are grateful to Per Lötstedt, Linda Petzold, and Stefan Hellander for valuable inputs during the development of URDME and the writing of this manuscript.