libsbml.SpeciesReference Class Reference

Inheritance diagram for libsbml.SpeciesReference:

Inheritance graph
[legend]

List of all members.


Detailed Description

LibSBML implementation of SBML's SpeciesReference construct.

The Reaction structure provides a way to express which species act as reactants and which species act as products in a reaction. In a given reaction, references to those species acting as reactants and/or products are made using instances of SpeciesReference structures in a Reaction object's lists of reactants and products.

The mandatory 'species' attribute of SpeciesReference must have as its value the identifier of an existing species defined in the enclosing Model. The species is thereby designated as a reactant or product in the reaction. Which one it is (i.e., reactant or product) is indicated by whether the SpeciesReference appears in the Reaction's 'reactant' or 'product' lists.

Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1.

For maximum interoperability, the 'stoichiometry' attribute should be used in preference to 'stoichiometryMath' when a species' stoichiometry is a simple scalar number (integer or decimal). When the stoichiometry is a rational number, or when it is a more complicated formula, 'stoichiometryMath' must be used. The MathML expression in 'stoichiometryMath' may also refer to identifiers of entities in a model (except reaction identifiers). However, the only species identifiers that can be used in 'stoichiometryMath' are those referenced in the Reaction list of reactants, products and modifiers.

The following is a simple example of a species reference for species X0, with stoichiometry 2, in a list of reactants within a reaction having the identifier J1:

<model>
    ...
    <listOfReactions>
        <reaction id='J1'>
            <listOfReactants>
                <speciesReference species='X0' stoichiometry='2'>
            </listOfReactants>
            ...
        </reaction>
        ...
    </listOfReactions>
    ...
</model>

The following is a more complex example of a species reference for species X0, with a stoichiometry formula consisting of the parameter x:

<model>
    ...
    <listOfReactions>
        <reaction id='J1'>
            <listOfReactants>
                <speciesReference species='X0'>
                    <stoichiometryMath>
                        <math xmlns='http://www.w3.org/1998/Math/MathML'>
                            <ci>x</ci>
                        </math>
                    </stoichiometryMath>
                </speciesReference>
            </listOfReactants>
            ...
        </reaction>
        ...
    </listOfReactions>
    ...
</model>

A species can occur more than once in the lists of reactants and products of a given Reaction instance. The effective stoichiometry for a species in a reaction is the sum of the stoichiometry values given on the SpeciesReference object in the list of products minus the sum of stoichiometry values given on the SpeciesReference objects in the list of reactants. A positive value indicates the species is effectively a product and a negative value indicates the species is effectively a reactant. SBML places no restrictions on the effective stoichiometry of a species in a reaction; for example, it can be zero. In the following SBML fragment, the two reactions have the same effective stoichiometry for all their species:

<reaction id='x'>
    <listOfReactants>
        <speciesReference species='a'/>
        <speciesReference species='a'/>
        <speciesReference species='b'/>
    </listOfReactants>
    <listOfProducts>
        <speciesReference species='c'/>
        <speciesReference species='b'/>
    </listProducts>
</reaction>
<reaction id='y'>
    <listOfReactants>
        <speciesReference species='a' stoichiometry='2'/>
    </listOfReactants>
    <listOfProducts>
        <speciesReference species='c'/>
    </listProducts>
</reaction>

Definition at line 20437 of file libsbml.py.


Public Member Functions

def __eq__
def __init__
def __init__
def __ne__
def addCVTerm
def appendAnnotation
def appendNotes
def clone
def createStoichiometryMath
def getAncestorOfType
def getAnnotation
def getAnnotationString
def getColumn
def getCVTerm
def getCVTerms
def getDenominator
def getElementName
def getId
def getLevel
def getLine
def getMetaId
def getModel
def getName
def getNamespaces
def getNotes
def getNotesString
def getNumCVTerms
def getParentSBMLObject
def getResourceBiologicalQualifier
def getResourceModelQualifier
def getSBMLDocument
def getSBOTerm
def getSBOTermID
def getSpecies
def getStoichiometry
def getStoichiometryMath
def getTypeCode
def getVersion
def hasRequiredAttributes
def hasRequiredElements
def hasValidLevelVersionNamespaceCombination
def initDefaults
def isModifier
def isSetAnnotation
def isSetId
def isSetMetaId
def isSetName
def isSetNotes
def isSetSBOTerm
def isSetSpecies
def isSetStoichiometryMath
def setAnnotation
def setDenominator
def setId
def setMetaId
def setName
def setNamespaces
def setNotes
def setSBOTerm
def setSpecies
def setStoichiometry
def setStoichiometryMath
def toSBML
def unsetAnnotation
def unsetCVTerms
def unsetId
def unsetMetaId
def unsetName
def unsetNotes
def unsetSBOTerm
def unsetStoichiometryMath

Public Attributes

 this

Member Function Documentation

def libsbml.SBase.__eq__ (   self,
  rhs 
) [inherited]

Definition at line 3296 of file libsbml.py.

def libsbml.SimpleSpeciesReference.__init__ (   self,
  args,
  kwargs 
) [inherited]

Reimplemented from libsbml.SBase.

Definition at line 20179 of file libsbml.py.

def libsbml.SpeciesReference.__init__ (   self,
  args 
)

Python method signature(s):

__init__(self, unsigned int level, unsigned int version)    SpeciesReference
__init__(self, SBMLNamespaces sbmlns)    SpeciesReference
__init__(self, SpeciesReference orig)    SpeciesReference

Predicate returning true or false depending on whether all the required attributes for this SpeciesReference object have been set.

Note:
The required attributes for a SpeciesReference object are: species
Returns:
a boolean value indicating whether all the required attributes for this object have been defined.
Deprecated:
libSBML internal

Definition at line 20566 of file libsbml.py.

def libsbml.SBase.__ne__ (   self,
  rhs 
) [inherited]

Definition at line 3303 of file libsbml.py.

def libsbml.SBase.addCVTerm (   self,
  args 
) [inherited]

Python method signature(s):

addCVTerm(self, CVTerm term)    int

Adds a copy of the given CVTerm to this SBML object.

Parameters:
term the CVTerm to assign
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED
  • LIBSBML_UNEXPECTED_ATTRIBUTE
  • LIBSBML_INVALID_OBJECT
Note:
Since the CV Term uses the metaid of the object as a reference, if the object has no metaid set the CVTerm will not be added.
Warning:
The fact that this method copies the object passed to it means that the caller will be left holding a physically different object instance than the one contained in this object. Changes made to the original object instance (such as resetting attribute values) will not affect the instance added here. In addition, the caller should make sure to free the original object if it is no longer being used, or else a memory leak will result.

Definition at line 2974 of file libsbml.py.

def libsbml.SpeciesReference.appendAnnotation (   self,
  args 
)

Python method signature(s):

appendAnnotation(self, XMLNode annotation)    int
appendAnnotation(self, string annotation)    int

Appends annotation content to any existing content in the 'annotation' subelement of this object.

The content in annotation is copied. Unlike setAnnotation(), this method allows other annotations to be preserved when an application adds its own data.

Parameters:
annotation an XML string that is to be copied and appended to the content of the 'annotation' subelement of this object
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED
See also:
setAnnotation(const std.string& annotation)

setAnnotation(const XMLNode* annotation)

Reimplemented from libsbml.SBase.

Definition at line 20958 of file libsbml.py.

def libsbml.SBase.appendNotes (   self,
  args 
) [inherited]

Python method signature(s):

appendNotes(self, XMLNode notes)    int
appendNotes(self, string notes)    int

Appends notes content to the 'notes' element attached to this object.

The content in notes is copied.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

Parameters:
notes an XML string that is to appended to the content of the 'notes' subelement of this object
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_OBJECT
  • LIBSBML_OPERATION_FAILED
See also:
getNotesString()

isSetNotes()

setNotes(const XMLNode* notes)

setNotes(const std.string& notes)

appendNotes(const XMLNode* notes)

unsetNotes()

Definition at line 2726 of file libsbml.py.

def libsbml.SpeciesReference.clone (   self  ) 

Python method signature(s):

clone(self)    SpeciesReference

Creates and returns a deep copy of this SpeciesReference instance.

Returns:
a (deep) copy of this SpeciesReference.

Reimplemented from libsbml.SBase.

Definition at line 20591 of file libsbml.py.

def libsbml.SpeciesReference.createStoichiometryMath (   self  ) 

Python method signature(s):

createStoichiometryMath(self)    StoichiometryMath

Creates a new, empty StoichiometryMath, adds it to this SpeciesReference and returns the StoichiometryMath.

Returns:
the newly created StoichiometryMath object instance
See also:
Reaction.addReactant(const SpeciesReference* sr)

Reaction.addProduct(const SpeciesReference* sr)

Definition at line 20904 of file libsbml.py.

def libsbml.SBase.getAncestorOfType (   self,
  args 
) [inherited]

Python method signature(s):

getAncestorOfType(self, SBMLTypeCode_t type)    SBase

Returns the ancestor SBML object that corresponds to the given SBMLTypeCode_t.

This function allows any object to determine its exact location/function within a model. For example a StoichiometryMath object has ancestors of type SpeciesReference, ListOfProducts/ListOfReactants/ListOfModifiers, Reaction, ListOfReactions and Model; any of which can be accessed via this function.

Parameters:
type the SBMLTypeCode_t of the ancestor to be returned.
Returns:
the ancestor SBML object of this SBML object, that corresponds to the given SBMLTypeCode_t, NULL if none exists.

Definition at line 2115 of file libsbml.py.

def libsbml.SBase.getAnnotation (   self  )  [inherited]

Python method signature(s):

getAnnotation(self)    XMLNode

Returns the content of the 'annotation' subelement of this object as an XML node tree.

Whereas the SBase 'notes' subelement is a container for content to be shown directly to humans, the 'annotation' element is a container for optional software-generated content not meant to be shown to humans. Every object derived from SBase can have its own value for 'annotation'. The element's content type is XML type any, allowing essentially arbitrary well-formed XML data content.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

The annotations returned by this method will be in XML form. LibSBML provides an object model and related interfaces for certain specific kinds of annotations, namely model history information and RDF content. See the ModelHistory, CVTerm and RDFAnnotationParser classes for more information about the facilities available.

Returns:
the annotation of this SBML object as an XMLNode
See also:
getAnnotationString()

isSetAnnotation()

setAnnotation(const XMLNode* annotation)

setAnnotation(const std.string& annotation)

appendAnnotation(const XMLNode* annotation)

appendAnnotation(const std.string& annotation)

unsetAnnotation()

Definition at line 1971 of file libsbml.py.

def libsbml.SBase.getAnnotationString (   self  )  [inherited]

Python method signature(s):

getAnnotationString(self)    string

Returns the content of the 'annotation' subelement of this object as a character string.

Whereas the SBase 'notes' subelement is a container for content to be shown directly to humans, the 'annotation' element is a container for optional software-generated content not meant to be shown to humans. Every object derived from SBase can have its own value for 'annotation'. The element's content type is XML type any, allowing essentially arbitrary well-formed XML data content.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

The annotations returned by this method will be in string form.

Returns:
the annotation string of this SBML object.
See also:
getAnnotation()

isSetAnnotation()

setAnnotation(const XMLNode* annotation)

setAnnotation(const std.string& annotation)

appendAnnotation(const XMLNode* annotation)

appendAnnotation(const std.string& annotation)

unsetAnnotation()

Definition at line 2014 of file libsbml.py.

def libsbml.SBase.getColumn (   self  )  [inherited]

Python method signature(s):

getColumn(self)    unsigned int

Returns the column number on which this object first appears in the XML representation of the SBML document.

Returns:
the column number of this SBML object.
See also:
getLine()

Definition at line 2217 of file libsbml.py.

def libsbml.SBase.getCVTerm (   self,
  args 
) [inherited]

Python method signature(s):

getCVTerm(self, unsigned int n)    CVTerm

Returns the nth CVTerm in the list of CVTerms of this SBML object.

Parameters:
n unsigned int the index of the CVTerm to retrieve
Returns:
the nth CVTerm in the list of CVTerms for this SBML object.

Definition at line 3042 of file libsbml.py.

def libsbml.SBase.getCVTerms (   self  )  [inherited]

Python method signature(s):

getCVTerms(self)    CVTermList

Get the CVTermList of CVTerm objects in this SBase.

Returns:
the CVTermList for this SBase.

Definition at line 3010 of file libsbml.py.

def libsbml.SpeciesReference.getDenominator (   self  ) 

Python method signature(s):

getDenominator(self)    int

Get the value of the 'denominator' attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1.

The 'denominator' attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the 'stoichiometryMath' subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode structure. LibSBML will write out the appropriate constructs (either a combination of 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a 'stoichiometryMath' subelement in the case of SBML Level 2).

Returns:
the value of the 'denominator' attribute of this SpeciesReference.

Definition at line 20702 of file libsbml.py.

def libsbml.SpeciesReference.getElementName (   self  ) 

Python method signature(s):

getElementName(self)    string

Returns the XML element name of this object, which for SpeciesReference, is always 'speciesReference'.

Returns:
the name of this element, i.e., 'speciesReference'.

Reimplemented from libsbml.SBase.

Definition at line 21019 of file libsbml.py.

def libsbml.SimpleSpeciesReference.getId (   self  )  [inherited]

Python method signature(s):

getId(self)    string

Returns the value of the 'id' attribute of this SimpleSpeciesReference.

Returns:
the id of this SimpleSpeciesReference.

Reimplemented from libsbml.SBase.

Definition at line 20183 of file libsbml.py.

def libsbml.SBase.getLevel (   self  )  [inherited]

Python method signature(s):

getLevel(self)    unsigned int

Returns the SBML Level of the overall SBML document.

Returns:
the SBML level of this SBML object.
See also:
getVersion()

Definition at line 3134 of file libsbml.py.

def libsbml.SBase.getLine (   self  )  [inherited]

Python method signature(s):

getLine(self)    unsigned int

Returns the line number on which this object first appears in the XML representation of the SBML document.

Returns:
the line number of this SBML object.
See also:
getColumn()

Definition at line 2199 of file libsbml.py.

def libsbml.SBase.getMetaId (   self  )  [inherited]

Python method signature(s):

getMetaId(self)    string

Returns the value of the 'metaid' attribute of this object.

The optional attribute named 'metaid', present on every major SBML component type, is for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each 'metaid' value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the 'metaid' attribute used by SBML—something to be aware of if your application-specific XML content inside the 'annotation' subelement happens to use XML ID.) The 'metaid' value serves to identify a model component for purposes such as referencing that component from metadata placed within 'annotation' subelements.

Returns:
the metaid of this SBML object.
See also:
isSetMetaId()

setMetaId(const std.string& metaid)

Definition at line 1790 of file libsbml.py.

def libsbml.SBase.getModel (   self  )  [inherited]

Python method signature(s):

getModel(self)    Model

Returns the Model object in which the current object is located.

Returns:
the parent Model of this SBML object.

Definition at line 3119 of file libsbml.py.

def libsbml.SimpleSpeciesReference.getName (   self  )  [inherited]

Python method signature(s):

getName(self)    string

Returns the value of the 'name' attribute of this SimpleSpeciesReference.

Returns:
the name of this SimpleSpeciesReference.

Reimplemented from libsbml.SBase.

Definition at line 20198 of file libsbml.py.

def libsbml.SBase.getNamespaces (   self  )  [inherited]

Python method signature(s):

getNamespaces(self)    XMLNamespaces

Returns a list of the XML Namespaces declared on this SBML document.

Returns:
the XML Namespaces associated with this SBML object

Reimplemented in libsbml.SBMLDocument.

Definition at line 2053 of file libsbml.py.

def libsbml.SBase.getNotes (   self  )  [inherited]

Python method signature(s):

getNotes(self)    XMLNode

Returns the content of the 'notes' subelement of this object as a tree of XML nodes.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

The 'notes' element content returned by this method will be in XML form, but libSBML does not provide an object model specifically for the content of notes. Callers will need to traverse the XML tree structure using the facilities available on XMLNode and related objects.

Returns:
the content of the 'notes' subelement of this SBML object.
See also:
getNotesString()

isSetNotes()

setNotes(const XMLNode* notes)

setNotes(const std.string& notes)

appendNotes(const XMLNode* notes)

appendNotes(const std.string& notes)

unsetNotes()

Definition at line 1891 of file libsbml.py.

def libsbml.SBase.getNotesString (   self  )  [inherited]

Python method signature(s):

getNotesString(self)    string

Returns the content of the 'notes' subelement of this object as a string.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

Returns:
the content of the 'notes' subelement of this SBML object.
See also:
getNotes()

isSetNotes()

setNotes(const XMLNode* notes)

setNotes(const std.string& notes)

appendNotes(const XMLNode* notes)

appendNotes(const std.string& notes)

unsetNotes()

Definition at line 1934 of file libsbml.py.

def libsbml.SBase.getNumCVTerms (   self  )  [inherited]

Python method signature(s):

getNumCVTerms(self)    unsigned int

Returns the number of CVTerm objects in the annotations of this SBML object.

Returns:
the number of CVTerms for this SBML object.

Definition at line 3026 of file libsbml.py.

def libsbml.SBase.getParentSBMLObject (   self  )  [inherited]

Python method signature(s):

getParentSBMLObject(self)    SBase

Returns the parent SBML object.

This method is convenient when holding an object nested inside other objects in an SBML model. It allows direct access to the <model> element containing it.

Returns:
the parent SBML object of this SBML object.

Definition at line 2096 of file libsbml.py.

def libsbml.SBase.getResourceBiologicalQualifier (   self,
  args 
) [inherited]

Python method signature(s):

getResourceBiologicalQualifier(self, string resource)    BiolQualifierType_t

Returns the BiologicalQualifier associated with this resource, or BQB_UNKNOWN if the resource does not exist.

Parameters:
resource string representing the resource; e.g., 'http://www.geneontology.org/GO:0005892'
Returns:
the BiolQualifierType_t value associated with the resource

Definition at line 3081 of file libsbml.py.

def libsbml.SBase.getResourceModelQualifier (   self,
  args 
) [inherited]

Python method signature(s):

getResourceModelQualifier(self, string resource)    ModelQualifierType_t

Returns the ModelQualifier associated with this resource, or BQM_UNKNOWN if the resource does not exist.

Parameters:
resource string representing the resource; e.g., 'http://www.geneontology.org/GO:0005892'
Returns:
the ModelQualifierType_t value associated with the resource

Definition at line 3100 of file libsbml.py.

def libsbml.SBase.getSBMLDocument (   self,
  args 
) [inherited]

Python method signature(s):

getSBMLDocument(self)    SBMLDocument
getSBMLDocument(self)    SBMLDocument

Returns the parent SBMLDocument object.

LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). An SBML model in libSBML is contained inside an SBMLDocument object. SBMLDocument corresponds roughly to the class Sbml defined in the SBML Level 2 specification, but it does not have a direct correspondence in SBML Level 1. (But, it is created by libSBML no matter whether the model is Level 1 or Level 2.)

This method allows the SBMLDocument for the current object to be retrieved.

Returns:
the parent SBMLDocument object of this SBML object.

Definition at line 2068 of file libsbml.py.

def libsbml.SBase.getSBOTerm (   self  )  [inherited]

Python method signature(s):

getSBOTerm(self)    int

Returns the integer portion of the value of the 'sboTerm' attribute of this object.

In SBML Level 2 Versions 2, 3 and 4, the data type of the attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the 'sboTerm' attribute on SBase has data type int, and SBO identifiers are stored simply as integers. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for 'sboTerm'. Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the 'sboTerm' attribute.

Returns:
the value of the 'sboTerm' attribute as an integer, or -1 if the value is not set.

Definition at line 2141 of file libsbml.py.

def libsbml.SBase.getSBOTermID (   self  )  [inherited]

Python method signature(s):

getSBOTermID(self)    string

Returns the string representation of the 'sboTerm' attribute of this object.

In SBML Level 2 Versions 2, 3 and 4, the data type of the attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the 'sboTerm' attribute on SBase has data type int, and SBO identifiers are stored simply as integers. This function recreates the string representation from the stored value. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for 'sboTerm'. Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the 'sboTerm' attribute.

Returns:
the value of the 'sboTerm' attribute as a string of the form SBO:NNNNNNN, or an empty string if the value is not set.

Definition at line 2169 of file libsbml.py.

def libsbml.SimpleSpeciesReference.getSpecies (   self  )  [inherited]

Python method signature(s):

getSpecies(self)    string

Get the value of the 'species' attribute.

Returns:
the value of the attribute 'species' for this SimpleSpeciesReference.

Definition at line 20213 of file libsbml.py.

def libsbml.SpeciesReference.getStoichiometry (   self  ) 

Python method signature(s):

getStoichiometry(self)    float

Get the value of the 'stoichiometry' attribute.

In SBML Level 2, Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1. For maximum interoperability between different software tools, the 'stoichiometry' attribute should be * used in preference to 'stoichiometryMath' when a species' stoichiometry * is a simple scalar number (integer or decimal).

Returns:
the value of the (scalar) 'stoichiometry' attribute of this SpeciesReference.
See also:
getStoichiometryMath()

Definition at line 20630 of file libsbml.py.

def libsbml.SpeciesReference.getStoichiometryMath (   self,
  args 
)

Python method signature(s):

getStoichiometryMath(self)    StoichiometryMath
getStoichiometryMath(self)    StoichiometryMath

Get the content of the 'stoichiometryMath' subelement as an ASTNode tree.

In SBML Level 2, Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1. For maximum interoperability between different software tools, the 'stoichiometry' attribute should be used in preference to 'stoichiometryMath' when a species' stoichiometry is a simple scalar number (integer or decimal).

Returns:
the content of the 'stoichiometryMath' subelement of this SpeciesReference.

Definition at line 20666 of file libsbml.py.

def libsbml.SpeciesReference.getTypeCode (   self  ) 

Python method signature(s):

getTypeCode(self)    SBMLTypeCode_t

Returns the libSBML type code for this SBML object.

Returns:
the SBML type code for this object, or SBML_UNKNOWN (default).
See also:
getElementName()

Reimplemented from libsbml.SBase.

Definition at line 20990 of file libsbml.py.

def libsbml.SBase.getVersion (   self  )  [inherited]

Python method signature(s):

getVersion(self)    unsigned int

Returns the Version within the SBML Level of the overall SBML document.

Returns:
the SBML version of this SBML object.
See also:
getLevel()

Definition at line 3151 of file libsbml.py.

def libsbml.SpeciesReference.hasRequiredAttributes (   self  ) 

Python method signature(s):

hasRequiredAttributes(self)    bool

Predicate returning true or false depending on whether all the required attributes for this SpeciesReference object have been set.

Note:
The required attributes for a SpeciesReference object are: species
Returns:
a boolean value indicating whether all the required attributes for this object have been defined.

Reimplemented from libsbml.SBase.

Definition at line 21035 of file libsbml.py.

def libsbml.SBase.hasRequiredElements (   self  )  [inherited]

Python method signature(s):

hasRequiredElements(self)    bool

Subclasses should override this method to write out their contained SBML objects as XML elements. Be sure to call your parents implementation of this method as well. For example:

SBase.writeElements(stream); mReactans.write(stream); mProducts.write(stream); ...

Deprecated:
libSBML internal

Reimplemented in libsbml.Model, libsbml.FunctionDefinition, libsbml.UnitDefinition, libsbml.InitialAssignment, libsbml.Rule, libsbml.Constraint, libsbml.KineticLaw, libsbml.Event, libsbml.EventAssignment, libsbml.Trigger, libsbml.Delay, and libsbml.StoichiometryMath.

Definition at line 3275 of file libsbml.py.

def libsbml.SBase.hasValidLevelVersionNamespaceCombination (   self  )  [inherited]

Python method signature(s):

hasValidLevelVersionNamespaceCombination(self)    bool

Predicate returning true or false depending on whether this object's level/version and namespace values correspond to a valid SBML specification.

The valid combinations of SBML Level, Version and Namespace as of this release of libSBML are the following:

  • Level 1 Version 2 'http://www.sbml.org/sbml/level1'
  • Level 2 Version 1 'http://www.sbml.org/sbml/level2'
  • Level 2 Version 2 'http://www.sbml.org/sbml/level2/version2'
  • Level 2 Version 3 'http://www.sbml.org/sbml/level2/version3'
  • Level 2 Version 4 'http://www.sbml.org/sbml/level2/version4'

Returns:
true if the level, version and namespace values of this SBML object correspond to a valid set of values, false otherwise.

Definition at line 3192 of file libsbml.py.

def libsbml.SpeciesReference.initDefaults (   self  ) 

Python method signature(s):

initDefaults(self)

Initializes the attributes of this SpeciesReference to their defaults.

  • stoichiometry is set to 1
  • denominator is set to 1

See also:
getDenominator()

setDenominator(int value)

getStoichiometry()

setStoichiometry (float value)

getStoichiometryMath()

setStoichiometryMath(const StoichiometryMath* math)

Definition at line 20606 of file libsbml.py.

def libsbml.SimpleSpeciesReference.isModifier (   self  )  [inherited]

Python method signature(s):

isModifier(self)    bool

Predicate returning true or false depending on whether this is a ModifierSpeciesReference.

Returns:
true if this SimpleSpeciesReference's subclass is ModiferSpeciesReference, false if it is a plain SpeciesReference.

Definition at line 20417 of file libsbml.py.

def libsbml.SBase.isSetAnnotation (   self  )  [inherited]

Python method signature(s):

isSetAnnotation(self)    bool

Predicate returning true or false depending on whether this object's 'annotation' subelement exists and has content.

Whereas the SBase 'notes' subelement is a container for content to be shown directly to humans, the 'annotation' element is a container for optional software-generated content not meant to be shown to humans. Every object derived from SBase can have its own value for 'annotation'. The element's content type is XML type any, allowing essentially arbitrary well-formed XML data content.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if a 'annotation' subelement exists, false otherwise.
See also:
getAnnotation()

getAnnotationString()

setAnnotation(const XMLNode* annotation)

setAnnotation(const std.string& annotation)

appendAnnotation(const XMLNode* annotation)

appendAnnotation(const std.string& annotation)

unsetAnnotation()

Definition at line 2387 of file libsbml.py.

def libsbml.SimpleSpeciesReference.isSetId (   self  )  [inherited]

Python method signature(s):

isSetId(self)    bool

Predicate returning true or false depending on whether this SimpleSpeciesReference's 'id' attribute has been set.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if the 'id' attribute of this SimpleSpeciesReference has been set, false otherwise.

Reimplemented from libsbml.SBase.

Definition at line 20229 of file libsbml.py.

def libsbml.SBase.isSetMetaId (   self  )  [inherited]

Python method signature(s):

isSetMetaId(self)    bool

Predicate returning true or false depending on whether this object's 'metaid' attribute has been set.

The optional attribute named 'metaid', present on every major SBML component type, is for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each 'metaid' value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the 'metaid' attribute used by SBML—something to be aware of if your application-specific XML content inside the 'annotation' subelement happens to use XML ID.) The 'metaid' value serves to identify a model component for purposes such as referencing that component from metadata placed within 'annotation' subelements.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if the 'metaid' attribute of this SBML object has been set, false otherwise.
See also:
getMetaId()

setMetaId(const std.string& metaid)

Definition at line 2235 of file libsbml.py.

def libsbml.SimpleSpeciesReference.isSetName (   self  )  [inherited]

Python method signature(s):

isSetName(self)    bool

Predicate returning true or false depending on whether this SimpleSpeciesReference's 'name' attribute has been set.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if the 'name' attribute of this SimpleSpeciesReference has been set, false otherwise.

Reimplemented from libsbml.SBase.

Definition at line 20248 of file libsbml.py.

def libsbml.SBase.isSetNotes (   self  )  [inherited]

Python method signature(s):

isSetNotes(self)    bool

Predicate returning true or false depending on whether this object's 'notes' subelement exists and has content.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if a 'notes' subelement exists, false otherwise.
See also:
getNotes()

getNotesString()

setNotes(const XMLNode* notes)

setNotes(const std.string& notes)

appendNotes(const XMLNode* notes)

appendNotes(const std.string& notes)

unsetNotes()

Definition at line 2348 of file libsbml.py.

def libsbml.SBase.isSetSBOTerm (   self  )  [inherited]

Python method signature(s):

isSetSBOTerm(self)    bool

Predicate returning true or false depending on whether this object's 'sboTerm' attribute has been set.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
true if the 'sboTerm' attribute of this SBML object has been set, false otherwise.

Definition at line 2427 of file libsbml.py.

def libsbml.SimpleSpeciesReference.isSetSpecies (   self  )  [inherited]

Python method signature(s):

isSetSpecies(self)    bool

Predicate returning true or false depending on whether this SimpleSpeciesReference's 'species' attribute has been set.

Returns:
true if the 'species' attribute of this SimpleSpeciesReference has been set, false otherwise.

Definition at line 20267 of file libsbml.py.

def libsbml.SpeciesReference.isSetStoichiometryMath (   self  ) 

Python method signature(s):

isSetStoichiometryMath(self)    bool

Predicate returning true or false depending on whether this SpeciesReference's 'stoichiometryMath' subelement has been set

Returns:
true if the 'stoichiometryMath' subelement of this SpeciesReference has been set, false otherwise.

Definition at line 20730 of file libsbml.py.

def libsbml.SpeciesReference.setAnnotation (   self,
  args 
)

Python method signature(s):

setAnnotation(self, XMLNode annotation)    int
setAnnotation(self, string annotation)    int

Sets the value of the 'annotation' subelement of this SBML object to a copy of annotation.

Any existing content of the 'annotation' subelement is discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the annotation that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use appendAnnotation().

Parameters:
annotation an XML string that is to be used as the content of the 'annotation' subelement of this object
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED
See also:
appendAnnotation(const XMLNode* annotation)

appendAnnotation(const std.string& annotation)

Reimplemented from libsbml.SBase.

Definition at line 20923 of file libsbml.py.

def libsbml.SpeciesReference.setDenominator (   self,
  args 
)

Python method signature(s):

setDenominator(self, int value)    int

Set the value of the 'denominator' attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1.

The 'denominator' attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the 'stoichiometryMath' subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode structure. LibSBML will write out the appropriate constructs (either a combination of 'stoichiometry' and 'denominator' in the case of SBML Level 1, or a 'stoichiometryMath' subelement in the case of SBML Level 2).

Parameters:
value the scalar value
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS

Definition at line 20832 of file libsbml.py.

def libsbml.SimpleSpeciesReference.setId (   self,
  args 
) [inherited]

Python method signature(s):

setId(self, string sid)    int

Sets the value of the 'id' attribute of this SimpleSpeciesReference.

The string sid is copied. Note that SBML has strict requirements for the syntax of identifiers. The following is summary of the definition of the SBML identifier type SId (here expressed in an extended form of BNF notation):

  letter ::= 'a'..'z','A'..'Z'
  digit  ::= '0'..'9'
  idChar ::= letter | digit | '_'
  SId    ::= ( letter | '_' ) idChar*
The equality of SBML identifiers is determined by an exact character sequence match; i.e., comparisons must be performed in a case-sensitive manner. In addition, there are a few conditions for the uniqueness of identifiers in an SBML model. Please consult the SBML specifications for the exact formulations.

Parameters:
sid the string to use as the identifier of this SimpleSpeciesReference
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
  • LIBSBML_UNEXPECTED_ATTRIBUTE

Reimplemented from libsbml.SBase.

Definition at line 20309 of file libsbml.py.

def libsbml.SBase.setMetaId (   self,
  args 
) [inherited]

Python method signature(s):

setMetaId(self, string metaid)    int

Sets the value of the 'metaid' attribute of this object.

The string metaid is copied. The value of metaid must be an identifier conforming to the syntax defined by the XML 1.0 data type ID. Among other things, this type requires that a value is unique among all the values of type XML ID in an SBMLDocument. Although SBML only uses XML ID for the 'metaid' attribute, callers should be careful if they use XML ID's in XML portions of a model that are not defined by SBML, such as in the application-specific content of the 'annotation' subelement.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Parameters:
metaid the identifier string to use as the value of the 'metaid' attribute
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
  • LIBSBML_UNEXPECTED_ATTRIBUTE
See also:
getMetaId()

isSetMetaId()

Definition at line 2446 of file libsbml.py.

def libsbml.SimpleSpeciesReference.setName (   self,
  args 
) [inherited]

Python method signature(s):

setName(self, string name)    int

Sets the value of the 'name' attribute of this SimpleSpeciesReference.

The string in name is copied.

Parameters:
name the new name for the SimpleSpeciesReference
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
  • LIBSBML_UNEXPECTED_ATTRIBUTE

Reimplemented from libsbml.SBase.

Definition at line 20348 of file libsbml.py.

def libsbml.SBase.setNamespaces (   self,
  args 
) [inherited]

Python method signature(s):

setNamespaces(self, XMLNamespaces xmlns)    int

Sets the namespaces relevant of this SBML object.

Parameters:
xmlns the namespaces to set
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS

Definition at line 2811 of file libsbml.py.

def libsbml.SBase.setNotes (   self,
  args 
) [inherited]

Python method signature(s):

setNotes(self, XMLNode notes)    int
setNotes(self, string notes)    int

Sets the value of the 'notes' subelement of this SBML object to a copy of the string notes.

Any existing content of the 'notes' subelement is discarded.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Parameters:
notes an XML string that is to be used as the content of the 'notes' subelement of this object
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_OBJECT
  • LIBSBML_OPERATION_FAILED
See also:
getNotesString()

isSetNotes()

setNotes(const XMLNode* notes)

appendNotes(const XMLNode* notes)

appendNotes(const std.string& notes)

unsetNotes()

Definition at line 2676 of file libsbml.py.

def libsbml.SBase.setSBOTerm (   self,
  args 
) [inherited]

Python method signature(s):

setSBOTerm(self, int value)    int
setSBOTerm(self, string sboid)    int

Sets the value of the 'sboTerm' attribute.

In SBML Level 2 Versions 2, 3 and 4, the data type of the SBML 'sboTerm' attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the 'sboTerm' attribute on SBase has data type int, and SBO identifiers are stored simply as integers. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for 'sboTerm'. Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the 'sboTerm' attribute.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Parameters:
value the NNNNNNN integer portion of the SBO identifier
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
  • LIBSBML_UNEXPECTED_ATTRIBUTE

Definition at line 2774 of file libsbml.py.

def libsbml.SimpleSpeciesReference.setSpecies (   self,
  args 
) [inherited]

Python method signature(s):

setSpecies(self, string sid)    int

Sets the 'species' attribute of this SimpleSpeciesReference.

The identifier string passed in sid is copied.

Parameters:
sid the identifier of a species defined in the enclosing Model's ListOfSpecies.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE

Definition at line 20284 of file libsbml.py.

def libsbml.SpeciesReference.setStoichiometry (   self,
  args 
)

Python method signature(s):

setStoichiometry(self, float value)    int

Sets the value of the 'stoichiometry' attribute of this SpeciesReference.

In SBML Level 2, Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1. For maximum interoperability between different software tools, the 'stoichiometry' attribute should be used in preference to 'stoichiometryMath' when a species' stoichiometry is a simple scalar number (integer or decimal).

Parameters:
value the new value of the 'stoichiometry' attribute
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS

Definition at line 20747 of file libsbml.py.

def libsbml.SpeciesReference.setStoichiometryMath (   self,
  args 
)

Python method signature(s):

setStoichiometryMath(self, StoichiometryMath math)    int

Sets the 'stoichiometryMath' subelement of this SpeciesReference.

The Abstract Syntax Tree in math is copied.

In SBML Level 2, Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1. For maximum interoperability between different software tools, the 'stoichiometry' attribute should be used in preference to 'stoichiometryMath' when a species' stoichiometry is a simple scalar number (integer or decimal).

Parameters:
math the StoichiometryMath expression that is to be copied as the content of the 'stoichiometryMath' subelement.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_UNEXPECTED_ATTRIBUTE
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH

