Group Abstract Group Abstract

Message Boards Message Boards

0
|
7K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How can I group constants/parameters using Mathematica?

I am trying to solve a problem which may seem quite simple, although I have been unable to find any solution in the documentation or the discussion forums. I am not a mathematician, so please bare with me.

Can Mathematica group together constant parameters in a function, such that the "true" number of parameters will be more apparent? The simplest example would be to assume we have the following function: $$ f(x)=k_1 \times k_2 \times x $$ where $k_1$ and $k_2$ are constant parameters, and $x$ is the variable. The function $f(x)$ really has only one parameter, which we can see by grouping together the two parameters such that:

$$k_3=k_1 \times k_2$$

to get the function

$$g(x)=k_3 \times x$$

Both functions $f(x)$ and $g(x)$ are equivalent. This example is very simple, and can be done manually. However, I am working on deriving complex expressions of enzyme kinetics, which can be quite large and have many parameters. The aim is to simplify the expressions, and group together the constant parameters to help reduce the expressions to more "practical" forms. To give another simple but better example from a real-world application, let:

$$ v(s)=\frac{k_1 \times k_{cat} \times e \times s}{k_1 \times s + k_2 + k_{cat}} $$

where $k_1$. $k_2$ and $k_{cat}$ are constants pertaining to reaction rates in the different catalytic steps, and $e$ is the concentration of enzyme (also constant). $v(s)$ is rate of reaction where a chemical substrate $s$ is consumed.

By dividing the numerator and denominator with $k_1$, we get:

$$ v(s)=\frac{k_{cat} \times e \times s}{s + \frac{k_2 + k_{cat}}{k_1} } $$

Now we can group the parameters. Let:

$$ v_{max} = k_{cat} \times e$$

$$ k_m = \frac{k_2 + k_{cat}}{k_1} $$

The result is an example of the most common and simplest known enzyme kinetic expression known as Michaelis-Menten kinetics, which has the form:

$$ v(s)=\frac{v_{max} \times s}{k_m + s} $$

We have reduced the number of constant parameters from 4 down to 2, and created an equivalent expression for the reaction rate $v(s)$ which is more readable by a human. Can something like this be automated or semi-automated in Mathematica?

Any help would be greatly appreciated.

POSTED BY: konrad K.B.

Hi Konrad,

Although the actions you are asking for would seem to be elementary, they can be hard to do when Mathematica is automatically evaluating every answer. For example, trying to divide both numerator and denominator by k1 will not do anything--the evaluator will cancel the k1's to give the original expression.

I like to put the manipulations after the expression using the // notation. Here is a possible divide numerator and denominator by a factor:

        divideND[c_][a_] := 
        Module[{n, d}, 
          n = ((Numerator[a]/c) // Apart // Cancel); 
          d = ((Denominator[a]/c) // Apart // Cancel);
          n/d
        ]

When used after the expression, the [a_] argument is absorbed by the //operation, and the [c_] argument becomes the divisor:

In[147]:= (e k1 kcat s)/(k2+kcat+k1 s)//divideND[k1]
Out[147]= (e kcat s)/((k2+kcat)/k1+s)

(It looks a lot better in a notebook!)

The vmax substitution is done using the Replace idiom ( /. followed by a substitution rule):

In[148]:= (e kcat s)/((k2+kcat)/k1+s)/.kcat e-> vmax
Out[148]= (s vmax)/((k2+kcat)/k1+s)

And the same idiom is used for km:

In[140]:= (s vmax)/((k2+kcat)/k1+s)/.(k2+kcat)/k1->km
Out[140]= (s vmax)/(km+s)

If you have a set of recurring substitutions, you can write little functions that will make the work easy.

Eric

POSTED BY: Eric Johnstone
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard