sbmlode 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sbmlode/__init__.py +44 -0
- sbmlode/analysis.py +981 -0
- sbmlode/astutil.py +164 -0
- sbmlode/dependencies.py +77 -0
- sbmlode/documents.py +914 -0
- sbmlode/events.py +103 -0
- sbmlode/formats.py +978 -0
- sbmlode/io.py +152 -0
- sbmlode/printers/__init__.py +41 -0
- sbmlode/printers/base.py +1094 -0
- sbmlode/printers/document.py +279 -0
- sbmlode/printers/julia.py +180 -0
- sbmlode/printers/latex.py +141 -0
- sbmlode/printers/python.py +155 -0
- sbmlode/printers/r.py +166 -0
- sbmlode/printers/typst.py +129 -0
- sbmlode/symbols.py +518 -0
- sbmlode/system.py +471 -0
- sbmlode/templates/julia.jl.jinja +719 -0
- sbmlode/templates/latex.tex.jinja +199 -0
- sbmlode/templates/markdown.md.jinja +163 -0
- sbmlode/templates/python.py.jinja +683 -0
- sbmlode/templates/r.R.jinja +808 -0
- sbmlode/templates/typst.typ.jinja +175 -0
- sbmlode/text.py +247 -0
- sbmlode/units.py +198 -0
- sbmlode-0.1.0.dist-info/METADATA +100 -0
- sbmlode-0.1.0.dist-info/RECORD +30 -0
- sbmlode-0.1.0.dist-info/WHEEL +4 -0
- sbmlode-0.1.0.dist-info/licenses/LICENSE +7 -0
sbmlode/__init__.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Export of an SBML model as its system of ordinary differential equations.
|
|
2
|
+
|
|
3
|
+
`OdeSystem.from_sbml` analyses a model into its ODE system, which is rendered in the
|
|
4
|
+
formats of `FORMATS`:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from sbmlode import OdeSystem
|
|
8
|
+
|
|
9
|
+
system = OdeSystem.from_sbml("model.xml")
|
|
10
|
+
code = system.render("python", simulator=True)
|
|
11
|
+
system.write("model.py")
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The methods `render`, `write` and `render_template` of `OdeSystem` are the functions of
|
|
15
|
+
the same names of this package, which take the system as their first argument.
|
|
16
|
+
|
|
17
|
+
The math of the model is written by the printers of `sbmlode.printers`,
|
|
18
|
+
one per dialect, the text of the model through the helpers of
|
|
19
|
+
`sbmlode.text`, the formats by `sbmlode.formats`:
|
|
20
|
+
python, julia and R code, and typst, LaTeX and markdown documents
|
|
21
|
+
(`sbmlode.documents`), e.g. `system.write("model.typ")`.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
# the version comes first, the modules below read it when they render
|
|
25
|
+
__version__ = "0.1.0"
|
|
26
|
+
|
|
27
|
+
from sbmlode.formats import (
|
|
28
|
+
FORMATS,
|
|
29
|
+
Format,
|
|
30
|
+
render,
|
|
31
|
+
render_template,
|
|
32
|
+
write,
|
|
33
|
+
)
|
|
34
|
+
from sbmlode.system import OdeSystem
|
|
35
|
+
|
|
36
|
+
__all__: list[str] = [
|
|
37
|
+
"FORMATS",
|
|
38
|
+
"Format",
|
|
39
|
+
"OdeSystem",
|
|
40
|
+
"__version__",
|
|
41
|
+
"render",
|
|
42
|
+
"render_template",
|
|
43
|
+
"write",
|
|
44
|
+
]
|