Repository navigation
Release notes for sbmlsim 0.68.0
A knob can name an icon which the web app draws, the derived units of a model no longer depend on the models loaded before it, and a model loads faster and its units are derived on demand. The contracts are unchanged. One visible change: the name of a unit definition with a factor is now <id>_<8 hex>, see Changed results.
Added
Knob.icon(#845). A knob may name one of the sixteen icons ofKNOB_ICONS(liver,kidney,heart,blood-flow,scalpel,body-weight,age,sex,pill,clock,food,drug-interaction,gene,temperature,pump,oxygen), which the web app draws left of its label. It is available on every kind of knob (panels, map panels, live figures and population panels), refused with the list of names when unknown, and written as the attributeiconof theknobelement ofns/panel/2. It is left out of the payload of a knob without one, so no contract version moves and the payloads of such knobs are unchanged. The demos name icons.- sbmlsim-web 0.13.0 is vendored, which draws the icons, with its third-party notices (the sources and licenses of the icons) embedded in the licenses of the web app.
Fixed
- The units of a model are a function of its SBML (#846). libsbml 5.21.2 derives the unit of a call of a function definition from a temporary copy of its body, which it deletes, while it keeps the unit of every node of the formula by its address, so the derived unit of a kinetic law with several calls depended on the heap of the process (
mol/lormol^2/l^2instead ofmol*sfor the SBML Test Suite case 00856, BIOMD0000000064 and BIOMD0000000450 alike). The derived units are now read from a copy of the document with every call expanded, and agree with the units sbmlsim-core derives. Of all documents of the SBML Test Suite and the BioModels cache only 13 with function definitions change a derived unit. - A unit definition with a factor is named
<id>_<8 hex>, the hash of its expression, unless pint knows the id as the same unit. It was<id>or<id>_<n>by what the shared registry held, so the name depended on the models loaded before and a second model with another unit of the same id had a unit in its description which differed from the one of its scan results. The units of the scans and references of sbmlsim-core are translated from the names of the core to these names (SBMLModel.core_units). - The derived units do not depend on the unit ids read before (#849). The copy without function calls orders the units of its unit definitions as
Units.udef_to_strorders them in the model, so a derived unit is the same whether the unit ids were read first (BIOMD0000000875T_cell_sourceismitem/s, as in sbmlsim-core, where #846 had givenitem/ks). - A model of level 2 whose kinetic law has a power to a parameter no longer raises a
ZeroDivisionErrorinunit_signaturewhen libsbml cannot determine its unit (7 BioModels viaUnitsInformation.from_sbml).
Performance
- A model is loaded without its parameter Jacobian (#848).
compiled_modeltakesparameter_jacobian(false by default): the module of a loaded model has nomodel_jac_p, which only the forward sensitivities read, and deriving and planning it was 35 to 64 % of the compile of BIOMD0000000505, BIOMD0000000835 and the perfusion model of pkdb_models. The forward sensitivities run onSBMLModel.sensitivity_model, compiled with it at their first run. The module without it simulates every timecourse bitwise as the one with it. - The units of the reactions of a model are derived at their first read (#849).
UnitsInformation.from_sbml_dockeeps the units which libsbml derives from the math of the kinetic laws, and the copy of the document with every function call expanded which they are read from, for their first read (an item of a derived id, an iteration orudict), and the contract of the units of a plan leaves them out, since a change never sets them. The elements of a model are taken off the linked list of libsbml instead of indexing it, which was quadratic. - The converted document of a model is kept.
to_level3keeps its last conversion, so a model loaded again converts nothing, and keeps the converted document as the document of the converted text, so its symbols, units and selections parse nothing again.
Changed results
- The names of units with a factor (
<id>or<id>_<n>before,<id>_<8 hex>now, e.g.unit_1becomesunit_1_<hash>) inUnitsInformation,uinfoand the registry. A code which compared such a name as text must read the unit instead. The units themselves are the same, and simulations, panels and figures are the same. - The derived unit of a kinetic law of the models whose law calls function definitions several times now is the one of the expanded math, where it was sometimes a wrong one.
- The web app of a model embeds sbmlsim-web 0.13.0, so run the factory again to update it.
