Kinetics
Chemical kinetics: reactions, oscillating reactors, and excitable media.
BrusselatorODESystem(u=1.0, v=1.0, *, a=1.0, b=3.0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
The well-mixed Brusselator.
It oscillates on a limit cycle when b > 1 + a**2.
The reactions A -> U, B + U -> V + D, 2U + V -> 3U, and U -> E with the buffered reactants A and B
give du/dt = a - (b + 1) u + u^2 v and dv/dt = b u - u^2 v, with the fixed point (a, b / a). The
concentrations are reactor.u and reactor.v.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u
|
float
|
The initial concentration of the autocatalytic intermediate. |
1.0
|
v
|
float
|
The initial concentration of the second intermediate. |
1.0
|
a
|
float
|
The constant supply of the first reactant. |
1.0
|
b
|
float
|
The constant supply of the second reactant. |
3.0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import BrusselatorODESystem
>>> BrusselatorODESystem(b=1.5).prepare().system_.elements[0].b
1.5
Source code in src/skcomplex/systems/chemistry/kinetics/_oscillators.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
CatalystPelletElement(label, *, c=1.0, h=0.1, k=10.0, K=20.0)
Bases: Element
Catalyst pellet, the concentration c of the reactant at its surface.
The concentration is relative to the bulk.
The mass transfer and the surface reaction of CatalystPelletSystem change the concentration and read their
constants from the pellet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the pellet. |
required |
c
|
Annotated[float, closed_open(0, oo)]
|
The initial surface concentration. |
1.0
|
h
|
Annotated[float, open(0, oo)]
|
The coefficient of mass transfer from the bulk. |
0.1
|
k
|
Annotated[float, closed_open(0, oo)]
|
The rate constant of the surface reaction. |
10.0
|
K
|
Annotated[float, closed_open(0, oo)]
|
The adsorption constant, which sets the inhibition. |
20.0
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CatalystPelletElement
>>> CatalystPelletElement('pellet').K
20.0
Source code in src/skcomplex/systems/chemistry/kinetics/_reactors.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
CatalystPelletSystem(c=1.0, *, h=0.1, k=10.0, K=20.0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
The surface concentration of a catalyst pellet.
It is bistable through Langmuir-Hinshelwood kinetics.
The concentration at the surface, relative to the bulk, follows dc/dt = h (1 - c) - k c / (1 + K c)^2, where
mass transfer from the bulk balances a reaction that the adsorbed reactant inhibits. For the default parameters a
reacting state of low concentration and an inhibited state of high concentration are both stable. The
concentration is pellet.c.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
c
|
float
|
The initial surface concentration. |
1.0
|
h
|
float
|
The coefficient of mass transfer from the bulk. |
0.1
|
k
|
float
|
The rate constant of the surface reaction. |
10.0
|
K
|
float
|
The adsorption constant, which sets the inhibition. |
20.0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CatalystPelletSystem
>>> CatalystPelletSystem(k=5.0).prepare().system_.elements[0].k
5.0
Source code in src/skcomplex/systems/chemistry/kinetics/_reactors.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
ChemicalLangevinEquationSystem(x=50.0, *, c1=1.5e-06, c2=0.0025, c3=0.0002, c4=3.5, A=100000.0, B=200000.0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
The chemical Langevin equation of Schlögl's bistable reaction.
Its noise switches between two states.
The channels A + 2X -> 3X, 3X -> A + 2X, B -> X, and X -> B have the propensities c1 A x (x - 1) / 2,
c2 x (x - 1) (x - 2) / 6, c3 B, and c4 x. Every channel adds its propensity times its change of x to the
drift and drives x with its own Wiener process of amplitude the square root of its propensity. The default rate
constants are those of Gillespie 2000 scaled to a volume five times smaller, so the stable states lie near 17 and
113 molecules and the noise switches between them within 200 time units. The number of molecules is reactor.x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
The initial number of molecules of |
50.0
|
c1
|
float
|
The rate constant of the autocatalytic production. |
1.5e-06
|
c2
|
float
|
The rate constant of the reverse of the autocatalytic production. |
0.0025
|
c3
|
float
|
The rate constant of the production from |
0.0002
|
c4
|
float
|
The rate constant of the conversion into |
3.5
|
A
|
float
|
The constant number of molecules of |
100000.0
|
B
|
float
|
The constant number of molecules of |
200000.0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import ChemicalLangevinEquationSystem
>>> ChemicalLangevinEquationSystem(c4=3.0).prepare().system_.elements[0].c4
3.0
Source code in src/skcomplex/systems/chemistry/kinetics/_reactions.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
ChemicalLangevinNetworkSystem(enzyme=100.0, substrate=300.0, *, k_binding=0.01, k_unbinding=0.1, k_catalysis=0.1, label='system', solver='auto', backend='auto')
Bases: ReactionNetworkSystem
The chemical Langevin equation of the enzyme reaction E + S <-> C -> E + P.
Every reaction adds its rate times its change of every species to the drift, and one Wiener process with the
amplitude the square root of its rate drives every species it changes. Since one increment changes all of them, the
total enzyme E + C and the total substrate S + C + P stay constant under the noise, as in the jump process. The
amounts are E.x, S.x, C.x, and P.x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enzyme
|
float
|
The initial amount of free enzyme. |
100.0
|
substrate
|
float
|
The initial amount of substrate. |
300.0
|
k_binding
|
float
|
The rate constant of the binding of enzyme and substrate. |
0.01
|
k_unbinding
|
float
|
The rate constant of the unbinding of the complex. |
0.1
|
k_catalysis
|
float
|
The rate constant of the conversion of the complex into enzyme and product. |
0.1
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import ChemicalLangevinNetworkSystem
>>> [reaction.mode for reaction in ChemicalLangevinNetworkSystem().prepare().system_.interactions]
['langevin', 'langevin', 'langevin']
Source code in src/skcomplex/systems/chemistry/kinetics/_reactions.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
CubicAutocatalysisElement(label, *, a=1.0, b=0.0, F=0.04, k=0.05)
Bases: Element
Continuously fed reactor of cubic autocatalysis.
It holds the concentrations of the reactant a and the autocatalyst b.
The reactions and the flows of CubicAutocatalysisSystem change the concentrations and read the feed rate F and
the decay rate k from the reactor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the reactor. |
required |
a
|
Annotated[float, closed_open(0, oo)]
|
The initial concentration of the reactant. |
1.0
|
b
|
Annotated[float, closed_open(0, oo)]
|
The initial concentration of the autocatalyst. |
0.0
|
F
|
Annotated[float, open(0, oo)]
|
The feed rate, the inverse residence time. |
0.04
|
k
|
Annotated[float, closed_open(0, oo)]
|
The decay rate of the autocatalyst. |
0.05
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CubicAutocatalysisElement
>>> CubicAutocatalysisElement('reactor').F
0.04
Source code in src/skcomplex/systems/chemistry/kinetics/_oscillators.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
CubicAutocatalysisSystem(a=0.5, b=0.5, *, F=0.04, k=0.05, label='system', solver='auto', backend='auto')
Bases: BaseSystem
Cubic autocatalysis A + 2B -> 3B with the decay B -> C.
It runs in a continuously fed reactor.
The flow through the reactor relaxes the reactant to its feed concentration 1 and washes out the autocatalyst at
the rate F, so the dimensionless concentrations follow da/dt = -a b^2 + F (1 - a) and
db/dt = a b^2 - (F + k) b. The washout state (1, 0) is always stable, and a reacting state coexists with it
when F + k < sqrt(F) / 2. The concentrations are reactor.a and reactor.b.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
The initial concentration of the reactant. |
0.5
|
b
|
float
|
The initial concentration of the autocatalyst. |
0.5
|
F
|
float
|
The feed rate, the inverse residence time. |
0.04
|
k
|
float
|
The decay rate of the autocatalyst. |
0.05
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CubicAutocatalysisSystem
>>> CubicAutocatalysisSystem(k=0.06).prepare().system_.elements[0].k
0.06
Source code in src/skcomplex/systems/chemistry/kinetics/_oscillators.py
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
CyclicAdvanceInteraction(label, *, target='cells')
Bases: Interaction
Advance of the cells of Griffeath's cyclic automaton around their cycle of levels.
A cell moves from level k to level k + 1 modulo n when at least threshold of its von Neumann neighbours
hold that level, with n and threshold the parameters of its cell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the interaction. |
required |
target
|
Role
|
The cells whose state |
'cells'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CyclicAdvanceInteraction
>>> CyclicAdvanceInteraction('advance', target='cells').target
'cells'
Source code in src/skcomplex/systems/chemistry/kinetics/_cyclic.py
94 95 96 | |
CyclicCellElement(label, *, level=0, n=14.0, threshold=1.0, space=None)
Bases: Element
Cell of Griffeath's cyclic cellular automaton, with n levels.
The levels follow each other in a cycle.
A cell moves from level k to level k + 1 modulo n when at least threshold of its neighbours hold that
level, by the local rule of CyclicCellularAutomatonSystem, so every level eats its predecessor and random initial
levels organize into spiral waves.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the cell or the lattice group. |
required |
level
|
Annotated[object, NN]
|
The initial level, from 0 to |
0
|
n
|
Annotated[float, open(0, oo)]
|
The number of levels. |
14.0
|
threshold
|
Annotated[float, open(0, oo)]
|
The number of neighbours at the following level that advance a cell. |
1.0
|
space
|
BaseSpace | None
|
The lattice of the cells, or |
None
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CyclicCellElement
>>> CyclicCellElement('cell').n
14.0
Source code in src/skcomplex/systems/chemistry/kinetics/_cyclic.py
58 59 60 61 62 63 64 65 66 67 68 69 70 | |
CyclicCellularAutomatonSystem(shape=(64, 64), *, n=14, threshold=1, random_state=0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
Griffeath's cyclic cellular automaton.
Its random levels organize into spiral waves.
Every cell of a lattice holds one of n levels, which follow each other in a cycle, and moves to the following
level when at least threshold of its von Neumann neighbours hold it. The levels are cells.level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shape
|
Sequence[int]
|
The number of rows and columns. |
(64, 64)
|
n
|
int
|
The number of levels. |
14
|
threshold
|
int
|
The number of von Neumann neighbours at the following level that advance a cell. |
1
|
random_state
|
int | Generator | None
|
The seed or generator of the initial levels. |
0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import CyclicCellularAutomatonSystem
>>> CyclicCellularAutomatonSystem((10, 10), n=8).prepare().system_.elements[0].n
8
Source code in src/skcomplex/systems/chemistry/kinetics/_cyclic.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
ElectrodeKineticsInteraction(label, *, target, C=1.0, alpha=0.5, tau=10.0, kappa=0.05, current=5.0, period=10.0, width=2.0)
Bases: Interaction
Kinetics of an electrode that a train of current pulses charges.
In units of the exchange current and of the thermal voltage, the overpotential follows
C deta/dt = i(t) - i_F, with the Butler-Volmer current i_F = c exp(alpha eta) - exp(-(1 - alpha) eta), and the
reactant concentration follows dc/dt = (1 - c) / tau - kappa i_F.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the interaction. |
required |
target
|
Role
|
The path of the electrode. |
required |
C
|
Annotated[float, open(0, oo)]
|
The capacitance of the double layer. |
1.0
|
alpha
|
Annotated[float, open(0, oo)]
|
The transfer coefficient. |
0.5
|
tau
|
Annotated[float, open(0, oo)]
|
The residence time of the reactor. |
10.0
|
kappa
|
Annotated[float, closed_open(0, oo)]
|
The consumption of reactant per unit of Faradaic current. |
0.05
|
current
|
float
|
The current of a pulse. |
5.0
|
period
|
float
|
The time between the starts of pulses. |
10.0
|
width
|
float
|
The duration of a pulse. |
2.0
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import ElectrodeKineticsInteraction
>>> ElectrodeKineticsInteraction('kinetics', target='electrode').period
10.0
Source code in src/skcomplex/systems/chemistry/kinetics/_reactors.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
HodgepodgeCellElement(label, *, level=0, n=100.0, k1=2.0, k2=3.0, g=34.0, space=None)
Bases: Element
Cell of the hodgepodge machine of Gerhardt and Schuster.
It is healthy at 0, infected below n, and ill at n.
Healthy cells catch the infection from their infected and ill neighbours, infected cells worsen by the mean of their
neighbourhood plus g, and ill cells heal, by the local rule of HodgepodgeSystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the cell or the lattice group. |
required |
level
|
Annotated[object, NN]
|
The initial level of infection from 0 to |
0
|
n
|
Annotated[float, open(0, oo)]
|
The level of illness. |
100.0
|
k1
|
Annotated[float, open(0, oo)]
|
The weight of infected neighbours for healthy cells. |
2.0
|
k2
|
Annotated[float, open(0, oo)]
|
The weight of ill neighbours for healthy cells. |
3.0
|
g
|
Annotated[float, closed_open(0, oo)]
|
The speed of the infection. |
34.0
|
space
|
BaseSpace | None
|
The lattice of the cells, or |
None
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import HodgepodgeCellElement
>>> HodgepodgeCellElement('cell').n
100.0
Source code in src/skcomplex/systems/chemistry/kinetics/_hodgepodge.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
HodgepodgeInteraction(label, *, target='cells')
Bases: Interaction
Infection, worsening, and healing of the cells of the hodgepodge machine.
A healthy cell catches the infection from its infected and ill neighbours, an infected cell worsens by the mean of
its Moore neighbourhood plus g, and an ill cell heals, with n, k1, k2, and g the parameters of its cell.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the interaction. |
required |
target
|
Role
|
The cells whose state |
'cells'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import HodgepodgeInteraction
>>> HodgepodgeInteraction('infection', target='cells').target
'cells'
Source code in src/skcomplex/systems/chemistry/kinetics/_hodgepodge.py
103 104 105 | |
HodgepodgeSystem(shape=(100, 100), *, n=100.0, k1=2.0, k2=3.0, g=34.0, random_state=0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
The hodgepodge machine, a chemical reaction whose waves form spirals.
Every cell of a lattice holds a level of infection from 0 to n. Healthy cells catch the infection from their
infected and ill Moore neighbours, infected cells worsen by the mean of their neighbourhood plus g, and ill cells
heal. The levels are cells.level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shape
|
Sequence[int]
|
The number of rows and columns. |
(100, 100)
|
n
|
float
|
The level of illness. |
100.0
|
k1
|
float
|
The weight of infected neighbours for healthy cells. |
2.0
|
k2
|
float
|
The weight of ill neighbours for healthy cells. |
3.0
|
g
|
float
|
The speed of the infection. |
34.0
|
random_state
|
int | Generator | None
|
The seed or generator of the initial levels. |
0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import HodgepodgeSystem
>>> HodgepodgeSystem((10, 10)).prepare().system_.elements[0].g
34.0
Source code in src/skcomplex/systems/chemistry/kinetics/_hodgepodge.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
MassExchangeInteraction(label, *, target, state='x', goal=0.0, time=1.0, noise=None)
Bases: Interaction
Mass exchange of a concentration towards a feed over a residence or transfer time.
Chemical engineering names it the exchange of a reactor with its feed, or a mass transfer to a surface. The rate is
(goal(ns) - x) / time(ns) of a state x of a target, with optional noise. With a constant goal and time and an
additive noise of amplitude sigma, the state follows the Ornstein-Uhlenbeck process dx = (goal - x) / time dt +
sigma dW, whose stationary variance is sigma**2 time / 2. A goal, a time, or a noise function takes the namespace
of the interaction, with the target as target and the time as t, and a number stands for a constant. A goal
that is a number applies to every component of a vector state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the interaction, unique among the components of its system. |
required |
target
|
Role
|
The path of the element or group whose state relaxes. |
required |
state
|
str
|
The name of the state of the target that relaxes. |
'x'
|
goal
|
Callable[[SimpleNamespace], object] | float
|
A function of the namespace that returns the goal, or a number. |
0.0
|
time
|
Callable[[SimpleNamespace], object] | float
|
A function of the namespace that returns the relaxation time, or a positive number. |
1.0
|
noise
|
Callable[[SimpleNamespace], object] | float | None
|
A function of the namespace that returns the amplitude of the noise, a number, or |
None
|
Raises:
| Type | Description |
|---|---|
ValidationError
|
The state is not a name, or a function is neither callable nor a number. |
Examples:
>>> from skcomplex.core.components.elements import Element
>>> from skcomplex.core.systems import System
>>> from skcomplex.systems.chemistry.kinetics import MassExchangeInteraction
>>> relaxation = MassExchangeInteraction('relaxation', target='stock', goal=10.0, time=0.5)
>>> system = System(elements=[Element('stock', values={'x': 0.0})], interactions=[relaxation]).prepare()
>>> round(float(system.simulate(until=5.0, dt=0.01).get_values('stock.x')[-1]), 3)
10.0
Source code in src/skcomplex/systems/chemistry/kinetics/_mass_exchange.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
MichaelisMentenSystem(enzyme=100.0, substrate=300.0, *, k_binding=0.01, k_unbinding=0.1, k_catalysis=0.1, stochastic=False, label='system', solver='auto', backend='auto')
Bases: ReactionNetworkSystem
The enzyme reaction E + S <-> C -> E + P of Michaelis and Menten.
It runs as rate equations or as jumps.
The total enzyme E + C and the total substrate S + C + P are conserved. In stochastic mode the amounts are
numbers of molecules and the reactions are the random events of Gillespie's algorithm. The amounts are E.x,
S.x, C.x, and P.x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enzyme
|
float
|
The initial amount of free enzyme. |
100.0
|
substrate
|
float
|
The initial amount of substrate. |
300.0
|
k_binding
|
float
|
The rate constant of the binding of enzyme and substrate. |
0.01
|
k_unbinding
|
float
|
The rate constant of the unbinding of the complex. |
0.1
|
k_catalysis
|
float
|
The rate constant of the conversion of the complex into enzyme and product. |
0.1
|
stochastic
|
bool
|
Whether the reactions are random events. |
False
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import MichaelisMentenSystem
>>> [element.label for element in MichaelisMentenSystem().prepare().system_.elements]
['E', 'S', 'C', 'P']
>>> sorted(MichaelisMentenSystem(stochastic=True).get_tags().laws)
['jump']
Source code in src/skcomplex/systems/chemistry/kinetics/_reactions.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
NanoparticleCoronaSystem(nanoparticle=18.0, *, radius=35.0, proteins=(600000.0, 15000.0, 8800.0), corona=(14.0, 4.0, 0.0), protein_radii=(5.0, 4.0, 8.3), association=(2400.0, 30000.0, 2000.0), dissociation=(0.002, 3e-05, 0.002), label='system', solver='auto', backend='auto')
Bases: BaseSystem
The corona that plasma proteins form on a nanoparticle.
The proteins are albumin, high-density lipoprotein, and fibrinogen.
Each protein i binds a free nanoparticle at the rate n_i alpha_i U P_i and leaves it at the rate
delta_i B_i, where n_i = 4 (R + r_i)^2 / r_i^2 is the number of its sites on a nanoparticle of radius R.
The book gives only the balance of the complexes, and the system takes the free nanoparticles and the free proteins
from mass action, so U + sum B_i and every P_i + B_i are conserved. The parameters and initial
concentrations are the book's, without the binding to a target. Concentrations are in nM, association rates in
1/(M s), and time is in seconds. Albumin, the most abundant, covers the nanoparticles first, and lipoprotein,
which binds more tightly, replaces it within hours, which is the Vroman effect. The free nanoparticles are
nanoparticle.x, the free proteins albumin.x, lipoprotein.x, and fibrinogen.x, and the complexes
albumin_corona.x, lipoprotein_corona.x, and fibrinogen_corona.x.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nanoparticle
|
float
|
The initial concentration of free nanoparticles. |
18.0
|
radius
|
float
|
The radius of a nanoparticle, in nm. |
35.0
|
proteins
|
Sequence[float]
|
The initial concentrations of free albumin, lipoprotein, and fibrinogen. |
(600000.0, 15000.0, 8800.0)
|
corona
|
Sequence[float]
|
The initial concentrations of nanoparticles bound to each protein. |
(14.0, 4.0, 0.0)
|
protein_radii
|
Sequence[float]
|
The radii of the proteins, in nm. |
(5.0, 4.0, 8.3)
|
association
|
Sequence[float]
|
The association rates of the proteins. |
(2400.0, 30000.0, 2000.0)
|
dissociation
|
Sequence[float]
|
The dissociation rates of the proteins, per second. |
(0.002, 3e-05, 0.002)
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import NanoparticleCoronaSystem
>>> round(NanoparticleCoronaSystem().prepare().system_.interactions[0].k, 7)
0.0006144
Source code in src/skcomplex/systems/chemistry/kinetics/_nanoparticles.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
OregonatorElement(label, *, x=0.1, y=0.1, z=0.1, epsilon=0.04, delta=0.0004, q=0.0008, f=1.0)
Bases: Element
Reactor of the scaled Oregonator.
It holds the scaled concentrations of bromous acid, bromide, and the oxidized catalyst.
The scaled concentrations follow epsilon dx/dt = q y - x y + x (1 - x), delta dy/dt = -q y - x y + f z, and
dz/dt = x - z. The reactions of OregonatorSystem change the concentrations, with the time scales epsilon and
delta dividing the stoichiometric coefficients of x and y, and read the parameters from the reactor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the reactor. |
required |
x
|
Annotated[float, closed_open(0, oo)]
|
The initial scaled concentration of bromous acid. |
0.1
|
y
|
Annotated[float, closed_open(0, oo)]
|
The initial scaled concentration of bromide. |
0.1
|
z
|
Annotated[float, closed_open(0, oo)]
|
The initial scaled concentration of the oxidized catalyst. |
0.1
|
epsilon
|
Annotated[float, open(0, oo)]
|
The ratio of the time scales of bromous acid and the catalyst. |
0.04
|
delta
|
Annotated[float, open(0, oo)]
|
The ratio of the time scales of bromide and the catalyst. |
0.0004
|
q
|
Annotated[float, closed_open(0, oo)]
|
The ratio of rate constants that sets the lowest bromous acid concentration. |
0.0008
|
f
|
Annotated[float, closed_open(0, oo)]
|
The stoichiometric factor of bromide production from the catalyst. |
1.0
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import OregonatorElement
>>> OregonatorElement('reactor').epsilon
0.04
Source code in src/skcomplex/systems/chemistry/kinetics/_oscillators.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
OregonatorSystem(x=0.1, y=0.1, z=0.1, *, epsilon=0.04, delta=0.0004, q=0.0008, f=1.0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
The scaled Oregonator of the Belousov-Zhabotinsky reaction.
It is the reduction of the FKN mechanism of the reaction.
The scaled concentrations of bromous acid x, bromide y, and the oxidized catalyst z follow
epsilon dx/dt = q y - x y + x (1 - x), delta dy/dt = -q y - x y + f z, and dz/dt = x - z. The five reactions
of the mechanism, bromate with bromide Y -> X at q y, bromous acid with bromide X + Y -> 0 at x y, the
autocatalysis X -> 2X + Z at x, the disproportionation 2X -> 0 at x^2, and the reduction of the catalyst
Z -> f Y at z, change x and y by stoichiometric coefficients scaled by 1 / epsilon and 1 / delta. With
the standard parameters the reaction settles on a relaxation limit cycle, and the small epsilon and delta make
it stiff. The concentrations are reactor.x, reactor.y, and reactor.z.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
float
|
The initial scaled concentration of bromous acid. |
0.1
|
y
|
float
|
The initial scaled concentration of bromide. |
0.1
|
z
|
float
|
The initial scaled concentration of the oxidized catalyst. |
0.1
|
epsilon
|
float
|
The ratio of the time scales of bromous acid and the catalyst. |
0.04
|
delta
|
float
|
The ratio of the time scales of bromide and the catalyst. |
0.0004
|
q
|
float
|
The ratio of rate constants that sets the lowest bromous acid concentration. |
0.0008
|
f
|
float
|
The stoichiometric factor of bromide production from the catalyst. |
1.0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import OregonatorSystem
>>> OregonatorSystem(f=0.8).prepare().system_.elements[0].f
0.8
Source code in src/skcomplex/systems/chemistry/kinetics/_oscillators.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
PulsedElectrochemicalReactorSystem(eta=0.0, c=1.0, *, C=1.0, alpha=0.5, tau=10.0, kappa=0.05, current=5.0, period=10.0, width=2.0, label='system', solver='auto', backend='auto')
Bases: BaseSystem
A stirred electrochemical reactor driven by current pulses.
A train of current pulses drives its electrode.
Every pulse charges the double layer, the overpotential drives a Butler-Volmer current that consumes the reactant,
and the feed restores it between pulses. The overpotential is electrode.eta and the concentration
electrode.c.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eta
|
float
|
The initial overpotential. |
0.0
|
c
|
float
|
The initial reactant concentration, relative to the feed. |
1.0
|
C
|
float
|
The capacitance of the double layer. |
1.0
|
alpha
|
float
|
The transfer coefficient. |
0.5
|
tau
|
float
|
The residence time of the reactor. |
10.0
|
kappa
|
float
|
The consumption of reactant per unit of Faradaic current. |
0.05
|
current
|
float
|
The current of a pulse. |
5.0
|
period
|
float
|
The time between the starts of pulses. |
10.0
|
width
|
float
|
The duration of a pulse. |
2.0
|
label
|
str
|
The label of the system, which names it when it is nested in another one. |
'system'
|
solver
|
BaseSolver | str
|
The solver of the problem, or |
'auto'
|
backend
|
BaseBackend | str
|
The backend that evaluates the compiled functions, or |
'auto'
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import PulsedElectrochemicalReactorSystem
>>> PulsedElectrochemicalReactorSystem(width=1.0).prepare().system_.interactions[0].width
1.0
>>> sorted(PulsedElectrochemicalReactorSystem().get_tags().laws)
['rate']
Source code in src/skcomplex/systems/chemistry/kinetics/_reactors.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | |
PulsedElectrodeElement(label, *, eta=0.0, c=1.0)
Bases: Element
Electrode of a stirred electrochemical reactor, with its overpotential eta and reactant concentration c.
The electrode kinetics of PulsedElectrochemicalReactorSystem change both.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the electrode. |
required |
eta
|
float
|
The initial overpotential. |
0.0
|
c
|
Annotated[float, closed_open(0, oo)]
|
The initial reactant concentration, relative to the feed. |
1.0
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import PulsedElectrodeElement
>>> PulsedElectrodeElement('electrode', c=0.5).c
0.5
Source code in src/skcomplex/systems/chemistry/kinetics/_reactors.py
93 94 95 96 97 98 99 100 101 102 | |
SchloglElement(label, *, x=50.0, c1=1.5e-06, c2=0.0025, c3=0.0002, c4=3.5, A=100000.0, B=200000.0)
Bases: Element
Reactor of Schlögl's reaction, the number of molecules of X.
The buffered species are A and B.
The reactions of ChemicalLangevinEquationSystem change x and read the rate constants and the constant numbers of
molecules of A and B from the reactor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the reactor. |
required |
x
|
Annotated[float, closed_open(0, oo)]
|
The initial number of molecules of |
50.0
|
c1
|
Annotated[float, closed_open(0, oo)]
|
The rate constant of the autocatalytic production. |
1.5e-06
|
c2
|
Annotated[float, closed_open(0, oo)]
|
The rate constant of the reverse of the autocatalytic production. |
0.0025
|
c3
|
Annotated[float, closed_open(0, oo)]
|
The rate constant of the production from |
0.0002
|
c4
|
Annotated[float, closed_open(0, oo)]
|
The rate constant of the conversion into |
3.5
|
A
|
Annotated[float, closed_open(0, oo)]
|
The constant number of molecules of |
100000.0
|
B
|
Annotated[float, closed_open(0, oo)]
|
The constant number of molecules of |
200000.0
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import SchloglElement
>>> SchloglElement('reactor').x
50.0
Source code in src/skcomplex/systems/chemistry/kinetics/_reactions.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
SpeciesElement(label, *, x=0.0, size=None, space=None)
Bases: NonnegativeElement
Chemical species with a nonnegative concentration x.
It is a free nanoparticle, a free protein, or a complex of the two. A species has no laws of its own, and the binding and unbinding reactions move its amount.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
The label of the species. |
required |
x
|
Annotated[object, closed_open(0, oo)]
|
The initial concentration. |
0.0
|
size
|
int | None
|
The number of members, or |
None
|
space
|
BaseSpace | None
|
The space with one member per site, such as a lattice of classes, or |
None
|
Examples:
>>> from skcomplex.systems.chemistry.kinetics import SpeciesElement
>>> SpeciesElement('albumin', x=600.0).x
600.0
Source code in src/skcomplex/systems/chemistry/kinetics/_nanoparticles.py
49 50 51 52 53 54 55 56 57 | |