Setting up — models, modes, the Launcher, and the Builder
The four models
Multi-Component Lattice
The most versatile model in the family: a 2D grid of up to ten site types, evolving under the four rule kinds (below) with per-type fields, pairwise interaction energies, facilitation constraints, masquerading, and immobility. Everything in this guide's Building systems chapters applies to this model. Ships with a growing preset library — from the Fredrickson–Andersen kinetically-constrained model to colloidal and artistic palettes.
2D Ising
The canonical spin-½ ferromagnet on a square lattice with Metropolis dynamics. Two states per site, one temperature slider, and all the classic phenomenology: domain coarsening below the critical temperature, fluctuation soup above it. In ensemble mode the magnetisation–energy cloud maps out the phase diagram live.
Single Particle in 1D Potential
A thermodynamic oscillator: one particle in a one-dimensional potential, integrated with Langevin dynamics. Its natural habitat is the ensemble phase-space view — thousands of walkers thermalising into a Boltzmann cloud over position × momentum.
Patchy Discs
The off-lattice member of the family: soft discs in a periodic box, each carrying coloured patches on its rim. Discs move by Langevin molecular dynamics; patches bind and unbind by Monte-Carlo moves under rules you define — the ingredients of patchy-colloid self-assembly: chains, rings, networks, micelle-like clusters. Design the species and their patch layout yourself, or start from a shipped preset — Polymer Chains, Honeycomb Gel, and Flower Micelles each self-assemble live. The full builder has its own chapter.
Single system vs. Ensemble
Single system shows one simulation up close — the mode for painting, tuning rules interactively, and watching morphology emerge site by site.
Ensemble launches a population of independent replicas of the same system — from 1,000 to 100,000 of them — and displays each one as a point in phase space: a plane whose axes are two measured observables you choose (say, composition vs. clustering). Statistical mechanics becomes something you can see: the cloud drifts, splits, condenses, and traces out the model's phase behaviour in real time. Ensembles run on the compiled C core across your CPU cores.
Every model supports both modes — for Patchy Discs, each ensemble member is an independent box of the designed discs (ensembles like small boxes: a few dozen discs each), plotted by observables such as bond fraction, energy per disc, or largest-cluster fraction.
The Launcher
Stochasm runs in three stages: the Launcher chooses what to simulate, the Builder designs it, and pressing Initialize hands off to the running Simulation — the tabbed control panel covered in Simulating systems and Watching systems. This chapter is the first two stages. The Launcher comes first, and Next slides you into the Builder; its Next bar stays tucked below the card until you have defined a system — a preset picked, a valid JSON pasted, or a Blank slate — then slides up into view. It is the card you see at start (and any time after Start Fresh):

Model selection & mode
The model dropdown and the Single system / Ensemble toggle. Everything below adapts to this choice.
Setup — where the system comes from
- Preset (default) — pick a ready-made system from the library. The stage previews it instantly. Presets seed randomly at the lattice size you choose in the Builder; your Builder edits to its types and rules carry into the run, and returning to the Launcher re-derives the pristine preset at the next Next. For the classic models — Ising, Fredrickson–Andersen, and Limited Mobility — the literature reference(s) that define the model appear beneath the picker, with DOI links to the papers.
- Import — paste a Stochasm JSON configuration (see Saving & sharing). The system launches with exactly its settings. If the JSON carries a stored lattice snapshot, a checkbox in the Builder’s System section (on by default) pins that exact initial state — or uncheck it to re-seed randomly. Reset Simulation mirrors the choice: a pinned run resets back to the stored snapshot, an unpinned one re-seeds randomly (the snapshot stays in the Builder for re-checking).
- Blank — start from a clean slate: choose how many generic site types you want and build everything yourself.
For Patchy Discs the Setup choice reads Preset / Import / Blank — Preset is the default here too, and Blank means you build the system yourself in the Builder. Press Next and the launcher card slides away, the live preview glides to the left, and the Builder card arrives from the right.
The Builder
The Builder is where the system takes shape — every structural decision lives here, whatever the source (an imported JSON is just as editable as a blank design). Top to bottom:
System
The seed knobs. For the lattice models: the square lattice size slider (16–256 per side, snap points at the powers of two) and, in ensemble mode, the # of Systems slider (1k–100k). For Patchy Discs: how many discs (20–5,000, log-scaled with snaps at 100/500/1000/2500) and the packing fraction φ (the box size follows from both). A Blank lattice adds the site-type count slider. An import whose JSON stores an initial lattice adds the use-snapshot checkbox right below the size slider — on by default, it locks the size to the snapshot’s own dimensions and makes Reset Simulation return to the stored state; uncheck it to seed randomly at any size (Reset Simulation then reseeds randomly too — the snapshot stays here for re-checking).
Types & Rules
The full editors. For the lattice model: every site type’s name, colour, initial occupancy, immobility and masquerade, plus the complete Rules editor with its interaction matrix (structure-only here: rule kinds and facilitation — each rule’s parameter is tuned in Simulation once launched). For Patchy Discs: the Particle design and bond-rule editors. Every edit re-seeds the stage preview live, so you always see what will launch. (One exception: while an imported snapshot is pinned, occupancy edits don’t regenerate the pinned preview — a green note at the top of the Site Types list reminds you the new values apply whenever the lattice is next seeded randomly, e.g. after unchecking the snapshot checkbox in System.)
Compute
The last Builder section: the Compiled C Core switch (on by default), for ensembles the # of CPU Workers slider, and for Patchy Discs the Cell Lists switch (on by default — an O(n) neighbour search that is bit-identical to the brute-force pair loop; turn it off only for A/B comparison).
Press Initialize and the Builder card melts into the control panel as the previewed system becomes the running one. Structure is fixed while a simulation runs — the Simulation stage shows the definition read-only, and the header’s Back to Builder button brings you back here any time to refine and re-launch (the running system is discarded; your design persists). In the Builder, a Back to setup pill in the top-left of the stage returns you to the Launcher exactly as you left it — source, pasted JSON and preset pick all kept. Pressing Next then re-derives the design from that source (the preset file or the pasted JSON), so tweaks from an earlier run never leak into a fresh setup.
