Saving & sharing — the configuration format, per model
Multi-Component Lattice format
For a lattice config, model.type is "multi_component_lattice" and
model.configuration holds the coordination number, the site types, and the rules. The saved
initial state, when present, lives in snapshot.lattice.
configuration
| Field | Meaning |
|---|---|
coordination_number | 4 (von Neumann) or 8 (Moore) — the neighbour shell. |
types[] | The site-type palette (below). |
rules[] | The transformation rules (below). |
snapshot (optional)
| Field | Meaning |
|---|---|
lattice | A 2D array of type ids whose shape is the lattice size — a pinned initial state. Omit the whole snapshot and the Builder's size slider decides the dimensions, seeded from each type's default_initial_relative_amount. |
Each type
| Field | Meaning |
|---|---|
name, color | Label and hex colour. |
immobile | true ⇒ swap rules cannot displace it. |
masquerade_as | Type id this one imitates for facilitation counting (or −1 = none). |
field | The type's energetic bias, in kBT. |
default_initial_relative_amount | Its relative share when the lattice is seeded randomly. |
persistence, alpha | Display-only trail decay and opacity. |
Each rule
| Field | Meaning |
|---|---|
kind | One of irreversible_flip · reversible_flip · swap · site_site_interaction. |
a, b | The two endpoint type ids (−1 = the any-site wildcard). |
param | The attempt-weight (flips/swaps) or interaction energy (site-site). |
disabled, ignore_energetics | Rule enable flag; bypass all fields & interactions. |
facilitation (optional) | A { "number": n, "site": t } node — the flip needs n neighbours of type t. |
Patchy Discs format
For a patchy config, model.type is "patchy_discs" and
model.configuration describes the patch types, the disc species, and the bond rules. The
disc count and packing fraction are chosen in the Builder (defaulting to
100 discs at φ 0.5) — like the lattice size, they are not stored in the config. Patchy has no
stage snapshot yet, so it omits snapshot.
configuration
| Field | Meaning |
|---|---|
patch_bond_stiffness | The spring constant of every formed patch bond. |
patch_types[] | The bonding patch species (below). |
species[] | The disc species (below). |
rules[] | The bond rules (below). |
Each patch type & species
| Field | Meaning |
|---|---|
patch type: name, color | Label and hex colour of a bonding patch. |
species: name, color | Label and hex colour of a disc species. |
radius, relative_abundance | Disc size and its share of the box population. |
patches[] | Each rim patch as { "angle", "patch_type" } — the angle in degrees, the patch type an index into patch_types. |
Each rule
| Field | Meaning |
|---|---|
name | A label for the bond rule. |
a, b | The two patch-type indices this rule lets bond. |
strength | The bond strength ε, in kBT. |
attempt_rate | Bind/unbind attempts per MD step, per patch. |
disabled | Rule enable flag. |
© Nicholas B. Tito · Stochasm — explore statistical thermodynamics, machine learning, and create digital art.
