Skip to content

API reference

The API reference is generated from the docstrings of the package.

sbmlsim

The top level modules: data, units and the shared output.

module description
data Data objects referencing simulation results and datasets, the input of plots and calculations
units unit registry of a model and unit conversions with pint
serialization JSON serialization of experiments
utils timing and other helpers
parallel the process pools of sbmlsim: the start method, the kept pools and the caches of the workers
console shared rich console
display the output of scripts: sections, key/value blocks and links which the terminal opens with a click
log logging of the package

sbmlsim.model

Models and the changes of a model, see Models.

module description
model.model AbstractModel, the model of a simulation experiment with its changes and selections
model.model_roadrunner RoadrunnerSBMLModel, the roadrunner instance of an SBML model with its units and parameter changes
model.model_resources Source, resolving the source of a model, i.e., a file or the SBML itself
model.roottol root_tolerance, the probe of roadrunner's root tolerance of events, and at_event_times, which gives the two rows of an event in the steps of the integrator the time of the event
model.symbols ModelSymbols, the entities of a model a simulation changes and its initial assignments
model.provenance the record of what was added to a derived model, i.e. the compiled networks, and its inverse

sbmlsim.simulation

Definition of simulations, see Simulations and Parameter scans and Observables.

module description
simulation.definition Simulation, Change and SteadyState, a simulation with its changes, with units
simulation.scan Scan and Dimension, a simulation over dimensions of values, simulations and models
simulation.observables Formula, PK and Custom, what a scan computes from every simulation
simulation.sampling the sampler: distributions, references and the designs of a scan, of the sensitivity analyses, of a fit and of a population

sbmlsim.simulator, sbmlsim.task

Execution of simulations.

module description
simulator.simulator Simulator, simulations and scans of models, serially or in a pool of processes
simulator.plan Plan, a simulation compiled against a model, without units
simulator.executor execute, running a plan on roadrunner with the semantics of PEtab v2
simulator.formula the formulas of the changes of a simulation
simulator.worker the chunks of a scan, run on one plan and one model in a worker
simulator.observables the compiled observables of a scan and their evaluation on the native solutions
simulator.pk the non-compartmental analysis of a PK observable with pkpdutils
task.task Task, a simulation applied to a model

sbmlsim.experiment, sbmlsim.result

Simulation experiments and their results, see Simulation experiments.

module description
experiment.experiment SimulationExperiment, models, datasets, simulations, tasks, data and figures of an experiment
experiment.runner ExperimentRunner, executing experiments and writing their results
result.timecourse TimecourseResult, the array of the selections of a single timecourse simulation
result.scan ScanResult, the result of a scan as an xarray dataset with units

sbmlsim.plot, sbmlsim.report

Figures and reports, see Plots and reports.

module description
plot.plotting Figure, Plot, Axis, Curve and their styles, the plot description independent of the backend
plot.points the lines, colours, legend labels and colour bars of a curve over the points of a scan, and the quantiles of a band
plot.serialization_matplotlib rendering of the figures with matplotlib
report.experiment_report HTML and markdown reports of simulation experiments

sbmlsim.fit

Parameter fitting, see Parameter fitting.

module description
fit.objects FitParameter, FitMapping, FitData and FitMappingCollection, the objects of a fit problem
fit.optimization OptimizationProblem, the residuals and cost of a fit problem
fit.options FitSettings and the options of the optimization, i.e., algorithms, residuals, weighting and loss functions
fit.parameters ParameterSet and ParameterSets, the fitted parameters a report is created from
fit.parameter_mapping which parameter writes which entity in which simulation, the coverage of versioned parameters
fit.derived derived changes of a simulation, the protocol a network before the simulation implements, and the summary of a hook for the console and the report
fit.result OptimizationResult, the result of an optimization
fit.runner running optimizations serially or in parallel
fit.report FitReport, the figures and reports of one or more parameter sets
fit.cli FitDefinition and the general command line tools which run and report a fit
fit.display the sections of the console output of a fit: the problem, the parameters, the settings and the data
fit.sampling sampling of initial parameter values
fit.metrics FitMetrics and the metrics of a fit: PRED, IPRED, residuals, MSE, RMSE, R² and AIC
fit.identifiability profile_likelihood, the confidence intervals and the classification of the parameters from the profiles
fit.fisher fisher_information, the standard errors, correlations and constrained directions from one jacobian
fit.helpers helpers for fitting
fit.petab_omex COMBINE archives of PEtab problems

PEtab v2, see PEtab.

module description
fit.petab_v2.export writing an OptimizationProblem as a PEtab v2 problem
fit.petab_v2.reader reading a PEtab v2 problem back into a fit problem
fit.petab_v2.extension the sbmlsim block of the problem, i.e., what PEtab does not express
fit.petab_v2.symbols the identifiers and symbols shared by the PEtab layer
fit.petab_v2.gaps the catalogue of the differences between a fit and its PEtab problem
fit.petab_v2.likelihood the log-likelihood and its gradient, chi2 and the priors, the noise models of PEtab v2
fit.petab_v2.testsuite the PEtab Test Suite: its cases of models and of math, and their comparison
fit.petab_v2.benchmark the PEtab benchmark collection: its problems converted to PEtab v2, simulated and compared with the collection and with AMICI
fit.petab_v2.sciml the networks of a PEtab SciML problem read into Hybridization objects
fit.petab_v2.sciml_export the hybridizations of a problem written as PEtab SciML

sbmlsim.sensitivity

Local and global sensitivity analysis, see Sensitivity analysis.

module description
sensitivity.indices the local, Sobol, FAST and Morris indices of the result of a scan
sensitivity.result the SensitivityResult with the indices, classify and netCDF
sensitivity.classification classification of sensitivities and uncertainties
sensitivity.plots heatmap, bars of the indices and the plane of Morris
sensitivity.uncertainty bands and distributions of a scan over draws

sbmlsim.sciml

The neural networks of hybrid problems, see PEtab SciML. The package needs the extra sciml.

module description
sciml the package: Network, Hybridization, NetworkInput, NetworkPattern, compile_network, network_fit_parameters, nominal_parameters, the id functions and the errors
sciml.network Network, the architecture and the arrays of a network, its forward pass and the ids of its elements, inputs and outputs
sciml.hybridization Hybridization, where a network sits, its inputs and outputs, its fit parameters and the derived changes of a network before the simulation
sciml.compiler compile_network, a network in the right hand side or in an observable written into the model as assignment rules
sciml.formula the math of SBML as sympy expressions, read with libsbml and sbmlmath, and written back, for the compiler and the hybridization
sciml.parameters the nominal values and the fit parameters of a network per network, layer or array
sciml.interpreter the walk over the forward pass of the NN YAML with a backend
sciml.backend the numpy backend of the forward pass and the sympy backend of the compiler
sciml.layers the layers and functions of PEtab SciML with the backends they support
sciml.errors the errors of the package
sciml.testsuite the PEtab SciML Test Suite: its cases, their comparison and the round trip

sbmlsim.testsuite

The semantic cases of the SBML Test Suite, see SBML Test Suite.

module description
testsuite.cases SemanticCase and SemanticSuite, the cases of a release on disk and its download
testsuite.runner run_case, simulating a case, and CaseStatus, the outcomes a case can have
testsuite.comparison comparing the results of a case within its tolerances
testsuite.report TestSuiteReport, the interactive report of a run
testsuite.submission write_submission, the archive with the results of a run for the SBML Test Suite Database
testsuite.cache the download and the cache of a test suite, shared by the SBML Test Suite, the PEtab test suite and the PEtab SciML test suite
testsuite.baseline the baseline of the PEtab test suites and of the benchmark collection, i.e. the cases which do not pass with their reasons

sbmlsim.comparison

module description
comparison.diff numerical comparison of simulation results from different simulators