Skip to content
Prev 393659 / 398503 Next

R emulation of FindRoot in Mathematica

Thanks, ? Valentin for the suggestion. I'm not sure I can go that way. I 
include below the statements from the paper containing the knowledge on 
the basis of which I would like to know at specified [H] the 
concentration of each of the many metabolites given the constraints. I 
have tried to contact the author to get the full code but it seems 
difficult.

BW Troels


hatp <- 10^6.494*H*atp
hhatp <- 10^3.944*H*hatp
hhhatp <- 10^1.9*H*hhatp
hhhhatp? <- 10*H*hhhatp
mgatp <- 10^4.363*atp*mg
mghatp <- 10^2.299*hatp*mg
mg2atp <- 10^1-7*mg*mgatp
katp <- 10^0.959*atp*k

hadp <- 10^6.349*adp*H
hhadp <- 10^3.819*hadp*H
hhhadp <- 10*H*hhadp
mgadp <- 10^3.294*mg*adp
mghadp <- 10^1.61*mg*hadp
mg2adp <- 10*mg*mgadp
kadp <- 10^0.82*k*adp

hpi <- 10^11.616*H*pi
hhpi <- 10^6.7*h*hpi
hhhpi <- 10^1.962*h*hhpi
mgpi <- 10^3.4*mg*pi
mghpi <- 10^1.946*mg*hpi
mghhpi <- 10^1.19*mg*hhpi
kpi <- 10^0.6*k*pi
khpi <- 10^1.218*k*hpi
khhpi <- 10^-0.2*k*hhpi

hpcr <- 10^14.3*h*pcr
hhpcr <- 10^4.5*h*hpcr
hhhpcr <- 10^2.7*h*hhpcr
hhhhpcr <- 100*h*hhhpcr
mghpcr <- 10^1.6*mg*hpcr
kpcr <- 10^0.74*k*pcr
khpcr <- 10^0.31*k*hpcr
khhpcr <- 10^-0.13*k*hhpcr

hcr <- 10^14.3*h*cr
hhcr <- 10^2.512*h*hcr

hlactate <- 10^3.66*h*lactate
mglactate <- 10^0.93*mg*lactate

tatp <- atp + hatp + hhatp + hhhatp + mgatp + mghatp + mg2atp + katp

tadp <- adp + hadp + hhadp + hhhadp + mghadp + mgadp + mg2adp + kadp

tpi <- pi + hpi + hhpi + hhhpi + mgpi + mghpi + mghhpi + kpi + khpi + khhpi

tpcr <- pcr + hpcr + hhpcr + hhhpcr + hhhhpcr + mghpcr + kpcr + khpcr + 
khhpcr

tcr <- cr + hcr + hhcr

tmg <- mg + mgatp + mghatp + mg2atp + mgadp + mghadp + mg2adp + mgpi + 
kghpi + mghhpi +
 ? mghpcr + mglactate

tk <- k + katp + kadp + kpi + khpi + khhpi + kpcr + khpcr + khhpcr

tlactate <- lactate + hlactate + mglactate

# conditions

tatp <- 0.008
tpcr <- 0.042
tcr <- 0.004
tadp <- 0.00001
tpi <- 0.003
tlactate <- 0.005

# free K and Mg constrained to be fixed
#
mg <- 0.0006
k <- 0.12

Den 19-01-2023 kl. 12:11 skrev Valentin Petzel: