Release notes for sbmlsim 0.69.0
A model is loaded for a simulation without a document of libsbml, from the reader of sbmlsim-core, which loads 17 models cold in 5.0 s instead of 29.3 s and again in 0.27 s instead of 8.9 s. The app of a model gets explorer pages: the knobs in view beside the drawing, a scan button per knob, the maps of a scan side by side and a drawing which follows the knobs, drawn by sbmlsim-web 0.14.0. The floors are sbmlsim-core 0.67.0, python-libsbml 5.22.0 and sbmlutils 0.20.0. The contracts keep their versions. Some results change on purpose, see Changed results.
Added
-
Explorer pages (#856).
AppPage.controlsdecides how a page which shows the figure of its app offers its knobs:both, the new default: on the regions of the drawing and in a card of every knob of the page beside the drawing, one state;figure: on the regions alone, the page of 0.68;knobs: in the card alone, and the drawing opens no knob.
Anything but
bothon a page withoutfigureis refused. The app answers the field on every page, andapp/1keeps its version, since sbmlsim-web reads only the fields it knows and an answer withoutcontrolsis read asboth. Every knob a page scans has a scan button beside it (sbmlsim-web), which replaces the select of the scan. A map panel draws a scan as small multiples, a map of every readout per value. A scan of a choice knob runs its choices, a curve per protocol for a choice knob of protocols of changes. This already ran in the service and the bundle and is now documented and tested end to end. -
Drawings which follow the knobs (
sbmlsim.panel_drawing, #856). An element of the drawing of an app with anidanddata-bind="<knob id>"takes exactly one effect, which sbmlsim-web applies whenever a control moves the knob:- a colour ramp of its fill or stroke (
data-bind-fill,data-bind-stroke, OKLab); - a rotation whose speed follows the value (
data-bind-speed, paused under reduced motion); - a level (
data-bind-level) or an opacity (data-bind-opacity); - a colour per choice (
data-bind-map,data-bind-map-stroke) or a visibility per choice (data-bind-show);
each with
-darkvariants of its colours.DRAWING_BINDINGSandDRAWING_EFFECTSare the vocabulary, which a guard test checks against the vendored sbmlsim-web.AppFigurerefuses an unknown attribute, a bound element without an id, no effect or two, and a value which does not parse, naming the element, the attribute and the reason. The service refuses at startup a knob which no page of the figure owns, a value which is no choice and an information figure with a binding.readout:is reserved. The author draws the drawing at the defaults of the knobs, and sbmlsim writes nothing into it. - a colour ramp of its fill or stroke (
-
The demo
examples/panels/explorer.py: the drawing of a perfusion with a rotating impeller, a tube coloured by the flow, a reservoir level, an outline coloured by the protocol and a mark shown for a protocol of changes, with scans of the flow and of the protocol of the medium changes. -
sbmlsim-web 0.14.0 is vendored (#858), the renderer of the explorer pages. Since 0.13.0 it also:
- shows no unit beside the label of a dimensionless quantity;
- names the values of a scan in the legend of every panel;
- lines up the labels of a group of knobs where some have an icon;
- keeps the current tab in view after a resize.
A polish of the explorer (sbmlsim-web 0.14.1) follows in a patch release: maps of a scan as wide as their cells, the stops of a slider named once, and a thumb of one size in every browser.
Changed
-
The load of a model reads no document of libsbml (#857). The units, symbols, default selections, ids and label of a model are what the reader of sbmlsim-core reads of its text (
sbmlsim_core.model_info,modelinfo/1, sbmlsim-core 0.67.0). For any level:- a hierarchical model is flattened by sbmlsim-core;
- a model of level 1 or 2 is compiled as it is, with no conversion to level 3;
- the added parameters are written into the text by sbmlsim-core.
UnitsInformation.from_sbmlandModelSymbols.from_sbmlread through sbmlsim-core, andfrom_sbml_doc(stable API) writes the document and reads that text. The units path of libsbml (unit_signature,Units.udef_to_strand the copy without function calls of 0.68) is gone, and so isto_level3. The SBML Test Suite runs the newest encoding of a case as the suite ships it, and the web app compiles a model of any level as it is, as the service does. -
python-libsbml 5.22.0 (#854), which writes
fbc:strictonce on acomp:modelDefinition.Interpolation.drive_comp(embed=True)of a model with fbc content now writes a valid document, and the workaround is removed. -
sbmlutils 0.20.0 (#855) and sbmlsim-core 0.67.0 are the floors.
Fixed
- The copy of a document without function calls was shared between threads (#853). A thread could get the copy another thread had made, so two threads read one libsbml document. The copy is now kept per thread, as the document read last is. The copy is gone with #857, and the test of thread confinement stays.
Performance
- Loading a model (#857) reads no libsbml document, so 17 models of pkdb_models load cold in 5.0 s instead of 29.3 s, and again in 0.27 s instead of 8.9 s.
- A large model loads faster (#851). An id which only local parameters or unit definitions have is never looked up in the whole model: 0.52 s for the 2028 local parameters of BIOMD0000000496/497, 0.015 s now. A model whose maths cannot read the time or a delay is not walked for them.
Changed results
All from the libsbml-free load path (#857), compared over 10,652 documents. Every other field is identical (units, unit ids, declared units, symbols, selections, label, sbml_ids, description and timecourses).
- The engine SBML of a model of level 1 or 2 or of a hierarchical model is its own text (7,355 documents), no longer libsbml's conversion or flattening. So every hash of such an engine SBML changes once: compiled models, panel bundles, and the checksums in the provenance of such models.
- A number with more than 15 significant digits keeps its exact double, where libsbml wrote 15 digits. 166 timecourses differ, mostly the level 2 version 3 encodings of the SBML Test Suite whose values have 17 digits, within the tolerances of the suite.
- The maths of the events are MathML written by sbmlsim-core (2,476 documents). 12,143 of 12,230 maths evaluate bit for bit as before, 54 fail to compile in both, and 33 differ in the last bits, from an exponent libsbml wrote as an integer.
- 14 documents which libsbml's conversion refused now load: BIOMD0000000090, and 13 level 1 cases of an algebraic rule, which pass the suite.
- The name of a unit definition with a factor is
<id>_<sha8>, the one sbmlsim-core gives, for the units read by either path. - The text of avogadro's constant: its factor is
6.02214179e+23. - A unit libsbml cannot determine is the empty unit. It was a unit of NaN exponents in 8 BioModels.
- The dependencies of the initial assignments no longer count the name of a csymbol as a read (99 documents).
- The compartments of
Koenig_demo_14keep the order of the document, which libsbml's flattening reordered. - The comp cases 01147 and 01148 flatten without libsbml's product parameters of nested conversion factors, with the same statuses in the suite. The SBML Test Suite cases 01397 and 01572 (a fast reaction, level 2 only) are
not_readinstead ofnot_converted. - The web app of a model embeds sbmlsim-web 0.14.0, and the hashes of the engine SBML of level 1, level 2 and hierarchical models change, so run the factory again to update the committed apps and browser exports.
