pypi sbmlsim 0.67.0

one hour ago

Release notes for sbmlsim 0.67.0

sbmlsim

This is a breaking release. A panel can declare a virtual population which is simulated at every value of a scan and summarized by scalars, shown as box plots and histograms (#830). The exported bundle is the contract panelbundle/5, the package requires sbmlsim-core 0.66.1 and the web app of a model vendors sbmlsim-web 0.12.0. See Migration for what a model package does.

Breaking

  • The contracts populationpanel/1, populationresult/1 and panelbundle/5. panelbundle/5 adds populations to every answer of the bundle. It is a clean cut: the panel endpoint of sbmlsim-core 0.65.0 and later reads panelbundle/5 only and refuses panelbundle/4, and an older endpoint refuses panelbundle/5, so a bundle and a web app must be exported again with this release.
  • Requires sbmlsim-core 0.66.1 (sbmlsim-core>=0.66.1): 0.65.0 the panel endpoint of panelbundle/5 with the population panels and the summaries boxStats and histogram, 0.66.0 and 0.66.1 the room of the tick labels of an axis (tick_label_room).
  • sbmlsim-web 0.12.0 is vendored, which shows population panels and reads panelbundle/5.

Migration

  • Run the factory again of every model package and commit the web app (<name>_app.html) and the browser exports it writes again: an app of 0.66 embeds a host which refuses panelbundle/5.

Added

  • Population panels. sbmlsim.panel.PopulationPanel declares virtual patients (PanelPopulation: n at most MAX_DRAWS (256), a fixed seed of at most MAX_SEED (2^64 - 1), draws, measured, targets), simulated at every value of the scan of one range knob (PanelScanAxis, at most MAX_SCAN_VALUES (16) values, so at most 4096 simulations; no draw reads the knob of the scan) on explicit output times, and summarized by scalars (PanelScalar, at most MAX_SCALARS (8), formulas over the knobs, the flags known_<id>, the draws, earlier scalars and the reductions at, max, min, loglinear_intercept and loglinear_slope), shown as box plots per value of the scan (ScalarBoxPlot) and histograms of the draws (DrawHistogram, at most MAX_BINS (100) bins). A page of an app names it as a part; the annotation is <population>, the project override Project.populations. The demo is examples.panels.population:PROJECT (python -m sbmlsim.serve --model population=examples.panels.population:PROJECT).
  • The distributions of a population (sbmlsim.population): Normal, LogNormal (scipy's convention) and MultivariateNormal of at most 3 coordinates with one table or a Lookup of tables by the class of a knob (right-closed edges), every parameter a number or a formula of knobs. They are compiled to formulas of the knobs and seeded standard normal scores (the design random of design/1 of sbmlsim-core) and written as initial assignments into the population SBML, which the service and the browser simulate alike, so draws, targets and integration agree by their bits and the scalars within 4 ulps for the elementary functions and the power.
  • The conditional normal of measured values. Measured(name, value, cv) sets a coordinate to value*(1 + cv*z) when the optional knob its value reads is known, and draws the other coordinates of its multivariate normal from the conditional normal given the measured ones (per subset and class, Cholesky factors at compile time), so they keep their correlation with what a reader knows.
  • Knob(optional=True): a knob without a target which a reader may leave unknown (null in a request), its default read then and its flag known_<id> 0; only a population panel declares one.
  • The routes GET /api/models/{model}/populations/{population} (populationpanel/1) and POST .../populations/{population}/simulate (populationresult/1, one value of the scan per request: the scalars and the draws of every patient with their units, provenance and status), cached under the spec hash and checked at startup on every variant a population runs on (its change formulas as those of a panel).
  • sbmlsim.simulator.observables.derive_unit is public: the unit of a formula derived from the units of its symbols, which the scalars of a population are checked and converted with.

Fixed

  • The web app strips distrib with the DOM, keeping every number as its text, so a model with uncertainties simulates in the page the SBML the service simulates (before, libsbml wrote it again with 15 digits, which also moved the derived targets of panelbundle/3 and /4).
  • The XML declaration of the exported SBML carries its encoding.

The web app

  • sbmlsim-web 0.12.0 shows population panels (<sbmlsim-population>), and a page without an app shows one per population panel. The web app registers the renderer with boxStats and histogram of sbmlsim-core, the box and the histogram of sbmlsim.sensitivity.plots by their bits.

Documentation

  • docs/serve.md (population panels) and docs/webapp.md; the guard of the embedded contracts (tests/webapp/test_contracts.py) checks populationpanel/1 and populationresult/1.

Don't miss a new sbmlsim release

NewReleases is sending notifications on new releases.