libsbml.Model Class Reference

Inheritance diagram for libsbml.Model:

Inheritance graph
[legend]

List of all members.


Detailed Description

LibSBML implementation of SBML's Model construct.

In an SBML model definition, a single object of class Model serves as the overall container for the lists of the various model components. All of the lists are optional, but if a given list container is present within the model, the list must not be empty; that is, it must have length one or more. The following are the components and lists permitted in different Levels and Versions of SBML as of this version of libSBML (3.3):

Although all the lists are optional, there are dependencies between SBML components such that defining some components requires defining others. An example is that defining a species requires defining a compartment, and defining a reaction requires defining a species. The dependencies are explained in more detail in the SBML specifications.

Approaches to creating objects using the libSBML API

LibSBML provides two main mechanisms for creating objects: class constructors (e.g., ), and createObject() methods (such as Model.createSpecies()) provided by certain object classes such as Model. These multiple mechanisms are provided by libSBML for flexibility and to support different use-cases, but they also have different implications for the overall model structure.

In general, the recommended approach is to use the createObject() methods. These methods both create an object and link it to the parent in one step. Here is an example:

 // Create an SBMLDocument object in Level 2 Version 4 format:

 SBMLDocument* sbmlDoc = new SBMLDocument(2, 4);

 // Create a Model object inside the SBMLDocument object and set
 // its identifier.  The call returns a pointer to the Model object
 // created, and methods called on that object affect the attributes
 // of the object attached to the model (as expected).

 Model* model = sbmlDoc->createModel();
 model->setId('MyModel');

 // Create a Species object inside the Model and set its identifier.
 // Similar to the lines above, this call returns a pointer to the Species
 // object created, and methods called on that object affect the attributes
 // of the object attached to the model (as expected).

 Species *sp = model->createSpecies();
 sp->setId('MySpecies');
 

The createObject() methods return a pointer to the object created, but they also add the object to the relevant list of object instances contained in the parent. (These lists become the <listOfObjects> elements in the finished XML rendition of SBML.) In the example above, Model.createSpecies() adds the created species directly to the <listOfSpecies> list in the model. Subsequently, methods called on the species change the species in the model (which is what is expected in most situations).

By contrast, the other main way of creating an object and adding it to a parent makes a copy of the object, and requires more care on the part of the caller. Here is an example of this alternative approach:

 // Create a Species object and add it to the model.
 // This uses the Species class constructor:

 Species *newsp = Species('MySpecies');
 model->addSpecies(newsp); // Warning! This makes a COPY inside 'model'.

 // addSpecies(...) copies the object, with the result that
 // 'newsp' still refers to the original.  The following may not
 // do what is expected:

 newsp.setId('NewId');    // Warning -- doesn't change the species in 'model'!

 // If 'newsp' object isn't going to be used further, it needs
 // to be deleted to avoid a memory leak.

 delete newsp;
 

The key point of the example above is that, because the

call makes a copy of the object handed to it, care is needed both when attempting to make changes to the object, and when the original object is no longer needed.

Consistency and adherence to SBML specifications

To make it easier for applications to do whatever they need, libSBML 3.x is relatively lax when it comes to enforcing correctness and completeness of models during model construction and editing. Essentially, libSBML will not in most cases check automatically that a model's components have valid attribute values, or that the overall model is consistent and free of errors—even obvious errors such as duplication of identifiers. This allows applications great leeway in how they build their models, but it means that software authors must take deliberate steps to ensure that the model will be, in the end, valid SBML. These steps include such things as keeping track of the identifiers used in a model, manually performing updates in certain situations where an entity is referenced in more than one place (e.g., a species that is referenced by multiple SpeciesReference objects), and so on.

That said, libSBML does provide powerful features for deliberately performing validation of SBML when an application decides it is time to do so. The interfaces to these facilities are on the SBMLDocument class, in the form of SBMLDocument.checkInternalConsistency() and SBMLDocument.checkConsistency(). Please refer to the documentation for SBMLDocument for more information about this.

While applications may play fast and loose and live like free spirits during the construction and editing of SBML models, they should always make sure to call SBMLDocument.checkInternalConsistency() and/or SBMLDocument.checkConsistency() before writing out the final version of an SBML model.

Definition at line 3612 of file libsbml.py.


Public Member Functions

def __eq__
def __init__
def __init__
def __ne__
def addCompartment
def addCompartmentType
def addConstraint
def addCVTerm
def addEvent
def addFunctionDefinition
def addInitialAssignment
def addParameter
def addReaction
def addRule
def addSpecies
def addSpeciesType
def addUnitDefinition
def appendAnnotation
def appendNotes
def clone
def createAlgebraicRule
def createAssignmentRule
def createCompartment
def createCompartmentType
def createConstraint
def createDelay
def createEvent
def createEventAssignment
def createFunctionDefinition
def createInitialAssignment
def createKineticLaw
def createKineticLawParameter
def createModifier
def createParameter
def createProduct
def createRateRule
def createReactant
def createReaction
def createSpecies
def createSpeciesType
def createTrigger
def createUnit
def createUnitDefinition
def getAncestorOfType
def getAnnotation
def getAnnotationString
def getColumn
def getCompartment
def getCompartmentType
def getConstraint
def getCVTerm
def getCVTerms
def getElementName
def getEvent
def getFunctionDefinition
def getId
def getInitialAssignment
def getLevel
def getLine
def getListOfCompartments
def getListOfCompartmentTypes
def getListOfConstraints
def getListOfEvents
def getListOfFunctionDefinitions
def getListOfInitialAssignments
def getListOfParameters
def getListOfReactions
def getListOfRules
def getListOfSpecies
def getListOfSpeciesTypes
def getListOfUnitDefinitions
def getMetaId
def getModel
def getModelHistory
def getName
def getNamespaces
def getNotes
def getNotesString
def getNumCompartments
def getNumCompartmentTypes
def getNumConstraints
def getNumCVTerms
def getNumEvents
def getNumFunctionDefinitions
def getNumInitialAssignments
def getNumParameters
def getNumReactions
def getNumRules
def getNumSpecies
def getNumSpeciesTypes
def getNumSpeciesWithBoundaryCondition
def getNumUnitDefinitions
def getParameter
def getParentSBMLObject
def getReaction
def getResourceBiologicalQualifier
def getResourceModelQualifier
def getRule
def getSBMLDocument
def getSBOTerm
def getSBOTermID
def getSpecies
def getSpeciesType
def getTypeCode
def getUnitDefinition
def getVersion
def hasRequiredAttributes
def hasRequiredElements
def hasValidLevelVersionNamespaceCombination
def isPopulatedListFormulaUnitsData
def isSetAnnotation
def isSetId
def isSetMetaId
def isSetModelHistory
def isSetName
def isSetNotes
def isSetSBOTerm
def populateListFormulaUnitsData
def removeCompartment
def removeCompartmentType
def removeConstraint
def removeEvent
def removeFunctionDefinition
def removeInitialAssignment
def removeParameter
def removeReaction
def removeRule
def removeSpecies
def removeSpeciesType
def removeUnitDefinition
def setAnnotation
def setId
def setMetaId
def setModelHistory
def setName
def setNamespaces
def setNotes
def setSBOTerm
def toSBML
def unsetAnnotation
def unsetCVTerms
def unsetId
def unsetMetaId
def unsetModelHistory
def unsetName
def unsetNotes
def unsetSBOTerm

Public Attributes

 this

Member Function Documentation

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

Definition at line 3296 of file libsbml.py.

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

Reimplemented in libsbml.SimpleSpeciesReference.

Definition at line 1771 of file libsbml.py.

def libsbml.Model.__init__ (   self,
  args 
)

Python method signature(s):

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

Removes the Event object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Event objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Event object to remove
Returns:
the Event object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Event object with the identifier exists in this Model object.
Deprecated:
libSBML internal

Definition at line 3767 of file libsbml.py.

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

Definition at line 3303 of file libsbml.py.

def libsbml.Model.addCompartment (   self,
  args 
)

Python method signature(s):

addCompartment(self, Compartment c)    int

Adds a copy of the given Compartment object to this Model.

Parameters:
c the Compartment object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createCompartment() for a method that does not lead to these issues.
See also:
createCompartment()

Definition at line 4218 of file libsbml.py.

def libsbml.Model.addCompartmentType (   self,
  args 
)

Python method signature(s):

addCompartmentType(self, CompartmentType ct)    int

Adds a copy of the given CompartmentType object to this Model.

Parameters:
ct the CompartmentType object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createCompartmentType() for a method that does not lead to these issues.
See also:
createCompartmentType()

Definition at line 4144 of file libsbml.py.

def libsbml.Model.addConstraint (   self,
  args 
)

Python method signature(s):

addConstraint(self, Constraint c)    int

Adds a copy of the given Constraint object to this Model.

Parameters:
c the Constraint object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createConstraint() for a method that does not lead to these issues.
See also:
createConstraint()

Definition at line 4406 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.Model.addEvent (   self,
  args 
)

Python method signature(s):

addEvent(self, Event e)    int

Adds a copy of the given Event object to this Model.

Parameters:
e the Event object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createEvent() for a method that does not lead to these issues.
See also:
createEvent()

Definition at line 4479 of file libsbml.py.

def libsbml.Model.addFunctionDefinition (   self,
  args 
)

Python method signature(s):

addFunctionDefinition(self, FunctionDefinition fd)    int

Adds a copy of the given FunctionDefinition object to this Model.

Parameters:
fd the FunctionDefinition to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createFunctionDefinition() for a method that does not lead to these issues.
See also:
createFunctionDefinition()

Definition at line 4070 of file libsbml.py.

def libsbml.Model.addInitialAssignment (   self,
  args 
)

Python method signature(s):

addInitialAssignment(self, InitialAssignment ia)    int

Adds a copy of the given InitialAssignment object to this Model.

Parameters:
ia the InitialAssignment object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createInitialAssignment() for a method that does not lead to these issues.
See also:
createInitialAssignment()

Definition at line 4329 of file libsbml.py.

def libsbml.Model.addParameter (   self,
  args 
)

Python method signature(s):

addParameter(self, Parameter p)    int

Adds a copy of the given Parameter object to this Model.

Parameters:
p the Parameter object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createParameter() for a method that does not lead to these issues.
See also:
createParameter()

Definition at line 4292 of file libsbml.py.

def libsbml.Model.addReaction (   self,
  args 
)

Python method signature(s):

addReaction(self, Reaction r)    int

Adds a copy of the given Reaction object to this Model.

Parameters:
r the Reaction object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createReaction() for a method that does not lead to these issues.
See also:
createReaction()

Definition at line 4442 of file libsbml.py.

def libsbml.Model.addRule (   self,
  args 
)

Python method signature(s):

addRule(self, Rule r)    int

Adds a copy of the given Rule object to this Model.

Parameters:
r the Rule object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see the methods Model.createAlgebraicRule(), Model.createAssignmentRule() and Model.createRateRule() for methods that do not lead to these issues.
See also:
createAlgebraicRule()

createAssignmentRule()

createRateRule()

Definition at line 4366 of file libsbml.py.

def libsbml.Model.addSpecies (   self,
  args 
)

Python method signature(s):

addSpecies(self, Species s)    int

Adds a copy of the given Species object to this Model.

Parameters:
s the Species object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createSpecies() for a method that does not lead to these issues.
See also:
createSpecies()

Definition at line 4255 of file libsbml.py.

