sbioreaction - Construct reaction object

Syntax

reactionObj = sbioreaction('ReactionValue')
reactionObj = sbioreaction('ReactantsValue', 'ProductsValue')
reactionObj = sbioreaction('ReactantsValue', RStoichCofficients, 'ProductsValue', PStoichCofficients)

reactionObj = sbioreaction(...'PropertyName', PropertyValue...)

Arguments

ReactionValue

Specify the reaction equation. Enter a character string. A hyphen preceded by a space and followed by a right angle bracket (->) indicate reactants going forward to products. A hyphen with left and right angle brackets (<->) indicate a reversible reaction. Coefficients before reactant or product names must be followed by a space.

Examples 'A -> B', 'A + B -> C', '2 A + B -> 2 C', 'A <-> B'.
ReactantsValueA string defining the species name, a cell array of strings, a species object or an array of species objects.
ProductsValueA string defining the species name, a cell array of strings, a species object or an array of species objects.
RStoichCofficientsStoichiometric coefficients for reactants, length of array equal to length of ReactantsValue.
PStoichCofficientsStoichiometric coefficients for products, length of array equal to length of ProductsValue.

Description

reactionObj = sbioreaction('ReactionValue') creates a SimBiology® reaction object, assigns a value (ReactionValue) to the property Reaction, and returns the reaction object (reactionObj).

To use reactionObj in a simulation, you must add reactionObj to a SimBiology model object using copyobj. You can use addreaction to simultaneously create a reaction object and add it to a model object. A SimBiology model object is constructed with the function sbiomodel.

reactionObj = sbioreaction('ReactantsValue', 'ProductsValue') constructs a SimBiology reaction object that contains reactant species (Reactants) and product species (Products). The stoichiometric values are assumed to be 1. Reactants and Products can be a string defining the species name, a cell array of strings, a species object, or an array of species objects.

reactionObj = sbioreaction('ReactantsValue', RStoichCofficients, 'ProductsValue', PStoichCofficients) adds stoichiometric coefficients (RStoichCofficients) for reactant species, and stoichiometric coefficients (PStoichCofficients) for product species, to the property Stoichiometry. The length of Reactants and RCofficients must be equal, and the length of Products and PCofficients must be equal.


reactionObj = sbioreaction(...'PropertyName', PropertyValue...)
defines optional properties. The property name/property value pairs can be in any format supported by the function set (for example, name-value string pairs, structures, and name-value cell array pairs).

View additional reactionObj properties with the get command. Modify additional reactionObj properties with the set command. You can find help for reactionObj properties with the help PropertyName command and help for functions with the sbiohelp FunctionName command.

A reaction object that does not have a parent can contain only species objects that do not have a parent. If a parented species object is added to an unparented reaction object, a copy of the species object will be made and added to the reaction as an unparented species.

When an unparented reaction object is added to a model, the method checks the model for the required species. If the model contains the species, the reaction object now uses the model's species object. If the model does not contain the species, the species object is added to the model and the reaction object uses it.

Method Summary

addkineticlaw (reaction)Create kinetic law object and add to reaction object
addproduct (reaction)Add product species object to reaction object
addreactant (reaction)Add species object as reactant to reaction object
copyobj (any object)Copy SimBiology® object and its children
delete (any object)Delete SimBiology® object
display (any object)Display summary of SimBiology® object
rmproduct (reaction)Remove species object from reaction object products
rmreactant (reaction)Remove species object from reaction object reactants

Property Summary

ActiveIndicate object in use during simulation
AnnotationStore link to URL or file
KineticLawShow kinetic law used for ReactionRate
NameSpecify name of object
NotesHTML text describing SimBiology® object
ParentIndicate parent object
ProductsArray of reaction products
ReactantsArray of reaction reactants
ReactionReaction object reaction
ReactionRateReaction rate equation in reaction object
ReversibleSpecify whether reaction is reversible or irreversible
StoichiometrySpecies coefficients in reaction
TagSpecify label for SimBiology® object
TypeDisplay top-level SimBiology® object type
UserDataSpecify data to associate with object

Examples

  1. Construct reaction objects.

    reactionObj1 = sbioreaction('a + 3 b -> 2 c');
    reactionObj2 = sbioreaction({'a', 'b'}, [1 3], 'c', 2);
    % View the help for the reaction object's Reversible property.
    help(reactionObj1, 'Reversible')
  2. View the property summary for reactionObj1.

get(reactionObj1)

           Active: 1
       Annotation: ''
       KineticLaw: []
             Name: ''
            Notes: ''
       Parameters: [0x1 double]
           Parent: []
         Products: [1x1 SimBiology.Species]
        Reactants: [2x1 SimBiology.Species]
         Reaction: 'a + 3 b -> 2 c'
     ReactionRate: ''
       Reversible: 0
    Stoichiometry: [-1 -3 2]
              Tag: ''
             Type: 'reaction'
         UserData: []

See Also

addreaction, sbiomodel

  


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