DRT_Cell_Simulator

Receptor cells on graph topology — companion to the trio paper.

Humble disclaimer. Amateur engineering project. We are not HPC professionals and make no competitive claims. Errors are likely. The simulator is a visualisation, not a quantitative biological model — see What is not in the paper.

GPLv3.

Contents


What it is

A browser demo where a population of small cells sit on a graph (not a regular grid), each cell holds a small piece of internal state, and at every tick each cell updates its state from the states of its immediate neighbours. There is no global controller. The whole-screen picture is whatever the local rules add up to over many ticks.

A second layer wraps the cellular substrate in a piece of human endocrine biology — the hypothalamic–pituitary–adrenal (HPA) stress-response loop — and uses Bach's BWV 847 fugue as the timing source that drives the simulation. So the demo simultaneously shows three things on one screen: cellular automata on a non-grid graph, a toy reconstruction of a biological feedback loop, and music as the clock that drives both.

The repository ships a second, related visualisation in the same browser tab: digital_twin.html — the bio digital twin prototype with an infinite level-of-detail (LOD) zoom-out camera. That file is described in its own section below.

Live demo →


Why it matters — bio digital twins

A bio digital twin is a computational model of a specific biological system — a heart chamber, a hepatic lobule, a section of cortex — wired tightly enough that it can predict the system's behaviour under a stimulus. Most realistic biological tissues are not organised as regular grids; they are graphs, with each cell coupled to a small number of irregular neighbours determined by tissue topology rather than by a Cartesian lattice.

The cell simulator addresses one specific slice of the bio digital twin question: what does cellular dynamics look like when the underlying topology is a graph rather than a grid, and the per-cell rule is a small local function over the neighbours' states? That is the structural shape that hepatocytes in a hepatic lobule, neurons in a cortical microcolumn, and cardiomyocytes in a ventricular wall all share. Building a useful bio digital twin requires being able to compute on that shape.

The HPA-axis layer adds one specific concrete use: a small endocrine feedback loop with three named glands (hypothalamus, pituitary, adrenal) and a central receptor that integrates their outputs. The demo is not a quantitative endocrine model — it is a visual playground for the shape "small graph of receptors with a feedback loop driven by a periodic signal." The Bach fugue plays the role of the periodic signal because BWV 847 is mathematically clean (well-defined entries, inversions, augmentations) and because hearing it makes the cellular dynamics easier to follow.

The framing for the trio (generator + cell simulator + scanner) is the trio white paper. This paper drills into the cell simulator specifically.


How it works — graph cells under a tick

The substrate is a graph G = (V, E) where V is the set of cells and E is the local-coupling edge set. Each cell i ∈ V holds:

At every tick the engine applies the local rule synchronously across all cells:

for each cell i:
    s_i_new = f_i( { s_j : j in N(i) } )
update all s_i = s_i_new at the tick boundary

The synchronous update is structurally important: every cell sees the previous tick's neighbour states, never a partially-updated mix. That is the same discipline that synchronous logic uses on FPGAs and that the BACK_EDGE primitive uses in the companion DagDB engine — the tick boundary is a hard barrier between "the values everyone agrees were true last tick" and "the values being computed for this tick."

The HPA layer adds four named cells on top of the substrate: a hypothalamus cell (CRH at 150 Hz), a pituitary cell (ACTH at 250 Hz), an adrenal cell (cortisol at 350 Hz), and a central receptor cell that integrates their outputs. Each named cell has its own glow colour and its own audio frequency contribution. Pressing the gland buttons in the live demo causes that gland to "secrete" — its output rises, and the receptor's integrated signal rises in response.

The Bach BWV 847 audio drives the global tick rate. As notes fire in the score, the corresponding cellular activity peaks: the demo's audio and visual layers run on the same time index. This is for legibility, not for biological accuracy — biological circadian and ultradian rhythms are not BWV 847.


Reading the output — HUD and what to watch

The HUD shows three things continuously:

On the screen, three things are visible:

Press a gland button to inject a transient. Watch the receptor integrate. Watch the substrate ripple as activity propagates out. Watch the HUD numbers settle as the system returns to its baseline.


The bio digital twin prototype — digital_twin.html

The same repository ships a second visualisation file, digital_twin.html, intended as a prototype of what a tissue-scale bio digital twin viewer might look like. It uses the same HPA-axis layer but adds a Socratic infinite-LOD zoom-out camera over a much larger cellular substrate.

Two things distinguish it from the main index.html demo:

Open the prototype directly at digital_twin.html. The same anti-claim discipline applies: this is a prototype of a viewer, not a validated bio digital twin. The biology layer is illustrative; the LOD camera is the engineering point.


What is not in the paper

The honest list of what this paper deliberately does not claim:


References and the trio

This repository is one of three that snap together into one workflow:

  1. drt-generator — produces sparse projection matrices from a clock tick.
  2. drt-cell-simulator (this repo) — receives the projections as cellular automata on graph topology. Each cell is a receptor with local rules over its neighbours' edges.
  3. drt-scanner — runs the transpose pass for inversion-fidelity verification.

End to end is generator → cell simulator → scanner — forward pass plus backward pass through the same matrices. Every step is sparse matrix-vector multiplication on a graph topology.

Trio framing in detail: Generator, Cell Simulator, Scanner — a sparse matrix-vector trio for bio digital twins (markdown source).

Distributed Reconstruction work — v0.1 in preparation by N. Matevosyan and A. Petrosyan.

Visualization co-authored with Claude (Anthropic).

Humble disclaimer. Amateur engineering project. We are not HPC professionals and make no competitive claims. Numbers speak; ego doesn't. Errors likely.

GPLv3. See LICENSE. · Markdown source.