amici.sbml_import

SBML Import

This module provides all necessary functionality to import a model specified in the Systems Biology Markup Language (SBML).

Classes

SbmlImporter(sbml_source[, ...])

Class to generate AMICI C++ files for a model provided in the Systems Biology Markup Language (SBML).

Functions Summary

assignmentRules2observables(sbml_model[, ...])

Turn assignment rules into observables.

get_species_initial(species)

Extract the initial concentration from a given species

replace_logx(math_str)

Replace logX(.) by log(., X) since sympy cannot parse the former

Functions

amici.sbml_import.assignmentRules2observables(sbml_model, filter_function=<function <lambda>>)[source]

Turn assignment rules into observables.

Parameters
  • sbml_model (libsbml.Model) – Model to operate on

  • filter_function (typing.Callable) – Callback function taking assignment variable as input and returning True/False to indicate if the respective rule should be turned into an observable.

Returns

A dictionary(observableId:{ ‘name’: observableName, ‘formula’: formulaString })

amici.sbml_import.get_species_initial(species)[source]

Extract the initial concentration from a given species

Parameters

species (libsbml.Species) – species index

Return type

sympy.core.expr.Expr

Returns

initial species concentration

amici.sbml_import.replace_logx(math_str)[source]

Replace logX(.) by log(., X) since sympy cannot parse the former

Parameters

math_str (typing.Union[str, float, None]) – string for sympification

Return type

typing.Union[str, float, None]

Returns

sympifiable string