Skip to Main Content Skip to Search
Product Documentation

addreactant (reaction) - Add species object as reactant to reaction object

Syntax

speciesObj = addreactant(reactionObj, 'NameValue')
addreactant(reactionObj, speciesObj, StoichCoefficient)
addreactant(reactionObj, 'NameValue', StoichCoefficient)

Arguments

reactionObjReaction object.
NameValueName property of a species object. Enter a unique character string, for example, 'glucose'. A species object can be referenced by other objects using this property.

You can use the function sbioselect to find an object with a specific Name property value.

speciesObjSpecies object or cell array of species objects.
StoichCoefficientStoichiometric coefficients for reactants, length of array equal to length of NameValue or length of speciesObj.

Description

speciesObj = addreactant(reactionObj, 'NameValue') creates a species object and returns the species object (speciesObj). In the species object, this method assigns the value (NameValue) to the property Name. In the reaction object, this method assigns the species object to the property Reactants, modifies the reaction equation in the property Reaction to include the new species, and adds the stoichiometric coefficient -1 to the property Stoichiometry.

When you define a reaction with a new species:

Create and add a species object to a compartment object with the method addspecies.

addreactant(reactionObj, speciesObj, StoichCoefficient), in the species object (speciesObj), assigns the parent object to the speciesObj property Parent. In the reaction object (reactionObj), it assigns the species object to the property Reactants, modifies the reaction equation in the property Reaction to include the new species, and adds the stoichiometric coefficient -1 to the property Stoichiometry. If speciesObj is a cell array of species objects, then StoichCoefficient must be a vector of doubles with the same length as speciesObj.

addreactant(reactionObj, 'NameValue', StoichCoefficient), in addition to the description above, adds the stoichiometric coefficient (StoichCoefficient) to the property Stoichiometry. If NameValue is a cell array of species names, then StoichCoefficient must be a vector of doubles with the same length as NameValue.

Species names are referenced by reaction objects, kinetic law objects, and model objects. If you change the Name of a species the reaction also uses the new name. You must, however, configure all other applicable elements such as rules that use the species, and the kinetic law object.

See for more information on species names.

Example

  1. Create a model object, and then add a reaction object.

    modelObj = sbiomodel('my_model');
    reactionObj = addreaction(modelObj, 'A -> U');
  2. Modify the reaction of the reactionObj from A -> U to be A + 3 C -> U.

    speciesObj = addreactant(reactionObj, 'C', 3);	

See Also

addspecies, sbiospecies

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS