-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State mapping in reaction rules? #501
Comments
To the best of my knowlegde this features isn't currently supported in pysb. Would also be interesting for some of the applications I am looking at, so I will look into enabling this. Shouldn't. be too much hassle as long as its supported in BNGXML (which it should). |
Great, thanks. Let me know if i can help. |
@dweindl The state-mapping rule you're showing is an old feature of BNGL that isn't really supported anymore (it's still in the software but it's not really considered part of "proper" BNGL). The “proper” way to use tags is to either tag a Molecule like |
A simple example model using the |
Was there a specific reason to deprecate this functionality in BNGL? I imagine that for any kind of study where molecules are in any way tagged and those tags can be transferred, the state mapping is a useful feature. Even though they use the same syntax, molecule or complex tags really serve a different feature and don't permit the abstraction implemented in state mapping. |
@lh64 Thanks for your explanation and the example. I stumbled across the %-notation in some older examples and found it pretty useful. As it still worked with BNGL, I wasn't aware that it is outdated. |
@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 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. |
Hi, BNGL supports state mapping using "%" in reaction rules, e.g.
A(a%x) -> B(a%x)
, to indicate that the state ofA
is transferred toB
. 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.The text was updated successfully, but these errors were encountered: