MathSBML

MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: compartmentToSBML


compartmentToSBML[options] returns a <compartment .../> definition.

compartmentToSBML[{{options},{options},...}] returns a <listOfCompartments.../> where each option list corresponds to a single <compartment .../> definition.

compartmentToSymbolicSBML[options] returns Symbolic SBML for a <compartment .../> definition.

New in version 2.1.5. Modified in 2.3.0, 2.6.0.

Options

Options are identical to their SBML fields in the <compartment.../> definition.
Option Default Description
compartmentType No default compartmentType that this compartment represents (Starting in Level 2, Version 2).
id generated* Value of compartment id. *If not specified, an id of the form compartmentn, where n is an integer, is generated.
name Value of id Gives compartment name.
spatialDimensions 3 Gives compartment spatialDimension. Must be 0, 1, 2, or 3.
size No default Gives compartment size. Unless constant->false then the size of the compartment is fixed.
units No default Gives compartment units.
outside No default Gives compartment outside of this compartment.
constant true If true then compartment size is fixed. If false then compartment size may vary as a variable.
metaid No default metaid for this compartmentType
notes No default notes for this compartmentType
annotation No default annotation for this compartmentType

Experimental Options

If Arrays->True is set by an call to newModel[]: ArrayDimensions->{i->{min,max},j->{min,max},...} or {} (default).

Example 1: Single compartment definition:

compartmentToSBML[id-> c1,name->"boundary_layer", spatialDimension->2]
returns the string
<compartment id="c1" name="boundarylayer" spatialDimension="2"/>

Example 2: list of compartment definitions:

The input string:
compartmentToSBML[{{id->"c1", size-> 5},
                   {id->"c2", spatialDimension-> 2},
                   {id->"c3",name-> "unsized_compartment_3"}}]
returns
<listOfCompartments>
 <compartment id="c1" name="c1" size="5"/>
 <compartment id="c2" name="c2" spatialDimension="2"/>
 <compartment id="c3" name="unsized_compartment_3"/>
</listOfCompartments>"
Go to the top of this page