MathSBML

MathSBML Home Page MathSBML Site Map

Model Builder:

SBMLStoichiometryMatrix
SBMLMassBalanceEquations
SBMLMassActionEquations
SBMLConservationMatrix


SBMLStoichiometryMatrix→True/False is an input option for the return option of SBMLRead. If the value is True (the default value is False), then the return value of SBMLRead will inlude the stoichiometry matrix as the value of the returned option of the same name, eg as SBMLStoichiometryMatrix→{{M11,M12,...},...}

SBMLMassBalanceEquations→True/False will calculate the mass balance equations based on the stoichiometry matrix. (Scroll down for mathematical definition and an example.)

SBMLMassActionEquations→True/False will calcluate the mass action ODE's based on the stoichiometry matrix, regardless of the kineticLaws supplied in the reactions. This allows one to calculate differential equations for a model even if it does not contain any kinetic laws. (Scroll down for mathematical definition and an example.)

SBMLConservationMatrix→True/False is an input option for the return option of SBMLRead. If the value is True (the default value is False), then the return value of SBMLRead will inlude the conservation matrix as the value of the returned option of the same name, eg as SBMLConservationMatrix→{{M11,M12,...},...}

See also conservationMatrix.

New in MathSBML version 2.4.2. SBMLConservationMatrix added in version 2.5.6.

Related Options


Notes

The stoichiometry matrix is calculated from the stoichiometry values of the reactants and products in a model's reactions. Every species and every reaction in the model is represented in the matrix. The columns represent the reactions, in the order in which they are defined in the model, and the rows represent the species, in order, as they are defined in the model. Verbose listings will identify the species by name in the output.

The mass balance equations are calculated as


where S is a vector of concentrations, N is the stoichiometry matrix, and v is a vector of rates, whose name is given by the option SBMLMassBalanceRateVector.

The mass action equations are calculated from the stoichiometry matrix using the standard definition of the law of mass action, and ignore the kinetic laws actually specified in the reaction. The name of the array of rate constants is taken to be the name specified as SBMLMassBalanceRateVector.

The conservation matrix is calculated using the function conservationMatrix.

In the current version it is assumed that all species are in the same compartment!!!!


Example

The following four reaction system:

S1→S2
5S3+S2→4S3+2S2
S3→S4
S4→S5

has the following stoichiometry matrix:


The five rows represent the five species, and the four columns represent the four reactions.

Let v=[ v1, v2, v3, v4]T be a column vector of kinetic rates; then the mass balance equations are

S1'=-v1
S2'=v1+v2
S3'=-v2-v3
S4'=v3-v4
S5'=v4

Using v instead as a vector of rate constants, the mass action equations become

S1'=-S1v1
S2'=S1v1+S2S35v2
S3'=-S2S35v2-S3v3
S4'=S3v3-S4v4
S5'=S4v4

We can create this model as stoic.xmlwith the following model builder commands:

    newModel["stoichiometry_matrix_example"];
    addCompartment[C];
    addSpecies[{S1, S2, S3, S4, S5}, initialAmount→1];
    addReaction[S1→S2, reversible→False];
    addReaction[5S3 + S2→4 S3 + 2S2, reversible→False];
    addReaction[S3→S4, reversible→False];
    addReaction[S4→S5, reversible→False];
    createModel["stoic.xml"];

Click here to see the file stoic.xml

To create an interpretive listing in HTML including all the relevant verbose options, enter

    SBMLWrite[inputfile→"stoic.xml", outputfile→"stoic.html", 
        context →None, SBMLMassBalanceRateVector→v, format→"HTML", 
        verboseStoichiometry→True,
        verboseMassBalanceEquations→True, 
        verboseMassActionEquations→True]
   

Click here to see the translated file stoic.html

Now read the model back in:

	m = SBMLRead["stoic.xml", context→None , SBMLMassBalanceRateVector→v]

The following output is produced (observe the values of SBMLStoichiometryMatrix, SBMLMassBalanceEquations, SBMLMassActionEquations):

Click to see the verbose listing as A Mathematica Notebook
Click to see the verbose listing as an HTML display of a Mathematica Notebook