Main Content

Determining the Stoichiometry Matrix for a Model

What Is a Stoichiometry Matrix?

A stoichiometry matrix lets you easily determine:

  • The reactants and products in a specific reaction in a model, including the stoichiometric value of the reactants and products

  • The reactions that a specific species is part of, and whether the species is a reactant or product in that reaction

A stoichiometry matrix is an M-by-R matrix, where M equals the total number of species in a model, and R equals the total number of reactions in a model. Each row corresponds to a species, and each column corresponds to a reaction.

The matrix indicates which species and reactions are involved as reactants and products:

  • Reactants are represented in the matrix with their stoichiometric value at the appropriate location (row of species, column of reaction). Reactants appear as negative values.

  • Products are represented in the matrix with their stoichiometric value at the appropriate location (row of species, column of reaction). Products appear as positive values.

  • All other locations in the matrix contain a 0.

For example, consider a model object containing two reactions. One reaction (named R1) is equal to 2 A + B -> 3 C, and the other reaction (named R2) is equal to B + 3 D -> 4 A. The stoichiometry matrix is:

      R1   R2
A     -2    4
B     -1   -1
C      3    0
D      0   -3

Retrieving a Stoichiometry Matrix for a Model

Retrieve a stoichiometry matrix for a model by passing the model object as an input argument to the getstoichmatrix method.

  1. Read in m1, a model object, using sbmlimport:

    m1 = sbmlimport('lotka.xml');
  2. Get the stoichiometry matrix for m1:

    [M,objSpecies,objReactions] = getstoichmatrix(m1)
    
    M =
    
       (2,1)        1
       (2,2)       -1
       (3,2)        1
       (3,3)       -1
       (4,3)        1
    
    
    objSpecies = 
    
        'x'
        'y1'
        'y2'
        'z'
    
    
    objReactions = 
    
        'Reaction1'
        'Reaction2'
        'Reaction3'
  3. Convert the stoichiometry matrix from a sparse matrix to a full matrix to more easily see the relationships between species and reactions:

    M_full = full(M)
    M_full =
    
         0     0     0
         1    -1     0
         0     1    -1
         0     0     1