libSBML C API
5.18.0
|
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... | |
int FbcSpeciesPlugin_getCharge | ( | SBasePlugin_t * | fbc | ) |
Takes a FbcSpeciesPlugin_t structure and returns its charge.
fbc | the FbcSpeciesPlugin_t whose charge is sought. |
int
. char * FbcSpeciesPlugin_getChemicalFormula | ( | SBasePlugin_t * | fbc | ) |
Takes a FbcSpeciesPlugin_t structure and returns its chemicalFormula.
fbc | the FbcSpeciesPlugin_t whose chemicalFormula is sought. |
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.
fbc | the FbcSpeciesPlugin_t structure to query |
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.
fbc | the FbcSpeciesPlugin_t structure to query |
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.
fbc | the FbcSpeciesPlugin_t structure |
charge | the value of charge to assign to the "charge" attribute |
int FbcSpeciesPlugin_setChemicalFormula | ( | SBasePlugin_t * | fbc, |
const char * | chemicalFormula | ||
) |
Sets the chemicalFormula of the given FbcSpeciesPlugin_t to a copy of chemicalFormula
.
fbc | the FbcSpeciesPlugin_t structure to set |
chemicalFormula | the chemicalFormula to assign to the given FbcSpeciesPlugin_t's "chemicalFormula" attribute. |
int FbcSpeciesPlugin_unsetCharge | ( | SBasePlugin_t * | fbc | ) |
Unsets the "charge" attribute of the given FbcSpeciesPlugin_t structure.
fbc | the FbcSpeciesPlugin_t structure to unset |
int FbcSpeciesPlugin_unsetChemicalFormula | ( | SBasePlugin_t * | fbc | ) |
Unsets the "chemicalFormula" attribute of the given FbcSpeciesPlugin_t structure.
fbc | the FbcSpeciesPlugin_t structure to unset |