API
SBMLToolkit provides importer selectors and extends the system constructors owned by SBML, Catalyst, and ModelingToolkit.
SBMLToolkit.convert_simplify_math — Function
convert_simplify_math(args...)Compatibility alias for SBML.convert_promotelocals_expandfuns.
All arguments are forwarded unchanged. New code should import and call SBML.convert_promotelocals_expandfuns directly.
Examples
normalized_document = convert_simplify_math(document)Catalyst.ReactionSystem — Method
ReactionSystem(model::SBML.Model; kwargs...)Convert an SBML.Model to a completed Catalyst.ReactionSystem.
Arguments
model::SBML.Model: the normalized SBML model to convert.
Keywords
kwargs...: forwarded toCatalyst.ReactionSystem.
Returns
Catalyst.ReactionSystem: the completed reaction system.
Examples
model = readSBML("model.xml", DefaultImporter())
reaction_system = ReactionSystem(model)ModelingToolkitBase.ODESystem — Method
ODESystem(model::SBML.Model; include_zero_odes = true, kwargs...)Convert an SBML.Model to a completed ModelingToolkit.ODESystem.
Arguments
model::SBML.Model: the normalized SBML model to convert.
Keywords
include_zero_odes::Bool = true: retain equations with zero right-hand sides.kwargs...: forwarded while constructing the intermediate reaction system.
Returns
ModelingToolkit.ODESystem: the completed ODE system.
Examples
model = readSBML("model.xml", DefaultImporter())
ode_system = ODESystem(model)SBMLToolkit.DefaultImporter — Type
DefaultImporter()Select SBMLToolkit's default normalization pipeline for SBML.readSBML.
The pipeline checks for unsupported features, upgrades the document to SBML Level 3 Version 2, and promotes local parameters and function definitions.
Examples
model = readSBML("model.xml", DefaultImporter())SBMLToolkit.ODESystemImporter — Type
ODESystemImporter()Select conversion of an SBML file to a completed ModelingToolkit.ODESystem.
Examples
ode_system = readSBML("model.xml", ODESystemImporter())SBMLToolkit.ReactionSystemImporter — Type
ReactionSystemImporter()Select conversion of an SBML file to a completed Catalyst.ReactionSystem.
Examples
reaction_system = readSBML("model.xml", ReactionSystemImporter())SBML.readSBML — Method
readSBML(sbmlfile::String, ::DefaultImporter) -> SBML.ModelImport and normalize an SBML file for conversion to SciML system types.
Arguments
sbmlfile::String: path to the SBML XML file.::DefaultImporter: selects SBMLToolkit's default normalization pipeline.
Returns
SBML.Model: the normalized SBML model.
Throws
ErrorException: the file uses an unsupported SBML feature.
Examples
model = readSBML("model.xml", DefaultImporter())SBML.readSBML — Method
readSBML(sbmlfile::String, ::ODESystemImporter; include_zero_odes = true, kwargs...)Import an SBML file as a completed ModelingToolkit.ODESystem.
Arguments
sbmlfile::String: path to the SBML XML file.::ODESystemImporter: selects ODE-system conversion.
Keywords
include_zero_odes::Bool = true: retain equations with zero right-hand sides.kwargs...: forwarded while constructing the intermediate reaction system.
Returns
ModelingToolkit.ODESystem: the completed ODE system.
Examples
ode_system = readSBML("model.xml", ODESystemImporter())SBML.readSBML — Method
readSBML(sbmlfile::String, ::ReactionSystemImporter; kwargs...)Import an SBML file as a completed Catalyst.ReactionSystem.
Arguments
sbmlfile::String: path to the SBML XML file.::ReactionSystemImporter: selects reaction-system conversion.
Keywords
kwargs...: forwarded toCatalyst.ReactionSystem.
Returns
Catalyst.ReactionSystem: the completed reaction system.
Examples
reaction_system = readSBML("model.xml", ReactionSystemImporter())SBMLToolkit.checksupport_file — Method
checksupport_file(filename::String)Validate that an SBML file uses features supported by SBMLToolkit.
Arguments
filename::String: path to the SBML XML file.
Returns
Bool:truewhen the file does not contain a known unsupported feature.
Throws
ErrorException: the file uses an unsupported SBML feature.
Examples
checksupport_file("model.xml")Compatibility reexports
SBMLToolkit keeps these dependency-owned bindings available for compatibility. New code should import each binding from its owning package.
ReactionSystem: theCatalyst.ReactionSystemtype and constructor.ODESystem: theModelingToolkit.ODESystemtype and constructor.readSBML: theSBML.readSBMLloader extended by the importer selectors above.readSBMLFromString: theSBML.readSBMLFromStringloader for in-memory XML.set_level_and_version: the corresponding SBML document transformation from SBML.jl.convert_promotelocals_expandfuns: the SBML.jl normalization transformation.convert_simplify_math: SBMLToolkit's compatibility alias forconvert_promotelocals_expandfuns.