From: Rainer M. <ra...@tb...> - 2006-09-05 08:41:22
|
Hi Michael, This email also goes to the SOSlib developers' email list. On Mon, 4 Sep 2006, Michael Hucka wrote: > Andrew recently wrote the following to me in a separate > message about the L2v2 draft specification: > > afinney> the Example of the translation from > afinney> multicompartment models to odes: > afinney> > afinney> This model is correct as it stands but this type > afinney> of translation doesn't work when the compartment > afinney> volume varies i.e. is defined by an ODE. In that > afinney> type of system the species odes need to be in > afinney> substance/time units. The species concentrations > afinney> can then be computed by simple 'rules' applied to > afinney> intermediate species variables in substance > afinney> units. The SOSlib team ran into this issue a > afinney> month or 2 ago. I can't explain the math but we > afinney> could probably get them to explain this if you > afinney> want real proof. > afinney> > afinney> Perhaps we can have a variable compartment model > afinney> translated into Odes in addition to the existing > afinney> model > afinney> > afinney> either way there needs to some text describing > afinney> the limitations of the approach that's used in > afinney> the current text. > > I think the model in question in the examples section was > contributed by Nicolas. I'm afraid I'll run out of time > to make all the remaining changes to the spec, so could I > ask for people's help in doing as Andrew suggests above? The example in section 5.6 has a variable compartment V1: http://sbml.org/specifications/sbml-level-2/version-1/html/sbml-level-2.html#SECTION00056000000000000000 So I think the given translation to ODEs is wrong in the current state!! Or am I wrong? This topic confused me back then. Maybe Stefan or Luki can check section 5.6 and the following short explanation: 1) First the constant K3 (and all other Ks) is already corrected for some initial volume to convert the kinetic law to substance/time. K3 = K3original * V1(0) where K3original was in units [1/time] and K3 is in [volume/time], so K3*S3, with S3 as a concentration [substance/volume], yields the required [substance/time]. So K3 is actually a volume-dependent variable!! The equation should rather have an explicit volume term, i.e. K3original * V1 * S1 The volume corrections in kinetic laws should in general be done explicitly and it might be a good thing to note this in the specs compartment section. 2) Second the last ODE dS3/dt is wrong. A correct math would require a d[S3]/dV term to account for the influence of volume change on the concentration. Imagine an initial concentration of 1 for S3(0) and a Volume V1 that has doubled at time t, V1(t) = 2 * V1(0). The ODE given would just add the changes by reactions but not changes to this initial condition by the volume change which at time t would only be 0.5. A term dS3/dV would account for this. Fortunately there was an easier solution which Andrew mentioned above and which is outlined shortly at http://www.tbi.univie.ac.at/wiki/index.php/SOSlibDevel#Variable_Compartment_Sizes 1) write ODEs in substance/time, i.e. don't divide by the compartment, the left hand side of the ODEs are dXamount/dt rather then dX/dt; the ODE solver will the calculate Xamount. 2) write assignment rules for species concentrations which are required at the right hand side of ODEs: X = Xamount / Volume. Let me know if we can contribute something specific to the new draft. Rainer > > The possible outcomes are as follows, in decreasing value of > goodness: > > 1. Someone writes a 2nd model (and corresponding > explanation) that handles the variable volume case. We > add this model as an additional example in the examples > section, and also modifies the description of the > existing constant-volume model to explain it's a common > but special case, it's limited, doesn't handle varying > volumes, etc. > > 2. Someone modifies the existing model to make it handle > varying volumes, and we leave just the one model, because > it's the most general case. > > 3. We decide we don't have time to create a new general > example, and instead only edit the existing > constant-volume model to explain its limitations. > > 4. I add a sentence to the existing constant-volume model > example description mentioning that it's only for > constant volumes "and this does not properly handle the > more general case". > > Let me know if anyone can do something. > > MH > |