pbg-reactive-system — MAPK signalling as a Bigraphical Reactive System

MEK phosphorylates ERK in the cytoplasm; phospho-ERK translocates into the nucleus; nuclear phosphatases close the cycle. Modelled as a Milner-style bigraph with seven rewrite rules under Gillespie SSA.

Simulated ticks120
Emitted snapshots121
Wall-clock runtime0.41s
ModeGillespie SSA

Overview

Biology

MEK1 phosphorylates ERK2 on its Thr-X-Tyr motif in the

cytoplasm. Phospho-ERK then imports through nuclear pore

complexes; nuclear phosphatases reset it. MEK is active-site

limited — one ERK at a time.

Bigraph encoding

  • Place graph: Cell ⊃ Cytoplasm ⊃ {Nucleus, ERLumen, MEK, ERK, pERK}.
  • Link graph: one shared edge per MEK·pERK complex.
  • Sorts: Cell, Compartment, MEK, ERK, pERK + kind

tags Cytoplasm, Nucleus, ERLumen.

Rules (Gillespie SSA, propensity = k × |matches|)

  • phosphorylate (k = 2.0): co-located free MEK + free ERK bind via a fresh edge.
  • dissociate (k = 0.5): MEK·pERK → free MEK + free pERK.
  • dephosphorylate (k = 0.4): nuclear pERK → ERK (DUSP-style reset).
  • translocate_erk_in / out (k = 1.0 each): free ERK between cytoplasm and child compartment.
  • translocate_perk_in (k = 2.0): free pERK, cytoplasm → nucleus (active import).
  • translocate_perk_out (k = 0.1): free pERK, nucleus → cytoplasm (slow leak).

The 20-fold in/out asymmetry drives nuclear pERK accumulation

— the signal itself.

Why bigraphs?

Compartment-only models capture *where*; reaction-network models

capture *what's bound*. Bigraphs unify both — a single redex

constrains place AND link in one step (e.g. phosphorylate

requires co-location AND no prior bond). See

references/brs_mapk.md for citations.

Initial bigraph (place + link graph)

initial bigraph

Substrate populations through time

time series

Per-compartment substrate counts under Gillespie SSA, with rule-firing ticks above the curves.

Structural snapshots

snapshots

Cell cartoons at evenly spaced points in the run — MEK in the cytoplasm, ERK / pERK distributed across compartments, MEK·pERK bonds drawn as paired green parallel lines.

Smooth animation

animation

Cubic ease-in-out interpolation between snapshots; the title carries the rule that fires during each transition.

Rule catalog — redex → reactum + state before → after

rule trace

Each row shows one rule from mapk_rules(): left half is the redex / reactum pattern itself (bigraph-viz), right half is a real before / after state from the run.

Initial composite state

Click to expand the JSON tree
{
  "cell": {
    "_type": "Cell",
    "cytoplasm": {
      "_type": "Compartment",
      "kind": {
        "_type": "Cytoplasm"
      },
      "mek": {
        "_type": "MEK"
      },
      "erk0": {
        "_type": "pERK",
        "name": "erk0"
      },
      "erk1": {
        "_type": "ERK",
        "name": "erk1"
      },
      "erk2": {
        "_type": "ERK",
        "name": "erk2"
      },
      "nucleus": {
        "_type": "Compartment",
        "kind": {
          "_type": "Nucleus"
        }
      },
      "er_lumen": {
        "_type": "Compartment",
        "kind": {
          "_type": "ERLumen"
        },
        "erk3": {
          "_type": "ERK",
          "name": "erk3"
        }
      }
    }
  }
}