MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: reactionToSBML


reactionToSBML[reaction, options] returns a single <reaction.../> defiintion.

reactionToSBML[options] returns a single <reaction.../> defiintion.

reactionToSBML[{{arguments}, {arguments},...}] returns a single <listOfReactions.../> where each argument sequence corresponds to a single <reaction.../> defiintion.

reactionToSymbolicSBML[arguments] returns Symbolic SBML for a single <reaction.../> defiintion.

If neither the option reaction nor at least on of reactants or products are specified, then the first argument in each argument list must be the reaction.

New in version 2.1.4; modified in 2.1.5,2.5.27

Options

Option Value Description
fast "false" Value of SBML fast field for this reaction.
id none Value of SBMLid for the reaction. If it is not specified an id of the form reactionn is generated where n is an integer. The value of n is reset to 1 by newModel[], and is incremented by 1 each time an identifier needs to be generated.
kineticLaw none Expression used to determine the value of the SBML kineticLaw field. Any valid Mathematica expression (formula) may be used. If kineticLaw is omitted, the options parameters, timeUnits, and substanceUnits will be ignored.
modifiers {} Single modifier name or list of modifier names that are referenced in the kinetic law.
name none Value of the SBML name field. If not specified, the value of the SBML id field is used.
parameters none parameter definitons for the local parameters defined in kineticLaw.
Format is parameters→{p1def, p2def,...}
Each pdef can have any of the following forms:
id
id→value, where value is any number
id→{options}
where options are any of the following: metaid, name, notes, annotations, sboTerm (L2V2++ only), value
parameters→{k1→2, k2→3} is equivalent to parameters→{k1→{value→2}, k2→{value→3}}
products {} Single product name or list of product names. Will be ignored if reaction is specified.
productStoichiometry 1 Single number or expression or list of numbers and/or expressions, corresponding to the stoichiometries of the products in the same order that the products are specified. If fewer stoichiometries then products are specified, the missing stoichiometries are assumed to be equal to 1. This option will be ignored if the option reaction is specified.
reactants {} Single reactant name or list of reactant names. Will be ignored if reaction is specified.
reactantStoichiometry 1 Single number or expression or list of numbers and/or expressions, corresponding to the stoichiometries of the reactants in the same order that the reactants are specified. If fewer stoichiometries then reactants are specified, the missing stoichiometries are assumed to be equal to 1. This option will be ignored if the option reaction is specified.
reaction none Typical form is reaction->(r1+r2+...->p1+p2+...) where the ri and pi are the reactants and products of the reaction.

Numeric stoichiometry can be specified as in reaction->(A + 3 B -> X + 2.5 Y).

Non-numerical stoichiometry can be specified as in
reaction->(A + 3 B -> X + Stoichiometry[3*A/(4+n*B)] Y).

The use of an asterisk between the reactant/product and stoichiometry is optional, as in reaction->(A + 3*B -> X + 2.5*Y).

If reaction is specified, then reactants, products, reactantstoichiometry, and productStoichiometry are ignored.

reversible "true" Value of SBML reversible field for this reaction.
sboTerm none Term in the Systems Biology Ontology (SBML Level 2, Version 2++).

Example

The following input expression (optional line-feeds added to emphasize syntactical nesting):

reactionToSBML[
  reaction -> (A + 3Z -> 5Y + C), 
  kineticLaw -> k*A*B*Z^3/(k2 + A), 
  modifiers -> B,  
  parameters -> {
      k -> {value -> 1.5, name -> "Velocity Constant"}, 
      k2 -> {name -> "Other Constant"}},   
  name -> "My First Reaction"]
or
reactionToSBML[A + 3Z -> 5Y + C, 
  kineticLaw -> k*A*B*Z^3/(k2 + A), 
  modifiers -> B,  
  parameters -> {
      k -> {value -> 1.5, name -> "Velocity Constant"}, 
      k2 -> {name -> "Other Constant"}},   
  name -> "My First Reaction"]

will produce the following output:

<reaction id="reaction1"
    name="reaction1"
    reversible="true"
    fast="false">
 <listOfReactants>
  <speciesReference species="A"/>
  <speciesReference species="B">
   <math xmlns="http://www>w3>org/1998/Math/MathML">
    <cn type="integer">2</cn>
   </math>
  </speciesReference>
 </listOfReactants>
 <listOfProducts>
  <speciesReference species="C"/>
 </listOfProducts>
 <listOfModifiers/>
 <kineticLaw timeUnits="time"
     substanceUnits="substance">
  <math xmlns="http://www>w3>org/1998/Math/MathML">
   <apply>
    <times/>
    <ci>A</ci>
    <ci>B</ci>
    <ci>k</ci>
   </apply>
  </math>
  <listOfParameters>
   <parameter id="k"
       value="12"
       name="Rate Constant"/>
  </listOfParameters>
 </kineticLaw>
</reaction>

Go to the top of this page