SBML

Import of model definitions is provided from SBML models using only parameters, rates and units. Species-compartment type models can not be imported.

Limitations:

  • The Species-Compartment features of SBML are not supported.
  • No mechanism to import stimulus currents is implemented. This means models will need to be adapted by hand to run in myokit.

API

The standard API for importing is provided:

myokit.formats.sbml.importers()

Returns a dict of all importers available in this module.

class myokit.formats.sbml.SBMLImporter

This:class:Importer <myokit.formats.Importer> load model definitions from files in SBML format.

info()

Returns a string containing information about this exporter.

This should be implemented by each subclass.

model(path, bind_time=True)

Returns a :class:myokit.Model based on the SBML file provided.

Arguments:

path
The path to the SBML file.
`` bind_time``
If set to True (default), a variable called “time” will be created and bound to time.
supports_model()

Returns a bool indicating if model import is supported.

class myokit.formats.sbml.SBMLError(message)

Thrown if an error occurs when importing SBML