Closed FFroehlich closed 5 years ago
I can say for certain that models like this are valid SBML. However, if you just have a plain species with no initial anything, even though it's valid, it is underdefined and cannot be simulated without resorting to external information to simulate it. As a result, there are no models like this in the semantic test suite, since the semantic test suite can only test models whose simulation results are fully defined.
There are indeed models like this in the syntactic test suite, which has a lot of models in it that are valid SBML, but which cannot be simulated for various reasons.
It's worth noting that I can think of four situations where a species (or any SBML element with mathematical meaning) with no 'initialValue' or 'value' can be defined:
I believe all four situations are covered by the test suite.
(There's also the vaguely-similar situation where a model with no reaction rates may have FBC information in it that is used to estimate those rates. This is one example of why underdefined models in SBML have always been valid. Structural analyses can also be performed usefully on models like these.)
It is true that some simulators like libroadrunner have internal defaults they use for otherwise undefined mathematical elements, but that's a choice that the simulator makes. Other simulators choose to fail. This has, unfortunately, been the case since the earliest days of SBML, and reflect different philosophies of tool use. It would be nice if everyone did the same thing (i.e. always fail or always use defaults) so that the models would be more exchangeable, but SBML is a community standard, and this is one area where the community has always had diverging practices.
If I recall correctly, libroadrunner uses a default of '0' for species and parameters, and a default of '1' for compartments and reaction rates. I think it is at least true that simulators that use defaults tend to all choose these same defaults.
Thanks for the quick and detailed response! I was not aware of the purpose or existence of the syntactic testcases, but I guess we will also have to implement a testrunner for those!
You're welcome! Links to the syntactic test suite cases can be found at https://github.com/sbmlteam/sbml-test-suite/releases
In general, the syntactic tests have several models that are syntactically valid (the 'pass' models), and a lot of models that are syntactically invalid (the 'fail' models). You can use them to ensure that you're passing on the correct error messages to your users, or at least to check that an invalid file doesn't crash your program ;-)
I believe there currently is no tests that test behavior for species that have no initial conditions (as in no initialAmount/initialConcentration/initialAssignment/Assignment). I am not sure whether such models are well defined in sbml standards.
sbml l3v2 states:
This suggests that species without initial conditions might not be valid SBML, but libSBML (5.17.0) does not seem to complain about it. Libroadrunner seems to default these initial conditions to a numeric value of
0.0
, which seems intuitive but I could not find anything that supports this behaviour in the documentation.