def libsbml.Model.addSpeciesType (   self,
  args 
)

Python method signature(s):

addSpeciesType(self, SpeciesType st)    int

Adds a copy of the given SpeciesType object to this Model.

Parameters:
st the SpeciesType object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createSpeciesType() for a method that does not lead to these issues.
See also:
createSpeciesType()

Definition at line 4181 of file libsbml.py.

def libsbml.Model.addUnitDefinition (   self,
  args 
)

Python method signature(s):

addUnitDefinition(self, UnitDefinition ud)    int

Adds a copy of the given UnitDefinition object to this Model.

Parameters:
ud the UnitDefinition object to add
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_DUPLICATE_OBJECT_ID
  • LIBSBML_OPERATION_FAILED
Note:
This method should be used with some caution. 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 Model. Changes made to the original object instance (such as resetting attribute values) will not affect the instance in the Model. 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. Please see Model.createUnitDefinition() for a method that does not lead to these issues.
See also:
createUnitDefinition()

Definition at line 4107 of file libsbml.py.

def libsbml.Model.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)

Reimplemented from libsbml.SBase.

Definition at line 4988 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.Model.clone (   self  ) 

Python method signature(s):

clone(self)    Model

Creates and returns a deep copy of this Model object.

Returns:
a (deep) copy of this Model.

Reimplemented from libsbml.SBase.

Definition at line 3796 of file libsbml.py.

def libsbml.Model.createAlgebraicRule (   self  ) 

Python method signature(s):

createAlgebraicRule(self)    AlgebraicRule

Creates a new AlgebraicRule inside this Model and returns it.

Returns:
the AlgebraicRule object created
See also:
addRule(const Rule* r)

Definition at line 4674 of file libsbml.py.

def libsbml.Model.createAssignmentRule (   self  ) 

Python method signature(s):

createAssignmentRule(self)    AssignmentRule

Creates a new AssignmentRule inside this Model and returns it.

Returns:
the AssignmentRule object created
See also:
addRule(const Rule* r)

Definition at line 4691 of file libsbml.py.

def libsbml.Model.createCompartment (   self  ) 

Python method signature(s):

createCompartment(self)    Compartment

Creates a new Compartment inside this Model and returns it.

Returns:
the Compartment object created
See also:
addCompartment(const Compartment *c)

Definition at line 4606 of file libsbml.py.

def libsbml.Model.createCompartmentType (   self  ) 

Python method signature(s):

createCompartmentType(self)    CompartmentType

Creates a new CompartmentType inside this Model and returns it.

Returns:
the CompartmentType object created
See also:
addCompartmentType(const CompartmentType* ct)

Definition at line 4572 of file libsbml.py.

def libsbml.Model.createConstraint (   self  ) 

Python method signature(s):

createConstraint(self)    Constraint

Creates a new Constraint inside this Model and returns it.

Returns:
the Constraint object created
See also:
addConstraint(const Constraint *c)

Definition at line 4725 of file libsbml.py.

def libsbml.Model.createDelay (   self  ) 

Python method signature(s):

createDelay(self)    Delay

Creates a new Delay inside the last Event object created in this Model, and returns a pointer to it.

The mechanism by which the last Event object in this model was created is not significant. It could have been created in a variety of ways, for example by using createEvent(). If no Event object exists in this Model object, a new Delay is not created and NULL is returned instead.

Returns:
the Delay object created

Definition at line 4932 of file libsbml.py.

def libsbml.Model.createEvent (   self  ) 

Python method signature(s):

createEvent(self)    Event

Creates a new Event inside this Model and returns it.

Returns:
the Event object created

Definition at line 4873 of file libsbml.py.

def libsbml.Model.createEventAssignment (   self  ) 

Python method signature(s):

createEventAssignment(self)    EventAssignment

Creates a new EventAssignment inside the last Event object created in this Model, and returns a pointer to it.

The mechanism by which the last Event object in this model was created is not significant. It could have been created in a variety of ways, for example by using createEvent(). If no Event object exists in this Model object, a new EventAssignment is not created and NULL is returned instead.

Returns:
the EventAssignment object created

Definition at line 4888 of file libsbml.py.

def libsbml.Model.createFunctionDefinition (   self  ) 

Python method signature(s):

createFunctionDefinition(self)    FunctionDefinition

Creates a new FunctionDefinition inside this Model and returns it.

Returns:
the FunctionDefinition object created
See also:
addFunctionDefinition(const FunctionDefinition* fd)

Definition at line 4516 of file libsbml.py.

def libsbml.Model.createInitialAssignment (   self  ) 

Python method signature(s):

createInitialAssignment(self)    InitialAssignment

Creates a new InitialAssignment inside this Model and returns it.

Returns:
the InitialAssignment object created
See also:
addInitialAssignment(const InitialAssignment* ia)

Definition at line 4657 of file libsbml.py.

def libsbml.Model.createKineticLaw (   self  ) 

Python method signature(s):

createKineticLaw(self)    KineticLaw

Creates a new KineticLaw inside the last Reaction object created in this Model, and returns a pointer to it.

The mechanism by which the last Reaction object was created and added to this Model is not significant. It could have been created in a variety of ways, for example using createReaction(). If a Reaction does not exist for this model, or a Reaction exists but already has a KineticLaw, a new KineticLaw is not created and NULL is returned instead.

Returns:
the KineticLaw object created

Definition at line 4826 of file libsbml.py.

def libsbml.Model.createKineticLawParameter (   self  ) 

Python method signature(s):

createKineticLawParameter(self)    Parameter

Creates a new local Parameter inside the KineticLaw object of the last Reaction created inside this Model, and returns a pointer to it.

The last KineticLaw object in this Model could have been created in a variety of ways. For example, it could have been added using createKineticLaw(), or it could be the result of using Reaction.createKineticLaw() on the Reaction object created by a createReaction(). If a Reaction does not exist for this model, or the last Reaction does not contain a KineticLaw object, a new Parameter is not created and NULL is returned instead.

