Simulating systems: running your system and tuning it live
The third stage. You pressed Initialize in the Builder and the system is now running. Structure is fixed (press Back to Builder to change it), but its behaviour (speeds, temperatures, energies, and how you reach in and disturb it) is yours to tune while it evolves. This chapter starts with the control panel that’s shared by every model, then covers each model’s own live parameters and interaction tools.
The control panel
Once you Initialize, the Builder card becomes the Simulation control panel: the right-hand panel that holds every control for the running system, organised into icon tabs along its bottom edge:
| Tab | Holds |
|---|---|
| Simulation (gauge) | Opens first. The System summary at its top (the lattice models: name, lattice size, coordination number, # of systems; Patchy Discs: the live Box readout — disc count, box side L, packing fraction φ), then the model’s live dynamics: the bulk of this chapter. |
| Compute (chip icon) | The Compute status card (engine ON/OFF, workers, cell lists) and the Observables card, whose switches turn the optional (heavier) observable groups on and off live — see Observables. |
| Types & Rules (definition-list icon) | The model’s structure definitions, read-only: the header’s Back to Builder takes you there to change them (colours stay tunable here: display, not physics). |
| Machine Learning (network) | The learning layer: the cluster graph today (ensembles). |
| Export (tray) | The current system as JSON, ready to copy; see Saving & sharing. |
Hover a tab to see which sections it contains; empty tabs hide themselves. Sections collapse by clicking their amber headers. Under the tab icons sits the live gfx / sim frame-rate readout: gfx is the display's rendering rate, sim is how many simulation rounds actually complete per second, decoupled on purpose, so a heavy ensemble can render at 120 fps while stepping at 10 rounds/s (and a paused simulation honestly reads sim 0). Beside the sim rate, parentheses give the model's raw step throughput across all systems: MC site attempts, MD steps, or Langevin steps per second, e.g. (154M steps/s); and when a heavy run drops below one round per second the readout switches to the honest 1 frame / X s form instead of rounding to zero.
Display settings live elsewhere by design: everything about how the active view is drawn (colours, trails, glow, axes) sits in the floating View Settings window (the eye icon), and its tools (paint brushes, the phase Pan/Zoom) in Interaction & Paint (the brush icon), both covered per view in Watching systems. All floating windows (View Settings, Interaction & Paint, Statistics, the Sampler) share the same behaviour: drag them by the title bar, they stay inside the viewport, they slide out of the panel's way, click one to bring it to the front, and ✕ closes it. Start Fresh puts every window back at its home position.
Multi-Component Lattice
The lattice model’s live controls sit in the Simulation tab, in three groups: overall pace, energetics, and the per-rule dynamics. All are live: change them any moment the system runs.
MC speed
How much simulation happens per rendered frame, measured in site-attempts. The slider is logarithmic with snap points at 1 site/frame (the slowest setting: one attempt per frame, for watching individual events) and 1 sweep/frame (one attempt per lattice site per frame). Above a sweep, morphology evolves in fast-forward. Every new system starts at a sensible midpoint.
Auto-tune
The Auto-tune MC speed checkbox under the slider hands the setting to the engine — in single and ensemble mode alike, whenever the compiled core is driving the workers. The Monte-Carlo stepping runs off the main thread, so the lattice on screen only refreshes when a batch of attempts lands: raising MC speed buys more attempts per second until your machine is saturated, and past that the rate stops climbing while the picture just updates more slowly. Auto-tune finds that turning point — the smallest speed already giving essentially the most attempts per second your machine can manage — and settles there, re-checking as the system evolves. The slider follows along, dimmed, showing what the engine chose; drag it yourself and you take control back. The MC kernel is fast, so a small single lattice can never saturate a frame within the slider’s range and Auto-tune simply pins it to the top; a large lattice or a big ensemble has a real interior optimum. Like MC speed and temperature it is a live setting, off for each new system, and never saved into a config.
Measurement rate (ensemble only)
How often the ensemble's observables are sampled: the slider right below MC speed. Measuring every system's composition, clustering and correlations is an O(sites) scan per replica, and for large lattices with thousands of replicas that scan, not the Monte-Carlo stepping, is what caps the simulation rate. Sampling less often lets the pool step at the raw kernel rate between measurements, so big ensembles evolve dramatically faster; the phase cloud, its history trail, and the cluster-graph learning all refresh at the chosen rate (the cloud advances in clean discrete steps rather than a blur). The slider reads 1 measurement / X frames, from 1 / frame (the fastest, and the default) down to much rarer; it carries two snap points: 1 / frame at that fast end, and a 1 / sweep point that slides into place at the current MC speed. Pair a high MC speed with a low measurement rate to watch a huge ensemble relax quickly.
Temperature
The Temperature slider (0.2–6, snap at T = 1) divides every energy in the Metropolis criterion, fields and interactions alike. Hot systems shrug off energetic penalties; cold ones commit to their energy landscape. T = 1 is the natural reference (the model's standard form), so that's where every new system starts.
Coordination number
The 4 · von Neumann / 8 · Moore selector (System section) chooses whether "neighbours" means the four orthogonal sites or all eight surrounding ones. It applies live (to facilitation counts, interaction energies, swap directions, and the clustering observables), and the phase-space axes re-scale to match. The Ising and FA presets use 4; the default is 8.
Site fields & Rule Controls
The Site H-Field Controls sub-card carries each type's energetic bias (in kBT). Below it, Rule Controls lists every rule read-only (its kind glyph and endpoints) with the live knobs: a parameter slider (0–1 for flips and swaps, −10 to +10 for a Site-Site interaction), an enable switch, and an Ignore Site Fields & Interactions checkbox (which makes the rule's success chance exactly its raw parameter, bypassing all energetics). The section ends with the live interaction matrix: every enabled Site-Site energy on each type pair, plus facilitation gates as f(●)×n chips.
Painting on the lattice
In the Lattice view, click or drag to paint sites directly, running or paused. A bold green square shows the brush and exactly the block of sites it will fill; it snaps to the lattice, moving site-by-site as you glide across. The brush is sized in whole sites (smallest is a single 1×1 site): set it in the Interaction & Paint window, or just scroll your mouse or touchpad over the lattice to grow and shrink it a ring at a time. Painting is physical: the sites you place immediately join the simulation (and the statistics).
Painting in phase space (ensemble)
In an ensemble's phase view the brush paints systems, not sites: dragging re-seeds the replicas under the cursor at the composition your brush position dictates. It works when an axis is a site-type fraction (both axes: a round brush; one axis: a stripe); observables like entropy can't be painted to, so the brush stays away. Scrolling resizes this brush too. The system you have selected in the Sampler is immune: a stationary click selects, a drag paints.
2D Ising
The Ising model's behaviour is three sliders in the Simulation tab plus MC speed. Temperature sets how readily spins flip against their neighbours: cross the critical point and domains coarsen; above it, fluctuation soup. Coupling J is the neighbour interaction strength (how much like-spins want to align), and Field H is a uniform bias toward up or down. MC speed works exactly as for the lattice model. In an ensemble the magnetisation–energy cloud maps out the phase diagram as you move these; painting in phase space injects systems at a chosen magnetisation (the horizontal brush position), their energy following from the fresh random configuration before it relaxes.
Single Particle
The particle moves under Langevin dynamics, tuned live in the Simulation tab. Temperature sets the thermal noise and Friction γ the damping (low = inertial and ballistic, high = an overdamped crawl). The potential selector chooses a single well (a harmonic trap set by its frequency ω) or a double well set by its separation & depth and a left/right bias. Its natural home is the ensemble phase-space view, where thousands of walkers thermalise into a Boltzmann cloud over position × momentum; painting in phase space respawns walkers in a disk at the (q, p) you brush, and they evolve back into the distribution.
Patchy Discs & Polymers
Patchy Discs runs a hybrid of molecular dynamics and bond Monte-Carlo, and the Simulation tab tunes both.
Motion
Discs move by Langevin dynamics (see the science). Temperature (snap at T = 1, the natural reference), MD speed (integration steps per frame), and Friction γ (low = inertial and ballistic, high = an overdamped Brownian crawl) are the live knobs, and reset to their defaults on every new system. Patch bond stiffness, the spring constant of every bond — patch bonds (U = ½k·d² − ε) and polymer backbones alike — is part of the design, so it persists across launches.
Thermodynamic ensemble: NVT or NPT
The Ensemble toggle chooses how the box is handled. NVT (the default) keeps the box a fixed size and thermostats the temperature. NPT instead lets the box breathe: a Martyna–Tobias–Klein barostat expands or compresses it until the internal pressure matches the target Pressure you set, so the discs equilibrate to whatever density that pressure implies (raise the pressure to squeeze them together, lower it to let them spread out). The Barostat coupling slider sets the box’s relaxation time: small for a fast, responsive piston, large for a slow, gentle one. In single mode the box side and packing fraction φ are shown live in the System section at the top of this tab; in ensemble mode each system’s box breathes independently, so L and φ are read per system in the Sampler. NPT adds a packing-fraction observable. Both ensembles work in single-system and ensemble mode; the choice is a live run setting (like temperature), reset to NVT on each launch and not stored in the config.
Rule Controls
Each rule appears read-only (its kind and two endpoints) with live knobs. The strength ε (in kBT) applies to both kinds (the bond well depth for a BOND rule, the Lennard-Jones well depth for an LJ rule), and together with temperature it fixes the equilibrium. Patch–patch bonds add an attempt rate (bind/unbind attempts per MD step, per patch), which sets how fast bonding equilibrates without shifting where it settles; disc–disc attractions have no attempt rate (the MD handles them directly). An enable switch removes a rule’s interaction mid-run, and two live matrices (one for patch bonds, one for disc–disc ε) round it out.
Auto-tune
Under the MD speed slider, Auto-tune MD speed hands the setting to the engine. Steps run off the main thread, so the box on screen only refreshes when a batch of them lands: raising MD speed buys more steps per second right up until your machine is saturated, and past that point the step rate stops growing while the picture just updates more slowly. Auto-tune finds that turning point — the smallest speed already giving essentially the most steps per second your machine can manage — and settles there, re-checking as it goes (a box gets more expensive as it clusters, so the answer drifts). Past that point more speed buys almost no extra computation and only slows the view, so it stops there. The slider follows along, dimmed, showing what the engine chose; drag it yourself and you take control back. It is a live setting, off for each new system, and never saved into a config. On this machine a 1,000-disc Binary Mixture box went from about 360 to 3,200 steps per second (roughly eight times faster).
Measurement rate (ensemble only)
The slider below Auto-tune sets how often the ensemble’s observables are sampled. Scanning every system’s energy, bonds, contacts and clustering each round is real work on top of the dynamics, and for large ensembles that scan — not the MD stepping — can be what caps the rate. Sampling less often lets the pool step at the raw kernel rate between measurements, so big ensembles evolve much faster; the phase cloud, its history trail, and the cluster-graph learning all refresh at the chosen rate. It reads 1 measurement / X frames, from 1 / frame (the fastest, and the default) down to much rarer. Unlike the lattice model there is no “sweep” landmark in continuous MD, so it carries just the single 1 / frame snap. Like MD speed and temperature it is a live setting, reset to every frame on each new system and never saved into a config.
Chain Controls (polymers only)
When the design holds a bead-spring chain, a Chain Controls card appears with one row per bead type that chains are made of. Its angular stiffness κ resists bending at a bead of that type: 0 is a freely-jointed chain, whose backbone turns wherever it likes; raise it and the chain stiffens into a worm and eventually a rod, with a persistence length of roughly 2κ/T bonds — so temperature works against it, and the two are worth playing against each other. Like the rule strengths it takes effect immediately on the running system: nothing re-seeds, the chains you are watching simply become stiffer or floppier. And like them it is part of the design, so it travels with an exported config. The backbone bond is a spring of the Patch bond stiffness above — chains and patch bonds share the one setting.
Spawning & deleting
The Interaction & Paint window (the brush icon) has two tools, both acting on a single click (drags do nothing, so you cannot mass-spawn or mow discs by sweeping). Spawn (the default) inserts exactly one molecule of the chosen kind per click — the picker lists the design’s molecules — with thermal velocities, leaving every existing bond in place; drop it onto a crowded spot and it is nudged clear of any overlap first, so it settles in rather than exploding out. For a single-disc molecule that is one disc; for a bead-spring chain it is a whole chain, its length drawn the same way the initial system draws it. A chain is placed all or nothing: it threads its way past the discs and bonds already there, and if it cannot find a route it declines rather than forcing itself through — which would leave a crossing the run could never undo. In a tightly packed box there is genuinely nowhere to insert a long chain, so clicks there do nothing; click somewhere looser, or lower the packing fraction. Delete removes the disc under the click: hover and the doomed disc is ringed in red, click and it leaves, releasing any bonds it held — and if it sat mid-chain, the chain breaks there rather than closing the gap. The tip line at the top of the viewport tells you which action the current tool takes.
