Systems Biology Simulation Core Library 1.2

Simulation Core Library: Documentation About Simulation Core Library The Java™ API Simulation Core Library comprises a collection of integrators for differential equation systems combined with an interpreter for the Systems Biology Markup Language (SBML).

See:
          Description

Packages
org.simulator This package simply contains a default main program to display very basic licensing terms and other information.
org.simulator.gui Contains classes that provide very basic functions that facilitate the creation of graphical user interfaces.
org.simulator.gui.img This package contains images and icons for the Simulation Core Library.
org.simulator.io Import and export of files.
org.simulator.math Classes that contain several mathematical operations.
org.simulator.math.odes The different solver classes that are all derived from AbstractDESSolver.
org.simulator.sbml Classes for storing and interpreting an SBML model.
org.simulator.sbml.astnode Classes for efficient numerical treatment of equations in form of abstract syntax trees.
org.simulator.sedml Classes for reading and executing SED-ML files.

 

Simulation Core Library: Documentation

About Simulation Core Library

The Java™ API Simulation Core Library comprises a collection of integrators for differential equation systems combined with an interpreter for the Systems Biology Markup Language (SBML). It is the first simulation library that is based on JSBML. The user can read an SBML model and simulate it with one of the provided numerical integration routines. All SBML levels and versions are supported. The library can easily be integrated into customized software, such as parameter estimation tools.

The provided integration methods

The Rosenbrock solver is best suitable for integrating stiff differential equation systems and also has a precise timing of SBML events. It is taken and adapted from Kotcon et al. Several solvers have been taken from the Apache Commons Math Library and wrapped into our library:

The following solvers have been implemented additionally and are fast, but not suitable for all differential equation systems:

Reading in a model and creating the respective differential equation system

A model can be read in by using the SBMLReader class of JSBML. With the model in memory the SBMLinterpreter can create the differential equation system that provides the basis for simulation:


      Model model = (new SBMLReader()).readSBML(sbmlfile).getModel();
SBMLinterpreter interpreter = new SBMLinterpreter(model);

Simulation of a differential equation system

The created differential equation system can then be simulated with a chosen solver and given time points. The result is stored in a data structure called MultiTable.


      AbstractDESSolver solver = new RosenbrockSolver();
double[] timePoints = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5};
MultiTable solution = solver.solve(interpreter, interpreter.getInitialValues(), timePoints);

Using SED-ML for simulation

The following example shows how to read in a File f (in SED-ML format) and how to run a simulation described in this file afterwards. The simulation results are stored in a MultiTable.


      SEDMLDocument doc = Libsedml.readDocument(f);
SedML sedml = doc.getSBMLModel();
Output wanted = sedml.getOutputs().get(0);
SedMLSBMLSimulatorExecutor exe = new SedMLSBMLSimulatorExecutor(sedml, wanted);
Map res = exe.runSimulations();
MultiTable solution = exe.processSimulationResults(wanted, res);

How to integrate Simulation Core Library into your software?

You just have to add the provided jar-file simulation-core-library.jar to the class path of your Java project. Then you have access to all classes of the library. This library depends on the following third-party libraries:

For SED-ML support, the following additional libraries are required: Please make sure to include the correct third-party libraries into your class path before working with this library.

Simulation of the models in the SBML Test Suite

You can run the simulation of the models in the SBML Test Suite by using the command below. TestSuiteDirectory denotes the directory containing your copy of the (entire) SBML test suite. Here we assume that the actual test cases are located in the sub-folder cases/semantic/ within the TestSuiteDirectory on your computer. The simulation is conducted for the models with numbers from first to last (these numbers are the indices of the models in the test suite, without leading zeros).


      java -cp SimulationCoreLibrary_vX.Y_incl-libs.jar org.simulator.SBMLTestSuiteRunner  TestSuiteDirectory/cases/semantic/ first last
    
Please note that, you have to replace _vX.Y_ within the library's name by the current release number, e.g., 1.2.

For example, if you like to simulate all test suite models ranging from 00259 to 00326, simply call the algorithm with first = 259 and last = 326.

Note that for the sake of a simple configuration, the simulation is started using default settings for the selection of the integration routine, step size etc.

Simulation of the models from BioModels database

In a similar way, you can also download and simulate all models from BioModels database:


      java -cp SimulationCoreLibrary_vX.Y_incl-libs.jar org.simulator.TestBiomodels BioModelsDirectory/ first last
    
Again, you have to replace _vX.Y_ within the library's name by the current release number, e.g., 1.2. Please use the variables first and last without leading zeros as in the previous case. The variable BioModelsDirectory gives the path to your local copy of the BioModels database.

As in the previous case, the simulation is conducted using default settings.


Generated December 13 2012