Returns:
the Parameter object created

Definition at line 4849 of file libsbml.py.

def libsbml.Model.createModifier (   self  ) 

Python method signature(s):

createModifier(self)    ModifierSpeciesReference

Creates a new ModifierSpeciesReference object for a modifier species inside the last Reaction object in this Model, and returns a pointer to it.

The mechanism by which the last Reaction object was created and added to this Model is not significant. It could have been created in a variety of ways, for example using createReaction(). If a Reaction does not exist for this model, a new ModifierSpeciesReference is not created and NULL is returned instead.

Returns:
the SpeciesReference object created

Definition at line 4803 of file libsbml.py.

def libsbml.Model.createParameter (   self  ) 

Python method signature(s):

createParameter(self)    Parameter

Creates a new Parameter inside this Model and returns it.

Returns:
the Parameter object created
See also:
addParameter(const Parameter *p)

Definition at line 4640 of file libsbml.py.

def libsbml.Model.createProduct (   self  ) 

Python method signature(s):

createProduct(self)    SpeciesReference

Creates a new SpeciesReference object for a product inside the last Reaction object in this Model, and returns a pointer to it.

The mechanism by which the last Reaction object was created and added to this Model is not significant. It could have been created in a variety of ways, for example using createReaction(). If a Reaction does not exist for this model, a new SpeciesReference is not created and NULL is returned instead.

Returns:
the SpeciesReference object created

Definition at line 4781 of file libsbml.py.

def libsbml.Model.createRateRule (   self  ) 

Python method signature(s):

createRateRule(self)    RateRule

Creates a new RateRule inside this Model and returns it.

Returns:
the RateRule object created
See also:
addRule(const Rule* r)

Definition at line 4708 of file libsbml.py.

def libsbml.Model.createReactant (   self  ) 

Python method signature(s):

createReactant(self)    SpeciesReference

Creates a new SpeciesReference object for a reactant inside the last Reaction object in this Model, and returns a pointer to it.

The mechanism by which the last Reaction object was created and added to this Model is not significant. It could have been created in a variety of ways, for example using createReaction(). If a Reaction does not exist for this model, a new SpeciesReference is not created and NULL is returned instead.

Returns:
the SpeciesReference object created

Definition at line 4759 of file libsbml.py.

def libsbml.Model.createReaction (   self  ) 

Python method signature(s):

createReaction(self)    Reaction

Creates a new Reaction inside this Model and returns it.

Returns:
the Reaction object created
See also:
addReaction(const Reaction *r)

Definition at line 4742 of file libsbml.py.

def libsbml.Model.createSpecies (   self  ) 

Python method signature(s):

createSpecies(self)    Species

Creates a new Species inside this Model and returns it.

Returns:
the Species object created
See also:
addSpecies(const Species *s)

Definition at line 4623 of file libsbml.py.

def libsbml.Model.createSpeciesType (   self  ) 

Python method signature(s):

createSpeciesType(self)    SpeciesType

Creates a new SpeciesType inside this Model and returns it.

Returns:
the SpeciesType object created
See also:
addSpeciesType(const SpeciesType* st)

Definition at line 4589 of file libsbml.py.

def libsbml.Model.createTrigger (   self  ) 

Python method signature(s):

createTrigger(self)    Trigger

Creates a new Trigger inside the last Event object created in this Model, and returns a pointer to it.

The mechanism by which the last Event object in this model was created is not significant. It could have been created in a variety of ways, for example by using createEvent(). If no Event object exists in this Model object, a new Trigger is not created and NULL is returned instead.

Returns:
the Trigger object created

Definition at line 4910 of file libsbml.py.

def libsbml.Model.createUnit (   self  ) 

Python method signature(s):

createUnit(self)    Unit

Creates a new Unit object within the last UnitDefinition object created in this model and returns a pointer to it.

The mechanism by which the UnitDefinition was created is not significant. If a UnitDefinition object does not exist in this model, a new Unit is not created and NULL is returned instead.

Returns:
the Unit object created
See also:
addUnitDefinition(const UnitDefinition* ud)

Definition at line 4550 of file libsbml.py.

def libsbml.Model.createUnitDefinition (   self  ) 

Python method signature(s):

createUnitDefinition(self)    UnitDefinition

Creates a new UnitDefinition inside this Model and returns it.

Returns:
the UnitDefinition object created
See also:
addUnitDefinition(const UnitDefinition* ud)

Definition at line 4533 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.Model.getCompartment (   self,
  args 
)

Python method signature(s):

getCompartment(self, unsigned int n)    Compartment
getCompartment(self, unsigned int n)    Compartment
getCompartment(self, string sid)    Compartment
getCompartment(self, string sid)    Compartment

Get a Compartment object based on its identifier.

Returns:
the Compartment in this Model with the identifier sid or NULL if no such Compartment exists.

Definition at line 5287 of file libsbml.py.

def libsbml.Model.getCompartmentType (   self,
  args 
)

Python method signature(s):

getCompartmentType(self, unsigned int n)    CompartmentType
getCompartmentType(self, unsigned int n)    CompartmentType
getCompartmentType(self, string sid)    CompartmentType
getCompartmentType(self, string sid)    CompartmentType

Get a CompartmentType object based on its identifier.

Returns:
the CompartmentType in this Model with the identifier sid or NULL if no such CompartmentType exists.

Definition at line 5249 of file libsbml.py.

def libsbml.Model.getConstraint (   self,
  args 
)

Python method signature(s):

getConstraint(self, unsigned int n)    Constraint
getConstraint(self, unsigned int n)    Constraint

Get the nth Constraint object in this Model.

Returns:
the nth Constraint of this Model.

Definition at line 5383 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.Model.getElementName (   self  ) 

Python method signature(s):

getElementName(self)    string

Returns the XML element name of this object, which for Model, is always 'model'.

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

Reimplemented from libsbml.SBase.

Definition at line 5664 of file libsbml.py.

def libsbml.Model.getEvent (   self,
  args 
)

Python method signature(s):

getEvent(self, unsigned int n)    Event
getEvent(self, unsigned int n)    Event
getEvent(self, string sid)    Event
getEvent(self, string sid)    Event

Get an Event object based on its identifier.

Returns:
the Event in this Model with the identifier sid or NULL if no such Event exists.

Definition at line 5418 of file libsbml.py.

def libsbml.Model.getFunctionDefinition (   self,
  args 
)

Python method signature(s):

getFunctionDefinition(self, unsigned int n)    FunctionDefinition
getFunctionDefinition(self, unsigned int n)    FunctionDefinition
getFunctionDefinition(self, string sid)    FunctionDefinition
getFunctionDefinition(self, string sid)    FunctionDefinition

Get a FunctionDefinition object based on its identifier.

Returns:
the FunctionDefinition in this Model with the identifier sid or NULL if no such FunctionDefinition exists.

Definition at line 5211 of file libsbml.py.

def libsbml.Model.getId (   self  ) 

Python method signature(s):

getId(self)    string

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

Returns:
the id of this Model.

Reimplemented from libsbml.SBase.

Definition at line 3811 of file libsbml.py.

def libsbml.Model.getInitialAssignment (   self,
  args 
)

Python method signature(s):

getInitialAssignment(self, unsigned int n)    InitialAssignment
getInitialAssignment(self, unsigned int n)    InitialAssignment
getInitialAssignment(self, string symbol)    InitialAssignment
getInitialAssignment(self, string symbol)    InitialAssignment

Get an InitialAssignment object based on the symbol to which it assigns a value.

Returns:
the InitialAssignment in this Model with the given 'symbol' attribute value or NULL if no such InitialAssignment exists.

Definition at line 5344 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.Model.getListOfCompartments (   self,
  args 
)

Python method signature(s):

getListOfCompartments(self)    ListOfCompartments
getListOfCompartments(self)    ListOfCompartments

Get the ListOfCompartments object in this Model.

Returns:
the list of Compartments for this Model.

Definition at line 5083 of file libsbml.py.

def libsbml.Model.getListOfCompartmentTypes (   self,
  args 
)

Python method signature(s):

getListOfCompartmentTypes(self)    ListOfCompartmentTypes
getListOfCompartmentTypes(self)    ListOfCompartmentTypes

Get the ListOfCompartmentTypes object in this Model.

Returns:
the list of CompartmentTypes for this Model.

Definition at line 5051 of file libsbml.py.

def libsbml.Model.getListOfConstraints (   self,
  args 
)

Python method signature(s):

getListOfConstraints(self)    ListOfConstraints
getListOfConstraints(self)    ListOfConstraints

Get the ListOfConstraints object in this Model.

Returns:
the list of Constraints for this Model.

Definition at line 5163 of file libsbml.py.

def libsbml.Model.getListOfEvents (   self,
  args 
)

Python method signature(s):

getListOfEvents(self)    ListOfEvents
getListOfEvents(self)    ListOfEvents

Get the ListOfEvents object in this Model.

Returns:
the list of Events for this Model.

Definition at line 5195 of file libsbml.py.

def libsbml.Model.getListOfFunctionDefinitions (   self,
  args 
)

Python method signature(s):

getListOfFunctionDefinitions(self)    ListOfFunctionDefinitions
getListOfFunctionDefinitions(self)    ListOfFunctionDefinitions

Get the ListOfFunctionDefinitions object in this Model.

Returns:
the list of FunctionDefinitions for this Model.

Definition at line 5019 of file libsbml.py.

def libsbml.Model.getListOfInitialAssignments (   self,
  args 
)

Python method signature(s):

getListOfInitialAssignments(self)    ListOfInitialAssignments
getListOfInitialAssignments(self)    ListOfInitialAssignments

Get the ListOfInitialAssignments object in this Model.

Returns:
the list of InitialAssignment for this Model.

Definition at line 5131 of file libsbml.py.

def libsbml.Model.getListOfParameters (   self,
  args 
)

Python method signature(s):

getListOfParameters(self)    ListOfParameters
getListOfParameters(self)    ListOfParameters

Get the ListOfParameters object in this Model.

Returns:
the list of Parameters for this Model.

Definition at line 5115 of file libsbml.py.

def libsbml.Model.getListOfReactions (   self,
  args 
)

Python method signature(s):

getListOfReactions(self)    ListOfReactions
getListOfReactions(self)    ListOfReactions

Get the ListOfReactions object in this Model.

Returns:
the list of Reactions for this Model.

Definition at line 5179 of file libsbml.py.

def libsbml.Model.getListOfRules (   self,
  args 
)

Python method signature(s):

getListOfRules(self)    ListOfRules
getListOfRules(self)    ListOfRules

Get the ListOfRules object in this Model.

Returns:
the list of Rules for this Model.

Definition at line 5147 of file libsbml.py.

def libsbml.Model.getListOfSpecies (   self,
  args 
)

Python method signature(s):

getListOfSpecies(self)    ListOfSpecies
getListOfSpecies(self)    ListOfSpecies

Get the ListOfSpecies object in this Model.

Returns:
the list of Species for this Model.

Definition at line 5099 of file libsbml.py.

def libsbml.Model.getListOfSpeciesTypes (   self,
  args 
)

Python method signature(s):

getListOfSpeciesTypes(self)    ListOfSpeciesTypes
getListOfSpeciesTypes(self)    ListOfSpeciesTypes

Get the ListOfSpeciesTypes object in this Model.

Returns:
the list of SpeciesTypes for this Model.

Definition at line 5067 of file libsbml.py.

def libsbml.Model.getListOfUnitDefinitions (   self,
  args 
)

Python method signature(s):

getListOfUnitDefinitions(self)    ListOfUnitDefinitions
getListOfUnitDefinitions(self)    ListOfUnitDefinitions

Get the ListOfUnitDefinitions object in this Model.

Returns:
the list of UnitDefinitions for this Model.

Definition at line 5035 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.Model.getModelHistory (   self,
  args 
)

Python method signature(s):

getModelHistory(self)    ModelHistory
getModelHistory(self)    ModelHistory

Returns the ModelHistory of this Model.

Returns:
ModelHistory of this Model.

Definition at line 3841 of file libsbml.py.

def libsbml.Model.getName (   self  ) 

Python method signature(s):

getName(self)    string

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

Returns:
the name of this Model.

Reimplemented from libsbml.SBase.

Definition at line 3826 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.Model.getNumCompartments (   self  ) 

Python method signature(s):

getNumCompartments(self)    unsigned int

Get the number of Compartment objects in this Model.

Returns:
the number of Compartments in this Model.

Definition at line 5497 of file libsbml.py.

def libsbml.Model.getNumCompartmentTypes (   self  ) 

Python method signature(s):

getNumCompartmentTypes(self)    unsigned int

Get the number of CompartmentType objects in this Model.

Returns:
the number of CompartmentTypes in this Model.

Definition at line 5467 of file libsbml.py.

def libsbml.Model.getNumConstraints (   self  ) 

Python method signature(s):

getNumConstraints(self)    unsigned int

Get the number of Constraint objects in this Model.

Returns:
the number of Constraints in this Model.

Definition at line 5590 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.Model.getNumEvents (   self  ) 

Python method signature(s):

getNumEvents(self)    unsigned int

Get the number of Event objects in this Model.

Returns:
the number of Events in this Model.

Definition at line 5620 of file libsbml.py.

def libsbml.Model.getNumFunctionDefinitions (   self  ) 

Python method signature(s):

getNumFunctionDefinitions(self)    unsigned int

Get the number of FunctionDefinition objects in this Model.

Returns:
the number of FunctionDefinitions in this Model.

Definition at line 5437 of file libsbml.py.

def libsbml.Model.getNumInitialAssignments (   self  ) 

Python method signature(s):

getNumInitialAssignments(self)    unsigned int

Get the number of InitialAssignment objects in this Model.

Returns:
the number of InitialAssignments in this Model.

Definition at line 5560 of file libsbml.py.

def libsbml.Model.getNumParameters (   self  ) 

Python method signature(s):

getNumParameters(self)    unsigned int

Get the number of Parameter objects in this Model.

Returns:
the number of Parameters in this Model. Parameters defined in KineticLaws are not included.

Definition at line 5544 of file libsbml.py.

def libsbml.Model.getNumReactions (   self  ) 

Python method signature(s):

getNumReactions(self)    unsigned int

Get the number of Reaction objects in this Model.

Returns:
the number of Reactions in this Model.

Definition at line 5605 of file libsbml.py.

def libsbml.Model.getNumRules (   self  ) 

Python method signature(s):

getNumRules(self)    unsigned int

Get the number of Rule objects in this Model.

Returns:
the number of Rules in this Model.

Definition at line 5575 of file libsbml.py.

def libsbml.Model.getNumSpecies (   self  ) 

Python method signature(s):

getNumSpecies(self)    unsigned int

Get the number of Specie objects in this Model.

Returns:
the number of Species in this Model.

Definition at line 5512 of file libsbml.py.

def libsbml.Model.getNumSpeciesTypes (   self  ) 

Python method signature(s):

getNumSpeciesTypes(self)    unsigned int

Get the number of SpeciesType objects in this Model.

Returns:
the number of SpeciesTypes in this Model.

Definition at line 5482 of file libsbml.py.

def libsbml.Model.getNumSpeciesWithBoundaryCondition (   self  ) 

Python method signature(s):

getNumSpeciesWithBoundaryCondition(self)    unsigned int

Get the number of Species in this Model having their 'boundaryCondition' attribute value set to true.

Returns:
the number of Species in this Model with boundaryCondition set to true.

Definition at line 5527 of file libsbml.py.

def libsbml.Model.getNumUnitDefinitions (   self  ) 

Python method signature(s):

getNumUnitDefinitions(self)    unsigned int

Get the number of UnitDefinition objects in this Model.

Returns:
the number of UnitDefinitions in this Model.

Definition at line 5452 of file libsbml.py.

def libsbml.Model.getParameter (   self,
  args 
)

Python method signature(s):

getParameter(self, unsigned int n)    Parameter
getParameter(self, unsigned int n)    Parameter
getParameter(self, string sid)    Parameter
getParameter(self, string sid)    Parameter

Get a Parameter object based on its identifier.

Returns:
the Parameter in this Model with the identifier sid or NULL if no such Parameter exists.

Definition at line 5325 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.Model.getReaction (   self,
  args 
)

Python method signature(s):

getReaction(self, unsigned int n)    Reaction
getReaction(self, unsigned int n)    Reaction
getReaction(self, string sid)    Reaction
getReaction(self, string sid)    Reaction

Get a Reaction object based on its identifier.

Returns:
the Reaction in this Model with the identifier sid or NULL if no such Reaction exists.

Definition at line 5399 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.Model.getRule (   self,
  args 
)

Python method signature(s):

getRule(self, unsigned int n)    Rule
getRule(self, unsigned int n)    Rule
getRule(self, string variable)    Rule
getRule(self, string variable)    Rule

Get a Rule object based on the variable to which it assigns a value.

Returns:
the Rule in this Model with the given 'variable' attribute value or NULL if no such Rule exists.

