mxlmodels 1.1.0__tar.gz → 1.2.0__tar.gz

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.
Files changed (94) hide show
  1. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/PKG-INFO +1 -1
  2. mxlmodels-1.2.0/docs/_dynamic_enterobactin.ipynb +49 -0
  3. mxlmodels-1.1.0/docs/pop_dyn.ipynb → mxlmodels-1.2.0/docs/_population_dynamics.ipynb +1 -3
  4. mxlmodels-1.1.0/docs/trip_dyn.ipynb → mxlmodels-1.2.0/docs/_tripartite_dynamics.ipynb +1 -3
  5. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/ebeling2026.ipynb +1 -3
  6. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/elowitz2000_repressilator.ipynb +1 -3
  7. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/lotka_volterra.ipynb +1 -3
  8. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/matuszynska2016_npq.ipynb +1 -3
  9. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/matuszynska2016_phd.ipynb +1 -3
  10. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/matuszynska2019.ipynb +1 -3
  11. mxlmodels-1.2.0/docs/nguyen2026_tomato.ipynb +69 -0
  12. mxlmodels-1.1.0/docs/pfennig2024-synechocystis.ipynb → mxlmodels-1.2.0/docs/pfennig2024_synechocystis.ipynb +14 -17
  13. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/poolman2000.ipynb +1 -3
  14. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/prigogine1968_brusselator.ipynb +1 -3
  15. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/saadat2021.ipynb +1 -3
  16. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/selkov1968_oscillator.ipynb +1 -3
  17. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/yokota1985.ipynb +1 -3
  18. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/pyproject.toml +1 -1
  19. mxlmodels-1.2.0/src/mxlmodels/__init__.py +55 -0
  20. mxlmodels-1.1.0/src/mxlmodels/dyn_entro.py → mxlmodels-1.2.0/src/mxlmodels/_dynamic_enterobactin.py +1 -1
  21. mxlmodels-1.2.0/src/mxlmodels/_names.py +235 -0
  22. mxlmodels-1.1.0/src/mxlmodels/pop_dyn.py → mxlmodels-1.2.0/src/mxlmodels/_population_dynamics.py +1 -1
  23. mxlmodels-1.1.0/src/mxlmodels/trip_dyn.py → mxlmodels-1.2.0/src/mxlmodels/_tripartite_dynamics.py +1 -1
  24. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/ebeling2026.py +1 -1
  25. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/elowitz2000_repressilator.py +1 -1
  26. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/lotka_volterra_v1.py +1 -1
  27. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/lotka_volterra_v2.py +1 -1
  28. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/matuszynska2016_npq.py +1 -1
  29. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/matuszynska2016_phd.py +1 -1
  30. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/matuszynska2019.py +1 -1
  31. mxlmodels-1.2.0/src/mxlmodels/nguyen2026_tomato.py +1173 -0
  32. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/pfennig2024_synechocystis.py +1 -1
  33. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/poolman2000.py +1 -1
  34. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/prigogine1968_brusselator.py +1 -1
  35. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/saadat2021.py +1 -1
  36. mxlmodels-1.1.0/src/mxlmodels/selkov1968_glycolysis_oscillator.py → mxlmodels-1.2.0/src/mxlmodels/selkov1968_oscillator.py +1 -1
  37. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/yokota1985.py +1 -1
  38. mxlmodels-1.2.0/tests/test_nguyen2026_tomato.py +29 -0
  39. mxlmodels-1.1.0/.github/workflows/docs.yml +0 -43
  40. mxlmodels-1.1.0/src/mxlmodels/__init__.py +0 -46
  41. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.gitattributes +0 -0
  42. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  43. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/ISSUE_TEMPLATE/discussion.md +0 -0
  44. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  45. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/dependabot.yml +0 -0
  46. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/workflows/python-publish.yml +0 -0
  47. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/workflows/release-to-slack.yml +0 -0
  48. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.github/workflows/tests.yml +0 -0
  49. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.gitignore +0 -0
  50. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.pre-commit-config.yaml +0 -0
  51. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.python-version +0 -0
  52. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/.vscode/settings.json +0 -0
  53. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/CONTRIBUTING.md +0 -0
  54. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/LICENSE +0 -0
  55. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/README.md +0 -0
  56. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/SECURITY.md +0 -0
  57. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/docs/assets/logo.png +0 -0
  58. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/__init__.py +0 -0
  59. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/__init__.py +0 -0
  60. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/README.md +0 -0
  61. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/cool_white_led.csv +0 -0
  62. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/fluorescent_lamp.csv +0 -0
  63. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/halogen_lamp.csv +0 -0
  64. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/incandescent_bulb.csv +0 -0
  65. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/solar.csv +0 -0
  66. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/lights/warm_white_led.csv +0 -0
  67. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/ocp_absorption.csv +0 -0
  68. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/per_pigment/README.md +0 -0
  69. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/per_pigment/allophycocyanin.csv +0 -0
  70. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/per_pigment/beta_carotene.csv +0 -0
  71. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/per_pigment/chla.csv +0 -0
  72. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/per_pigment/phycocyanin.csv +0 -0
  73. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/photosystem_composition.csv +0 -0
  74. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/data/pfennig2024/pigment_concentrations.csv +0 -0
  75. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/src/mxlmodels/py.typed +0 -0
  76. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/__init__.py +0 -0
  77. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_dynamic_enterobactin.py +0 -0
  78. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_ebeling_2026.py +0 -0
  79. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_elowitz2000_repressilator.py +0 -0
  80. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_import.py +0 -0
  81. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_lotka_volterra_v1.py +0 -0
  82. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_lotka_volterra_v2.py +0 -0
  83. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_matuszynska2016_npq.py +0 -0
  84. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_matuszynska2016_phd.py +0 -0
  85. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_matuszynska2019.py +0 -0
  86. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_pfennig2024_synechocystis.py +0 -0
  87. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_poolman2000.py +0 -0
  88. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_population_dynamics.py +0 -0
  89. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_prigogine1968_brusselator.py +0 -0
  90. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_saadat2021.py +0 -0
  91. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_selkov1968_glycolysis_oscillator.py +0 -0
  92. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_tripartite_dynamics.py +0 -0
  93. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/tests/test_yokota1985.py +0 -0
  94. {mxlmodels-1.1.0 → mxlmodels-1.2.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mxlmodels
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: MxlModels is a Python package of reference mechanistic models.
5
5
  Author-email: Marvin van Aalst <marvin.vanaalst@gmail.com>
6
6
  Maintainer-email: Marvin van Aalst <marvin.vanaalst@gmail.com>
@@ -0,0 +1,49 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "323f3026",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "from mxlmodels import Simulator, get_dynamic_enterobactin, plot\n",
11
+ "\n",
12
+ "res = Simulator(get_dynamic_enterobactin()).simulate(0.2).get_result().unwrap_or_err()\n",
13
+ "\n",
14
+ "fig, (ax1, ax2, ax3) = plot.grid_layout(3, n_cols=3)\n",
15
+ "_ = plot.lines(res.get_variables(include_derived_variables=False).iloc[:, :10], ax=ax1)\n",
16
+ "_ = plot.lines(\n",
17
+ " res.get_args(\n",
18
+ " include_variables=False,\n",
19
+ " include_derived_variables=True,\n",
20
+ " include_reactions=False,\n",
21
+ " ).iloc[:, :10],\n",
22
+ " ax=ax2,\n",
23
+ ")\n",
24
+ "_ = plot.lines(res.fluxes.iloc[:, :10], ax=ax3)"
25
+ ]
26
+ }
27
+ ],
28
+ "metadata": {
29
+ "kernelspec": {
30
+ "display_name": "git-mxl-meta (3.13.12)",
31
+ "language": "python",
32
+ "name": "python3"
33
+ },
34
+ "language_info": {
35
+ "codemirror_mode": {
36
+ "name": "ipython",
37
+ "version": 3
38
+ },
39
+ "file_extension": ".py",
40
+ "mimetype": "text/x-python",
41
+ "name": "python",
42
+ "nbconvert_exporter": "python",
43
+ "pygments_lexer": "ipython3",
44
+ "version": "3.13.12"
45
+ }
46
+ },
47
+ "nbformat": 4,
48
+ "nbformat_minor": 5
49
+ }
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_population_dynamics\n",
10
+ "from mxlmodels import Simulator, get_population_dynamics, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_population_dynamics()).simulate(1).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_tripartite_dynamics\n",
10
+ "from mxlmodels import Simulator, get_tripartite_dynamics, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_tripartite_dynamics()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_ebeling_2026\n",
10
+ "from mxlmodels import Simulator, get_ebeling_2026, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_ebeling_2026()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_elowitz2000_repressilator\n",
10
+ "from mxlmodels import Simulator, get_elowitz2000_repressilator, plot\n",
13
11
  "\n",
14
12
  "res = (\n",
15
13
  " Simulator(get_elowitz2000_repressilator()).simulate(10).get_result().unwrap_or_err()\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_lotka_volterra_v1\n",
10
+ "from mxlmodels import Simulator, get_lotka_volterra_v1, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_lotka_volterra_v1()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_matuszynska2016_npq\n",
10
+ "from mxlmodels import Simulator, get_matuszynska2016_npq, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_matuszynska2016_npq()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_matuszynska2016_phd\n",
10
+ "from mxlmodels import Simulator, get_matuszynska2016_phd, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_matuszynska2016_phd()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_matuszynska2019\n",
10
+ "from mxlmodels import Simulator, get_matuszynska2019, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_matuszynska2019()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -0,0 +1,69 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "db264b37",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "from mxlmodels import Simulator, get_nguyen2026_tomato, plot\n",
11
+ "\n",
12
+ "res = (\n",
13
+ " Simulator(get_nguyen2026_tomato())\n",
14
+ " .update_variables(\n",
15
+ " {\n",
16
+ " \"B0\": 1.9587919653281205,\n",
17
+ " \"B1\": 5.308607566760226e-08,\n",
18
+ " \"B2\": 0.5412079539026975,\n",
19
+ " \"PQH2\": 14.753583247530687,\n",
20
+ " \"ATP\": 23.681707158359565,\n",
21
+ " \"H_lumen\": 0.004056077821448256,\n",
22
+ " \"delta_psi\": 0.02512099319259713,\n",
23
+ " \"Vx\": 0.9500845858289113,\n",
24
+ " \"PsbS\": 0.6863197475682336,\n",
25
+ " \"ATPactivity\": 1.0,\n",
26
+ " \"K_lumen\": 400.0,\n",
27
+ " \"K_stroma\": 3200.0,\n",
28
+ " }\n",
29
+ " )\n",
30
+ " .simulate(10)\n",
31
+ " .get_result()\n",
32
+ " .unwrap_or_err()\n",
33
+ ")\n",
34
+ "fig, (ax1, ax2) = plot.two_axes(figsize=(12, 4))\n",
35
+ "_ = plot.lines(res.variables.iloc[:, :10], ax=ax1)\n",
36
+ "_ = plot.lines(res.fluxes.iloc[:, :10], ax=ax2)"
37
+ ]
38
+ },
39
+ {
40
+ "cell_type": "code",
41
+ "execution_count": null,
42
+ "id": "97322ab1",
43
+ "metadata": {},
44
+ "outputs": [],
45
+ "source": []
46
+ }
47
+ ],
48
+ "metadata": {
49
+ "kernelspec": {
50
+ "display_name": "git-mxl-meta (3.13.12)",
51
+ "language": "python",
52
+ "name": "python3"
53
+ },
54
+ "language_info": {
55
+ "codemirror_mode": {
56
+ "name": "ipython",
57
+ "version": 3
58
+ },
59
+ "file_extension": ".py",
60
+ "mimetype": "text/x-python",
61
+ "name": "python",
62
+ "nbconvert_exporter": "python",
63
+ "pygments_lexer": "ipython3",
64
+ "version": "3.13.12"
65
+ }
66
+ },
67
+ "nbformat": 4,
68
+ "nbformat_minor": 5
69
+ }
@@ -7,22 +7,22 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
10
+ "from mxlmodels import Simulator, data, get_pfennig2024_synechocystis, plot\n",
11
11
  "\n",
12
- "import mxlmodels\n",
13
- "from mxlmodels import get_pfennig2024_synechocystis\n",
14
- "\n",
15
- "data = mxlmodels.data.pfennig2024.load()\n",
12
+ "dfs = data.pfennig2024.load()\n",
16
13
  "\n",
17
14
  "model = get_pfennig2024_synechocystis(\n",
18
- " light_spectrum=data.light_spectrum,\n",
19
- " light_spectrum_measure=data.light_spectrum_measure,\n",
20
- " ocp_absorption=data.ocp_absorption_per_wavelength,\n",
21
- " abs_coef=data.pigment_abs_coef_per_wavelength,\n",
22
- " molar_masses=data.molar_masses,\n",
23
- " ps_comp=data.ps_comp,\n",
24
- " pigment_content=data.pigment_content,\n",
25
- ")"
15
+ " light_spectrum=dfs.light_spectrum,\n",
16
+ " light_spectrum_measure=dfs.light_spectrum_measure,\n",
17
+ " ocp_absorption=dfs.ocp_absorption_per_wavelength,\n",
18
+ " abs_coef=dfs.pigment_abs_coef_per_wavelength,\n",
19
+ " molar_masses=dfs.molar_masses,\n",
20
+ " ps_comp=dfs.ps_comp,\n",
21
+ " pigment_content=dfs.pigment_content,\n",
22
+ ")\n",
23
+ "\n",
24
+ "res = Simulator(model).simulate(10).get_result().unwrap_or_err()\n",
25
+ "fig, ax = plot.lines(res.fluxes.loc[:, [\"vPS2\"]])"
26
26
  ]
27
27
  },
28
28
  {
@@ -31,10 +31,7 @@
31
31
  "id": "3e475022",
32
32
  "metadata": {},
33
33
  "outputs": [],
34
- "source": [
35
- "res = Simulator(model).simulate(10).get_result().unwrap_or_err()\n",
36
- "fig, ax = plot.lines(res.fluxes.loc[:, [\"vPS2\"]])"
37
- ]
34
+ "source": []
38
35
  }
39
36
  ],
40
37
  "metadata": {
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_poolman2000\n",
10
+ "from mxlmodels import Simulator, get_poolman2000, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_poolman2000()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_prigogine1968_brusselator\n",
10
+ "from mxlmodels import Simulator, get_prigogine1968_brusselator, plot\n",
13
11
  "\n",
14
12
  "res = (\n",
15
13
  " Simulator(get_prigogine1968_brusselator()).simulate(10).get_result().unwrap_or_err()\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_saadat2021\n",
10
+ "from mxlmodels import Simulator, get_saadat2021, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_saadat2021()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_selkov1968_glycolysis_oscillator\n",
10
+ "from mxlmodels import Simulator, get_selkov1968_glycolysis_oscillator, plot\n",
13
11
  "\n",
14
12
  "res = (\n",
15
13
  " Simulator(get_selkov1968_glycolysis_oscillator())\n",
@@ -7,9 +7,7 @@
7
7
  "metadata": {},
8
8
  "outputs": [],
9
9
  "source": [
10
- "from mxlpy import Simulator, plot\n",
11
- "\n",
12
- "from mxlmodels import get_yokota1985\n",
10
+ "from mxlmodels import Simulator, get_yokota1985, plot\n",
13
11
  "\n",
14
12
  "res = Simulator(get_yokota1985()).simulate(10).get_result().unwrap_or_err()\n",
15
13
  "\n",
@@ -45,7 +45,7 @@ maintainers = [
45
45
  name = "mxlmodels"
46
46
  readme = "README.md"
47
47
  requires-python = ">=3.13"
48
- version = "1.1.0"
48
+ version = "1.2.0"
49
49
 
50
50
  [tool.hatchling]
51
51
  from = "src"
@@ -0,0 +1,55 @@
1
+ """MxlModels is a Python package of reference mechanistic models.
2
+
3
+ It contains the same models as in the [MxlBricks](https://github.com/Computational-Biology-Aachen/mxl-bricks) repo,
4
+ but written as single, flat files to make inspection easier.
5
+
6
+ """
7
+
8
+ # Re-export mxlpy modules for easy access
9
+ from mxlpy import Simulator, fit, mc, mca, plot, scan
10
+
11
+ from . import data
12
+ from ._dynamic_enterobactin import get_dynamic_enterobactin
13
+ from ._population_dynamics import get_population_dynamics
14
+ from ._tripartite_dynamics import get_tripartite_dynamics
15
+ from .ebeling2026 import get_ebeling_2026
16
+ from .elowitz2000_repressilator import get_elowitz2000_repressilator
17
+ from .lotka_volterra_v1 import get_lotka_volterra_v1
18
+ from .lotka_volterra_v2 import get_lotka_volterra_v2
19
+ from .matuszynska2016_npq import get_matuszynska2016_npq
20
+ from .matuszynska2016_phd import get_matuszynska2016_phd
21
+ from .matuszynska2019 import get_matuszynska2019
22
+ from .nguyen2026_tomato import get_nguyen2026_tomato
23
+ from .pfennig2024_synechocystis import get_pfennig2024_synechocystis
24
+ from .poolman2000 import get_poolman2000
25
+ from .prigogine1968_brusselator import get_prigogine1968_brusselator
26
+ from .saadat2021 import get_saadat2021 as get_saadat2021
27
+ from .selkov1968_oscillator import get_selkov1968_glycolysis_oscillator
28
+ from .yokota1985 import get_yokota1985
29
+
30
+ __all__ = [
31
+ "Simulator",
32
+ "data",
33
+ "fit",
34
+ "get_dynamic_enterobactin",
35
+ "get_ebeling_2026",
36
+ "get_elowitz2000_repressilator",
37
+ "get_lotka_volterra_v1",
38
+ "get_lotka_volterra_v2",
39
+ "get_matuszynska2016_npq",
40
+ "get_matuszynska2016_phd",
41
+ "get_matuszynska2019",
42
+ "get_nguyen2026_tomato",
43
+ "get_pfennig2024_synechocystis",
44
+ "get_poolman2000",
45
+ "get_population_dynamics",
46
+ "get_prigogine1968_brusselator",
47
+ "get_saadat2021",
48
+ "get_selkov1968_glycolysis_oscillator",
49
+ "get_tripartite_dynamics",
50
+ "get_yokota1985",
51
+ "mc",
52
+ "mca",
53
+ "plot",
54
+ "scan",
55
+ ]
@@ -79,7 +79,7 @@ def _d_bdt(
79
79
  return -_cons_term_c * r_cons_c - _cons_term_e * r_cons_e + enterobactin * r_prod
80
80
 
81
81
 
82
- def create_model() -> Model:
82
+ def get_dynamic_enterobactin() -> Model:
83
83
  """Build the dynamic enterobactin cross-feeding model (E. coli / C. glutamicum)."""
84
84
  return (
85
85
  Model()
@@ -0,0 +1,235 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Literal
4
+
5
+ EMPTY: Literal[""] = ""
6
+
7
+ ###############################################################################
8
+ # Parameter fns
9
+ ###############################################################################
10
+
11
+
12
+ def loc(name: str, compartment: str, tissue: str) -> str:
13
+ """Localise a component to a compartment and tissue."""
14
+ return f"{name}{compartment}{tissue}"
15
+
16
+
17
+ def e0(enzyme: str) -> str:
18
+ return f"E0_{enzyme}"
19
+
20
+
21
+ def e(enzyme: str) -> str:
22
+ return f"E_{enzyme}"
23
+
24
+
25
+ def kcat(enzyme: str) -> str:
26
+ return f"kcat_{enzyme}"
27
+
28
+
29
+ def vmax(enzyme: str) -> str:
30
+ return f"vmax_{enzyme}"
31
+
32
+
33
+ def keq(enzyme: str) -> str:
34
+ return f"keq_{enzyme}"
35
+
36
+
37
+ def kre(enzyme: str) -> str:
38
+ return f"kre_{enzyme}"
39
+
40
+
41
+ def kf(enzyme: str) -> str:
42
+ return f"kf_{enzyme}"
43
+
44
+
45
+ def kh(enzyme: str) -> str:
46
+ """Hill constant"""
47
+ return f"kh_{enzyme}"
48
+
49
+
50
+ def ksat(enzyme: str) -> str:
51
+ return f"ksat_{enzyme}"
52
+
53
+
54
+ def km(enzyme: str, substrate: str | None = None) -> str:
55
+ if substrate is None:
56
+ return f"km_{enzyme}"
57
+ return f"km_{enzyme}_{substrate}"
58
+
59
+
60
+ def kms(enzyme: str) -> str:
61
+ return km(enzyme, "s")
62
+
63
+
64
+ def kmp(enzyme: str) -> str:
65
+ return km(enzyme, "p")
66
+
67
+
68
+ def ki(enzyme: str, substrate: str | None = None) -> str:
69
+ if substrate is None:
70
+ return f"ki_{enzyme}"
71
+ return f"ki_{enzyme}_{substrate}"
72
+
73
+
74
+ def ka(enzyme: str, substrate: str | None = None) -> str:
75
+ if substrate is None:
76
+ return f"ki_{enzyme}"
77
+ return f"ki_{enzyme}_{substrate}"
78
+
79
+
80
+ def k(n: str) -> str:
81
+ return f"k_{n}"
82
+
83
+
84
+ # def ph(n: str) -> str:
85
+ # return f"ph_{n}"
86
+
87
+
88
+ def proton_fn(n: str) -> str:
89
+ return f"h_{n}"
90
+
91
+
92
+ def act_energy(n: str) -> str:
93
+ return f"activation_energy_{n}"
94
+
95
+
96
+ def q10(n: str) -> str:
97
+ return f"q10_{n}"
98
+
99
+
100
+ ###############################################################################
101
+ # Parameters / Variables
102
+ ###############################################################################
103
+
104
+
105
+ def a0(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
106
+ """Photosystem II reaction center 0"""
107
+ return loc("A0", compartment, tissue)
108
+
109
+
110
+ def p700_fa(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
111
+ return loc("P700FA", compartment, tissue)
112
+
113
+
114
+ def p700_plus_fa_minus(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
115
+ return loc("P700+FA-", compartment, tissue)
116
+
117
+
118
+ def p700_fa_minus(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
119
+ return loc("P700FA-", compartment, tissue)
120
+
121
+
122
+ def p700_plus_fa(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
123
+ return loc("P700+FA", compartment, tissue)
124
+
125
+
126
+ def a1(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
127
+ """Photosystem II reaction center 1"""
128
+ return loc("A1", compartment, tissue)
129
+
130
+
131
+ def a2(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
132
+ """Photosystem II reaction center 2"""
133
+ return loc("A2", compartment, tissue)
134
+
135
+
136
+ def b0(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
137
+ return loc("B0", compartment, tissue)
138
+
139
+
140
+ def b1(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
141
+ return loc("B1", compartment, tissue)
142
+
143
+
144
+ def b2(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
145
+ return loc("B2", compartment, tissue)
146
+
147
+
148
+ def b3(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
149
+ return loc("B3", compartment, tissue)
150
+
151
+
152
+ def fd_ox(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
153
+ return loc("Ferredoxine (oxidised)", compartment, tissue)
154
+
155
+
156
+ def fd_red(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
157
+ return loc("Ferredoxine (reduced)", compartment, tissue)
158
+
159
+
160
+ def pc_ox(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
161
+ return loc("Plastocyanine (oxidised)", compartment, tissue)
162
+
163
+
164
+ def pc_red(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
165
+ return loc("Plastocyanine (reduced)", compartment, tissue)
166
+
167
+
168
+ def pq_ox(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
169
+ return loc("Plastoquinone (oxidised)", compartment, tissue)
170
+
171
+
172
+ def pq_red(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
173
+ return loc("Plastoquinone (reduced)", compartment, tissue)
174
+
175
+
176
+ def pfd(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
177
+ """Photosynthetic Photon Flux Density"""
178
+ return loc("PPFD", compartment, tissue)
179
+
180
+
181
+ def h2o2(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
182
+ return loc("H2O2", compartment, tissue)
183
+
184
+
185
+ def ps2cs(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
186
+ return loc("PSII_cross_section", compartment, tissue)
187
+
188
+
189
+ def o2(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
190
+ return loc("O2 (dissolved)", compartment, tissue)
191
+
192
+
193
+ def h(compartment: str = EMPTY, tissue: str = EMPTY) -> str:
194
+ return loc("H", compartment, tissue)
195
+
196
+
197
+ atp = "ATP"
198
+ adp = "ADP"
199
+ pq = "PQ"
200
+ pqh2 = "PQH2"
201
+ proton = "H"
202
+
203
+ quencher = "Quencher act."
204
+ zx = "Zx"
205
+ vx = "Vx"
206
+ psbs = "PsbS"
207
+ psbsp = "PsbSP"
208
+
209
+ pc = "PC" # oxidised plastocyan
210
+ fd = "Fd" # oxidised ferrodoxin
211
+ nadph = "NADPH" # stromal concentration of NADPH
212
+ lhc = "LHC"
213
+
214
+ atpact = "ATPactivity"
215
+
216
+ fluo = "Fluorescence"
217
+ light = "pfd"
218
+ fr_light = "pfd_fr"
219
+
220
+ temp_c = "temperature(deg.C)"
221
+ temp_k = "T" # modified for now
222
+
223
+ k_lumen = "K_lumen"
224
+ k_stroma = "K_stroma"
225
+
226
+ h_lumen = "H_lumen"
227
+ h_stroma = "H_stroma"
228
+
229
+ ph_lumen = "pH_lumen"
230
+ ph_stroma = "pH_stroma"
231
+
232
+ pmf = "pmf(V)"
233
+ delta_psi = "delta_psi" # r'$\Delta \Psi$'
234
+ delta_ph = "delta_pH" # r'$\Delta pH$'
235
+ delta_mu_proton = "delta_mu_proton" # r'$\Delta \tilde{\mu}_{H^+}$'
@@ -22,7 +22,7 @@ def _d_cdt(
22
22
  return a_c * c_gluta * mu_c - c_gluta**2.0 * theta
23
23
 
24
24
 
25
- def create_model() -> Model:
25
+ def get_population_dynamics() -> Model:
26
26
  """Build the two-species population dynamics model (E. coli / C. glutamicum)."""
27
27
  return (
28
28
  Model()
@@ -42,7 +42,7 @@ def _d_mdt(
42
42
  return -private * public * beta + private * r_m - private**2.0 * gamma
43
43
 
44
44
 
45
- def create_model() -> Model:
45
+ def get_tripartite_dynamics() -> Model:
46
46
  """Build the three-strain public-goods game model (Public / Cheater / Private)."""
47
47
  return (
48
48
  Model()
@@ -1034,7 +1034,7 @@ def _div(
1034
1034
  return x / y
1035
1035
 
1036
1036
 
1037
- def create_model() -> Model:
1037
+ def get_ebeling_2026() -> Model:
1038
1038
  """Ebeling 2026 extended chloroplast model with ion transport, ROS, and Calvin cycle.
1039
1039
 
1040
1040
  Reference: tbd