libSBML C API  5.18.0
FbcSpeciesPlugin_t Class Reference

Detailed Description

fbc Extension of Species_t.

The FbcSpeciesPlugin_t class codifies an extension of the core SBML Species_t class defined in the SBML Level 3 Flux Balance Constraints (“fbc”) package. The “fbc” package adds two attributes named "charge" and "chemicalFormula" to Species_t.

The optional attribute "charge" can contain a signed integer that refers to the Species_t object's electrical charge (in terms of electrons, not the SI unit of coulombs). Note that this attribute is therefore defined as it is in the SBML Level 2 Version 1 specification. (The charge attribute was removed in higher Versions and Levels of SBML, and is not an attribute of SBML Species_t in core SBML Level 3. However, it is useful for flux balance constraints models, and thus, the Level 3 “fbc” package adds it.)

The optional attribute "chemicalFormula" can contain a text string that represents the elemental composition of the substance represented by the Species_t object. The purpose of the "chemicalFormula" attribute is to allow balancing and validating reactions. This is particularly important in constraint-based models. The format of "chemicalFormula" must consist only of atomic names (as given in the Periodic Table of elements) or user-defined compounds, either of which take the form of a single capital letter followed by zero or more lowercase letters. Where there is more than a single atom present, this is indicated with an integer. With regards to order (and to enhance interoperability of models), users are advised to employ the Hill system order. Using this notation, the number of carbon atoms in a molecule is indicated first, followed by the number of hydrogen atoms, and then the number of all other chemical elements in alphabetical order. When the formula contains no carbon, all elements including hydrogen are listed alphabetically.

Here is an example of the XML form of an extended Species_t definition with these attributes:

<species metaid="meta_M_atp_c" id="M_atp_c" name="ATP" compartment="Cytosol"
boundaryCondition="false" initialConcentration="0" hasOnlySubstanceUnits="false"
fbc:charge="-4" fbc:chemicalFormula="C10H12N5O13P3"/>

Public Member Functions

int FbcSpeciesPlugin_getCharge (SBasePlugin_t *fbc)
 Takes a FbcSpeciesPlugin_t structure and returns its charge. More...
 
char * FbcSpeciesPlugin_getChemicalFormula (SBasePlugin_t *fbc)
 Takes a FbcSpeciesPlugin_t structure and returns its chemicalFormula. More...
 
int FbcSpeciesPlugin_isSetCharge (SBasePlugin_t *fbc)
 Predicate returning 1 (true) or 0 (false) depending on whether the given FbcSpeciesPlugin_t structure's charge is set. More...
 
int FbcSpeciesPlugin_isSetChemicalFormula (SBasePlugin_t *fbc)
 Predicate returning 1 (true) or 0 (false) depending on whether the given FbcSpeciesPlugin_t structure's chemicalFormula is set. More...
 
int FbcSpeciesPlugin_setCharge (SBasePlugin_t *fbc, int charge)
 Sets the "charge" attribute of the given FbcSpeciesPlugin_t structure. More...
 
int FbcSpeciesPlugin_setChemicalFormula (SBasePlugin_t *fbc, const char *chemicalFormula)
 Sets the chemicalFormula of the given FbcSpeciesPlugin_t to a copy of chemicalFormula. More...
 
int FbcSpeciesPlugin_unsetCharge (SBasePlugin_t *fbc)
 Unsets the "charge" attribute of the given FbcSpeciesPlugin_t structure. More...
 
int FbcSpeciesPlugin_unsetChemicalFormula (SBasePlugin_t *fbc)
 Unsets the "chemicalFormula" attribute of the given FbcSpeciesPlugin_t structure. More...
 

Member Function Documentation

int FbcSpeciesPlugin_getCharge ( SBasePlugin_t fbc)

Takes a FbcSpeciesPlugin_t structure and returns its charge.

Parameters
fbcthe FbcSpeciesPlugin_t whose charge is sought.
Returns
the charge attribute of the given FbcSpeciesPlugin_t, as an int.
char * FbcSpeciesPlugin_getChemicalFormula ( SBasePlugin_t fbc)

Takes a FbcSpeciesPlugin_t structure and returns its chemicalFormula.

Parameters
fbcthe FbcSpeciesPlugin_t whose chemicalFormula is sought.
Returns
the chemicalFormula of the given FbcSpeciesPlugin_t, as a pointer to a string.
int FbcSpeciesPlugin_isSetCharge ( SBasePlugin_t fbc)

Predicate returning 1 (true) or 0 (false) depending on whether the given FbcSpeciesPlugin_t structure's charge is set.

Parameters
fbcthe FbcSpeciesPlugin_t structure to query
Returns
1 (true) if the "charge" attribute of the given FbcSpeciesPlugin_t structure is set, 0 (false) otherwise.
int FbcSpeciesPlugin_isSetChemicalFormula ( SBasePlugin_t fbc)

Predicate returning 1 (true) or 0 (false) depending on whether the given FbcSpeciesPlugin_t structure's chemicalFormula is set.

Parameters
fbcthe FbcSpeciesPlugin_t structure to query
Returns
1 (true) if the "chemicalFormula" attribute of the given FbcSpeciesPlugin_t structure is set, 0 (false) otherwise.
int FbcSpeciesPlugin_setCharge ( SBasePlugin_t fbc,
int  charge 
)

Sets the "charge" attribute of the given FbcSpeciesPlugin_t structure.

Parameters
fbcthe FbcSpeciesPlugin_t structure
chargethe value of charge to assign to the "charge" attribute
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int FbcSpeciesPlugin_setChemicalFormula ( SBasePlugin_t fbc,
const char *  chemicalFormula 
)

Sets the chemicalFormula of the given FbcSpeciesPlugin_t to a copy of chemicalFormula.

Parameters
fbcthe FbcSpeciesPlugin_t structure to set
chemicalFormulathe chemicalFormula to assign to the given FbcSpeciesPlugin_t's "chemicalFormula" attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with the name set to NULL is equivalent to unsetting the "chemicalFormula" attribute.
int FbcSpeciesPlugin_unsetCharge ( SBasePlugin_t fbc)

Unsets the "charge" attribute of the given FbcSpeciesPlugin_t structure.

Parameters
fbcthe FbcSpeciesPlugin_t structure to unset
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int FbcSpeciesPlugin_unsetChemicalFormula ( SBasePlugin_t fbc)

Unsets the "chemicalFormula" attribute of the given FbcSpeciesPlugin_t structure.

Parameters
fbcthe FbcSpeciesPlugin_t structure to unset
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: