Metadata-Version: 2.5
Name: sbmlode
Version: 0.1.0
Summary: sbmlode writes the ordinary differential equations of SBML models as python, julia and R code and as LaTeX, typst and markdown documents.
Project-URL: Homepage, https://matthiaskoenig.github.io/sbmlode
Project-URL: Documentation, https://matthiaskoenig.github.io/sbmlode
Project-URL: Repository, https://github.com/matthiaskoenig/sbmlode
Project-URL: Issues, https://github.com/matthiaskoenig/sbmlode/issues
Project-URL: Changelog, https://matthiaskoenig.github.io/sbmlode/release-notes/
Project-URL: Download, https://pypi.org/project/sbmlode
Author-email: Matthias König <konigmatt@googlemail.com>
Maintainer-email: Matthias König <konigmatt@googlemail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ODE,SBML,Systems Biology Markup Language,code generation,computational modeling,ordinary differential equations
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: jinja2>=3.1.6
Requires-Dist: python-libsbml>=5.21.2
Provides-Extra: dev
Requires-Dist: antimony!=3.2.0; (sys_platform == 'win32') and extra == 'dev'
Requires-Dist: antimony>=3.1.3; extra == 'dev'
Requires-Dist: bump-my-version>=1.5.1; extra == 'dev'
Requires-Dist: libroadrunner>=2.10.0; (python_version < '3.15') and extra == 'dev'
Requires-Dist: markdown-it-py>=3.0.0; extra == 'dev'
Requires-Dist: mkdocstrings-python>=2.0.8; extra == 'dev'
Requires-Dist: numpy>=2.2.2; extra == 'dev'
Requires-Dist: pandas>=2.2.2; extra == 'dev'
Requires-Dist: pre-commit>=4.6.2; extra == 'dev'
Requires-Dist: pytest>=9.1.1; extra == 'dev'
Requires-Dist: ruff>=0.16.6; extra == 'dev'
Requires-Dist: scipy>=1.15.0; extra == 'dev'
Requires-Dist: tox-uv>=1.29.0; extra == 'dev'
Requires-Dist: tox>=4.61.2; extra == 'dev'
Requires-Dist: ty>=0.0.79; extra == 'dev'
Requires-Dist: typst>=0.15.0; extra == 'dev'
Requires-Dist: zensical>=0.0.60; extra == 'dev'
Provides-Extra: simulate
Requires-Dist: numpy>=2.2.2; extra == 'simulate'
Requires-Dist: pandas>=2.2.2; extra == 'simulate'
Requires-Dist: scipy>=1.15.0; extra == 'simulate'
Provides-Extra: test
Requires-Dist: antimony!=3.2.0; (sys_platform == 'win32') and extra == 'test'
Requires-Dist: antimony>=3.1.3; extra == 'test'
Requires-Dist: libroadrunner>=2.10.0; (python_version < '3.15') and extra == 'test'
Requires-Dist: markdown-it-py>=3.0.0; extra == 'test'
Requires-Dist: numpy>=2.2.2; extra == 'test'
Requires-Dist: pandas>=2.2.2; extra == 'test'
Requires-Dist: pytest>=9.1.1; extra == 'test'
Requires-Dist: scipy>=1.15.0; extra == 'test'
Requires-Dist: typst>=0.15.0; extra == 'test'
Description-Content-Type: text/markdown

# sbmlode

[![PyPI](https://img.shields.io/pypi/v/sbmlode.svg)](https://pypi.org/project/sbmlode/) [![CI-CD](https://github.com/matthiaskoenig/sbmlode/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/matthiaskoenig/sbmlode/actions/workflows/ci-cd.yml) [![Documentation](https://img.shields.io/badge/docs-zensical-teal)](https://matthiaskoenig.github.io/sbmlode/)

An SBML model describes a system of ordinary differential equations (ODEs), but it is not written as one: the equations follow from the reactions, rules, events and units of the model. `sbmlode` derives this system once and writes it

- as **code** which simulates the model: **python** (numpy and scipy), **julia** (OrdinaryDiffEq.jl) and **R** (deSolve), verified against [libroadrunner](https://libroadrunner.org) over the [SBML test suite](https://github.com/sbmlteam/sbml-test-suite);
- as **documents** which describe the model: **typst**, **LaTeX** and **markdown**;
- as **typed data** for an application which lays out the equations itself, such as [SBML4Humans](https://sbml4humans.de), see [Typed target](https://matthiaskoenig.github.io/sbmlode/typeset/).

sbmlode depends on [python-libsbml](https://sbml.org/software/libsbml/) and jinja2 only. It is the ODE export of [sbmlutils](https://github.com/matthiaskoenig/sbmlutils) 0.14 as a package of its own, which sbmlutils re-exports as `sbmlutils.converters.ode`.

## Installation

```bash
pip install sbmlode               # the export
pip install "sbmlode[simulate]"   # with numpy, pandas and scipy, which the python code runs with
```

## Quick start

```python
from sbmlode import OdeSystem

system = OdeSystem.from_sbml("model.xml")

code: str = system.render("python")  # the code or document as a string
system.write("model.jl")  # the format from the suffix of the file
system.write("model.md", standalone=False)  # with the options of the format
```

The [Guide](https://matthiaskoenig.github.io/sbmlode/formats/) describes the formats, their options, the supported SBML and the verification, the [API reference](https://matthiaskoenig.github.io/sbmlode/api/) the classes and functions.

## License

sbmlode is open source under the [MIT license](https://github.com/matthiaskoenig/sbmlode/blob/develop/LICENSE). Please [open an issue](https://github.com/matthiaskoenig/sbmlode/issues) for a question or a problem.
