libSBML C API  5.18.0
Reaction_t Class Reference

Detailed Description

An SBML reaction between species in an SBML model.

A reaction represents any transformation, transport or binding process, typically a chemical reaction, that can change the quantity of one or more species. In SBML, a reaction is defined primarily in terms of the participating reactants and products (and their corresponding stoichiometries), along with optional modifier species, an optional rate at which the reaction takes place, and optional parameters.

As with other major objects in SBML, Reaction_t has a mandatory attribute, "id", used to give the reaction an identifier. The identifier must be a text string conforming to the identifer syntax permitted in SBML. In SBML Level 2 and Level 3, the reaction "id" identifier can be used in mathematical formulas elsewhere in an SBML model to represent the rate of that reaction; this usage is explained below. Reaction_t also has an optional "name" attribute, of type string. The "id" and "name" must be used according to the guidelines described in the SBML specification.

The species participating as reactants, products, and/or modifiers in a reaction are declared using lists of SpeciesReference_t and/or ModifierSpeciesReference_t instances stored in subelements "listOfReactants", "listOfProducts" and "listOfModifiers". Certain restrictions are placed on the appearance of species in reaction definitions:

  • The ability of a species to appear as a reactant or product of any reaction in a model is governed by certain flags in that species' definition; see the definition of Species_t for more information.

  • Any species appearing in the mathematical formula of the subelement "kineticLaw" (described below) of a Reaction_t must be declared in at least one of that Reaction_t's lists of reactants, products, and/or modifiers. Put another way, it is an error for a reaction's kinetic law formula to refer to species that have not been declared for that reaction.

  • For SBML Levels 1, 2, and SBML Level 3 Version 1, a reaction definition can contain an empty list of reactants or an empty list of products, but it must have at least one reactant or product; in other words, a reaction without any reactant or product species is not permitted. (This restriction does not apply to modifier species, which remain optional in all cases.) In SBML Level 3 Version 2, this requirement was dropped, allowing the creation of reactions with neither reactants nor products.

A reaction can contain up to one KineticLaw_t object in a subelement named "kineticLaw". It defines the speed at which the process defined by the reaction takes place. The description of KineticLaw_t provides more details about its use. Note that although the inclusion of a KineticLaw_t object in an instance of a Reaction_t component is optional, there is no useful default that can be substituted in place of a missing rate expression in a reaction. Moreover, a reaction's rate cannot be defined in any other way in SBML—InitialAssignment_t, AssignmentRule_t, RateRule_t, AlgebraicRule_t, Event_t, and other constructs in SBML cannot be used to set the reaction rate separately. Nevertheless, for some modeling applications, reactions without any defined rate can be perfectly acceptable.

Reaction_t also has a boolean attribute named "reversible" for indicating whether the reaction is reversible. This attribute is optional in SBML Level 2, with a default of true; it is mandatory in SBML Level 3 (with no default value). To say that a reaction is reversible is to say it can proceed in either the forward or the reverse direction. Although the reversibility of a reaction can sometimes be deduced by inspecting its rate expression, this is not always the case, especially for complicated expressions. Moreover, the need in SBML to allow rate expressions (i.e., KineticLaw_t) to be optional leads to the need for a separate flag indicating reversibility. Note that labeling a reaction as irreversible is an assertion that the reaction always proceeds in the given forward direction. (Why else would it be flagged as irreversible?) This implies the rate expression in the KineticLaw_t always has a non-negative value during simulations. Software tools could provide a means of optionally testing that this condition holds. The presence of reversibility information in two places (i.e., the rate expression and the "reversible" attribute on Reaction_t) leaves open the possibility that a model could contain contradictory information, but the creation of such a model would be an error on the part of the software generating it.

The Reaction_t object class has another boolean attribute called "fast". This attribute is optional in SBML Level 2, with a default of false; it is mandatory in SBML Level 3 (with no default value). In SBML Level 3 Version 2, a value of true for the "fast" attribute is deprecated in favor of all reactions having a "fast" value of false. It is used to indicate that a reaction occurs on a vastly faster time scale than others in a system. Readers are directed to the SBML Level 2 Version 4 specification, which provides more detail about the conditions under which a reaction can be considered to be fast in this sense. SBML Level 1 and Level 2 Version 1 incorrectly claimed that software tools could ignore this attribute if they did not implement support for the corresponding concept; however, further research in SBML has revealed that this is not true, and "fast" cannot be ignored if it is set to true. SBML Level 2 Versions 2–4 therefore stipulate that if a model has any reactions with "fast" set to true, a software tool must be able to respect the attribute or else indicate to the user that it does not have the capacity to do so. Analysis software cannot ignore the value of the "fast" attribute because doing so may lead to different results as compared to a software system that does make use of "fast".

In SBML Level 3 Version 2, the "fast" attribute was removed. All reactions are assumed to be equivalent to reactions in previous levels/versions that have a "fast" attribute value of false. Users should be aware that even for previous levels/versions of the specification, "fast" attribute values of true never achieved widespread support, and many software packages may ignore it. To achieve the same or similar effects as setting the fast attribute to true for a given reaction, the KineticLaw_t attribute should be constructed to produce a value in the desired time scale, or else the reaction could be replaced with an AssignmentRule_t or AlgebraicRule_t.

In SBML Level 3, the Reaction_t object has an additional optional attribute named "compartment", whose value must be the identifier of a compartment defined in the enclosing Model_t object. The "compartment" attribute can be used to indicate the compartment in which the reaction is assumed to take place. If the attribute is present, its value must be the identifier of a Compartment_t object defined in the enclosing Model_t object. Similar to the "reversible" attribute, the value of the "compartment" attribute has no direct impact on the construction of mathematical equations for the SBML model. When a kinetic law is given for a reaction, the compartment location may already be implicit in the kinetic law (although this cannot always be guaranteed). Nevertheless, software tools may find the "compartment" attribute value useful for such purposes as analyzing the structure of the model, guiding the modeler in constructing correct rate formulas, and visualization purposes.

Readers are urged to read the SBML specification for more details about the proper use of Reaction_t.

Examples:
addingEvidenceCodes_1.c, createExampleSBML.c, printAnnotation.c, printMath.c, printNotes.c, printUnits.c, spec_example1.c, unsetAnnotation.c, and unsetNotes.c.

Public Member Functions

int Reaction_addModifier (Reaction_t *r, const SpeciesReference_t *msr)
 Adds a copy of the given modifier (modifier SpeciesReference_t) to this Reaction_t. More...
 
int Reaction_addModifierBySpecies (Reaction_t *r, const Species_t *s, const char *id)
 Adds a copy of the given Species_t object as a modifier to this Reaction_t. More...
 
int Reaction_addProduct (Reaction_t *r, const SpeciesReference_t *sr)
 Adds a copy of the given product (SpeciesReference_t) to this Reaction_t. More...
 
int Reaction_addProductBySpecies (Reaction_t *r, const Species_t *s, double stoichiometry, const char *id, int constant)
 Adds a copy of the given Species_t object as a product to this Reaction_t. More...
 
int Reaction_addReactant (Reaction_t *r, const SpeciesReference_t *sr)
 Adds a copy of the given reactant (SpeciesReference_t) to this Reaction_t. More...
 
int Reaction_addReactantBySpecies (Reaction_t *r, const Species_t *s, double stoichiometry, const char *id, int constant)
 Adds a copy of the given Species_t object as a reactant to this Reaction_t. More...
 
Reaction_tReaction_clone (const Reaction_t *r)
 
Reaction_tReaction_create (unsigned int level, unsigned int version)
 Creates a new Reaction_t structure using the given SBML level and version values. More...
 
KineticLaw_tReaction_createKineticLaw (Reaction_t *r)
 Creates a new KineticLaw_t for this Reaction_t and returns it. More...
 
SpeciesReference_tReaction_createModifier (Reaction_t *r)
 Creates a new SpeciesReference_t, adds it to this Reaction_t's list of modifiers and returns it. More...
 
SpeciesReference_tReaction_createProduct (Reaction_t *r)
 Creates a new SpeciesReference_t, adds it to this Reaction_t's list of products and returns it. More...
 
SpeciesReference_tReaction_createReactant (Reaction_t *r)
 Creates a new SpeciesReference_t, adds it to this Reaction_t's list of reactants and returns it. More...
 
Reaction_tReaction_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new Reaction_t structure using the given SBMLNamespaces_t structure. More...
 
void Reaction_free (Reaction_t *r)
 Frees the given Reaction_t. More...
 
const char * Reaction_getCompartment (const Reaction_t *r)
 
int Reaction_getFast (const Reaction_t *r)
 
const char * Reaction_getId (const Reaction_t *r)
 
KineticLaw_tReaction_getKineticLaw (Reaction_t *r)
 
ListOf_tReaction_getListOfModifiers (Reaction_t *r)
 
ListOf_tReaction_getListOfProducts (Reaction_t *r)
 
ListOf_tReaction_getListOfReactants (Reaction_t *r)
 
SpeciesReference_tReaction_getModifier (Reaction_t *r, unsigned int n)
 
SpeciesReference_tReaction_getModifierBySpecies (Reaction_t *r, const char *species)
 
const char * Reaction_getName (const Reaction_t *r)
 
const XMLNamespaces_tReaction_getNamespaces (Reaction_t *r)
 Returns a list of XMLNamespaces_t associated with this Reaction_t structure. More...
 
unsigned int Reaction_getNumModifiers (const Reaction_t *r)
 
unsigned int Reaction_getNumProducts (const Reaction_t *r)
 
unsigned int Reaction_getNumReactants (const Reaction_t *r)
 
SpeciesReference_tReaction_getProduct (Reaction_t *r, unsigned int n)
 
SpeciesReference_tReaction_getProductBySpecies (Reaction_t *r, const char *species)
 
SpeciesReference_tReaction_getReactant (Reaction_t *r, unsigned int n)
 
SpeciesReference_tReaction_getReactantBySpecies (Reaction_t *r, const char *species)
 
int Reaction_getReversible (const Reaction_t *r)
 
int Reaction_hasRequiredAttributes (Reaction_t *r)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for this Reaction_t structure have been set. More...
 
void Reaction_initDefaults (Reaction_t *r)
 Initializes the fields of this Reaction_t to their defaults: More...
 
int Reaction_isSetCompartment (const Reaction_t *r)
 
int Reaction_isSetFast (const Reaction_t *r)
 
int Reaction_isSetId (const Reaction_t *r)
 
int Reaction_isSetKineticLaw (const Reaction_t *r)
 
int Reaction_isSetName (const Reaction_t *r)
 
int Reaction_isSetReversible (const Reaction_t *r)
 
SpeciesReference_tReaction_removeModifier (Reaction_t *r, unsigned int n)
 Removes the nth modifier SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it. More...
 
SpeciesReference_tReaction_removeModifierBySpecies (Reaction_t *r, const char *species)
 Removes the modifier SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it. More...
 
SpeciesReference_tReaction_removeProduct (Reaction_t *r, unsigned int n)
 Removes the nth product SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it. More...
 
SpeciesReference_tReaction_removeProductBySpecies (Reaction_t *r, const char *species)
 Removes the product SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it. More...
 
SpeciesReference_tReaction_removeReactant (Reaction_t *r, unsigned int n)
 Removes the nth reactant SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it. More...
 
SpeciesReference_tReaction_removeReactantBySpecies (Reaction_t *r, const char *species)
 Removes the reactant SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it. More...
 
int Reaction_setCompartment (Reaction_t *r, const char *compartment)
 Sets the compartment of this Reaction_t to a copy of compartment. More...
 
int Reaction_setFast (Reaction_t *r, int value)
 Sets the fast status of this Reaction_t to value (boolean). More...
 
int Reaction_setId (Reaction_t *r, const char *sid)
 Sets the id of this Reaction_t to a copy of sid. More...
 
int Reaction_setKineticLaw (Reaction_t *r, const KineticLaw_t *kl)
 Sets the KineticLaw_t of this Reaction_t to a copy of the given KineticLaw_t. More...
 
int Reaction_setName (Reaction_t *r, const char *name)
 Sets the name of this Reaction_t to a copy of name. More...
 
int Reaction_setReversible (Reaction_t *r, int value)
 Sets the reversible status of this Reaction_t to value (boolean). More...
 
int Reaction_unsetCompartment (Reaction_t *r)
 Unsets the compartment of this Reaction_t. More...
 
int Reaction_unsetFast (Reaction_t *r)
 Unsets the fast status of this Reation_t. More...
 
int Reaction_unsetKineticLaw (Reaction_t *r)
 Unsets the KineticLaw_t of this Reaction_t. More...
 
int Reaction_unsetName (Reaction_t *r)
 Unsets the name of this Reaction_t. More...
 
int Reaction_unsetReversible (Reaction_t *r)
 Unsets the reversible status of this Reaction_t. More...
 

Member Function Documentation

int Reaction_addModifier ( Reaction_t r,
const SpeciesReference_t msr 
)

Adds a copy of the given modifier (modifier SpeciesReference_t) to this Reaction_t.

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 Reaction_addModifierBySpecies ( Reaction_t r,
const Species_t s,
const char *  id 
)

Adds a copy of the given Species_t object as a modifier to this Reaction_t.

Parameters
rthe Reaction_t structure to which the modifier is added.
sthe Species_t structure to be added as modifier.
idthe string to be used as the id of the SpeciesReference_t that will be created.
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
the Species_t structure itself is NOT added to the model
int Reaction_addProduct ( Reaction_t r,
const SpeciesReference_t sr 
)

Adds a copy of the given product (SpeciesReference_t) to this Reaction_t.

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 Reaction_addProductBySpecies ( Reaction_t r,
const Species_t s,
double  stoichiometry,
const char *  id,
int  constant 
)

Adds a copy of the given Species_t object as a product to this Reaction_t.

Parameters
rthe Reaction_t structure to which the product is added.
sthe Species_t structure to be added as product.
stoichiometrythe stoichiometry of the added product.
idthe string to be used as the id of the SpeciesReference_t that will be created.
constantan attribute specifying whether the SpeciesReference_t is constant or not.
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
the Species_t structure itself is NOT added to the model
int Reaction_addReactant ( Reaction_t r,
const SpeciesReference_t sr 
)

Adds a copy of the given reactant (SpeciesReference_t) to this Reaction_t.

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 Reaction_addReactantBySpecies ( Reaction_t r,
const Species_t s,
double  stoichiometry,
const char *  id,
int  constant 
)

Adds a copy of the given Species_t object as a reactant to this Reaction_t.

Parameters
rthe Reaction_t structure to which the reactant is added.
sthe Species_t structure to be added as reactant.
stoichiometrythe stoichiometry of the added reactant.
idthe string to be used as the id of the SpeciesReference_t that will be created.
constantan attribute specifying whether the created SpeciesReference_t is constant or not.
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
the Species_t structure itself is NOT added to the model
Reaction_t * Reaction_clone ( const Reaction_t r)
Returns
a (deep) copy of this Reaction_t.
Reaction_t * Reaction_create ( unsigned int  level,
unsigned int  version 
)

Creates a new Reaction_t structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML Level to assign to this Reaction_t.
versionan unsigned int, the SBML Version to assign to this Reaction_t.
Returns
a pointer to the newly created Reaction_t structure.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
KineticLaw_t * Reaction_createKineticLaw ( Reaction_t r)

Creates a new KineticLaw_t for this Reaction_t and returns it.

If this Reaction_t had a previous KineticLaw_t, it will be destroyed.

Examples:
createExampleSBML.c.
SpeciesReference_t * Reaction_createModifier ( Reaction_t r)

Creates a new SpeciesReference_t, adds it to this Reaction_t's list of modifiers and returns it.

SpeciesReference_t * Reaction_createProduct ( Reaction_t r)

Creates a new SpeciesReference_t, adds it to this Reaction_t's list of products and returns it.

Examples:
createExampleSBML.c, and spec_example1.c.
SpeciesReference_t * Reaction_createReactant ( Reaction_t r)

Creates a new SpeciesReference_t, adds it to this Reaction_t's list of reactants and returns it.

Examples:
createExampleSBML.c, and spec_example1.c.
Reaction_t * Reaction_createWithNS ( SBMLNamespaces_t sbmlns)

Creates a new Reaction_t structure using the given SBMLNamespaces_t structure.

Parameters
sbmlnsSBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this Reaction_t.
Returns
a pointer to the newly created Reaction_t structure.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
void Reaction_free ( Reaction_t r)

Frees the given Reaction_t.

const char * Reaction_getCompartment ( const Reaction_t r)
Returns
the compartment of this Reaction_t.
int Reaction_getFast ( const Reaction_t r)
Returns
the fast status of this Reaction_t.
In SBML Level 3 Version 2, the "fast" attribute was removed. All reactions are assumed to be equivalent to reactions in previous levels/versions that have a "fast" attribute value of false. Users should be aware that even for previous levels/versions of the specification, "fast" attribute values of true never achieved widespread support, and many software packages may ignore it. To achieve the same or similar effects as setting the fast attribute to true for a given reaction, the KineticLaw_t attribute should be constructed to produce a value in the desired time scale, or else the reaction could be replaced with an AssignmentRule_t or AlgebraicRule_t.
const char * Reaction_getId ( const Reaction_t r)
Returns
the id of this Reaction_t.
Examples:
printAnnotation.c, and printNotes.c.
KineticLaw_t * Reaction_getKineticLaw ( Reaction_t r)
ListOf_t * Reaction_getListOfModifiers ( Reaction_t r)
Returns
the list of Modifiers for this Reaction_t.
ListOf_t * Reaction_getListOfProducts ( Reaction_t r)
Returns
the list of Products for this Reaction_t.
ListOf_t * Reaction_getListOfReactants ( Reaction_t r)
Returns
the list of Reactants for this Reaction_t.
SpeciesReference_t * Reaction_getModifier ( Reaction_t r,
unsigned int  n 
)
Returns
the nth modifier (modifier SpeciesReference_t) of this Reaction_t. If the index n is invalid, NULL is returned.
Examples:
printAnnotation.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
SpeciesReference_t * Reaction_getModifierBySpecies ( Reaction_t r,
const char *  species 
)
Returns
the modifier (modifier SpeciesReference_t) in this Reaction_t with the given species or NULL if no such modifier exists.
const char * Reaction_getName ( const Reaction_t r)
Returns
the name of this Reaction_t.
const XMLNamespaces_t * Reaction_getNamespaces ( Reaction_t r)

Returns a list of XMLNamespaces_t associated with this Reaction_t structure.

Parameters
rthe Reaction_t structure.
Returns
pointer to the XMLNamespaces_t structure associated with this structure
unsigned int Reaction_getNumModifiers ( const Reaction_t r)
Returns
the number of modifiers (modifier SpeciesReference_t's) in this Reaction_t.
Examples:
printAnnotation.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Reaction_getNumProducts ( const Reaction_t r)
Returns
the number of products (SpeciesReference_t's) in this Reaction_t.
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Reaction_getNumReactants ( const Reaction_t r)
Returns
the number of reactants (SpeciesReference_t's) in this Reaction_t.
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
SpeciesReference_t * Reaction_getProduct ( Reaction_t r,
unsigned int  n 
)
Returns
the nth product (SpeciesReference_t) of this Reaction_t. If the index n is invalid, NULL is returned.
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
SpeciesReference_t * Reaction_getProductBySpecies ( Reaction_t r,
const char *  species 
)
Returns
the product (SpeciesReference_t) in this Reaction_t with the given species or NULL if no such product exists.
SpeciesReference_t * Reaction_getReactant ( Reaction_t r,
unsigned int  n 
)
Returns
the nth reactant (SpeciesReference_t) of this Reaction_t. If the index n is invalid, NULL is returned.
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
SpeciesReference_t * Reaction_getReactantBySpecies ( Reaction_t r,
const char *  species 
)
Returns
the reactant (SpeciesReference_t) in this Reaction_t with the given species or NULL if no such reactant exists.
int Reaction_getReversible ( const Reaction_t r)
Returns
the reversible status of this Reaction_t.
int Reaction_hasRequiredAttributes ( Reaction_t r)

Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for this Reaction_t structure have been set.

The required attributes for a Reaction_t structure are:

  • "id" (or "name" in SBML Level 1)
  • "fast" (in Level 3 Version 1 only, where it is defined as a required attribute)
  • "reversible" (in Level 3 only, where it is defined as a required attribute)
Parameters
rthe Reaction_t structure to check.
Returns
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise.
void Reaction_initDefaults ( Reaction_t r)

Initializes the fields of this Reaction_t to their defaults:

The SBML Reaction_t component has slightly different aspects and default attribute values in different SBML Levels and Versions. This method sets the values to certain common defaults, based mostly on what they are in SBML Level 2. Specifically:

  • Sets the "reversible" attribute to true
  • Sets the "fast" attribute to false
  • Marks the "fast" attribute as not having been set for SBML Level 2, but as having been set for SBML Level 1 and SBML Level 3.
Warning
SBML definitions before SBML Level 2 Version 2 incorrectly indicated that software tools could ignore the "fast" attribute if they did not implement support for the corresponding concept; however, further research in SBML has revealed that this is not true, and "fast" cannot be ignored if it is set to true. Beginning with SBML Level 2 Versions 2, the SBML specifications therefore stipulate that if a model has any reactions with "fast" set to true, a software tool must be able to respect the attribute or else indicate to the user that it does not have the capacity to do so. Readers are directed to the SBML specifications, which provides more detail about the conditions under which a reaction can be considered to be fast in this sense.
int Reaction_isSetCompartment ( const Reaction_t r)
Returns
1 (true) if the KineticLaw_t of this Reaction_t is set, 0 (false) otherwise.
int Reaction_isSetFast ( const Reaction_t r)
Returns
1 (true) if the fast status of this Reaction_t is set, 0 (false) otherwise.

In L1, fast is optional with a default of false, which means it is effectively always set. In L2, however, fast is optional with no default value, so it may or may not be set to a specific value.

In SBML Level 3 Version 2, the "fast" attribute was removed. All reactions are assumed to be equivalent to reactions in previous levels/versions that have a "fast" attribute value of false. Users should be aware that even for previous levels/versions of the specification, "fast" attribute values of true never achieved widespread support, and many software packages may ignore it. To achieve the same or similar effects as setting the fast attribute to true for a given reaction, the KineticLaw_t attribute should be constructed to produce a value in the desired time scale, or else the reaction could be replaced with an AssignmentRule_t or AlgebraicRule_t.
int Reaction_isSetId ( const Reaction_t r)
Returns
1 (true) if the id of this Reaction_t is set, 0 (false) otherwise.
int Reaction_isSetKineticLaw ( const Reaction_t r)
Returns
1 (true) if the KineticLaw_t of this Reaction_t is set, 0 (false) otherwise.
Examples:
printAnnotation.c, printMath.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
int Reaction_isSetName ( const Reaction_t r)
Returns
1 (true) if the name of this Reaction_t is set, 0 (false) otherwise.
int Reaction_isSetReversible ( const Reaction_t r)
Returns
1 (true) if the reversible attribute of this Reaction_t is set, 0 (false) otherwise.
SpeciesReference_t * Reaction_removeModifier ( Reaction_t r,
unsigned int  n 
)

Removes the nth modifier SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
nthe integer index of the modifier SpeciesReference_t to remove.
Returns
the modifier SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if the given index is out of range.
SpeciesReference_t * Reaction_removeModifierBySpecies ( Reaction_t r,
const char *  species 
)

Removes the modifier SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
speciesthe "species" attribute of the modifier SpeciesReference_t to remove.
Returns
the modifier SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no modifier SpeciesReference_t structure with the "species" attribute exists in this Reaction_t.
SpeciesReference_t * Reaction_removeProduct ( Reaction_t r,
unsigned int  n 
)

Removes the nth product SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
nthe integer index of the product SpeciesReference_t to remove.
Returns
the product SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if the given index is out of range.
SpeciesReference_t * Reaction_removeProductBySpecies ( Reaction_t r,
const char *  species 
)

Removes the product SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
speciesthe "species" attribute of the product SpeciesReference_t to remove.
Returns
the product SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no product SpeciesReference_t structure with the "species" attribute exists in this Reaction_t.
SpeciesReference_t * Reaction_removeReactant ( Reaction_t r,
unsigned int  n 
)

Removes the nth reactant SpeciesReference_t structure from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
nthe integer index of the reactant SpeciesReference_t to remove.
Returns
the reactant SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if the given index is out of range.
SpeciesReference_t * Reaction_removeReactantBySpecies ( Reaction_t r,
const char *  species 
)

Removes the reactant SpeciesReference_t structure with the given "species" attribute from this Reaction_t structure and returns a pointer to it.

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

Parameters
rthe Reaction_t structure.
speciesthe "species" attribute of the reactant SpeciesReference_t to remove.
Returns
the reactant SpeciesReference_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no reactant SpeciesReference_t structure with the "species" attribute exists in this Reaction_t.
int Reaction_setCompartment ( Reaction_t r,
const char *  compartment 
)

Sets the compartment of this Reaction_t to a copy of compartment.

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 compartment set to NULL is equivalent to unsetting the "compartment" attribute.
int Reaction_setFast ( Reaction_t r,
int  value 
)

Sets the fast status of this Reaction_t to value (boolean).

In SBML Level 3 Version 2, the "fast" attribute was removed. All reactions are assumed to be equivalent to reactions in previous levels/versions that have a "fast" attribute value of false. Users should be aware that even for previous levels/versions of the specification, "fast" attribute values of true never achieved widespread support, and many software packages may ignore it. To achieve the same or similar effects as setting the fast attribute to true for a given reaction, the KineticLaw_t attribute should be constructed to produce a value in the desired time scale, or else the reaction could be replaced with an AssignmentRule_t or AlgebraicRule_t.
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:
Examples:
spec_example1.c.
int Reaction_setId ( Reaction_t r,
const char *  sid 
)

Sets the id of this Reaction_t to a copy of sid.

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 an sid of NULL is equivalent to unsetting the "id" attribute.
Examples:
createExampleSBML.c, and spec_example1.c.
int Reaction_setKineticLaw ( Reaction_t r,
const KineticLaw_t kl 
)

Sets the KineticLaw_t of this Reaction_t to a copy of the given KineticLaw_t.

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 Reaction_setName ( Reaction_t r,
const char *  name 
)

Sets the name of this Reaction_t to a copy of name.

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 "name" attribute.
int Reaction_setReversible ( Reaction_t r,
int  value 
)

Sets the reversible status of this Reaction_t to value (boolean).

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:
Examples:
createExampleSBML.c, and spec_example1.c.
int Reaction_unsetCompartment ( Reaction_t r)

Unsets the compartment of this Reaction_t.

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 Reaction_unsetFast ( Reaction_t r)

Unsets the fast status of this Reation_t.

In SBML Level 3 Version 2, the "fast" attribute was removed. All reactions are assumed to be equivalent to reactions in previous levels/versions that have a "fast" attribute value of false. Users should be aware that even for previous levels/versions of the specification, "fast" attribute values of true never achieved widespread support, and many software packages may ignore it. To achieve the same or similar effects as setting the fast attribute to true for a given reaction, the KineticLaw_t attribute should be constructed to produce a value in the desired time scale, or else the reaction could be replaced with an AssignmentRule_t or AlgebraicRule_t.
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: In L1, fast is optional with a default of false, which means it is effectively always set. In L2, however, fast is optional with no default value, so it may or may not be set to a specific value.
int Reaction_unsetKineticLaw ( Reaction_t r)

Unsets the KineticLaw_t of this Reaction_t.

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 Reaction_unsetName ( Reaction_t r)

Unsets the name of this Reaction_t.

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 Reaction_unsetReversible ( Reaction_t r)

Unsets the reversible status of this Reaction_t.

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: