SBML.org — the global portal for all things SBML

Addition of optional compartment to reactions

At the 2008 SBML Hackathon in Stellenbosch, South Africa, Jannie Hofmeyer pointed out inadequacies in the Level 2 specification's description of how to write rate expressions. The explanations given in the SBML specification were not sufficiently general, and failed to give sound guidance for how to handle complex reaction scenarios such as reactions taking place on membranes between two compartments. For Level 3, the description of reactions will be rewritten with these points in mind. (The SBML framework does not need to change structurally, but the explanations for how to represent rate laws will be amended to address Jannie's points.)

One change will be made, however, to enable software tools to work with multicompartment reactions more effectively. This is the addition of an optional attribute on the Reaction component that will allow a reaction definition to reference the compartment in which the reaction is assumed to take place. Normally, if a kinetic law is given, this information is not strictly necessary because it can also be embodied in the kinetic law (although it cannot always be guaranteed); however, when a reaction has no kinetic law, the new optional attribute may be a useful annotation for some software tools.

Changes compared to Level 2

The new UML diagram for reactions is shown here:


The change described here involves the addition of the optional compartment attribute to the Reaction object structure. The value of the attribute, if supplied, must be the identifier of an existing compartment in the model. There is no default value for the attribute.

Notable implications

The compartment attribute is optional and has no impact on the mathematics of a model. It is more akin to an annotation of the model.

As mentioned above, this attribute is not strictly necessary in SBML; a reaction's kinetic law formula (and possibly values that it references through variables set by SBML Rules elsewhere in the model) will by necessity include appropriate size corrections. The new compartment optional attribute is intended to help automatic processing of reactions. Some example scenarios where the attribute may be useful include the following:

  • If a model contains reactions without stated kinetic laws, a software tool may nevertheless be able to offer users the ability to take the model as a starting point and create generic rate expressions based on the reaction/modifier/product lists and general principles about common reaction types. However, doing so in a situation where the species are located in different compartments may require knowing in which compartment the reaction is supposed to take place. In this situation, an annotation on Reaction may be helpful.
  • Given a kinetic law mathematical formula for a reaction involving species in different compartments, it may be difficult or even impossible to determine, from inspection of the formula alone, the compartment in which the reaction is taking place. The compartment annotation may help tools that are designed for (e.g.) visualization or other purposes, and that do not have sophisticated formula analysis capabilities.


Please use our issue tracking system for any questions or suggestions about this website. This page was last modified 20:13, 8 July 2009.