Definition at line 20787 of file libsbml.py.

def libsbml.SBase.toSBML (   self  )  [inherited]

Python method signature(s):

toSBML(self)    char

Returns a string that consists of the partial SBML describing this object. This is primarily provided for testing and debugging purposes. It may be removed in a future version of libSBML.

Returns:
the partial SBML that describes this SBML object.

Definition at line 3237 of file libsbml.py.

def libsbml.SBase.unsetAnnotation (   self  )  [inherited]

Python method signature(s):

unsetAnnotation(self)    int

Unsets the value of the 'annotation' subelement of this SBML object.

Whereas the SBase 'notes' subelement is a container for content to be shown directly to humans, the 'annotation' element is a container for optional software-generated content not meant to be shown to humans. Every object derived from SBase can have its own value for 'annotation'. The element's content type is XML type any, allowing essentially arbitrary well-formed XML data content.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
See also:
getAnnotation()

getAnnotationString()

isSetAnnotation()

setAnnotation(const XMLNode* annotation)

setAnnotation(const std.string& annotation)

appendAnnotation(const XMLNode* annotation)

appendAnnotation(const std.string& annotation)

Definition at line 2910 of file libsbml.py.

def libsbml.SBase.unsetCVTerms (   self  )  [inherited]

Python method signature(s):

unsetCVTerms(self)    int

Clears the list of CVTerms of this SBML object.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED

Definition at line 3060 of file libsbml.py.

def libsbml.SimpleSpeciesReference.unsetId (   self  )  [inherited]

Python method signature(s):

unsetId(self)    int

Unsets the value of the 'id' attribute of this SimpleSpeciesReference.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED

Definition at line 20373 of file libsbml.py.

def libsbml.SBase.unsetMetaId (   self  )  [inherited]

Python method signature(s):

unsetMetaId(self)    int

Unsets the value of the 'metaid' attribute of this SBML object.

The optional attribute named 'metaid', present on every major SBML component type, is for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each 'metaid' value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the 'metaid' attribute used by SBML—something to be aware of if your application-specific XML content inside the 'annotation' subelement happens to use XML ID.) The 'metaid' value serves to identify a model component for purposes such as referencing that component from metadata placed within 'annotation' subelements.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED

Definition at line 2832 of file libsbml.py.

def libsbml.SimpleSpeciesReference.unsetName (   self  )  [inherited]

Python method signature(s):

unsetName(self)    int

Unsets the value of the 'name' attribute of this SimpleSpeciesReference.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED

Definition at line 20395 of file libsbml.py.

def libsbml.SBase.unsetNotes (   self  )  [inherited]

Python method signature(s):

unsetNotes(self)    int

Unsets the value of the 'notes' subelement of this SBML object.

The optional element named 'notes', present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the 'notes' element would be to contain formatted user comments about the model element in which the 'notes' element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for 'notes', allowing users considerable freedom when adding comments to their models. The format of 'notes' elements must be XHTML 1.0. The SBML Level 2 specification has considerable detail about how 'notes' element content must be handled; please refer to the specifications.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
See also:
getNotesString()

isSetNotes()

setNotes(const XMLNode* notes)

setNotes(const std.string& notes)

appendNotes(const XMLNode* notes)

appendNotes(const std.string& notes)

Definition at line 2869 of file libsbml.py.

def libsbml.SBase.unsetSBOTerm (   self  )  [inherited]

Python method signature(s):

unsetSBOTerm(self)    int

Unsets the value of the 'sboTerm' attribute of this SBML object.

Some words of explanation about the set/unset/isSet methods: SBML Levels 1 and 2 define certain attributes on some classes of objects as optional. This requires an application to be careful about the distinction between two cases: (1) a given attribute has never been set to a value, and therefore should be assumed to have the SBML-defined default value, and (2) a given attribute has been set to a value, but the value happens to be an empty string. LibSBML supports these distinctions by providing methods to set, unset, and query the status of attributes that are optional. The methods have names of the form setAttribute(...), unsetAttribute(), and isSetAttribute(), where Attribute is the the name of the optional attribute in question.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_UNEXPECTED_ATTRIBUTE

Definition at line 2952 of file libsbml.py.

def libsbml.SpeciesReference.unsetStoichiometryMath (   self  ) 

Python method signature(s):

unsetStoichiometryMath(self)    int

Unsets the 'stoichiometryMath' subelement of this SpeciesReference.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED
In SBML Level 2, Product and reactant stoichiometries can be specified using either 'stoichiometry' or 'stoichiometryMath' in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The 'stoichiometry' attribute is of type float and should contain values greater than zero (0). The 'stoichiometryMath' element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of 'stoichiometry' or 'stoichiometryMath' should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of 'stoichiometry' in the SpeciesReference instance defaults to 1. For maximum interoperability between different software tools, the 'stoichiometry' attribute should be used in preference to 'stoichiometryMath' when a species' stoichiometry is a simple scalar number (integer or decimal).

Definition at line 20865 of file libsbml.py.


Member Data Documentation

Reimplemented from libsbml.SBase.

Definition at line 20590 of file libsbml.py.




HTML documentation generated on Thu Jan 21 16:56:19 2010 using Doxygen 1.5.8.