The notion of programmable matter is often attributed to computer scientists Tommaso Toffoli and Norman Margolus, who speculated in 1991 about a collection of tiny computational objects that could sense their neighbours and arrange themselves according to fixed rules1. That idea, however, based in concepts from macroscopic robotics, was closely aligned to a long history of work at the molecular scale on self-organization and assembly, which can be traced from the observation of spontaneous molecular ordering in liquid crystals in the late nineteenth century through to the informational picture of DNA and protein structure in the 1950s and 1960s. The same chemical principles as those found in molecular biology, typically reliant on selective recognition and structural annealing via relatively weak bonds, informed the science of supramolecular chemistry. Jean-Marie Lehn, who pioneered that field, argued that the bottom-up assembly of molecules into complex structures might lead to a technology of “informed matter”2 — nothing less than programmable matter realized at the molecular scale.

This confluence of ideas from reconfigurable robotics and supramolecular chemistry has already been shown to be capable of furnishing mesoscale structures made by the recognition and adhesion of engineered objects3,4, as well as complex nanoscale architectures based on the programmable assembly of strands of DNA5,6. One key question is how to bond the component parts. Hydrogen bonds are an ideal ‘weak glue’ at the molecular scale but not beyond. Interfacial energy — hydrophobicity, for example — can work both at the molecular scale (for multicomponent protein assemblies say) and the microscale3,4. Another possibility is to use magnetism as the attractive force, and various macroscale arrays have been constructed this way7,8. One advantage here is that the interaction can be switched on and off using electromagnets.

Niu et al. have now achieved some alignment between these two strategies for programmed self-assembly based on molecules and on engineered, magnetically actuated components9. They have created a wide variety of assemblies from disk units 9 mm across, which have embedded within them 2 × 2 arrays of magnets. With different arrangements of the orientations of the magnets, the researchers can set up different selectivities for the attractive forces between these units, reminiscent of the geometrically matched pairing between DNA nucleotide bases. This is not all-or-nothing coupling based on complementarity of the magnetic patterns, but rather creates a range of binding energies for the various pairings that depends on the balance of attractive and repulsive interactions between the magnets in each array. In effect, Niu et al. create a kind of pseudo-chemistry for their disc-shaped components.

To instigate assembly, they bring the units into contact by placing them on a vibrating table; the amplitude of the shaking then plays the role of temperature in a molecular system. In this way, the units can assemble selectively into polymeric stacks with sequences that can be programmed into the components. By adding three- and fourfold branching junctions into the mix, they can produce branched polymers — and in principle, open networks in two and three dimensions.

The researchers extended the molecular analogy further by assembling chains of discs joined via tapes — for example, to create complementary double strands and hairpin loops like those of DNA and RNA. Many of the strategies already developed for information storage and origami-style folding of DNA can be directly imported into these systems, and already Niu et al. have made preformed two-dimensional (2D) networks of the magnetic units that will fold on shaking into 3D shapes such as cubes and bowls.

The technology should be fully scalable at least down to the nanoscale, where magnetic binding energies would start to become comparable to kT. The researchers imagine using micro- and nanolithography to make strips and sheets of units that could then be magnetically programmed (like writing domains into magnetic recording media) to assemble into particular structures or even magnetically actuated machines.