euba / BacArena

agent based modelling
GNU General Public License v3.0
26 stars 11 forks source link

setkinetics question #135

Closed fairquestion closed 5 years ago

fairquestion commented 5 years ago

Dear all,

I have a question regarding the "setkinetics" command. When I implement a specific km for an exchange reaction I am always getting the same output despite the km number:

setKinetics (bac1, "EX_cpd00075(e)", 0.01, 7.56) [1] "Exchange reaction with uptake set of -1000" [1] "EX_cpd00254(e)" "EX_cpd00073(e)" "EX_cpd00305(e)" "EX_cpd00971(e)" [5] "EX_cpd00067(e)" "EX_cpd00210(e)" "EX_cpd00034(e)" "EX_cpd00149(e)" [9] "EX_cpd00063(e)" "EX_cpd11596(e)" "EX_cpd00001(e)" "EX_cpd00058(e)" [13] "EX_cpd01012(e)" "EX_cpd08023(e)" "EX_cpd00276(e)" "EX_cpd00011(e)" [17] "EX_cpd00531(e)" "EX_cpd00048(e)" "EX_cpd11575(e)" "EX_cpd09878(e)" [21] "EX_cpd03048(e)" "EX_cpd00205(e)" "EX_cpd00264(e)" "EX_cpd03724(e)" [25] "EX_cpd11579(e)" "EX_cpd00099(e)" "EX_cpd00009(e)" "EX_cpd00075(e)" [29] "EX_cpd10516(e)" "EX_cpd00209(e)" "EX_cpd10515(e)" "EX_cpd00118(e)" [33] "EX_cpd04097(e)" "EX_cpd00030(e)" "EX_cpd00395(e)" "EX_cpd11578(e)" [37] "EX_cpd00047(e)" "EX_cpd00013(e)" "EX_cpd00418(e)" "EX_cpd00418x_c" [41] "EX_cpd00007(e)" "EX_cpd11416(e)" "EX_cpd00242(e)" "EX_cpd00165(e)"

What does this output exactly mean?

Thanks, Fair

euba commented 5 years ago

Hi,

This function gives an Bac object back. That's why you see this output, it should be the same output as if you just write bac1 in the console. You should use setKinetics like this:

bac1 <- setKinetics (bac1, "EX_cpd00075(e)", 0.01, 7.56)

That's how you can overwrite the settings of bac1.

Cheers, Eugen

fairquestion commented 5 years ago

Hi Euba,

Sorry, I did an incomplete question I know that by doing "bac1 <-" I can modify bac1. What I wanted to know is why, no matter the value of my km and vmax, the uptake is always set to the same number, i.e. -100. Is it something expectable? I can try to reproduce the results.

Best, Fair.

euba commented 5 years ago

Ah ok, I see what you mean. The reason why you don't see a difference in the constraints is because the upperbound is generally open (so -1000) and with the Michaelis-Menten kinetics the internal lower bounds are set dynamically according to the current (time step tstep) substance concentrations s in the environment with:

lnew = -(vmax*s/(Km + s))*tstep

If you want to check if the kinetics are set before and after setKinetics you can run:

bac1@kinetics

that's how you can make sure that the kinetics were set.

Cheers, Eugen

jotech commented 5 years ago

please reopen if still an issue :)