Playground
Two small simulations you can run in the browser. One shows self-assembly as it happens; the other is the sampler I used to build a machine-learning dataset. Change the parameters and see what the physics does.
Program the bonds, watch the structure
Two species of DNA-coated gold nanoparticles. Choose which strands hybridise and the same particles build a binary lattice, sort into two crystals, or form a random alloy.
What's being simulated
Overdamped Langevin dynamics in a periodic box (reduced units). Each particle has a gold core and a corona of one DNA strand, either a or a′. Pairs whose strands hybridise feel a Lennard-Jones attraction (cut-off 2.5σ). All other pairs are purely repulsive (WCA), with a core 1.25σ wide to mimic the steric and electrostatic repulsion of non-complementary DNA shells. White lines are hybridised links. "In crystallites" counts particles bonded to at least three partners.
Why the attention lines?
They show what an attention layer does to a particle graph. A query particle scores its neighbours, here by distance plus a bonus for partners it can bind, and a softmax turns the scores into weights. Lower τ focuses attention on a few neighbours. My adhesion model uses the same mechanism to decide which surface sites matter for which polymer beads.
Design-space sampler for surfaces and sequences
How the training data for the adhesion network were made. Kawasaki-exchange Monte Carlo on an Ising lattice swaps unlike neighbours, so the fraction of strongly attracting sites stays exactly fixed while the coupling J/kBT tunes the pattern from random to blocky.
Sweeps: 0 · polymer fA = –
Polymer sequence (1D Ising, same fA)