CHW Example 6.1

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

\(\(\( (*\ SetDirectory["C:\CHEMmma"]\ *) \)\(\ \)\( (*\ 
      Put\ in\ path\ to\ chemJac . 
          m\ *) \)\(
\)\(\(<<\)\("chemJac.m"\)\(\ \)\)\)\)

Inputting the stoichiometric matrix S

S = {{-1,  0,  2}, {-1, -1,  
          0},  {0,  -1,  -1}, {1,  0,  0}, {0,  1,  
          0}}   ;  S // MatrixForm

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

monomials  =  makeMonomial[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]

Collect[det, a[2] a[3]]

Core Determinant of the Jacobian of the RHS of the ODE

core = coreDet[j, S]

coeffs[core]