CHW Example 6.5

Loads the chemJac command file, which contains all commands used below

<< "chemJac.m"

Inputting the stoichiometric matrix S (we input half the matrix and then use the "makeReversible" command)

S = 
      Transpose[{{-1,  -1, 0, 0,  1, 0, 0}, {0, -1,  -1, 
            0, 0, 1, 0},  {0, 0,  -1,  -1, 0, 0, 1}, {2,  0,  
            0, -1, 0, 0, 0}}];  
S = makeReversible[S]; 
S // MatrixForm

Making the non-mass-action flux vector 'monomials' and the list of species concentrations 'vars' automatically from S

monomials = makeMonomialNMA[S]

vars = svars[S]

'S.monomials' is the right hand side of the ODE

S . monomials

The Jacobian of the RHS of the ODE, and its Craciun-Feinberg determinant

j = jac[S . monomials,  vars];
j // MatrixForm

det = cfDet[j];

coeffs[det]

Core Determinant of the Jacobian of the RHS of the ODE

core = coreDet[j, S]

coeffs[core]