-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
PR to sync with latest breaking SBML change to Reaction #26
Conversation
Now there are two test failures, but I'm not sure what wen't wrong here. Model to MTK conversions: Test Failed at /Users/anand/.julia/dev/SBMLToolkit/test/reactionsystem.jl:140
Expression: isequal(([ncs], [ncs], [1.0], [1.0]), SBMLToolkit.getreagents(constreac.reactants, constreac.products, constmod))
Evaluated: isequal((Term{Real, Nothing}[constspec(t)], Term{Real, Nothing}[constspec(t)], [1.0], [1.0]), (nothing, Num[constspec(t)], nothing, [1.0]))
Model to MTK conversions: Test Failed at /Users/anand/.julia/dev/SBMLToolkit/test/reactionsystem.jl:141
Expression: isequal((nothing, nothing, nothing, nothing), SBMLToolkit.getreagents(constreac.reactants, constreac.products, constmod))
Evaluated: isequal((nothing, nothing, nothing, nothing), (nothing, Num[constspec(t)], nothing, [1.0])) See the tests where I updated reactions, I'd appreciate a double check that I converted the netstoich to reactants and products correctly. I'm also wondering what I need to do for the boundary condition stuff, since I effectively removed that logic |
This is the reason why the tests are failing iiuc. If |
if model.species[k].boundary_condition != true | ||
push!(products, create_var(k,Catalyst.DEFAULT_IV)) | ||
push!(pstoich, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulflang okay yeah I think i see. what is the reason we don't push to reactants if bc is true here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess because that would double things up right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if bc is true we need to make sure that the stoichiometry of the species in question is the same on the right and left side of the reaction equation. however, we never want to modify the left hand side. this is because the left hand side can be used to determine if a reaction is mass action kinetics (i.e. A + B -> C gives mass action kinetic kAB, A -> B gives mass action kinetic k*A, etc.). This leaves us with the option to modify the product side. But this is already taken care of in line 149. In line 154 we only need to take care of the default case of bc = false, which is that reaction products are actually produced.
this latest commit only fails on Model to MTK conversions: Test Failed at /Users/anand/.julia/dev/SBMLToolkit/test/reactionsystem.jl:141
Expression: isequal((nothing, nothing, nothing, nothing), SBMLToolkit.getreagents(constreac.reactants, constreac.products, constmod))
Evaluated: isequal((nothing, nothing, nothing, nothing), (Num[constspec(t)], Num[constspec(t)], [1.0], [1.0])) I don't see why thouhg |
This is because you call The reaction is |
thanks for the help paul #28 is a much cleaner copy of this |
There is something going on with negative stoichs.
The tests will fail since a new release of SBML hasn't happened.
I also probably messed up the boundary condition handling and something in reversible reactions.
Everything passes locally but 7 failures that all either look like one of the following:
@paulflang understandable if you don't have time to review but if you get the chance