Stoichiometry - Species coefficients in reaction

Description

The Stoichiometry property specifies the species coefficients in a reaction. Enter an array of doubles indicating the stoichiometry of reactants (negative value) and products (positive value). Example: [-1 -1 2].

The double specified cannot be 0. The reactants of the reaction are defined with a negative number. The products of the reaction are defined with a positive number. For example, the reaction 3 H + A-> 2 C + F has the Stoichiometry value of [-3 -1 2 1].

When this property is configured the Reaction property updates accordingly. In the above example, if the Stoichiometry value was set to [-2 -1 2 3], the Reaction is updated to 2H + A -> 2C + 3F.

The length of the Stoichiometry array is the sum of the Reactants array and the Products array. To remove a product or reactant from a reaction use the rmproduct or rmreactant functions. Add a product or reactant and set stoichiometry with methods addproduct and addreactant

ODE solvers support double stoichiometry values such as 0.5. Stochastic solvers and dimensional analysis currently only support integers in Stoichiometry, therefore you must balance the reaction equation and specify integer values for these two cases.

A -> null has a stoichiometry value of [-1]. null -> B has a stoichiometry value of [1].

Characteristics

Applies toObject: reaction
Data type Double array
Data values1–by-n double, where n is length (products) + length (reactants). Default [] (empty)
AccessRead/Write

Example

  1. Create a reaction object

    modelObj = sbiomodel('cell');
    reactionObj = addreaction(modelObj, '2 a + 3 b -> d + 2 c');
  2. Verify the Reaction and Stoichiometry properties for reactionObj.

    get(reactionObj,'Stoichiometry')

    MATLAB® returns

    ans =
    
    -2    -3     1     2
  3. Set stoichiometry to [-1 -2 2 2].

    set (reactionObj, 'Stoichiometry', [-1 -2 2 2]);
    get (reactionObj, 'Stoichiometry')

    MATLAB returns

    ans =
    
     -1    -2     2     2
  4. Note with get that the Reaction property updates automatically.

    get (reactionObj, 'Reaction')

    MATLAB returns

    ans =
    
    a + 2 b -> 2 d + 2 c

See Also

addreaction, addproduct, addreactant, rmproduct, rmreactant, Reaction

  


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