sbmlteam / sbml-test-suite

The SBML Test Suite is a conformance testing system. It allows developers and users to test the degree and correctness of the SBML support provided in a software package.
https://sbml.org/software/sbml-test-suite/
Other
23 stars 12 forks source link

Non-Unique entries in list of Reactants/Products #48

Closed FFroehlich closed 7 years ago

FFroehlich commented 7 years ago

Hello,

In a software I develop (which is tested using the semantic test cases of this testuite) I recently encountered problems with a SBML model which had multiple entries referring to the same species in the ListOfReactants of a Reaction. As I can imagine that others could run into similar problems with such models, I thought it might be worthwhile to include a corresponding test case.

If desired, I would contribute a minimal example where this occurs.

Best, Fabian

luciansmith commented 7 years ago

That makes sense, and is a good idea. I've been adding new tests to the test suite recently anyway; I'll add this to the list. We'd need multiple entries, with different stoichiometries, and probably negative stoichiometries, too. And variable stoichiometries. Off the top of my head, here's what I think I'd put in:

A + A -> A + 2A -> A + -A -> A -> A A -> 2A 2A -> A 2A -> -3A -2A -> 3A -> A + A -> A + 2A A + A -> B + B A + B -> A + B 2A + -B -> -2A + B A + 2A + -4A -> 5A + -2A + A + A nA + mA -> nA -> mA -> nA + mA nA + mA -> oB + pB nA + mB -> oA + pB

Anything else I should add? Thanks for the suggestion!

FFroehlich commented 7 years ago

Great! Might be reasonable to also make combinations with AssignedConstantStoichiometry (as in 1064-1102) and AssignedVariableStoichiometry (as in 1103-1109).

luciansmith commented 7 years ago

OK! The repository now contains tests 1420-1453 (in the 'develop' branch; https://github.com/sbmlteam/sbml-test-suite/tree/develop), which cover the above tests (one per line, usually), with the 'n' and 'm' tests testing both constant and variable assigned stoichiometries (using events and rate rules), and also with StoichiometryMath, for l2 models.

They've all been tested with RoadRunner, but an external test would be great, too. Thanks!

(Also, there are a lot of new l3v2 tests in general--let us know if you get a chance to implement support for them, as it'll mean l3v2 could be officially released!)

mhucka commented 7 years ago

Very impressive. Thanks for doing that!

FFroehlich commented 7 years ago

I can confirm that that test cases 1420-1453 are working for me. l3v2 tests will take a little bit longer ( we do not support the full spectrum of SBML functionality so you will probably also need testing from more tools)

luciansmith commented 7 years ago

Great! Glad to hear they're working for you. Do let us know if you find more situations not covered by the test suite; we'll be happy to add them in. Closing this tracker item for now; feel free to re-open if something else comes up.