|
From: giuseppe a. <apr...@gm...> - 2009-02-05 15:51:27
|
Dear all,
I am giuseppe and I am using IE-Cell SE Version 3.1.106 on kubuntu 8.04.
I am experiencing some problems in implementig new processes.
I am trying to use ecell as an ode solver: the differential equations are:
pow1a=(ks3/x(3))^n3;
pow1b=(ks4/x(4))^n4;
pow2a=(x(3)/sm3)^a3;
pow2b=(x(4)/sm4)^a4;
mu=mu1*(1/(1+pow1a))*(1/(1+pow1b))*(1-pow2a)*(1-pow2b)
dx(1)dt = mu*x(1)
dx(2)dt = ((k1*mu)+k2)*x(1)
dx(3)dt = -((alp*mu)+gam)*x(1)
dx(4)dt = -((mu/yRS2)+mS2)*x(1)
where ks3,ks4,n3,n4,sm3,sm4,a3,a4,mu1,k1,k2,alp,gam,yRS2,mS2
are numerical parameters; they keep the same value throughout the
computation. I wrote 4 new processes (which are attached); one for
each equation. As far as I understand ona can use ecell to as an ode
solver once given a process for each equation. the system should
assign to each "1" entry in the VariableReferenceList the proper
velocity in the following way. Given this entry in .em file:
...........
Process ODE2Process( ODE2 )
{
mu1 0.303;
n1 3.5938;
n2 2.213;
ks1 22.836;
ks2 0.234;
sm1 90.11;
sm2 10.11;
a1 3.19;
a2 0.97;
k1 0.008;
k2 0.034;
VariableReferenceList[X1 Variable:.:BIOMASS -1]
[X2 Variable:.:PHA 1]
[X3 Variable:.:NUTRIENT -1]
[X4 Variable:.:INHIBITOR -1];
}
...........
I guess ecell will associate ODE2Process' velocity to X2 Variable (PHA).
Is that right?
Now I have 2 problems:
- during compilation I get los of warnings of the kind:
"/usr/include/ecell-3.1/libecs/Entity.hpp:73: warning: comparison with
string literal results in unspecified behaviour"
I don't really understand if I am doing some fatal error in the code,
anyway I successfully get my .so objacts. Can I ignore this warning?
- if I compare the results with matlab ones they are quite different
both quantitatively (~20%) and qualitatively after "only" 60 sec.
By the way, does anybody know if there is some documentation about
Stepper settings (timestep, tolerance) or about how to make your own Stepper?
Many Thanks in advance,
Giuseppe
|
|
From: Moriyoshi K. <mo...@sf...> - 2009-02-06 10:07:17
Attachments:
odeFit.expression.em
|
On Fri, Feb 6, 2009 at 12:51 AM, giuseppe aprea <apr...@gm...> wrote: > I guess ecell will associate ODE2Process' velocity to X2 Variable (PHA). > Is that right? Right, X2 is accumulated according to the value of the ODE2Process's activity. > Now I have 2 problems: > > - during compilation I get los of warnings of the kind: > "/usr/include/ecell-3.1/libecs/Entity.hpp:73: warning: comparison with > string literal results in unspecified behaviour" > I don't really understand if I am doing some fatal error in the code, > anyway I successfully get my .so objacts. Can I ignore this warning? Those warnings are basically harmless, but it was addressed in the newer releases. Give 3.1.107rc2 a try. > - if I compare the results with matlab ones they are quite different > both quantitatively (~20%) and qualitatively after "only" 60 sec. You apparently specified an wrong coeffient (-1). Each process denotes a flux, so variables given with negative coefficients have negative deltas. > By the way, does anybody know if there is some documentation about > Stepper settings (timestep, tolerance) or about how to make your own Stepper? Assuming you took a look at the E-Cell manual, there has been no comprehensive document known that elaborates on Stepper specifications. Sorry. By the way, you can write such simple equations with ExpressionFluxProcess'es. Attached is a version rewritten with them. Regards, Moriyoshi |
|
From: Moriyoshi K. <mo...@sf...> - 2009-02-06 12:38:27
Attachments:
odeFit.expression.em
|
It seems I sent you a wrong version of the model file. Try this one instead. -- moriyoshi On Fri, Feb 6, 2009 at 7:07 PM, Moriyoshi Koizumi <mo...@sf...> wrote: > On Fri, Feb 6, 2009 at 12:51 AM, giuseppe aprea > <apr...@gm...> wrote: > >> I guess ecell will associate ODE2Process' velocity to X2 Variable (PHA). >> Is that right? > > Right, X2 is accumulated according to the value of the ODE2Process's activity. > >> Now I have 2 problems: >> >> - during compilation I get los of warnings of the kind: >> "/usr/include/ecell-3.1/libecs/Entity.hpp:73: warning: comparison with >> string literal results in unspecified behaviour" >> I don't really understand if I am doing some fatal error in the code, >> anyway I successfully get my .so objacts. Can I ignore this warning? > > Those warnings are basically harmless, but it was addressed in the > newer releases. Give 3.1.107rc2 a try. > >> - if I compare the results with matlab ones they are quite different >> both quantitatively (~20%) and qualitatively after "only" 60 sec. > > You apparently specified an wrong coeffient (-1). Each process denotes > a flux, so variables given with negative coefficients have negative > deltas. > >> By the way, does anybody know if there is some documentation about >> Stepper settings (timestep, tolerance) or about how to make your own Stepper? > > Assuming you took a look at the E-Cell manual, there has been no > comprehensive document known that elaborates on Stepper > specifications. Sorry. > > By the way, you can write such simple equations with > ExpressionFluxProcess'es. Attached is a version rewritten with them. > > Regards, > Moriyoshi > |
|
From: giuseppe a. <apr...@gm...> - 2009-02-07 21:27:46
|
Hi Moriyoshi,
thanks for your help. Since your answer I guess I missed something about
ecell's internal ode machinery.
Actually I set up Processes and em files thinking that the total delta for
each variable is the sum of the velocities of the processes for which it has
a +1 entry. I'll make an example: in my em file I have 4 processes entries
".........
Process ODE1Process( ODE1 )
{
mu1 0.303;
n1 3.5938;
n2 2.213;
ks1 22.836;
ks2 0.234;
sm1 90.11;
sm2 10.11;
a1 3.19;
a2 0.97;
VariableReferenceList[X1 Variable:.:BIOMASS 1]
[X3 Variable:.:NUTRIENT -1]
[X4 Variable:.:INHIBITOR -1];
}
Process ODE2Process( ODE2 )
{
mu1 0.303;
n1 3.5938;
n2 2.213;
ks1 22.836;
ks2 0.234;
sm1 90.11;
sm2 10.11;
a1 3.19;
a2 0.97;
k1 0.008;
k2 0.034;
VariableReferenceList[X1 Variable:.:BIOMASS -1]
[X2 Variable:.:PHA 1]
[X3 Variable:.:NUTRIENT -1]
[X4 Variable:.:INHIBITOR -1];
}
Process ODE3Process( ODE3 )
{
mu1 0.303;
n1 3.5938;
n2 2.213;
ks1 22.836;
ks2 0.234;
sm1 90.11;
sm2 10.11;
a1 3.19;
a2 0.97;
alp 0.48;
gam 0.0348;
VariableReferenceList[X1 Variable:.:BIOMASS -1]
[X3 Variable:.:NUTRIENT 1]
[X4 Variable:.:INHIBITOR -1];
}
Process ODE4Process( ODE4 )
{
mu1 0.303;
n1 3.5938;
n2 2.213;
ks1 22.836;
ks2 0.234;
sm1 90.11;
sm2 10.11;
a1 3.19;
a2 0.97;
yRS2 16.7;
mS2 0.0000045;
VariableReferenceList[X1 Variable:.:BIOMASS -1]
[X3 Variable:.:NUTRIENT -1]
[X4 Variable:.:INHIBITOR 1];
}
.........."
As far as I understood the four DELTAs were:
DELTA[X1]=velocity[PROCESS1]
DELTA[X2]=velocity[PROCESS2]
DELTA[X3]=velocity[PROCESS3]
DELTA[X4]=velocity[PROCESS4]
And I would have got t the initial ODE system.
But from your words and your second file I guess the answer is that my em file
gives:
DELTA[X1]=velocity[PROCESS1]-velocity[PROCESS2]-velocity[PROCESS3]-velocity[PROCESS4]
DELTA[X2]=velocity[PROCESS2]
DELTA[X3]=-velocity[PROCESS1]-velocity[PROCESS2]+velocity[PROCESS3]-velocity[PROCESS4]
DELTA[X4]=-velocity[PROCESS1]-velocity[PROCESS2]-velocity[PROCESS3]+velocity[PROCESS4]
(But in this case I would have missed not just a "-1" entry).
Now I have changed every "-1" with "0" and the results are the same of matlab.
It was a stupid error since I would have recognized that those species
acted like enzymes.
thanks a lot for your help (as always).
g
2009/2/6 Moriyoshi Koizumi <mo...@sf...>:
> On Fri, Feb 6, 2009 at 12:51 AM, giuseppe aprea
> <apr...@gm...> wrote:
>
>> I guess ecell will associate ODE2Process' velocity to X2 Variable (PHA).
>> Is that right?
>
> Right, X2 is accumulated according to the value of the ODE2Process's activity.
>
>> Now I have 2 problems:
>>
>> - during compilation I get los of warnings of the kind:
>> "/usr/include/ecell-3.1/libecs/Entity.hpp:73: warning: comparison with
>> string literal results in unspecified behaviour"
>> I don't really understand if I am doing some fatal error in the code,
>> anyway I successfully get my .so objacts. Can I ignore this warning?
>
> Those warnings are basically harmless, but it was addressed in the
> newer releases. Give 3.1.107rc2 a try.
>
>> - if I compare the results with matlab ones they are quite different
>> both quantitatively (~20%) and qualitatively after "only" 60 sec.
>
> You apparently specified an wrong coeffient (-1). Each process denotes
> a flux, so variables given with negative coefficients have negative
> deltas.
>
>> By the way, does anybody know if there is some documentation about
>> Stepper settings (timestep, tolerance) or about how to make your own Stepper?
>
> Assuming you took a look at the E-Cell manual, there has been no
> comprehensive document known that elaborates on Stepper
> specifications. Sorry.
>
> By the way, you can write such simple equations with
> ExpressionFluxProcess'es. Attached is a version rewritten with them.
>
> Regards,
> Moriyoshi
>
|