libSBML Python API  5.18.0
libsbml.FbcModelPlugin Class Reference
Inheritance diagram for libsbml.FbcModelPlugin:
[legend]

Detailed Description

fbc Extension of Model.

The FbcModelPlugin object is used to extend the standard SBML Model object with features used in the SBML Level 3 Flux Balance Constraints (“fbc”) package. In Version 1 of the “fbc” specification, the extended Model class has two optional subobjects: ListOfObjectives and ListOfFluxBounds. In Version 2 of the specification, the extended Model object is defined differently: it is extended with a new required attribute named 'strict', and the two optional subobjects ListOfObjectives and ListOfGeneProducts. (ListOfFluxBounds is not used in Version 2.)

The 'strict' attribute on the (extended) Model class

The mandatory attribute 'strict', of type boolean, in Version 2 of this package, is used to apply an additional set of restrictions to the model. The 'strict' attribute helps ensure that the Flux Balance Constraints package can be used to encode legacy flux-balance analysis models expressible as Linear Programs (LP's) for software that is unable to analyze arbitrary mathematical expressions that may appear in an SBML model. In addition, a 'strict' model is fully described and mathematically consistent, for example, by ensuring that all fluxes have a valid upper or lower bound.

The following restrictions are in effect if an “fbc” model object has a value of 'true' for the attribute 'strict' on Model:

  • Each Reaction in a Model must define values for the attributes 'lowerFluxBound' and 'upperFluxBound', with each attribute pointing to a valid Parameter object defined in the current Model.
  • Each Parameter object referred to by the Reaction attributes 'lowerFluxBound' and 'upperFluxBound' must have its 'constant' attribute set to the value 'true' and its 'value' attribute set to a value of type double. This value may not be 'NaN'.
  • SpeciesReference objects in Reaction objects must have their 'stoichiometry' attribute set to a double value that is not 'NaN', nor '-INF', nor 'INF'. In addition, the value of their 'constant' attribute must be set to 'true'.
  • All defined FluxObjective objects must have their coefficient attribute set to a double value that is not 'NaN', nor '-INF', nor 'INF'.
  • A Reaction 'lowerFluxBound' attribute may not point to a Parameter object that has a value of 'INF'.
  • A Reaction 'upperFluxBound' attribute may not point to a Parameter object that has a value of '-INF'.
  • For all Reaction objects, the value of a 'lowerFluxBound' attribute must be less than or equal to the value of the 'upperFluxBound' attribute.

While it is not compulsory for a 'strict' Flux Balance Constraints model to define an Objective, doing so does does allow the model to be formulated as a Linear Program and optimized. However, this decision is left to the modeler. Note that all other properties of the objects referred to in the list above are to be set as specified in the relevant SBML Level 3 Version 1 Core and Flux Balance Constraints (“fbc”) specifications.

Alternatively, if the value of the strict attribute is 'false', then none of these restrictions apply and the model creator can choose to define “fbc” models that are not necessarily encodable as an LP. For example, if strict is 'false', the InitialAssignment construct may be used to set any valid numerical entity, including Parameter values and stoichiometric coefficients, with any value of type double. In addition, Parameter elements are no longer required to be flagged as constant, thus allowing for a Flux Balance Constraints model's use in alternative, hybrid modeling strategies.

Lists of subobjects on the (extended) Model class

The ListOfObjectives is used to define the objectives of a given “fbc” model. Objectives generally consist of linear combinations of model variables (fluxes) and a direction for the optimality constraint (either maximization or minimization). Each Objective has a ListOfFluxObjectives subobjects.

In Version 2 of “fbc”, the ListOfGeneProducts is used to define the gene products represented by the “fbc” model.

In Version 1 of “fbc”, there is no ListOfGeneProducts, and instead, Model can have an optional ListOfFluxBounds.

See also
Objective
FluxObjective
FluxBound

Public Member Functions

def __init__ (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def addFluxBound (self, bound)
 Adds a copy of the given FluxBound object to the list of FluxBounds. More...
 
def addGeneAssociation (self, association)
 Adds a copy of the given GeneAssociation annotation object to the list of GeneAssociations. More...
 
def addGeneProduct (self, gp)
 Adds a copy the given GeneProduct to this FbcModelPlugin. More...
 
def addObjective (self, o)
 Adds a copy the given Objective to this FbcModelPlugin. More...
 
def clone (self)
 Creates and returns a deep copy of this FbcModelPlugin object. More...
 
def createFluxBound (self)
 Creates a new FluxBound object and adds it to the list of FluxBound objects and returns it. More...
 
def createGeneAssociation (self)
 Creates a new GeneAssociation annotation object and adds it to the list of GeneAssociation objects and returns it. More...
 
def createGeneProduct (self)
 Creates a new GeneProduct object, adds it to this FbcModelPlugin's ListOfGeneProducts and returns the GeneProduct object created. More...
 
def createObjective (self)
 Creates a new Objective object, adds it to this FbcModelPlugin's ListOfObjectives and returns the Objective object created. More...
 
def getActiveObjective (self, args)
 Returns the current active objective. More...
 
def getActiveObjectiveId (self)
 Returns the id of the current active objective. More...
 
def getElementByMetaId (self, metaid)
 Return the first child object found with a given meta identifier. More...
 
def getElementBySId (self, id)
 Return the first child object found with a given identifier. More...
 
def getElementNamespace (self)
 Returns the namespace URI of the package to which this plugin object belongs. More...
 
def getFluxBound (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def getFluxBoundsForReaction (self, reaction)
 Creates a new ListOfFluxBounds object that contains only the FluxBound objects associated with the given Reaction. More...
 
def getGeneAssociation (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def getGeneProduct (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def getGeneProductByLabel (self, label)
 Get a GeneProduct from the ListOfGeneProducts based on its label. More...
 
def getLevel (self)
 Returns the SBML Level of the package extension of this plugin object. More...
 
def getListOfAllElements (self, filter=None)
 Returns an SBaseList of all child SBase objects, including those nested to an arbitrary depth. More...
 
def getListOfFluxBounds (self, args)
 Returns the ListOfFluxBounds in this plugin object. More...
 
def getListOfGeneAssociations (self, args)
 Returns the ListOfGeneAssociations annotation object for level 1 in this plugin object. More...
 
def getListOfGeneProducts (self, args)
 Returns the ListOfGeneProducts in this FbcModelPlugin object. More...
 
def getListOfObjectives (self, args)
 Returns the ListOfObjectives in this FbcModelPlugin object. More...
 
def getNumFluxBounds (self)
 Returns the number of FluxBound object in this plugin object. More...
 
def getNumGeneAssociations (self)
 Returns the number of GeneAssociation annotation object in this plugin object. More...
 
def getNumGeneProducts (self)
 Get the number of GeneProduct objects in this FbcModelPlugin. More...
 
def getNumObjectives (self)
 Get the number of Objective objects in this FbcModelPlugin. More...
 
def getObjective (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def getPackageName (self)
 Returns the short-form name of the package to which this plugin object belongs. More...
 
def getPackageVersion (self)
 Returns the package version of the package extension of this plugin object. More...
 
def getParentSBMLObject (self, args)
 Returns the parent object to which this plugin object is connected. More...
 
def getPrefix (self)
 Returns the XML namespace prefix of the package to which this plugin object belongs. More...
 
def getSBMLDocument (self, args)
 Returns the SBMLDocument object containing this object instance. More...
 
def getStrict (self)
 Returns the value of the 'strict' attribute of this FbcModelPlugin. More...
 
def getURI (self)
 Returns the XML namespace URI for the package to which this object belongs. More...
 
def getVersion (self)
 Returns the Version within the SBML Level of the package extension of this plugin object. More...
 
def isSetStrict (self)
 Predicate returning True if this FbcModelPlugin's 'strict' attribute is set. More...
 
def isValidTypeForList (self, item)
 
def removeFluxBound (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def removeGeneAssociation (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def removeGeneProduct (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def removeObjective (self, args)
 This method has multiple variants; they differ in the arguments they accept. More...
 
def renameMetaIdRefs (self, oldid, newid)
 Replaces all uses of a given meta identifier attribute value with another value. More...
 
def renameSIdRefs (self, oldid, newid)
 Replaces all uses of a given SIdRef type attribute value with another value. More...
 
def renameUnitSIdRefs (self, oldid, newid)
 Replaces all uses of a given UnitSIdRef type attribute value with another value. More...
 
def setActiveObjectiveId (self, objectiveId)
 Sets the id of the active objective. More...
 
def setElementNamespace (self, uri)
 Sets the XML namespace to which this object belongs. More...
 
def setStrict (self, strict)
 Sets the value of the 'strict' attribute of this FbcModelPlugin. More...
 
def unsetActiveObjectiveId (self)
 Unsets the 'activeObjective' attribute of the ListOfObjectives. More...
 
def unsetStrict (self)
 Unsets the value of the 'strict' attribute of this FbcModelPlugin. More...
 

Constructor & Destructor Documentation

def libsbml.FbcModelPlugin.__init__ (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

__init__(string uri, string prefix, FbcPkgNamespaces fbcns)   FbcModelPlugin
__init__(FbcModelPlugin orig)   FbcModelPlugin

Each variant is described separately below.


Method variant with the following signature:
FbcModelPlugin(FbcModelPlugin orig)

Copy constructor for FbcModelPlugin.

Parameters
origthe FbcModelPlugin instance to copy.

Method variant with the following signature:
FbcModelPlugin(string uri, string prefix, FbcPkgNamespaces fbcns)

Creates a new FbcModelPlugin object using the given parameters.

In the XML representation of an SBML document, XML namespaces are used to identify the origin of each XML construct used. XML namespaces are identified by their unique resource identifiers (URIs). The core SBML specifications stipulate the namespaces that must be used for core SBML constructs; for example, all XML elements that belong to SBML Level 3 Version 1 Core must be placed in the XML namespace identified by the URI 'http://www.sbml.org/sbml/level3/version1/core'. Individual SBML Level 3 packages define their own XML namespaces; for example, all elements belonging to the SBML Level 3 Layout Version 1 package must be placed in the XML namespace 'http://www.sbml.org/sbml/level3/version1/layout/version1/'.
The SBMLNamespaces object encapsulates SBML Level/Version/namespaces information. It is used to communicate the SBML Level, Version, and (in Level 3) packages used in addition to SBML Level 3 Core. A common approach to using libSBML's SBMLNamespaces facilities is to create an SBMLNamespaces object somewhere in a program once, then hand that object as needed to object constructors that accept SBMLNamespaces as arguments.
Parameters
urithe URI of the SBML Level 3 package implemented by this libSBML package extension.
prefixthe XML namespace prefix being used for the package.
fbcnsthe namespaces object for the package.

Member Function Documentation

def libsbml.FbcModelPlugin.addFluxBound (   self,
  bound 
)

Adds a copy of the given FluxBound object to the list of FluxBounds.

addFluxBound(FluxBound bound)   int
Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
boundthe FluxBound object to be added to the list of FluxBounds.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.FbcModelPlugin.addGeneAssociation (   self,
  association 
)

Adds a copy of the given GeneAssociation annotation object to the list of GeneAssociations.

addGeneAssociation(GeneAssociation association)   int
Parameters
associationthe GeneAssociation annotation object to be added to the list of GeneAssociations.
Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.FbcModelPlugin.addGeneProduct (   self,
  gp 
)

Adds a copy the given GeneProduct to this FbcModelPlugin.

addGeneProduct(GeneProduct gp)   int
Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
gpthe GeneProduct object to add.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.FbcModelPlugin.addObjective (   self,
  o 
)

Adds a copy the given Objective to this FbcModelPlugin.

addObjective(Objective o)   int
Parameters
othe Objective object to add.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.FbcModelPlugin.clone (   self)

Creates and returns a deep copy of this FbcModelPlugin object.

clone()   FbcModelPlugin
Returns
a (deep) copy of this FbcModelPlugin object.
def libsbml.FbcModelPlugin.createFluxBound (   self)

Creates a new FluxBound object and adds it to the list of FluxBound objects and returns it.

createFluxBound()   FluxBound
Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Returns
a newly created FluxBound object.
def libsbml.FbcModelPlugin.createGeneAssociation (   self)

Creates a new GeneAssociation annotation object and adds it to the list of GeneAssociation objects and returns it.

createGeneAssociation()   GeneAssociation
Returns
a newly created GeneAssociation annotation object.
def libsbml.FbcModelPlugin.createGeneProduct (   self)

Creates a new GeneProduct object, adds it to this FbcModelPlugin's ListOfGeneProducts and returns the GeneProduct object created.

createGeneProduct()   GeneProduct
Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Returns
a new GeneProduct object instance.
See also
addGeneProduct()
def libsbml.FbcModelPlugin.createObjective (   self)

Creates a new Objective object, adds it to this FbcModelPlugin's ListOfObjectives and returns the Objective object created.

createObjective()   Objective
Returns
a new Objective object instance.
See also
addObjective()
def libsbml.FbcModelPlugin.getActiveObjective (   self,
  args 
)

Returns the current active objective.

getActiveObjective()   Objective
Returns
the Objective pointed to by the 'activeObjective' attribute, or None if no such Objective can be found.
def libsbml.FbcModelPlugin.getActiveObjectiveId (   self)

Returns the id of the current active objective.

getActiveObjectiveId()   string
Returns
the value of the 'activeObjective' attribute of the ListOfObjectives.
def libsbml.SBasePlugin.getElementByMetaId (   self,
  metaid 
)
inherited

Return the first child object found with a given meta identifier.

getElementByMetaId(string metaid)   SBase

This method searches all the subobjects under this one, compares their meta identifiers to metaid, and returns the first one that machines.

Parameters
metaidstring, the metaid of the object to find.
Returns
pointer to the first object found with the given metaid.
def libsbml.SBasePlugin.getElementBySId (   self,
  id 
)
inherited

Return the first child object found with a given identifier.

getElementBySId(string id)   SBase

This method searches all the subobjects under this one, compares their identifiers to id, and returns the first one that machines.

Normally, SId type identifier values are unique across a model in SBML. However, in some circumstances they may not be, such as if a model is invalid because of multiple objects having the same identifier.

Parameters
idstring representing the identifier of the object to find.
Returns
pointer to the first object with the given id.
def libsbml.SBasePlugin.getElementNamespace (   self)
inherited

Returns the namespace URI of the package to which this plugin object belongs.

getElementNamespace()   string
Returns
the XML namespace URI of the SBML Level 3 package implemented by this libSBML package extension.
def libsbml.FbcModelPlugin.getFluxBound (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

getFluxBound(long  n)   FluxBound
getFluxBound(string sid)   FluxBound

Each variant is described separately below.


Method variant with the following signature:
getFluxBound(long n)

Returns the FluxBound object that belongs to the given index. If the index is invalid, None is returned.

Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
nthe index number of the FluxBound to get.
Returns
the nth FluxBound in the ListOfFluxBounds. If the index n is invalid, None is returned.

Method variant with the following signature:
getFluxBound(string sid)

Returns the FluxBound object based on its identifier.

Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
sida string representing the identifier of the FluxBound to get.
Returns
FluxBound in the ListOfFluxBounds with the given sid or None if no such FluxBound exists.
See also
getFluxBound()
getListOfFluxBounds()
def libsbml.FbcModelPlugin.getFluxBoundsForReaction (   self,
  reaction 
)

Creates a new ListOfFluxBounds object that contains only the FluxBound objects associated with the given Reaction.

getFluxBoundsForReaction(string reaction)   ListOfFluxBounds

If no such Reaction can be found, or if there are no FluxBound objects associated with it, returns None.

Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
reactionthe id of an reaction to find FluxBound objects for.
Returns
a ListOfFluxBounds for the given reaction id.
def libsbml.FbcModelPlugin.getGeneAssociation (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

getGeneAssociation(long  n)   GeneAssociation
getGeneAssociation(string sid)   GeneAssociation

Each variant is described separately below.


Method variant with the following signature:
getGeneAssociation(long n)

Returns the GeneAssociation annotation object that belongs to the given index. If the index is invalid, None is returned.

Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Parameters
nthe index number of the GeneAssociation annotation to get.
Returns
the nth GeneAssociation annotation in the ListOfGeneAssociations. If the index n is invalid, None is returned.

Method variant with the following signature:
getGeneAssociation(string sid)

Returns the GeneAssociation annotation object based on its identifier.

Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Parameters
sida string representing the identifier of the GeneAssociation annotation to get.
Returns
GeneAssociation annotation in the ListOfGeneAssociations with the given sid or None if no such GeneAssociation annotation exists.
See also
getGeneAssociation()
getListOfGeneAssociations()
def libsbml.FbcModelPlugin.getGeneProduct (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

getGeneProduct(long  n)   GeneProduct
getGeneProduct(string sid)   GeneProduct

Each variant is described separately below.


Method variant with the following signature:
getGeneProduct(long n)

Get a GeneProduct from the ListOfGeneProducts.

Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
nthe index number of the GeneProduct to get.
Returns
the nth GeneProduct in the ListOfGeneProducts within this FbcModelPlugin. If the index n is invalid, None is returned.
See also
getNumGeneProducts()

Method variant with the following signature:
getGeneProduct(string sid)

Get a GeneProduct from the ListOfGeneProducts based on its identifier.

Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
sida string representing the identifier of the GeneProduct to get.
Returns
the GeneProduct in the ListOfGeneProducts with the given id or None if no such GeneProduct exists.
See also
getGeneProduct()
getNumGeneProducts()
def libsbml.FbcModelPlugin.getGeneProductByLabel (   self,
  label 
)

Get a GeneProduct from the ListOfGeneProducts based on its label.

getGeneProductByLabel(string label)   GeneProduct
Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
labela string representing the label of the GeneProduct to get.
Returns
the GeneProduct in the ListOfGeneProducts with the given label or None if no such GeneProduct exists.
See also
getGeneProduct()
getNumGeneProducts()
def libsbml.SBasePlugin.getLevel (   self)
inherited

Returns the SBML Level of the package extension of this plugin object.

getLevel()   long
Returns
the SBML Level.
See also
getVersion()
def libsbml.SBasePlugin.getListOfAllElements (   self,
  filter = None 
)
inherited

Returns an SBaseList of all child SBase objects, including those nested to an arbitrary depth.

getListOfAllElements(ElementFilter filter)   SBaseList
getListOfAllElements()   SBaseList
Returns
a list of all objects that are children of this object.
def libsbml.FbcModelPlugin.getListOfFluxBounds (   self,
  args 
)

Returns the ListOfFluxBounds in this plugin object.

getListOfFluxBounds()   ListOfFluxBounds
Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Returns
ListOfFluxBounds object in this plugin object.
def libsbml.FbcModelPlugin.getListOfGeneAssociations (   self,
  args 
)

Returns the ListOfGeneAssociations annotation object for level 1 in this plugin object.

getListOfGeneAssociations()   ListOfGeneAssociations
Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Returns
ListOfGeneAssociations annotation object for level 1 in this plugin object.
def libsbml.FbcModelPlugin.getListOfGeneProducts (   self,
  args 
)

Returns the ListOfGeneProducts in this FbcModelPlugin object.

getListOfGeneProducts()   ListOfGeneProducts
Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Returns
the ListOfGeneProducts child of this FbcModelPlugin.
def libsbml.FbcModelPlugin.getListOfObjectives (   self,
  args 
)

Returns the ListOfObjectives in this FbcModelPlugin object.

getListOfObjectives()   ListOfObjectives
Returns
the ListOfObjectives child of this FbcModelPlugin.
def libsbml.FbcModelPlugin.getNumFluxBounds (   self)

Returns the number of FluxBound object in this plugin object.

getNumFluxBounds()   long
Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Returns
the number of FluxBound object in this plugin object.
def libsbml.FbcModelPlugin.getNumGeneAssociations (   self)

Returns the number of GeneAssociation annotation object in this plugin object.

getNumGeneAssociations()   int
Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Returns
the number of GeneAssociation annotation object in this plugin object.
def libsbml.FbcModelPlugin.getNumGeneProducts (   self)

Get the number of GeneProduct objects in this FbcModelPlugin.

getNumGeneProducts()   long
Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Returns
the number of GeneProduct objects in this FbcModelPlugin.
def libsbml.FbcModelPlugin.getNumObjectives (   self)

Get the number of Objective objects in this FbcModelPlugin.

getNumObjectives()   long
Returns
the number of Objective objects in this FbcModelPlugin.
def libsbml.FbcModelPlugin.getObjective (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

getObjective(long  n)   Objective
getObjective(string sid)   Objective

Each variant is described separately below.


Method variant with the following signature:
getObjective(long n)

Get an Objective from the ListOfObjectives.

Parameters
nthe index number of the Objective to get.
Returns
the nth Objective in the ListOfObjectives within this FbcModelPlugin. If the index n is invalid, None is returned.
See also
getNumObjectives()

Method variant with the following signature:
getObjective(string sid)

Get an Objective from the ListOfObjectives based on its identifier.

Parameters
sida string representing the identifier of the Objective to get.
Returns
the Objective in the ListOfObjectives with the given id or None if no such Objective exists.
See also
getObjective()
getNumObjectives()
def libsbml.SBasePlugin.getPackageName (   self)
inherited

Returns the short-form name of the package to which this plugin object belongs.

getPackageName()   string
Returns
the short-form package name (or nickname) of the SBML package implemented by this package extension.
def libsbml.SBasePlugin.getPackageVersion (   self)
inherited

Returns the package version of the package extension of this plugin object.

getPackageVersion()   long
Returns
the package version of the package extension of this plugin object.
See also
getLevel()
getVersion()
def libsbml.SBasePlugin.getParentSBMLObject (   self,
  args 
)
inherited

Returns the parent object to which this plugin object is connected.

getParentSBMLObject()   SBase
Returns
the parent object of this object.
def libsbml.SBasePlugin.getPrefix (   self)
inherited

Returns the XML namespace prefix of the package to which this plugin object belongs.

getPrefix()   string
Returns
the XML namespace prefix of the SBML Level 3 package implemented by this libSBML package extension.
def libsbml.SBasePlugin.getSBMLDocument (   self,
  args 
)
inherited

Returns the SBMLDocument object containing this object instance.

getSBMLDocument()   SBMLDocument
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 3 and Level 2 specifications, 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, Level 2 or Level 3.)

This method allows the caller to obtain the SBMLDocument for the current object.

Returns
the parent SBMLDocument object of this plugin object.
See also
getParentSBMLObject()
def libsbml.FbcModelPlugin.getStrict (   self)

Returns the value of the 'strict' attribute of this FbcModelPlugin.

getStrict()   bool
Note
The 'strict' attribute of the FbcModelPlugin is only defined for version 2 of the 'Flux Balance Constraints' specification, and has no equivalent in version 1 of the specification.
Returns
the value of the 'strict' attribute of this FbcModelPlugin as a boolean.
def libsbml.SBasePlugin.getURI (   self)
inherited

Returns the XML namespace URI for the package to which this object belongs.

getURI()   string
In the XML representation of an SBML document, XML namespaces are used to identify the origin of each XML construct used. XML namespaces are identified by their unique resource identifiers (URIs). The core SBML specifications stipulate the namespaces that must be used for core SBML constructs; for example, all XML elements that belong to SBML Level 3 Version 1 Core must be placed in the XML namespace identified by the URI 'http://www.sbml.org/sbml/level3/version1/core'. Individual SBML Level 3 packages define their own XML namespaces; for example, all elements belonging to the SBML Level 3 Layout Version 1 package must be placed in the XML namespace 'http://www.sbml.org/sbml/level3/version1/layout/version1/'.

This method first looks into the SBMLNamespaces object possessed by the parent SBMLDocument object of the current object. If this cannot be found, this method returns the result of getElementNamespace().

Returns
a string, the URI of the XML namespace to which this object belongs.
See also
getPackageName()
getElementNamespace()
getSBMLDocument()
def libsbml.SBasePlugin.getVersion (   self)
inherited

Returns the Version within the SBML Level of the package extension of this plugin object.

getVersion()   long
Returns
the SBML Version.
See also
getLevel()
def libsbml.FbcModelPlugin.isSetStrict (   self)

Predicate returning True if this FbcModelPlugin's 'strict' attribute is set.

isSetStrict()   bool
Note
The 'strict' attribute of the FbcModelPlugin is only defined for version 2 of the 'Flux Balance Constraints' specification, and has no equivalent in version 1 of the specification.
Returns
True if this FbcModelPlugin's 'strict' attribute has been set, otherwise False is returned.
def libsbml.SBasePlugin.isValidTypeForList (   self,
  item 
)
inherited
isValidTypeForList(SBase item)   bool
 
def libsbml.FbcModelPlugin.removeFluxBound (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

removeFluxBound(long  n)   FluxBound
removeFluxBound(string sid)   FluxBound

Each variant is described separately below.


Method variant with the following signature:
removeFluxBound(long n)

Removes the nth FluxBound object from this plugin object and returns a pointer to it.

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

Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
nthe index of the FluxBound object to remove.
Returns
the FluxBound object removed. As mentioned above, the caller owns the returned object. None is returned if the given index is out of range.

Method variant with the following signature:
removeFluxBound(string sid)

Removes the FluxBound object with the given sid attribute from this plugin object and returns a pointer to it.

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

Note
FluxBound objects are only defined for version 1 of the 'Flux Balance Constraints' specification, and are replaced in version 2 by the 'upperFluxBound' and 'lowerFluxBound' attributes of the FbcReactionPlugin.
Parameters
sidthe id attribute of the FluxBound object to remove.
Returns
the FluxBound object removed. As mentioned above, the caller owns the returned object. None is returned if the given index is out of range.
def libsbml.FbcModelPlugin.removeGeneAssociation (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

removeGeneAssociation(long  n)   GeneAssociation
removeGeneAssociation(string sid)   GeneAssociation

Each variant is described separately below.


Method variant with the following signature:
removeGeneAssociation(long n)

Removes the nth GeneAssociation annotation object from this plugin object and returns a pointer to it.

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

Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Parameters
nthe index of the GeneAssociation annotation object to remove.
Returns
the GeneAssociation annotation object removed. As mentioned above, the caller owns the returned object. None is returned if the given index is out of range.

Method variant with the following signature:
removeGeneAssociation(string sid)

Removes the GeneAssociation annotation object with the given sid attribute from this plugin object and returns a pointer to it.

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

Note
GeneAssociation objects are not defined in any version of the 'Flux Balance Constraints' specification, and can only be used for annotation purposes. Version 2 instead defines the GeneProduct and GeneProductAssociation classes to cover the information otherwise encoded here.
Parameters
sidthe id attribute of the GeneAssociation annotation object to remove.
Returns
the GeneAssociation annotation object removed. As mentioned above, the caller owns the returned object. None is returned if the given index is out of range.
def libsbml.FbcModelPlugin.removeGeneProduct (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

removeGeneProduct(long  n)   GeneProduct
removeGeneProduct(string sid)   GeneProduct

Each variant is described separately below.


Method variant with the following signature:
removeGeneProduct(long n)

Removes the nth GeneProduct from the ListOfGeneProducts within this FbcModelPlugin. and returns a pointer to it.

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

Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
nthe index of the GeneProduct to remove.
See also
getNumGeneProducts()

Method variant with the following signature:
removeGeneProduct(string sid)

Removes the GeneProduct with the given identifier from the ListOfGeneProducts within this FbcModelPlugin and returns a pointer to it.

The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier sid, then None is returned.

Note
GeneProduct objects are only defined for version 2 of the 'Flux Balance Constraints' specification, and have no equivalent in version 1 of the specification.
Parameters
sidthe identifier of the GeneProduct to remove.
Returns
the GeneProduct removed. As mentioned above, the caller owns the returned item.
def libsbml.FbcModelPlugin.removeObjective (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

removeObjective(long  n)   Objective
removeObjective(string sid)   Objective

Each variant is described separately below.


Method variant with the following signature:
removeObjective(long n)

Removes the nth Objective from the ListOfObjectives within this FbcModelPlugin. and returns a pointer to it.

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

Parameters
nthe index of the Objective to remove.
See also
getNumObjectives()

Method variant with the following signature:
removeObjective(string sid)

Removes the Objective with the given identifier from the ListOfObjectives within this FbcModelPlugin and returns a pointer to it.

The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier sid, then None is returned.

Parameters
sidthe identifier of the Objective to remove.
Returns
the Objective removed. As mentioned above, the caller owns the returned item.
def libsbml.SBasePlugin.renameMetaIdRefs (   self,
  oldid,
  newid 
)
inherited

Replaces all uses of a given meta identifier attribute value with another value.

renameMetaIdRefs(string oldid, string newid)
In SBML, object 'meta' identifiers are of the XML data type ID; the SBML object attribute itself is typically named metaid. All attributes that hold values referring to values of type ID are of the XML data type IDREF. They are also sometimes informally referred to as 'metaid refs', in analogy to the SBML-defined type SIdRef.

This method works by looking at all meta-identifier attribute values, comparing the identifiers to the value of oldid. If any matches are found, the matching identifiers are replaced with newid. The method does not descend into child elements.

Parameters
oldidthe old identifier.
newidthe new identifier.
def libsbml.SBasePlugin.renameSIdRefs (   self,
  oldid,
  newid 
)
inherited

Replaces all uses of a given SIdRef type attribute value with another value.

renameSIdRefs(string oldid, string newid)
In SBML, object identifiers are of a data type called SId. In SBML Level 3, an explicit data type called SIdRef was introduced for attribute values that refer to SId values; in previous Levels of SBML, this data type did not exist and attributes were simply described to as 'referring to an identifier', but the effective data type was the same as SIdRef in Level 3. These and other methods of libSBML refer to the type SIdRef for all Levels of SBML, even if the corresponding SBML specification did not explicitly name the data type.

This method works by looking at all attributes and (if appropriate) mathematical formulas in MathML content, comparing the referenced identifiers to the value of oldid. If any matches are found, the matching values are replaced with newid. The method does not descend into child elements.

Parameters
oldidthe old identifier.
newidthe new identifier.
def libsbml.SBasePlugin.renameUnitSIdRefs (   self,
  oldid,
  newid 
)
inherited

Replaces all uses of a given UnitSIdRef type attribute value with another value.

renameUnitSIdRefs(string oldid, string newid)
In SBML, unit definitions have identifiers of type UnitSId. In SBML Level 3, an explicit data type called UnitSIdRef was introduced for attribute values that refer to UnitSId values; in previous Levels of SBML, this data type did not exist and attributes were simply described to as 'referring to a unit identifier', but the effective data type was the same as UnitSIdRef in Level 3. These and other methods of libSBML refer to the type UnitSIdRef for all Levels of SBML, even if the corresponding SBML specification did not explicitly name the data type.

This method works by looking at all unit identifier attribute values (including, if appropriate, inside mathematical formulas), comparing the referenced unit identifiers to the value of oldid. If any matches are found, the matching values are replaced with newid. The method does not descend into child elements.

Parameters
oldidthe old identifier.
newidthe new identifier.
def libsbml.FbcModelPlugin.setActiveObjectiveId (   self,
  objectiveId 
)

Sets the id of the active objective.

setActiveObjectiveId(string objectiveId)   int
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.SBasePlugin.setElementNamespace (   self,
  uri 
)
inherited

Sets the XML namespace to which this object belongs.

setElementNamespace(string uri)   int
In the XML representation of an SBML document, XML namespaces are used to identify the origin of each XML construct used. XML namespaces are identified by their unique resource identifiers (URIs). The core SBML specifications stipulate the namespaces that must be used for core SBML constructs; for example, all XML elements that belong to SBML Level 3 Version 1 Core must be placed in the XML namespace identified by the URI 'http://www.sbml.org/sbml/level3/version1/core'. Individual SBML Level 3 packages define their own XML namespaces; for example, all elements belonging to the SBML Level 3 Layout Version 1 package must be placed in the XML namespace 'http://www.sbml.org/sbml/level3/version1/layout/version1/'.
Parameters
urithe URI to assign to this object.
Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:
See also
getElementNamespace()
def libsbml.FbcModelPlugin.setStrict (   self,
  strict 
)

Sets the value of the 'strict' attribute of this FbcModelPlugin.

setStrict(bool strict)   int
Note
The 'strict' attribute of the FbcModelPlugin is only defined for version 2 of the 'Flux Balance Constraints' specification, and has no equivalent in version 1 of the specification.
Parameters
strictbool value of the 'strict' attribute to be set.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.FbcModelPlugin.unsetActiveObjectiveId (   self)

Unsets the 'activeObjective' attribute of the ListOfObjectives.

unsetActiveObjectiveId()   int
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
success status
def libsbml.FbcModelPlugin.unsetStrict (   self)

Unsets the value of the 'strict' attribute of this FbcModelPlugin.

unsetStrict()   int
Note
The 'strict' attribute of the FbcModelPlugin is only defined for version 2 of the 'Flux Balance Constraints' specification, and has no equivalent in version 1 of the specification.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are: