From: Stefan M. <ste...@oe...> - 2006-06-21 13:36:24
|
rainer, there are more mistakes! (please see below) > hi, > > find below a draft for bringing this issue to the SBML list, as suggested > by Andrew. > > could you review? is the problem stated clearly and correctly? > > > Dear SBML Community, > > As we recently wanted to model variable compartments we realized that our > tool - SOSlib - actually does not solve models with variable compartments > correctly. > > We wonder how other tools approach this topic. > > In summary: > > SOSlib constructs ODEs as recommended by the SBML specs, e.g.: > > species X1 in compartment V1, with concentration x1 = X1/V1 > species X2 and X3 in V2, with conc. as above > > Reactions: > X1->X2; k1*X1*V1 // a translocation, k1 [1/sec] > X2->X3; k2*X2*V2 // a unimolecular reaction, k2 [1/sec] > > Derived ODEs: > dx1/dt = - ( k1 * X1* V1 ) / V1 > dx2/dt = ( k1 * X1* V1 - k2 * X2 * V2 ) / V2 > > the kinetic laws are the SBML specific conversion of `classic' rate law > to substance/time units, instead of concentrations/time to allow for > easy software handling of multiple compartment models. > > If however, the volumes in the model are variable with time, i.e. either > an assignment rule or a rate rule, these equations would not be correct. the following section is not very clear and/or wrong: (please don't send this to the sbml list!) > A numerical integration routine would start with the initial concentration > x(0) and add the changes during time t: > > x(t) = x(0) + dx/dt * t > > i.e. > > x(t) = X(0)/V(0) + dx/dt * t > > dx/dt is calculated correctly from above ODE because it also accounts for > changing compartments by explicit inclusion of the volume in the kinetic > law. > > However, the change of the initial concentration x(0) is not accounted for > anywhere. The solver should rather return: > > x(t) = X(0)/V(t) + dx/dt * t > > If x is a function of time and of volume V, x(t,V(t)), > then the correct ODE would actually be > > dx/dt = dx/dt + dx/dV * dV/dt > > Right? no! please use the following math: (i already wrote it down in one of my previous mails :) ) definitions: x(t) ... conc X(t) ... substance V(t) ... compartment size given a kinetic law for a reaction, e.g. X->Y: r*x*V or X+Y->Z: r*x*y*V, which explicitly includes the compartment size (!), the corresponding ode for substance X amounts to: dX/dt = - r*x*V or - r*x*y*V, or replacing conc by substances: dX/dt = - r*X or - r*X*Y/V the ode for conc can be derived by differentiating x=X/V: dx/dt = (dX/dt)/V - x*(dV/dt)/V where dX/dt is given by the kinetic law above. i.e. we would get a correction term for variable compartment size. this is the most important reason for using odes for substances! > We are currently discussing different solutions and their dangers > for SOSlib, i.e. how to correctly convert the ODE system to an ODE system > in amount/time instead of concentration/time or whether the above partial > differential equation could or should be implemented instead. > > It would be helpful for us to hear how other tools handle variable > compartments. > > > And BTW, it might be good to indicate it as good practice NOT to convert > parameters e.g. from [1/sec] to [litre/sec] to obtain correct units for > SBML kinetic laws, but to explicitly keep the volume in the formula! This > would allow changing the compartment size or even making the variable, at > least for tools which do it correctly. > E.g. the model in the specs, section 5.6 will not be valid anymore if > someone wanted to change the volume sizes! > > Such rather unconvential volume-dependent rate `constants' can be > quite dangerous! > > > Rainer > > > > Rainer Machne > Institute for Theoretical Chemistry > University of Vienna > Austria > > > _______________________________________________ > sbmlsolver-devel mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-devel |