Message Boards Message Boards

0
|
9046 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Strange Results for set of ODEs

Hi all, as an attempt to model a process in molecular biology, I have put together a set of differential equations to describe changes in the concentration of certain proteins (PhaC), as they go through an initial complex formation (PhaCC), and multiple subsequent reactions adding one S group each time. Each S carrying complex is also subject to hydrolysis, which yields the protein complex and the number of S groups carried, as free monomers. The image below is representative.

enter image description here

Except for the complex formation, all reactions follow irreversible mass action kinetics. Furthermore, all initial concentrations are set to 0, except for the protein monomers, and the S groups, also as monomers. I have encountered two problems:

  • first, some protein concentrations take negative values from a certain point in time, and the substrate concentration, which is supposed to diminish, actually increases...
  • second, I was unable to explicitely state a mass conservation equation in the system.

I've made lists containing the odes, the rate expressions (rateqs), the parameter (parm), the initial values (init) and the variables (vars); in the end, all are joined into an NDSolve expression goes as follows

                              tsol = NDSolve[Join[odes /. rateqs /. parm, init], vars, {t, 0, 10}]

I have attached the mathematica file. I'd greatly appreciate any thoughts

Thanks!

Attachments:
POSTED BY: Aris Kondylidis
3 Replies

Special formatting, like summation symbols and subscripts are a double edged sword.

Programmers, who specialize in managing complexity and mantainability, do not use them. I usually don't recommend them for code. Subscripts especially encourage bad naming conventions for symbols and can be much trickier to work with than people realize.

POSTED BY: Sean Clarke
  1. Take your first cell, where you defined "odes" and highlight it.
  2. In the toolbar, navigate to "Cell" > "Convert To", and then click "Input Form"

Your code will look different. You should think of this as how your code "actually" looks.

Now, inside of your code you will see "TextCell[""]". This means you have an invisible TextCell accidentally inserted into your code. Get rid of it and then try rerunning your code. Does this help?

POSTED BY: Sean Clarke

Dear Sean,

Thanks a million, I could have been staring at it for two lifetimes... I guess you're right, subscripts can be a pain after all; still thinking in terms of chemistry I guess...

Thanks again for taking the time, and for the advice!

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

Group Abstract Group Abstract