Skip to content

Norton-Simon Gompertzian cell kill

The Norton-Simon system of a Gompertzian tumour under a dose schedule.

  • Class: NortonSimonSystem
  • Import: from skcomplex.systems.biology.oncology import NortonSimonSystem
  • Field: biology/oncology
  • Topics: chemotherapy, ode, log kill, Gompertz, dosing
  • References:
    • Padmanabhan, Meskin, and Al Moustafa 2021
    • Norton and Simon 1977

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.biology.oncology import NortonSimonSystem

trajectory = NortonSimonSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
n 100.0
r 0.0719
K 1964.0
a 1.0
dose 1.0
period 21.0
width 1.0
start 42.0
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class NortonSimonSystem(BaseSystem):
    """The Norton-Simon system of a Gompertzian tumour under a dose schedule.

    The schedule kills the tumour in proportion to its size.

    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. The
    system has the volume `tumour.x`.

    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.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.biology.oncology import NortonSimonSystem
        >>> NortonSimonSystem().prepare().system_.interactions[1].start
        42.0
    """

    field = 'biology/oncology'
    topics = ('chemotherapy', 'ode', 'log kill', 'Gompertz', 'dosing')
    references = ('Padmanabhan, Meskin, and Al Moustafa 2021', 'Norton and Simon 1977')
    until = 150.0
    dt = 0.5

    def __init__(
        self,
        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,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label, solver=solver, backend=backend)
        self.n = n
        self.r = r
        self.K = K
        self.a = a
        self.dose = dose
        self.period = period
        self.width = width
        self.start = start

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of the Norton-Simon system.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        self.system_ = System(
            self.label,
            elements=[PopulationElement('tumour', x=self.n)],
            interactions=[
                GompertzGrowthInteraction('growth', target='tumour', r=self.r, K=self.K),
                LogKillInteraction(
                    'kill',
                    target='tumour',
                    a=self.a,
                    dose=self.dose,
                    period=self.period,
                    width=self.width,
                    start=self.start,
                ),
            ],
        )

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

  • GompertzGrowthInteraction, from Interaction
  • LogKillInteraction, from Interaction
class PopulationElement(CompartmentElement):
    """Population of one species, a compartment whose state `x` holds its size.

    Args:
        label:
            The label of the population.

        x:
            The initial size.

    Examples:
        >>> from skcomplex.systems.biology.common.populations import PopulationElement
        >>> PopulationElement('rabbits', x=40).x
        40
    """

    def __init__(
        self,
        label: str,
        *,
        x: Annotated[float, RealSet.closed_open(0, oo)] = 1.0,
    ) -> None:
        super().__init__(label, x=x)

class GompertzGrowthInteraction(GrowthInteraction):
    """Gompertz growth towards a capacity, without harvest.

    The growth is `dx/dt = r x log(K / x(t - tau))`.

    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.systems.biology.common.kinetics import CompartmentElement
        >>> from skcomplex.core.systems import System
        >>> from skcomplex.systems.biology.oncology import GompertzGrowthInteraction
        >>> system = System(
        ...     elements=[CompartmentElement('tumour', x=1.0)],
        ...     interactions=[GompertzGrowthInteraction('growth', target='tumour', r=1.0, K=20.0)],
        ... )
        >>> trajectory = system.prepare().simulate(until=30.0, dt=0.1)
        >>> round(float(trajectory.get_values('tumour.x')[-1]), 3)
        20.0
    """

    def __init__(
        self,
        label: str,
        *,
        target: Role,
        r: Annotated[float, RealSet.open(0, oo)] = 0.0719,
        K: Annotated[float, RealSet.open(0, oo)] = 1964.0,
        tau: Annotated[float, RealSet.closed_open(0, oo)] = 0.0,
        state: str = 'x',
    ) -> 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(Interaction):
    """Cell kill proportional to the tumour and to a drug exposure.

    The exposure is given in a train of rectangular doses.

    The kill is `dx/dt = -a x U(t)`, where the exposure `U` is `dose` for `width` time units every `period`, from
    `start` on. Without growth, every dose lowers `log x` 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.systems.biology.oncology import LogKillInteraction
        >>> LogKillInteraction('kill', target='tumour', period=21.0).period
        21.0
    """

    law_classes = (RateLaw,)

    def __init__(
        self,
        label: str,
        *,
        target: Role,
        a: Annotated[float, RealSet.closed_open(0, oo)] = 0.5,
        dose: Annotated[float, RealSet.closed_open(0, oo)] = 1.0,
        period: float = 7.0,
        width: float = 1.0,
        start: float = 0.0,
    ) -> None:
        super().__init__(label)
        self.target = target
        self.a = a
        self.dose = dose
        self.period = period
        self.width = width
        self.start = start

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the rate of the `x` of the target.

        Args:
            context:
                The namespace of the bound elements, the time `t`, and the parameters.
        """
        super()._prepare(context)
        self.laws_ = [RateLaw(context.target.x, self._get_rate(context))]

    def _get_rate(self, s: SimpleNamespace) -> Expression:
        """Return the rate `-a x 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.x

Equations

The equations are those that symbolic returns for the system with its default parameters.

tumour.x: diff(x_tumour(t), t) == -a_kill*dose_kill*where(both(t >= 42.0, mod(t - 42.0, 21.0) < 1.0), 1.0, 0)*x_tumour(t) + r_growth*log(K_growth/x_tumour(t))*x_tumour(t)