Norton-Simon Gompertzian cell kill
The Norton-Simon model, a Gompertzian tumour killed in proportion to its size by a dose schedule.
- Name:
norton_simon - Field:
biology/oncology - Formalism: ordinary differential equations
- References: Padmanabhan, Meskin, and Al Moustafa 2021; Norton and Simon 1977
Factory
@register_model(
field='biology/oncology',
tags=('chemotherapy', 'ode', 'log kill', 'Gompertz', 'dosing'),
references=('Padmanabhan, Meskin, and Al Moustafa 2021', 'Norton and Simon 1977'),
defaults={'until': 150.0, 'dt': 0.5},
)
def norton_simon(
n: float = 100.0,
*,
r: float = 0.0719,
K: float = 1964.0,
a: float = 1.0,
dose: float = 1.0,
period: float = 21.0,
width: float = 1.0,
start: float = 42.0,
) -> System:
"""Return the Norton-Simon model, a Gompertzian tumour killed in proportion to its size by a dose schedule.
The tumour follows `dn/dt = r n log(K / n) - a n U(t)`. A Gompertzian tumour regrows faster the smaller it is, so
a dose that shrinks it is followed by fast regrowth, and the schedule settles on a cycle below the capacity.
Args:
n:
The initial volume.
r:
The rate at which the growth slows.
K:
The carrying capacity.
a:
The kill rate per unit of exposure.
dose:
The exposure during a dose.
period:
The time between the starts of doses.
width:
The duration of a dose.
start:
The time of the first dose.
Returns:
system:
The model, with the volume `tumour.n`.
Examples:
>>> from skcomplex.models.biology.oncology import norton_simon
>>> norton_simon().interactions[1].start
42.0
"""
return System(
elements=[PopulationElement('tumour', n=n)],
interactions=[
GompertzGrowthInteraction('growth', target='tumour', r=r, K=K),
LogKillInteraction('kill', target='tumour', a=a, dose=dose, period=period, width=width, start=start),
],
)
Components
class PopulationElement(CompartmentElement):
"""Population of one species, a compartment whose state `n` holds its size.
Args:
label:
The label of the population.
visual:
How the element is drawn, or `None` for `default_visual_`.
n:
The initial size.
Examples:
>>> from skcomplex.models.biology.common.populations import PopulationElement
>>> PopulationElement('rabbits', n=40).n
40
"""
def __init__(
self,
label: str,
visual: VisualSpec | None = None,
*,
n: Annotated[float, StateSpec(domain=RealSet.closed_open(0, oo))] = 1.0,
) -> None:
super().__init__(label, visual=visual, n=n)
class GompertzGrowthInteraction(GrowthInteraction):
"""Gompertz growth towards a capacity, `dn/dt = r n log(K / n(t - tau))`, without harvest.
Args:
label:
The label of the interaction.
target:
The path of the element or group whose population grows.
r:
The growth rate.
K:
The capacity.
tau:
The delay of the limiting factor, 0 for none.
state:
The name of the state of the target that holds the population.
Examples:
>>> from skcomplex.core.elements import CompartmentElement
>>> from skcomplex.core.system import System
>>> from skcomplex.engine.runtime import Simulation
>>> from skcomplex.models.biology.common.populations import GompertzGrowthInteraction
>>> system = System(
... elements=[CompartmentElement('tumour', n=1.0)],
... interactions=[GompertzGrowthInteraction('growth', target='tumour', r=1.0, K=20.0)],
... )
>>> trajectory = Simulation(system, dt=0.1).check().prepare().run(until=30.0).trajectory_
>>> round(float(trajectory.values('tumour.n')[-1]), 3)
20.0
"""
def __init__(
self,
label: str,
*,
target: Annotated[str, RoleSpec()],
r: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 0.0719,
K: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 1964.0,
tau: Annotated[float, ParameterSpec(domain=RealSet.closed_open(0, oo))] = 0.0,
state: str = 'n',
) -> None:
super().__init__(label, target=target, r=r, K=K, tau=tau, form='gompertz', state=state)
def _get_rate(self, namespace: SimpleNamespace) -> Expression:
"""Return the Gompertz growth, with no harvest.
Args:
namespace:
The namespace of the symbols the rate can use, with the namespace of the target.
Returns:
rate:
The rate of the population.
"""
return self._get_growth(namespace)
class LogKillInteraction(RateInteraction):
"""Cell kill proportional to the tumour and to a drug exposure given in a train of rectangular doses.
The kill is `dn/dt = -a n U(t)`, where the exposure `U` is `dose` for `width` time units every `period`, from
`start` on. Without growth, every dose lowers `log n` by `a dose width`.
Args:
label:
The label of the interaction.
target:
The path of the tumour.
a:
The kill rate per unit of exposure.
dose:
The exposure during a dose.
period:
The time between the starts of doses.
width:
The duration of a dose.
start:
The time of the first dose.
Examples:
>>> from skcomplex.models.biology.oncology import LogKillInteraction
>>> LogKillInteraction('kill', target='tumour', period=21.0).period
21.0
"""
def __init__(
self,
label: str,
*,
target: Annotated[str, RoleSpec()],
a: Annotated[float, ParameterSpec(domain=RealSet.closed_open(0, oo))] = 0.5,
dose: Annotated[float, ParameterSpec(domain=RealSet.closed_open(0, oo))] = 1.0,
period: float = 7.0,
width: float = 1.0,
start: float = 0.0,
) -> None:
super().__init__(label, target=target, state='n')
self.a = a
self.dose = dose
self.period = period
self.width = width
self.start = start
def _get_rate(self, s: SimpleNamespace) -> Expression:
"""Return the rate `-a n U(t)`.
Args:
s:
The namespace of the symbols the laws can use.
Returns:
rate:
The rate of the size of the tumour.
"""
exposure = pulse_train(s.t, self.period, self.width, start=self.start)
return -s.a * s.dose * exposure * s.target.n
Equations
tumour.n: diff(n_tumour(t), t) == -a_kill*dose_kill*n_tumour(t)*where(both(t >= 42.0, mod(t - 42.0, 21.0) < 1.0), 1.0, 0) + r_growth*log(K_growth/n_tumour(t))*n_tumour(t)