Definition at line 5364 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.Model.getSpecies (   self,
  args 
)

Python method signature(s):

getSpecies(self, unsigned int n)    Species
getSpecies(self, unsigned int n)    Species
getSpecies(self, string sid)    Species
getSpecies(self, string sid)    Species

Get a Species object based on its identifier.

Returns:
the Species in this Model with the identifier sid or NULL if no such Species exists.

Definition at line 5306 of file libsbml.py.

def libsbml.Model.getSpeciesType (   self,
  args 
)

Python method signature(s):

getSpeciesType(self, unsigned int n)    SpeciesType
getSpeciesType(self, unsigned int n)    SpeciesType
getSpeciesType(self, string sid)    SpeciesType
getSpeciesType(self, string sid)    SpeciesType

Get a SpeciesType object based on its identifier.

Returns:
the SpeciesType in this Model with the identifier sid or NULL if no such SpeciesType exists.

Definition at line 5268 of file libsbml.py.

def libsbml.Model.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 5635 of file libsbml.py.

def libsbml.Model.getUnitDefinition (   self,
  args 
)

Python method signature(s):

getUnitDefinition(self, unsigned int n)    UnitDefinition
getUnitDefinition(self, unsigned int n)    UnitDefinition
getUnitDefinition(self, string sid)    UnitDefinition
getUnitDefinition(self, string sid)    UnitDefinition

Get a UnitDefinition based on its identifier.

Returns:
the UnitDefinition in this Model with the identifier sid or NULL if no such UnitDefinition exists.

Definition at line 5230 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.SBase.hasRequiredAttributes (   self  )  [inherited]

Python method signature(s):

hasRequiredAttributes(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.FunctionDefinition, libsbml.Unit, libsbml.UnitDefinition, libsbml.CompartmentType, libsbml.SpeciesType, libsbml.Compartment, libsbml.Species, libsbml.Parameter, libsbml.InitialAssignment, libsbml.Rule, libsbml.AlgebraicRule, libsbml.AssignmentRule, libsbml.RateRule, libsbml.Reaction, libsbml.KineticLaw, libsbml.SpeciesReference, libsbml.ModifierSpeciesReference, and libsbml.EventAssignment.

Definition at line 3254 of file libsbml.py.

def libsbml.Model.hasRequiredElements (   self  ) 

Python method signature(s):

hasRequiredElements(self)    bool

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

Note:
The required elements for a Model object are: listOfCompartments (L1 only); listOfSpecies (L1V1 only); listOfReactions(L1V1 only)
Returns:
a boolean value indicating whether all the required elements for this object have been defined.

Reimplemented from libsbml.SBase.

Definition at line 5731 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.Model.isPopulatedListFormulaUnitsData (   self  ) 

Python method signature(s):

isPopulatedListFormulaUnitsData(self)    bool

Predicate returning true or false depending on whether the list of FormulaUnitsData has been populated.

Returns:
true if the list of FormulaUnitsData has been populated, false otherwise.

Definition at line 5714 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.Model.isSetId (   self  ) 

Python method signature(s):

isSetId(self)    bool

Predicate returning true or false depending on whether this Model'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 Model has been set, false otherwise.

Reimplemented from libsbml.SBase.

Definition at line 3857 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.Model.isSetModelHistory (   self  ) 

Python method signature(s):

isSetModelHistory(self)    bool

Predicate returning true or false depending on whether this Model's ModelHistory 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 ModelHistory of this Model has been set, false otherwise.

Definition at line 3895 of file libsbml.py.

def libsbml.Model.isSetName (   self  ) 

Python method signature(s):

isSetName(self)    bool

Predicate returning true or false depending on whether this Model'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 Model has been set, false otherwise.

Reimplemented from libsbml.SBase.

Definition at line 3876 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.Model.populateListFormulaUnitsData (   self  ) 

Python method signature(s):

populateListFormulaUnitsData(self)

Populates the list of FormulaDataUnits with the units derived for the model. The list contains elements of class FormulaUnitsData.

The first element of the list refers to the default units of 'substance per time' derived from the model and has the unitReferenceId 'subs_per_time'. This facilitates the comparison of units derived from mathematical formula with the expected units.

The next elements of the list record the units of the compartments and species established from either explicitly declared or default units.

The next elements record the units of any parameters.

Subsequent elements of the list record the units derived for each mathematical expression encountered within the model.

Note:
This function is utilised by the Unit Consistency Validator. The list is populated prior to running the validation and thus the consistency of units can be checked by accessing the members of the list and comparing the appropriate data.

Definition at line 5680 of file libsbml.py.

def libsbml.Model.removeCompartment (   self,
  args 
)

Python method signature(s):

removeCompartment(self, unsigned int n)    Compartment
removeCompartment(self, string sid)    Compartment

Removes the Compartment object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Compartment objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Compartment object to remove
Returns:
the Compartment object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Compartment object with the identifier exists in this Model object.

Definition at line 5854 of file libsbml.py.

def libsbml.Model.removeCompartmentType (   self,
  args 
)

Python method signature(s):

removeCompartmentType(self, unsigned int n)    CompartmentType
removeCompartmentType(self, string sid)    CompartmentType

Removes the CompartmentType object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the CompartmentType objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the object to remove
Returns:
the CompartmentType object removed. As mentioned above, the caller owns the returned object. NULL is returned if no CompartmentType object with the identifier exists in this Model object.

Definition at line 5803 of file libsbml.py.

def libsbml.Model.removeConstraint (   self,
  args 
)

Python method signature(s):

removeConstraint(self, unsigned int n)    Constraint

Removes the nth Constraint object from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters:
n the index of the Constraint object to remove
Returns:
the Constraint object removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.

Definition at line 5980 of file libsbml.py.

def libsbml.Model.removeEvent (   self,
  args 
)

Python method signature(s):

removeEvent(self, unsigned int n)    Event
removeEvent(self, string sid)    Event

Removes the Event object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Event objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Event object to remove
Returns:
the Event object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Event object with the identifier exists in this Model object.

Definition at line 6029 of file libsbml.py.

def libsbml.Model.removeFunctionDefinition (   self,
  args 
)

Python method signature(s):

removeFunctionDefinition(self, unsigned int n)    FunctionDefinition
removeFunctionDefinition(self, string sid)    FunctionDefinition

Removes the FunctionDefinition object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the FunctionDefinition objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the FunctionDefinition object to remove
Returns:
the FunctionDefinition object removed. As mentioned above, the caller owns the returned object. NULL is returned if no FunctionDefinition object with the identifier exists in this Model object.

Definition at line 5753 of file libsbml.py.

def libsbml.Model.removeInitialAssignment (   self,
  args 
)

Python method signature(s):

removeInitialAssignment(self, unsigned int n)    InitialAssignment
removeInitialAssignment(self, string symbol)    InitialAssignment

Removes the InitialAssignment object with the given 'symbol' attribute from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the InitialAssignment objects in this Model object have the 'symbol' attribute symbol, then NULL is returned.

Parameters:
symbol the 'symbol' attribute of the InitialAssignment object to remove
Returns:
the InitialAssignment object removed. As mentioned above, the caller owns the returned object. NULL is returned if no InitialAssignment object with the 'symbol' attribute exists in this Model object.

Definition at line 5930 of file libsbml.py.

def libsbml.Model.removeParameter (   self,
  args 
)

Python method signature(s):

removeParameter(self, unsigned int n)    Parameter
removeParameter(self, string sid)    Parameter

Removes the Parameter object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Parameter objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Parameter object to remove
Returns:
the Parameter object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Parameter object with the identifier exists in this Model object.

Definition at line 5905 of file libsbml.py.

def libsbml.Model.removeReaction (   self,
  args 
)

Python method signature(s):

removeReaction(self, unsigned int n)    Reaction
removeReaction(self, string sid)    Reaction

Removes the Reaction object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Reaction objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Reaction object to remove
Returns:
the Reaction object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Reaction object with the identifier exists in this Model object.

Definition at line 6003 of file libsbml.py.

def libsbml.Model.removeRule (   self,
  args 
)

Python method signature(s):

removeRule(self, unsigned int n)    Rule
removeRule(self, string variable)    Rule

Removes the Rule object with the given 'variable' attribute from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Rule objects in this Model object have the 'variable' attribute variable, then NULL is returned.

Parameters:
variable the 'variable' attribute of the Rule object to remove
Returns:
the Rule object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Rule object with the 'variable' attribute exists in this Model object.

Definition at line 5955 of file libsbml.py.

def libsbml.Model.removeSpecies (   self,
  args 
)

Python method signature(s):

removeSpecies(self, unsigned int n)    Species
removeSpecies(self, string sid)    Species

Removes the Species object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the Species objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the Species object to remove
Returns:
the Species object removed. As mentioned above, the caller owns the returned object. NULL is returned if no Species object with the identifier exists in this Model object.

Definition at line 5879 of file libsbml.py.

def libsbml.Model.removeSpeciesType (   self,
  args 
)

Python method signature(s):

removeSpeciesType(self, unsigned int n)    SpeciesType
removeSpeciesType(self, string sid)    SpeciesType

Removes the SpeciesType object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the SpeciesType objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the SpeciesType object to remove
Returns:
the SpeciesType object removed. As mentioned above, the caller owns the returned object. NULL is returned if no SpeciesType object with the identifier exists in this Model object.

Definition at line 5828 of file libsbml.py.

def libsbml.Model.removeUnitDefinition (   self,
  args 
)

Python method signature(s):

removeUnitDefinition(self, unsigned int n)    UnitDefinition
removeUnitDefinition(self, string sid)    UnitDefinition

Removes the UnitDefinition object with the given identifier from this Model object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it. If none of the UnitDefinition objects in this Model object have the identifier sid, then NULL is returned.

Parameters:
sid the identifier of the UnitDefinition object to remove
Returns:
the UnitDefinition object removed. As mentioned above, the caller owns the returned object. NULL is returned if no UnitDefinition object with the identifier exists in this Model object.

Definition at line 5778 of file libsbml.py.

def libsbml.Model.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 std.string& annotation)

Reimplemented from libsbml.SBase.

Definition at line 4954 of file libsbml.py.

def libsbml.Model.setId (   self,
  args 
)

Python method signature(s):

setId(self, string sid)    int

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

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.

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:
sid the string to use as the identifier of this Model
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE

Reimplemented from libsbml.SBase.

Definition at line 3914 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.Model.setModelHistory (   self,
  args 
)

Python method signature(s):

setModelHistory(self, ModelHistory history)    int

Sets the ModelHistory of this Model.

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:
history ModelHistory of this Model.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_OBJECT

Definition at line 3980 of file libsbml.py.

def libsbml.Model.setName (   self,
  args 
)

Python method signature(s):

setName(self, string name)    int

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

The string in name is copied.

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:
name the new name for the Model
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE

Reimplemented from libsbml.SBase.

Definition at line 3954 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.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.Model.unsetId (   self  ) 

Python method signature(s):

unsetId(self)    int

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

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 4004 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.Model.unsetModelHistory (   self  ) 

Python method signature(s):

unsetModelHistory(self)    int

Unsets the ModelHistory of this Model.

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 4048 of file libsbml.py.

def libsbml.Model.unsetName (   self  ) 

Python method signature(s):

unsetName(self)    int

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

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 4026 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.


Member Data Documentation

Reimplemented from libsbml.SBase.

Definition at line 3795 of file libsbml.py.




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