Abstract Model
rma_kinetics.models.AbstractModel
Abstract RMA model.
Attributes:
| Name | Type | Description |
|---|---|---|
rma_prod_rate |
float
|
RMA production rate (concentration/time). |
rma_rt_rate |
float
|
RMA reverse transcytosis rate (1/time). |
rma_deg_rate |
float
|
RMA degradation rate (1/time). |
time_units |
Time
|
Time units (Default = Time.hours). |
conc_units |
Concentration
|
Concentration units (Default = Concentration.nanomolar). |
Source code in src/rma_kinetics/models/abstract.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
simulate(t0: float, t1: float, y0: PyTree[float], dt0: float | None = None, sampling_rate: float = 1, stepsize_controller: AbstractStepSizeController = PIDController(rtol=1e-05, atol=1e-05), max_steps: int = 4096, solver: AbstractSolver = Kvaerno3(), adjoint: AbstractAdjoint = RecursiveCheckpointAdjoint(), throw: bool = True, progress_meter: AbstractProgressMeter = NoProgressMeter())
Simulates model within the given time interval.
Wraps diffrax.diffeqsolve with specific defaults for RMA model simulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t0
|
float
|
Start time of integration. |
required |
t1
|
float
|
Stop time of integration. |
required |
y0
|
PyTree[float]
|
Tuple of initial conditions. |
required |
dt0
|
float | None`
|
Initial step size if using adaptive step sizes, or size of all steps if using constant stepsize. |
None
|
sampling_rate
|
float
|
Sampling rate for saving solution. |
1
|
stepsize_controller
|
AbstractStepSizeController`
|
Determines how to change step size during integration. |
PIDController(rtol=1e-05, atol=1e-05)
|
max_steps
|
int
|
Max number of steps before stopping. |
4096
|
solver
|
AbstractSolver
|
Differential equation solver. |
Kvaerno3()
|
adjoint
|
AbstractAdjoint
|
How to differentiate. |
RecursiveCheckpointAdjoint()
|
throw
|
bool
|
Raise an exception if integration fails. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
solution |
Solution
|
A solution object (parent of diffrax.Solution) with added plotting methods. |
Source code in src/rma_kinetics/models/abstract.py
_terms() -> AbstractTerm
Wraps model in AbstractTerm for use with the differential
equation solver (implemented by child class).
Returns:
| Name | Type | Description |
|---|---|---|
term |
AbstractTerm
|
Terms for use with |
Source code in src/rma_kinetics/models/abstract.py
_model(t: float, y: PyTree[float], args=None) -> PyTree[float]
Final ODE/SDE model (implemented by child class)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
float
|
Time point. |
required |
y
|
PyTree[float]
|
Brain and plasma RMA concentrations |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dydt |
PyTree[float]
|
Change in brain and plasma RMA concentrations (along with any other additional species). |