From System Biology Format Converter framework (SBFC)
Jump to: navigation, search

Conversion from SBML to XPP

About SBML

SBML is a machine-readable format for representing models. It's oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML's framework is suitable for representing models commonly found in research on a number of topics, including cell signaling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. If you want to know more, you can read the Basic Introduction on SBML

About XPP

XPP is a numerical analysis software. It permits to solve differential equations, difference equations, delay equations, functional equations, boundary value problems, and stochastic equations. To know more, you can read the What is it? page.


This converter is not maintained any more, last updates are from 2007. The recommended converter to use is the new java version.

However, this converter should work on simple SBML L2V1 models.

Most of the mathematical parts of the SBML model are converted into a set of declarations or equations that can be executed in XPP.

The conversion is performed in one XSLT pass, but using five stylesheets.

1. Test if we can convert this SBML model

We are calling several templates and running several tests to see if we can reasonably convert the SBML model.
First we count the number of XPP parameters that would be created, and if this number is above 300, XPP will not be able to handle the file. Xpp parameter are compartment, global parameter, species with their attribute constant=true and all local parameter, as they are always constant. 
Second, if there is any events we cannot convert the model. Also, the program was written for SBML level 2 version 1, so will disregard any new SBML elements introduced since then.
Third, we control the units of the model, if there is user-defined units that do not change an SBML built-in unit, we cannot currently convert this model.
Last, we check the MathML to see if there is any user-defined functions or some MathML functions that we cannot handle in XPP, in that case we cannot convert the model either.

2. Writing the XPP file
Here is what we wrote to the ode file :
all SBML ids are changed to comply to the XPP rules. In XPP id should be 9 character long maximum and we have to put the local parameter in the same id space as all the others.
the name of the SBML model as a comment, in general we put a comment for each SBML element that we include in the ode file
we declare several functions used in the MathML expression and that do not exist by default in XPP, like root, power,..
the compartment elements as para or init
the global parameters elements as para or init
the species elements as para or init
d species/dt=ODE (if this species actually be affected by reaction/kineticLaw) (ODE should be concentration/time, but kineticLaw usually be substance/time, depending on species unit) (in ODE all the reaction/kineticLaw will be represented as RXNindex)
we set several XPP values to be able to simulate the model
done (the word "done" as to be written at the end of an Xpp ode file)

SBML elements not supported

  • event
  • constraint
  • initialAssignment
  • stoichiometryMath
  • complex units
  • some math operators allowed in SBML are not supported by XPP

Information lost in the conversion

  • compartment
  • units
  • sboTerm
  • notes
  • most annotations

Quick Setup

   To generate an XPP-Aut ode file from an SBML model, run:

      Xalan MyModel_sbml.xml sbml_xpp16.xsl > MyModel.xpp

   You can download the XSL stylesheets in the section below.


You have to download these five XSL stylesheets and put them in the same folder

Getting Help and Support

In case you discover a bug within SBFC or request new features, please let us know. There are two dedicated trackers:

For general discussions about SBFC, please use the forum:

sbfc-forum [at]

If you need further support or you wish to develop new modules in SBFC you can contact the team using the following e-mail address:

sbfc-devel [at]

Other known converters