-
Notifications
You must be signed in to change notification settings - Fork 6
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
infix math doesn't follow Python conventions #120
Comments
Looking at the actual code, most of this is indeed already handled, which is great. And I'm not sure if the sbml-specific csymbols (avogadro, delay, rateOf) are allowed in SED-ML anyway, so those are probably fine. But the units definitely need to be removed, and the functions with 0/1 arguments probably should be dealt with, though this probably won't come up very often, if at all. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The libsedml.formulaToL3String() (inherited from libsbml) will often work as-is to be interpretable in Python, but there are many cases where it will not. Issue #118 fixed one of them, but several remain. I'll try to come up with a complete list:
Note that avogadro is explicitly defined as exactly that value in libsbml, even though avogadro's number is now different than it was when the SBML spec first introduced the symbol. libsedml doesn't say anything about avogadro, of course, but
I had the vague memory of doing something like this before, and managed to find it:
https://github.com/luciansmith/sedml-script/blob/master/parser/src/registry.cpp#L335
Looks like I didn't get everything above, but a lot of it is there. Seems like the math functions can be imported from a combination of 'math' and 'mpmath', and you have to write your own 'piecewise' function a la
https://github.com/luciansmith/sedml-script/blob/master/parser/src/registry.cpp#L471
The text was updated successfully, but these errors were encountered: