MathSBML

MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: add/remove/modifyReaction


addReaction[options] adds a <reaction ... /> definition to the current model. Options are the same as reactionToSBML.

addReaction[r, options] is the same as addReaction[reaction->r, optoins].

The reaction may be specified as s1*r1+s2*r2+...->S1*p1+S2*p2+..., where r1,r2,... are source reactants, p1, p2,... are product reactants, and s1, s2, ... and S1, S2, ... are numeric stoichiometries. Symbolic stoichiometry can be specified with the Stoichiometry[expression] function. Integer stoichiometrys will be encoded as inline xml (stoichiometry="value"); expressions will be encoded as MathML.

Any species specified in the reaction that have not previously been defined are automatically added to the first compartment in the model. If no compartments have been previously defined a new compartment is created.

If an id is not specified it is automatically generated.

modifyReaction[options] modifies a reaction. Options are the same as reactionToSBML.

modifyReaction[x, options] is the same as modifyReaction[id->x, options].

removeReaction[id] removes the specified reaction from the model.

addReaction, removeReaction, modifyReaction new in 2.2.0. Revised in 2.3.24.

Example


Input:  newModel[echo->True,notes->""];
        addReaction[S + Enz -> X, kineticLaw -> k1*S*Enz, parameters -> { k1 -> 0.5}]
Output: Compartment Compartment1 added.
        Species Enz added to compartment Compartment1
        Species S added to compartment Compartment1
        Species X added to compartment Compartment1
        Reaction reaction1 added.

Input:  addReaction[X -> S + Enz,  kineticLaw -> k2*X, parameters -> {k2 -> 0.01}];
Output: Reaction reaction2 added.

Input:  addReaction[X -> P + Enz,  kineticLaw -> k3*X, parameters -> {k3 -> 0.5}];
Output: Species P added to compartment Compartment1
        Reaction reaction3 added.

Input:  modifyReaction[reaction3, parameters-> {k3-> 0.25}];
Output: Previous occurance of reaction reaction3 removed.
        Reaction reaction3 added.

Input:  createModel[]
Output: 

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated 5-July-2004 12:07:24.348944 -->
<!-- Generated by MathSBML 2.3.24 (05-July-2004) -->
<sbml xmlns="http://www.sbml.org/sbml/level2"
    level="2"
    version="1">
 <model id="SBMLModel"
     name="SBMLModel">
  <!-- <notes/> -->
  <!-- <listOfFunctionDefinitions/> -->
  <!-- <listOfUnitDefinitions/> -->
  <listOfCompartments>
   <compartment id="Compartment1"
       name="Compartment1"
       spatialDimension="3"
       units="volume"/>
  </listOfCompartments>
  <listOfSpecies>
   <species id="Enz"
       name="Enz"
       compartment="Compartment1"
       boundaryCondition="false"
       constant="false"
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
   <species id="S"
       name="S"
       compartment="Compartment1"
       boundaryCondition="false"
       constant="false"
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
   <species id="X"
       name="X"
       compartment="Compartment1"
       boundaryCondition="false"
       constant="false"
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
   <species id="P"
       name="P"
       compartment="Compartment1"
       boundaryCondition="false"
       constant="false"
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
  </listOfSpecies>
  <!-- <listOfParameters/> -->
  <!-- <listOfRules/> -->
  <listOfReactions>
   <reaction id="reaction1"
       name="reaction1"
       reversible="true"
       fast="false">
    <listOfReactants>
     <speciesReference species="Enz"/>
     <speciesReference species="S"
         stoichiometry="2"/>
    </listOfReactants>
    <listOfProducts>
     <speciesReference species="X"/>
    </listOfProducts>
    <!-- <listOfModifiers/> -->
    <kineticLaw timeUnits="time"
        substanceUnits="substance">
     <math xmlns="http://www.w3.org/1998/Math/MathML">
      <apply>
       <times/>
       <ci>Enz</ci>
       <ci>k1</ci>
       <ci>S</ci>
      </apply>
     </math>
     <listOfParameters>
      <parameter id="k1"
          value="0.5"/>
     </listOfParameters>
    </kineticLaw>
   </reaction>
   <reaction id="reaction2"
       name="reaction2"
       reversible="true"
       fast="false">
    <listOfReactants>
     <speciesReference species="X"/>
    </listOfReactants>
    <listOfProducts>
     <speciesReference species="Enz"/>
     <speciesReference species="S"
         stoichiometry="2"/>
    </listOfProducts>
    <!-- <listOfModifiers/> -->
    <kineticLaw timeUnits="time"
        substanceUnits="substance">
     <math xmlns="http://www.w3.org/1998/Math/MathML">
      <apply>
       <times/>
       <ci>k2</ci>
       <ci>X</ci>
      </apply>
     </math>
     <listOfParameters>
      <parameter id="k2"
          value="0.01"/>
     </listOfParameters>
    </kineticLaw>
   </reaction>
   <reaction id="reaction3"
       name="reaction3"
       reversible="true"
       fast="false">
    <listOfReactants>
     <speciesReference species="X"/>
    </listOfReactants>
    <listOfProducts>
     <speciesReference species="Enz"/>
     <speciesReference species="P"/>
    </listOfProducts>
    <!-- <listOfModifiers/> -->
    <kineticLaw timeUnits="time"
        substanceUnits="substance">
     <math xmlns="http://www.w3.org/1998/Math/MathML">
      <apply>
       <times/>
       <ci>k3</ci>
       <ci>X</ci>
      </apply>
     </math>
     <listOfParameters>
      <parameter id="k3"
          value="0.25"/>
     </listOfParameters>
    </kineticLaw>
   </reaction>
  </listOfReactions>
  <!-- <listOfEvents/> -->
 </model>
</sbml>


This page last modified 5 July 2004