Morpheus¶
engine: morpheus runs Morpheus 2.4.1 models, MorpheusML files combining cellular
Potts cells, ODEs and PDEs, as they are (tier T0). ABM-IR models are translated to MorpheusML first (tier T1),
with a fidelity report, and MorpheusML models import to ABM-IR.
Running Morpheus¶
The engine tries, in order:
native:
MORPHEUS_BIN, amorpheusexecutable.docker: the image built from
containers/morpheus/Dockerfile, which pins a Debian base image by digest and verifies Morpheus’s static Linux binary by its SHA-256:docker build --platform linux/amd64 -t abmfact/morpheus:2.4.1 \ "https://github.com/a7med7emedan/ABMfact.git#v0.2.0:containers/morpheus"
Docker fetches the folder from GitHub at the release tag, so no checkout is needed. In a checkout,
containers/morpheusin place of the URL builds the same image.
Morpheus publishes its headless simulator as a static x86-64 binary and no arm64 build, so the image is amd64. On Apple silicon Docker runs it under emulation; on Intel and most cloud machines it runs natively. The official runner image on Morpheus’s registry dates from 2022 and predates 2.4.1, so it is not used.
Native runs (tier T0)¶
For each run the engine copies the model into a run folder, sets any element a parameter names, and adds two
loggers to its Analysis section, which are Morpheus’s own output components and change no dynamics:
Logger |
Writes |
|---|---|
cells |
each cell’s id, type, centre and volume, at time 0 and every |
fields |
every global field, one file per save |
Morpheus then runs with the seed, one thread, gnuplot off and the run’s output folder on its command line:
abmfact run-model path/to/model.xml --engine morpheus --out results/run --params '{"Time/StopTime": 1000}'
A parameter Time/StopTime sets the stop time; any other parameter is an element path whose value
attribute is set, such as Global/Constant[@symbol='d'].
Units¶
Morpheus models carry their own units: lattice nodes, and time in whatever unit the model chose. The common
output schema uses micron and minutes, so the engine takes node_length (micron per node) and time_minutes
(minutes per model time unit). Both are 1 by default for native models, and every run record then says the
outputs are in the model’s own units. Translated models use 2 micron per node and 1 minute per step.
Translation (tier T1)¶
ABM-IR describes centre-based cells in micron and minutes; Morpheus moves lattice nodes between cells, one
Monte Carlo step per time unit. Every quantity is converted with two stated scales, node_length (2 micron per
node by default for exports) and time_minutes (1 minute per step). Morpheus can say almost all of ABM-IR in
its own language, so an export is one MorpheusML file with no extra code. Each cell keeps its state (live,
apoptotic, necrotic), its damage and its behaviours as cell properties, and the cell logger records the state.
Models are translated once per model and translator version, and cached.
ABM-IR |
Exported as |
Fidelity |
|---|---|---|
space |
a square lattice of |
exact |
volume |
|
approximated |
adhesion and affinities |
contact energies |
approximated |
substrates |
a global |
exact |
secretion and uptake |
by the cells covering each node. ABM-IR dilutes a cell’s rates over its voxel, which is |
approximated |
live cycle |
|
exact |
apoptosis, necrosis |
an |
approximated |
rules |
Hill-type rules combined as in PhysiCell 1.14.2, as one Morpheus expression per behaviour; signals from |
exact |
pressure signal |
the fraction of the cell’s boundary touching other cells |
approximated |
motility |
|
approximated |
chemotaxis |
|
approximated |
fast diffusion |
above 200 nodes² per step the coefficient is capped, as Morpheus substeps diffusion to stay stable. The field’s secretion, uptake and decay are slowed by the same factor, which keeps its steady profile (the decay length √(D/k)) and slows only how fast it settles; the note gives the factor. The reaction step stays below one over the fastest rate |
approximated |
attack and damage |
each touching live effector adds damage at its damage rate times the steady share of time an effector spends attacking, rate x duration / (1 + rate x duration) |
approximated |
initial placements |
|
approximated |
timed boundary values (a drug pulse) |
two global events that set and reset the edge value; outside the pulse the edges hold 0, so a no-flux edge also drains the field |
approximated |
phagocytosis, fusion, transformations, intracellular models, CSV positions |
not exported |
dropped |
Importing a MorpheusML model reads the lattice, cell types, target areas, contact energies (inverting the
mapping above), fields with their diffusion, decay and boundary values, and circle and rectangle
initialisers, evaluating arithmetic on size.x, size.y and global constants. Rates and speeds are read where
the model gives them as plain numbers, as an export does; any other expression, and every element without an
ABM-IR reading, is listed as dropped.
abmfact run-model examples/ir/immune.yaml --engine morpheus --out results/immune --option node_length=2
abmfact recommend examples/ir/immune.yaml --details
Knobs¶
Refining the time step or the lattice of a cellular Potts model needs other parameters rescaled with it, so the
engine refuses dt_scale and dx_scale with the reason. Morpheus has one random stream set by the seed, so the
rng_streams check remaps the seed. With one thread Morpheus is deterministic for a seed, which a test checks.
Tests¶
The unit tests need neither Morpheus nor Docker. The tests marked morpheus run two example models copied
unchanged from Morpheus 2.4.1 (tests/fixtures/morpheus, BSD-3-Clause): cell sorting, checked for determinism,
and autocrine chemotaxis, checked for its field. They also run the translated immune attack problem and check
that tumour cells die. CI runs them in the image.