From: Rainer M. <ra...@tb...> - 2006-06-19 16:07:56
|
Stefan i guess it might be different if we have to consider multiple compartments S1 is in V1; S2 and S3 are in V2; S1->S2: k1*[S1] S2->S3: k2*[S2] [S1] = S1 / V1 [S2] = S2 / V2 [S3] = S3 / V3 Thus the two parameters include two different initial volumes, i.e.: k1 [volume/sec] = r1 * V1(0) k2 [volume/sec] = r2 * V2(0) Currently the ODE would be: d[S1]/dt = k1 * [S1] / V1 d[S2]/dt = ( k1*[S1] - k2*[S2] ) / V2 d[S3]/dt k2*[S2]*[S3] / V3 which is only valid for constant compartments V1 and V2. At least for the second ODE, depending in two different volumes, the conversion to ODEs depending on substance instead of concentration is not as simple as > dS1/dt = k * [S1] * [S2] / V(0) * V = k/V(0) * S1 * S2 / V (all the ODEs in your email are missing a minus, BTW!) It should probably be something like: dS1/dt = - k1 * [S1] / V1(0) * V1 = - k1/V1(0) * S1 as your example before, but for S2 I get: dS2/dt = k1/V1(0) * S1/V1 * V2 - k2/V2(0) * S2 Right? Thus I would really have to check the type of reaction and edit a lot of kinetic laws before constructing the ODEs. Thus I think it just doesn't work with kinetic laws that don't include the compartment explicitly! But if they include the compartment we can write ODEs for substances but have concentrations in the right hand side of the ODEs. We then just need to a second array for the concentrations, as discussed before. Rainer On Mon, 19 Jun 2006, Stefan Mueller wrote: > let me summarize: > kinetic laws have units substance/time, > and they depend on concentrations or substances. > > we SHOULD write down odes for substances, > and we COULD eliminate concs completely. > (of course, we would have to convert initial concs to substances.) > > in any case, odes for substances depend on the compartment size > (linearly or according to the order of the reaction): > > order 1: > S1->junk: k*[S1] > dS1/dt = k * [S1] / V(0) * V = k/V(0) * S1 > > order 2: > S1+S2->bla: k*[S1]*[S2] > dS1/dt = k * [S1] * [S2] / V(0) * V = k/V(0) * S1 * S2 / V > > order 3: > S1+S2+S3->wow: k*[S1]*[S2]*[S3] > dS1/dt = k * [S1] * [S2] * [S3] / V(0) * V = k/V(0) * S1 * S2 * S3 / V^2 > > ... > > if the kinetic laws included the compartment explicitly (which is desirable), > we would have the following situation: > > order 1: > S1->junk: r*[S1]*V > dS1/dt = r * [S1] * V= r * S1 > > order 2: > S1+S2->bla: r*[S1]*[S2]*V > dS1/dt = r * [S1] * [S2] * V= r * S1 * S2 / V > > order 3: > S1+S2+S3->wow: r*[S1]*[S2]*[S3]*V > dS1/dt = r * [S1] * [S2] * [S3] * V = r * S1 * S2 * S3 / V^2 > > as stated earlier, odes for substances have got another advantage. for the > compartment size we could use either a rate rule or an assignment rule: > dV/dt = f(t, V, ...) > or > V= f(t, V, ...) > > cheers, > stefan. > > > Am Montag 19 Juni 2006 11:17 schrieb Stefan Mueller: >> andrew: >> >> for the SBML system >> S1 in C >> S1->junk : k * [S1] >> dC/dt = 1 >> >> the right math is: >> dS1/dt = k * [S1] / C(0) * C >> dC/dt = 1 >> with initial cond: >> S1(0) = [S1](0) * C(0) >> C(0) >> >> notation: >> S1 ... substance >> [S1] ... conc >> >> the "proposed solution" (who proposed this?) has the right units, >> but is wrong otherwise... :) >> >> as rainer and me already discussed, everything would be much clearer, >> if the kinetic law included the compartment explicitly: >> S1 in C >> S1->junk : C * r * [S1] >> dC/dt = 1 >> >> with: >> r ... the "real" chemical rate constant. >> >> rainer: >> >> chemists always knew that rate constants are not constant with respect to >> pH, T, ... as a physicist i have to be fair! :) >> >> to conclude: the math is not really tricky. >> odes for substances are better suited to handle both multiple and variable >> compartments. of course, we have to take care of many implementation >> details... >> >> cheers, >> stefan. > > > _______________________________________________ > sbmlsolver-devel mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-devel > |