RuleWorld / bionetgen

Rule-based modeling framework
https://bionetgen.org/
MIT License
59 stars 25 forks source link

Ele function marked as invalid syntax #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From Bogdan<iancu.v.bogdan@gmail.com>:

"I have a little problem with RuleBender, I'm trying to use the Ele function as 
a rate Law but apparently RuleBender does not recognize it,  is it implemented 
there or am I doing something wrong?"

I have not looked much further into this, but it sounds like an issue in the 
parser.  

Original issue reported on code.google.com by AdamMatthewSmith on 11 Feb 2013 at 12:20

GoogleCodeExporter commented 9 years ago
It would be useful to see a model example that produces the error.

I sense that there may be some confusion about the way elementary rate laws are 
invoked. Elementary ratelaws are assumed if a number, parameter, or math 
expression (without  observable or function calls) follows the products of a 
reaction rule, e.g.

A + B -> C  k

This reaction rule has a total rate of k*|A|*|B|, according to elementary 
kinetic principles.  If one attempts to access the elementary type by writing 
something like "Ele(k)", e.g.

A + B -> C  Ele(k)

that won't work!  There is no special "Ele" keyword. Just write the rate 
constant and the elementary ratelaw will be assumed.

Original comment by justinshogg on 13 Feb 2013 at 1:13

GoogleCodeExporter commented 9 years ago
I'm surprised by this actually. Note 20 of the BNG Bible discusses rate law 
types and states that: "the three recognized rate law types are 'Ele', 'Sat', 
and 'MM'." Therefore, although I had never tried it, I always assumed that 
"Ele(k)" was valid syntax and equivalent to just "k". Even though it's not 
strictly necessary, I'm tempted to support Ele() as a special function for the 
sake of completeness. I plan to reimplement Sat(), MM(), and Hill() at some 
point anyway. Any one else have any thoughts on this?

Original comment by lh64@cornell.edu on 13 Feb 2013 at 1:34

GoogleCodeExporter commented 9 years ago
Note 20 does make it seem as if "Ele(k)" will work. In contrast, the main text 
describes the Elementary ratelaw as default and makes no mention of any keyword.

Personally, I think we should avoid special ratelaws as much as possible. A 
little feature is simple enough by itself, but the accumulation of these 
special ratelaws is a large burden for future software maintenance.

Since this is the first time I've heard of this confusion, and since none of 
the examples use the "Ele" keyword, I think it's best to leave this as is.

Original comment by justinshogg on 13 Feb 2013 at 1:48

GoogleCodeExporter commented 9 years ago

Original comment by lh64@cornell.edu on 27 Jun 2014 at 10:42