mxlmodels 1.0.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.
- mxlmodels/__init__.py +34 -0
- mxlmodels/dyn_entro.py +184 -0
- mxlmodels/ebeling2026.py +2375 -0
- mxlmodels/lotka_volterra_v1.py +92 -0
- mxlmodels/lotka_volterra_v2.py +83 -0
- mxlmodels/matuszynska2016_npq.py +683 -0
- mxlmodels/matuszynska2016_phd.py +864 -0
- mxlmodels/matuszynska2019.py +1469 -0
- mxlmodels/poolman2000.py +685 -0
- mxlmodels/pop_dyn.py +69 -0
- mxlmodels/py.typed +0 -0
- mxlmodels/saadat2021.py +1871 -0
- mxlmodels/trip_dyn.py +115 -0
- mxlmodels/yokota1985.py +170 -0
- mxlmodels-1.0.0.dist-info/METADATA +68 -0
- mxlmodels-1.0.0.dist-info/RECORD +18 -0
- mxlmodels-1.0.0.dist-info/WHEEL +4 -0
- mxlmodels-1.0.0.dist-info/licenses/LICENSE +21 -0
mxlmodels/__init__.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
from .dyn_entro import create_model as get_dynamic_enterobactin
|
|
9
|
+
from .ebeling2026 import create_model as get_ebeling_2026
|
|
10
|
+
from .lotka_volterra_v1 import create_model as get_lotka_volterra_v1
|
|
11
|
+
from .lotka_volterra_v2 import create_model as get_lotka_volterra_v2
|
|
12
|
+
from .matuszynska2016_npq import create_model as get_matuszynska2016_npq
|
|
13
|
+
from .matuszynska2016_phd import create_model as get_matuszynska2016_phd
|
|
14
|
+
from .matuszynska2019 import create_model as get_matuszynska2019
|
|
15
|
+
from .poolman2000 import create_model as get_poolman2000
|
|
16
|
+
from .pop_dyn import create_model as get_population_dynamics
|
|
17
|
+
from .saadat2021 import create_model as get_saadat2021
|
|
18
|
+
from .trip_dyn import create_model as get_tripartite_dynamics
|
|
19
|
+
from .yokota1985 import create_model as get_yokota1985
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"get_dynamic_enterobactin",
|
|
23
|
+
"get_ebeling_2026",
|
|
24
|
+
"get_lotka_volterra_v1",
|
|
25
|
+
"get_lotka_volterra_v2",
|
|
26
|
+
"get_matuszynska2016_npq",
|
|
27
|
+
"get_matuszynska2016_phd",
|
|
28
|
+
"get_matuszynska2019",
|
|
29
|
+
"get_poolman2000",
|
|
30
|
+
"get_population_dynamics",
|
|
31
|
+
"get_saadat2021",
|
|
32
|
+
"get_tripartite_dynamics",
|
|
33
|
+
"get_yokota1985",
|
|
34
|
+
]
|
mxlmodels/dyn_entro.py
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"""Dynamic enterobactin competition model: E. coli vs C. glutamicum siderophore cross-feeding."""
|
|
2
|
+
|
|
3
|
+
from mxlpy import Model
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def _a_c(
|
|
7
|
+
a_e: float,
|
|
8
|
+
) -> float:
|
|
9
|
+
"""Affinity of C. glutamicum for enterobactin: conservation with E. coli affinity."""
|
|
10
|
+
return 10.0 - a_e
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _uptake_e_growth(
|
|
14
|
+
a_e: float,
|
|
15
|
+
enterobactin: float,
|
|
16
|
+
k_e: float,
|
|
17
|
+
) -> float:
|
|
18
|
+
"""Michaelis-Menten uptake of enterobactin by E. coli, scaled by E. coli affinity."""
|
|
19
|
+
return a_e * enterobactin / (k_e + enterobactin)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _uptake_c_growth(
|
|
23
|
+
enterobactin: float,
|
|
24
|
+
_a_c: float,
|
|
25
|
+
k_c: float,
|
|
26
|
+
) -> float:
|
|
27
|
+
"""Michaelis-Menten uptake of enterobactin by C. glutamicum, scaled by its affinity."""
|
|
28
|
+
return _a_c * enterobactin / (k_c + enterobactin)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _cons_term_e(
|
|
32
|
+
a_e: float,
|
|
33
|
+
e_coli: float,
|
|
34
|
+
k_e: float,
|
|
35
|
+
mu_e: float,
|
|
36
|
+
) -> float:
|
|
37
|
+
"""Enterobactin consumption term for E. coli: affinity * population * growth rate."""
|
|
38
|
+
return a_e * e_coli * mu_e / (k_e + a_e)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _cons_term_c(
|
|
42
|
+
mu_c: float,
|
|
43
|
+
_a_c: float,
|
|
44
|
+
k_c: float,
|
|
45
|
+
c_gluta: float,
|
|
46
|
+
) -> float:
|
|
47
|
+
"""Enterobactin consumption term for C. glutamicum: affinity * population * growth rate."""
|
|
48
|
+
return _a_c * c_gluta * mu_c / (k_c + _a_c)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _d_edt(
|
|
52
|
+
mu_e: float,
|
|
53
|
+
e_coli: float,
|
|
54
|
+
_uptake_e_growth: float,
|
|
55
|
+
) -> float:
|
|
56
|
+
"""Net growth rate of E. coli population."""
|
|
57
|
+
return e_coli * mu_e * _uptake_e_growth
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _d_cdt(
|
|
61
|
+
mu_c: float,
|
|
62
|
+
c_gluta: float,
|
|
63
|
+
_uptake_c_growth: float,
|
|
64
|
+
theta: float,
|
|
65
|
+
) -> float:
|
|
66
|
+
"""Net growth rate of C. glutamicum minus density-dependent death."""
|
|
67
|
+
return c_gluta * mu_c * _uptake_c_growth - c_gluta**2.0 * theta
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _d_bdt(
|
|
71
|
+
enterobactin: float,
|
|
72
|
+
r_cons_e: float,
|
|
73
|
+
_cons_term_e: float,
|
|
74
|
+
r_prod: float,
|
|
75
|
+
_cons_term_c: float,
|
|
76
|
+
r_cons_c: float,
|
|
77
|
+
) -> float:
|
|
78
|
+
"""Net rate of change of enterobactin: production by E. coli minus consumption by both species."""
|
|
79
|
+
return -_cons_term_c * r_cons_c - _cons_term_e * r_cons_e + enterobactin * r_prod
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def create_model() -> Model:
|
|
83
|
+
"""Build the dynamic enterobactin cross-feeding model (E. coli / C. glutamicum)."""
|
|
84
|
+
return (
|
|
85
|
+
Model()
|
|
86
|
+
.add_variable(
|
|
87
|
+
"e_coli",
|
|
88
|
+
initial_value=5.0,
|
|
89
|
+
)
|
|
90
|
+
.add_variable(
|
|
91
|
+
"c_gluta",
|
|
92
|
+
initial_value=5.0,
|
|
93
|
+
)
|
|
94
|
+
.add_variable(
|
|
95
|
+
"enterobactin",
|
|
96
|
+
initial_value=1.0,
|
|
97
|
+
)
|
|
98
|
+
.add_parameter(
|
|
99
|
+
"mu_e",
|
|
100
|
+
value=0.4,
|
|
101
|
+
)
|
|
102
|
+
.add_parameter(
|
|
103
|
+
"mu_c",
|
|
104
|
+
value=0.3,
|
|
105
|
+
)
|
|
106
|
+
.add_parameter(
|
|
107
|
+
"a_e",
|
|
108
|
+
value=6.0,
|
|
109
|
+
)
|
|
110
|
+
.add_parameter(
|
|
111
|
+
"K_e",
|
|
112
|
+
value=0.5,
|
|
113
|
+
)
|
|
114
|
+
.add_parameter(
|
|
115
|
+
"K_c",
|
|
116
|
+
value=0.5,
|
|
117
|
+
)
|
|
118
|
+
.add_parameter(
|
|
119
|
+
"theta",
|
|
120
|
+
value=0.001,
|
|
121
|
+
)
|
|
122
|
+
.add_parameter(
|
|
123
|
+
"r_prod",
|
|
124
|
+
value=0.2,
|
|
125
|
+
)
|
|
126
|
+
.add_parameter(
|
|
127
|
+
"r_cons_e",
|
|
128
|
+
value=1.0,
|
|
129
|
+
)
|
|
130
|
+
.add_parameter(
|
|
131
|
+
"r_cons_c",
|
|
132
|
+
value=1.0,
|
|
133
|
+
)
|
|
134
|
+
.add_derived(
|
|
135
|
+
"a_c",
|
|
136
|
+
fn=_a_c,
|
|
137
|
+
args=["a_e"],
|
|
138
|
+
)
|
|
139
|
+
.add_derived(
|
|
140
|
+
"uptake_E_growth",
|
|
141
|
+
fn=_uptake_e_growth,
|
|
142
|
+
args=["a_e", "enterobactin", "K_e"],
|
|
143
|
+
)
|
|
144
|
+
.add_derived(
|
|
145
|
+
"uptake_C_growth",
|
|
146
|
+
fn=_uptake_c_growth,
|
|
147
|
+
args=["enterobactin", "a_c", "K_c"],
|
|
148
|
+
)
|
|
149
|
+
.add_derived(
|
|
150
|
+
"cons_term_E",
|
|
151
|
+
fn=_cons_term_e,
|
|
152
|
+
args=["a_e", "e_coli", "K_e", "mu_e"],
|
|
153
|
+
)
|
|
154
|
+
.add_derived(
|
|
155
|
+
"cons_term_C",
|
|
156
|
+
fn=_cons_term_c,
|
|
157
|
+
args=["mu_c", "a_c", "K_c", "c_gluta"],
|
|
158
|
+
)
|
|
159
|
+
.add_reaction(
|
|
160
|
+
"dEdt",
|
|
161
|
+
fn=_d_edt,
|
|
162
|
+
args=["mu_e", "e_coli", "uptake_E_growth"],
|
|
163
|
+
stoichiometry={"e_coli": 1.0},
|
|
164
|
+
)
|
|
165
|
+
.add_reaction(
|
|
166
|
+
"dCdt",
|
|
167
|
+
fn=_d_cdt,
|
|
168
|
+
args=["mu_c", "c_gluta", "uptake_C_growth", "theta"],
|
|
169
|
+
stoichiometry={"c_gluta": 1.0},
|
|
170
|
+
)
|
|
171
|
+
.add_reaction(
|
|
172
|
+
"dBdt",
|
|
173
|
+
fn=_d_bdt,
|
|
174
|
+
args=[
|
|
175
|
+
"enterobactin",
|
|
176
|
+
"r_cons_e",
|
|
177
|
+
"cons_term_E",
|
|
178
|
+
"r_prod",
|
|
179
|
+
"cons_term_C",
|
|
180
|
+
"r_cons_c",
|
|
181
|
+
],
|
|
182
|
+
stoichiometry={"enterobactin": 1.0},
|
|
183
|
+
)
|
|
184
|
+
)
|