addproduct (reaction) - Add product species object to reaction object

Syntax

speciesObj = addproduct(reactionObj, 'NameValue')
speciesObj = addproduct(reactionObj, speciesObj)
speciesObj = addproduct(reactionObj, 'NameValue', Stoichcoefficient)
speciesObj = addproduct(reactionObj, speciesObj, Stoichcoefficient)

Arguments

reactionObjReaction object. Enter a name for the reaction object.
NameValueProperty of a species object that names the object (not the reaction object). Enter a unique character string. For example, 'fructose 6-phosphate'.

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 NameValue.

speciesObjSpecies object.
StoichcoeffieientStoichiometric coefficients for products, length of array equal to length of NameValue or length of speciesObj.

Description

speciesObj = addproduct(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 Products, 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.

speciesObj = addproduct(reactionObj, speciesObj), in the species object (speciesObj), assigns the parent object of the reactionObj to the species property Parent. In the reaction object (reactionObj), it assigns the species object to the property Products, modifies the reaction equation in the property Reaction to include the new species, and adds the stoichiometric coefficient 1 to the property Stoichiometry.

speciesObj = addproduct(reactionObj, 'NameValue', Stoichcoefficient), in addition to the description above, this method 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.

speciesObj = addproduct(reactionObj, speciesObj, Stoichcoefficient), in addition to the description above, this method adds the stoichiometric coefficient (Stoichcoefficient) to the property Stoichiometry.

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.

Example

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

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

    speciesObj = addproduct(reactionObj, 'H', 2);	

See Also

sbiospecies, addspecies

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS