State mapping in reaction rules?
See original GitHub issueHi, BNGL supports state mapping using “%” in reaction rules, e.g. A(a%x) -> B(a%x)
, to indicate that the state of A
is transferred to B
. I was wondering if there exists anything comparable in pysb? I see that it is straightforward to generate all the rules programmatically, but it would be convenient if that could be avoided.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
12.3: The Connection between Reaction Mechanisms and ...
Analyzing a reaction mechanism to determine the type of rate law that is ... order in A (in the limit that the steady...
Read more >Calculation of reaction rules for EC 2.6.1.5. (A) The atom ...
(A) The atom mapping highlights reacting atoms labelled 8, 11, 16 and 19. (B) Calculation of the EC 2.6.1.5 rules for diameters D...
Read more >Reaction Maps Now Available - Master Organic Chemistry
Reaction Map PDF from Master Organic Chemistry (MOC) has 29 "maps" of the reactions of functional groups including over 100 reactions.
Read more >Automatic Determination of Reaction Mappings and Reaction ...
The complete mapping for each atom of the reactants to an atom of the products of a given reaction is called the atomic...
Read more >Extraction of organic chemistry grammar from unsupervised ...
During the last few hundred years, chemists compiled the language of chemical synthesis inferring a series of “reaction rules” from knowing how atoms...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FFroehlich The basic reason is that the syntax for molecule and complex tags isn’t consistent with the syntax for component state tags, that’s all. A tag is conceptually like a pointer to an object. They can be used to map reactants to products (needed for extracting base operations from the rules, e.g., bind, change state, etc.) and for defining the context for performing pattern matching in Observables. Observables produce numbers (the number of matches to a molecule or complex) but the tag itself is not a number.
In the state-mapping example, the tag in
A(a%x) -> B(a%x)
represents a number, which is the problem. We thought about modifying the syntax so the rule would look something likeA(a~?%x) -> B(a~valueOf(x))
, where%x
would point to the state (as an object) ofa
and then a new builtin function (that we’d have to implement)valueOf
would extract the value of the state from the tagx
. But we never came to an agreement on exactly how to do this so it didn’t happen. For example, should we tag the state, like I did above, or the component, as in something likeA(a%x) -> B(a~x.getState())
?Anyway, we threw around ideas like this for a while but nothing ever came of it. So the original state-mapping syntax is still in there if it’s useful but I’d be careful about using it because it could change at some point in a new BNG release.
@lh64 Thank you for the detailed explanation, that definitely makes sense.