-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
reversible reaction #198
Comments
inside of the macro? |
That is what I am trying: |
rxn = @reaction_network begin
2.0, X + Y <> XY
end ? |
It does not work. I showed to you the code, and the error messages. |
Go you. My mistake. It is a typo. |
This throws the error: |
What version of Julia? v1.4.2 with DiffEqBio v4.3? |
Juliav1.4.2 |
These seem to be the valid arrow symbols:
I’m not sure about the text representation of some of them, maybe you need |
Never mind, I see that didn’t work either for you. You may have to just define it as two separate reactions. Internally it should lead to no changes in the models that are generated. |
Let's move this issue over to DEBio, but not address it until after the change to MTK (which is almost done!) |
This basically has to do with the parsing of expressions in Julia. When creating expressions I think neither one of rxn = @reaction_network begin
2.0, X + Y <--> XY
2.0, X + Y <-> XY
2.0, X + Y <> XY
end yields working code. Similar limitations for how expressions are parsed makes it so we cannot use This leaves us with only various one character symbols as possible separators for reversible reactions ( For your problem specifically, it would be interesting to know why you cannot use those arrows? And what alternative symbols you have available? More practically, what you will have to do here, is to simply write out both reactions: rxn = @reaction_network begin
2.0, X + Y --> XY
2.0, XY --> X + Y
end |
Some of the arrows parse in the parser, like -->. I thought bidirectional arrows were in the list? |
I'm not really sure what kind of operation
you will get an error ( |
@metma99 So Julia will add the ability to parse reversible reaction arrows, which in turn will (eventually) allow us to use them here. I assume this won't be available until at least 1.6 though. See JuliaLang/julia#36666 |
Thank you very much! |
This works now with version 6.11 and Julia 1.6! |
Quick question if I may:
I tried to use <>, <->, and <--> for representing reversible reactions without success. Errors are ">" is not a unary operator, invalid identifier name "->".
Because of technical reasons I cannot use the double arrow used in the examples.
Is the double arrow in the examples the only way to represent equilibrium reactions?
Markus
The text was updated successfully, but these errors were encountered: