MathSBML

MathSBML Home Page MathSBML Site Map

MathSBML Model Builder: add/remove/modifySpecies


addSpecies[options] adds a <species .../> definition to the current model. Options are the same as speciesToSBML.

If the id option is not specified, one is automatically generated for the species.

If the name option is not specified, the value of the id option is used.

If the compartment option is not specified, the species is added to the first compartment in the model. If no compartments have yet been specified then a new compartment is added to the model and the species is placed in that compartment.

If the compartment option refers to a non-existant compartment, a new compartment by the specified name is created.

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

addSpecies[{x, y, z,...}, options] is the same as addSpecies[id->x, options];addSpecies[id->y, options];....

modifySpecies[options] modifies the specified species defintion. Options are the same as speciesToSBML

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

removeSpecies[id] removes the specified <species .../> definition. It does not remove any references to the species in the model; the user must do this manually.

addSpecies, removeSpecies, modifySpecies new in 2.2.0. Revised in 2.3.24.

Example

Input:  newModel["foo", echo->True];
        addSpecies[A];
Output: Model foo initialized: SBML Level 2 Version 1
        Compartment Compartment1 added.
        Species A added to compartment Compartment1

Input:  addSpecies[B, initialAmount -> 15, boundaryCondition -> True]
Output: Species B added to compartment Compartment1

Input:  modifySpecies[B, initialAmount -> 25];
Output: Previous occurance of species B removed.
        Species B added to compartment Compartment1

Input:  removeSpecies[A];
Output: Species A removed.

Input:  addSpecies[A, initialAmount-> 1, constant-> True, charge->3];
Output: Species A added to compartment Compartment1

Input:  createModel[]
Output: 

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated 5-July-2004 11:58:40.562389 -->
<!-- Generated by MathSBML 2.3.24 (05-July-2004) -->
<sbml xmlns="http://www.sbml.org/sbml/level2"
    level="2"
    version="1">
 <model id="foo"
     name="foo">
  <notes>
   <body xmlns="http://www.w3.org/1999/xhtml">
    <p>This is a Systems Biology Markup Language (SBML) file; its contents 
    will not be displayed properly in some internet browser.</p>
    <p>Model Name:<i>foo</i></p>
    <p>Generated by MathSBML 2.3.24 (05-July-2004) 5-July-2004 11:57:59.731224</p>
    <p>The remainder of this file is in XML. To view the contents of the file use the "View Source" or "Show text source" or equivalent button on you browser.</p>
   </body>
  </notes>
  <!-- <listOfFunctionDefinitions/> -->
  <!-- <listOfUnitDefinitions/> -->
  <listOfCompartments>
   <compartment id="Compartment1"
       name="Compartment1"
       spatialDimension="3"
       units="volume"/>
  </listOfCompartments>
  <listOfSpecies>
   <species id="B"
       name="B"
       compartment="Compartment1"
       boundaryCondition="true"
       constant="false"
       initialAmount="25."
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
   <species id="A"
       name="A"
       compartment="Compartment1"
       boundaryCondition="false"
       constant="true"
       initialAmount="1"
       charge="3"
       substanceUnits="substance"
       hasOnlySubstanceUnits="false"
       spatialSizeUnits="volume"/>
  </listOfSpecies>
  <!-- <listOfParameters/> -->
  <!-- <listOfRules/> -->
  <!-- <listOfReactions/> -->
  <!-- <listOfEvents/> -->
 </model>
</sbml>
        
  

This page last modified 5 July 2004