### Reciprocal interactions

We take into account *m* desired constructions with every being a random permutation of *M* elements or tiles. For simplicity, allow us to prepare the primary *q* constructions in a queue that we label as *S*^{(1)} to *S*^{(q)}, which defines the shifting sequence. The purpose is to outline an interplay matrix that allows the self-assembly of every goal construction and the belief of the shifting sequence. We assume that every pair of neighbouring tiles within the desired constructions has a particular interplay and outline these reciprocal interactions imposed by constructions as

$${U}_{Asquare B}^{{{{rm{r}}}}}=left{start{array}{ll}-varepsilon ,quad &{{{rm{if}}}}Asquare Bin {{{{mathcal{I}}}}}^{{{{rm{r}}}}}, 0,quad &{{{rm{in any other case}}}},finish{array}proper.$$

(1)

in models of the thermal vitality *okay*_{B}*T*, the place â–¡â€‰âˆˆâ€‰{,â€‰/} represents a particular reciprocal interplay (Fig. 1b). Furthermore, ({{{{mathcal{I}}}}}^{{{{rm{r}}}}}equiv {I}^{{{{rm{r}}}}}({S}^{(1)})cup {I}^{{{{rm{r}}}}}({S}^{(2)})cup cdots cup {I}^{{{{rm{r}}}}}({S}^{(m)})) is the set of all the particular interactions between the tiles imposed by *m* desired constructions, the place *I*^{r}(*S*^{(â„“)}) is the set of all the particular interactions within the construction *â„“*, specifically,

$${I}^{{{{rm{r}}}}}({S}^{(ell )})=mathop{bigcup}limits_{start{array}{c}leftlangle alpha ,beta rightrangle finish{array}},{S}_{alpha }^{(ell )}sq. {S}_{beta }^{(ell )},$$

(2)

the place *Î±* and *Î²* are the representatives of lattice coordinates (*i*,â€‰*j*) operating over the closest neighbours, and â–¡â€‰âˆˆâ€‰{,â€‰/}. To explain the configuration house of the system, we are able to outline a Potts configuration variable *Ïƒ*_{Î±}â€‰=â€‰0,â€‰1,â€‰2,â€¦*M*, with *Ïƒ*_{Î±}â€‰=â€‰0 representing an empty slot and the others describing the corresponding tile species. Utilizing the interplay potential and configuration variables, one can outline a (classical generalized) Hamiltonian for the system as

$${{{mathcal{H}}}}=mathop{sum}limits_{leftlangle alpha ,beta rightrangle }{U}_{{sigma }_{alpha }sq. {sigma }_{beta }}^{{{{rm{r}}}}}-mu ,n,$$

(3)

the place *Î¼* is the chemical potential of the tiles (assumed to be the identical for all of the species), (n={sum }_{alpha }left(1-{delta }_{0,{sigma }_{alpha }}proper)) representing the full variety of tiles in each given configuration and â–¡â€‰âˆˆâ€‰{,â€‰/}. As regular, the chemical potential controls the typical density of tiles within the system.

The reciprocal interplay *U* asserts that two elements particularly work together if the interplay is favoured a minimum of by one of many constructions^{6,7}. This easy interplay rule makes multifarious self-assembly mannequin an associative reminiscence able to retrieving saved constructions ranging from an preliminary seed or any related set off. With an applicable tuning of the mannequin parameters (vitality scale *Îµ*, variety of elements *M*, variety of memorized patterns *m* and chemical potential *Î¼*), one can obtain an equilibrium self-assembly machine paying homage to the Hopfield neural community^{6,33,40}.

### Non-reciprocal interactions

The addition of a non-reciprocal flavour to particular interactions turns the equilibrium multifarious self-assembly mannequin into the non-equilibrium multifarious self-organization mannequin with a brand new shape-shifting property. Impressed by latest numerous bodily fashions with non-reciprocal interactions^{18,19,20,21,22,23,24,25,26}, we introduce non-reciprocal interactions between the tiles as follows. We outline

$${R}_{Ablacksquare{B}}^{{{{rm{nr}}}}}=left{start{array}{ll}lambda ,quad &{{{rm{if}}}},A,blacksquare{B}in {{{{mathcal{I}}}}}^{{{{rm{nr}}}}}, 0,quad &{{{rm{in any other case}}}},finish{array}proper.$$

(4)

the place â– â€‰âˆˆâ€‰{â†˜, â†–, â†—, â†™} represents all of the attainable particular non-reciprocal interactions (Fig. 1c). The set of all such interactions between the tiles wanted to appreciate the shifting sequence {*S*^{(1)}â€‰â†’â€‰*S*^{(2)}, *S*^{(2)}â€‰â†’â€‰*S*^{(3)}â€¦*S*^{(qâˆ’1)}â€‰â†’â€‰*S*^{(q)}} is denoted by ({{{{mathcal{I}}}}}^{{{{rm{nr}}}}}equiv {I}^{{{{rm{nr}}}}}({S}^{(1)}to {S}^{(2)})cup {I}^{{{{rm{nr}}}}}({S}^{(2)}to {S}^{(3)})cup cdots cup {I}^{{{{rm{nr}}}}}({S}^{(q-1)}to {S}^{(q)})). Right here *I*^{nr}(*S*^{(â„“)}â€‰â†’â€‰*S*^{(â„“+1)}) is the set of particular non-reciprocal interactions wanted for the belief of the *S*^{(â„“)}â€‰â†’â€‰*S*^{(â„“+1)} transition, which is outlined as

$$start{array}{l}{I}^{{{{rm{nr}}}}}({S}^{(ell )}to {S}^{(ell +1)})=mathop{bigcup}limits_{start{array}{c}i,jend{array}},left{,{S}_{i-1,j}^{(ell )}swarrow {S}_{i,j}^{(ell +1)},proper. left.{S}_{i,j}^{(ell +1)}nearrow {S}_{i+1,j}^{(ell )},,{S}_{i,j}^{(ell +1)}searrow {S}_{i,j-1}^{(ell )},,{S}_{i,j+1}^{(ell )}nwarrow {S}_{i,j}^{(ell +1)},proper}.finish{array}$$

(5)

The uneven interplay matrix *R*^{nr} comprises these particular non-reciprocal interactions which can be favoured by a minimum of one of many transitions.

### Monte Carlo simulation

The introduction of non-reciprocal interactions into the multifarious self-assembly mannequin renders the issue to have inherent non-equilibriumness. As such, a devoted remedy of the stochastic dynamics would require using an applicable grasp equation formalism. To assist spotlight the reference to the equilibrium multifarious self-assembly mannequin, nevertheless, we have now chosen to make use of a generalized Monte Carlo scheme wherein we have now included the non-reciprocal interactions within the spirit of kinetic Monte Carlo algorithms. Our particular implementation could be justified with the belief of separation of timescales between the method of self-assembly and shape-shifting transitions.

Within the lattice realization of our mannequin, the entire system is outlined as a sq. lattice of dimension (2sqrt{M}instances 2sqrt{M}), wherein the specified constructions within the type of two-dimensional sq. lattices of dimension (sqrt{M}instances sqrt{M}) could be embedded. We make use of the totally heterogeneous and zero-sparsity situation, that’s, every element ought to seem solely as soon as in every construction^{7}, and thus, every construction is a random permutation of the tiles within the sq. lattice. We observe a generalized model of the grand canonical Monte Carlo simulation as would have been carried out for the Hamiltonian ({{{mathcal{H}}}}), with the next generalization within the acceptance price of each step. At every Monte Carlo step, a random lattice level (*i*,â€‰*j*) is chosen and its element *Ïƒ*_{i,j} is modified to a different random element *Ïƒ*â€² with chance

$$p=min left{1,exp left({{varLambda }}-{{Delta }}{{{mathcal{H}}}}proper)proper},$$

(6)

the place

$${{{varLambda }}}_{i,j}={R}_{{sigma }_{i-1,j}swarrow {sigma }^{prime}}^{{{{rm{nr}}}}}+{R}_{{sigma }^{prime}nearrow {sigma }_{i+1,j}}^{{{{rm{nr}}}}}+{R}_{{sigma }^{prime}searrow {sigma }_{i,j-1}}^{{{{rm{nr}}}}}+{R}_{{sigma }_{i,j+1}nwarrow {sigma }^{prime}}^{{{{rm{nr}}}}}.$$

(7)

Evidently, within the restrict *Î»*â€‰â†’â€‰0, this mannequin reduces to the equilibrium multifarious self-assembly mannequin as outlined in different work^{6,7}.

### Error calculation

The error of meeting is calculated because the fraction of additional tiles connected to the sample or the fraction of tiles lacking from the specified patterns. The error is outlined as 1â€‰âˆ’â€‰*O*, the place *O* stands for overlap and is calculated as follows: (1) we discover the biggest linked cluster of the tiles *L*; (2) we then assemble *A*â€‰=â€‰*L*â€‰âˆªâ€‰*S*^{(i)}, that’s, the union of the specified construction as positioned on the centre of the lattice *S*^{(i)} and *L*; (3) we calculate *O*_{i}â€‰=â€‰âˆ£*A*â€‰âˆ©â€‰*S*^{(i)}âˆ£/âˆ£*A*âˆ£. The error of self-assembly is *e*_{i}â€‰=â€‰1â€‰âˆ’â€‰*O*_{i}, which is outlined for a single desired construction. If a sequence is encoded within the system and if the system is initialized with one of many patterns on this sequence, then for sufficiently sturdy *Î»*, we anticipate to watch shifts. Consequently, one must repeat step (3) for every of the patterns within the sequence and outline error as ({{{rm{error}}}}=min {{overline{e}}_{i}} _{i}), the place *i* runs over all of the patterns in that sequence.

### Colouring

We’ve got used a conference for colouring the ultimate configurations on the finish of the simulations to have the ability to visually observe the self-assembled constructions in addition to transition dynamics. The colouring conference works as follows. First, we assign unbiased colors to every of the *m* desired constructions. Within the closing configuration on the finish of the simulation, a lattice level is both empty, which is then colored white, or it’s crammed with a tile, which ought to then be colored. A tile is colored with respect to its nearest neighbours, and consequently, it could take solely one of many *m* colors similar to the *m* desired constructions. For instance, allow us to take into account a tile that has 4 neighbouring tiles particularly interacting with it. Since all the particular interactions are initially extracted from the saved constructions, every of those 4 interactions can belong to at least one (or extra) of the saved constructions. For the tile into consideration, we choose the color of the construction that has the utmost contribution to its set of interactions with the neighbours. Within the case of a tie, we randomly select a color from the colors of the competing constructions. Within the case when the tile makes particular bonds with none of its neighbours, then it ought to randomly inherit the color from one of many constructions. In a few of the figures with many snapshots, to distinguish the liquid from chimera constructions, we have now colored each tile if it particularly interacts with a minimum of one of many neighbours.

### Brownian dynamics simulation

A extra life like mannequin is launched within the Supplementary Info. We outline a field with a aspect size of ({N}_{x},{N}_{y},{N}_{z}=(2times sqrt{M},2times sqrt{M},2times sqrt{M}+1)), which comprises the pool of tiles that endure stochastic movement. To make the comparability between this simulation and the Monte Carlo simulation, we implement the directional interactions on small cubic tiles that endure translational Brownian movement in discrete house and discrete time. Tiles are domestically interacting with excluded quantity interactions in the complete field. Additionally they work together with particular reciprocal and non-reciprocal interactions within the interplay area. The interplay area has the identical dimension of a sample positioned in the midst of the field. At *t*â€‰=â€‰0, we place an preliminary seed in the midst of the field. Tiles that attain the floor of the preliminary seed at *z*â€‰=â€‰*z*_{seed}â€‰Â±â€‰1 work together with the tile within the seed and change it (offered the excluded quantity situation is fulfilled) with a price that follows the identical chance as outlined within the case of the kinetic Monte Carlo simulation, specifically, (p=min {1,{mathrm{e}}^{{{varLambda }}-{{Delta }}{{{mathcal{H}}}}}})â€‰. Observe that the belief of the existence of a area for the interactions is to keep away from the nucleation of one other construction that may result in the depletion of tiles, which may consequently forestall shifting. We anticipate this assumption to not be restrictive, since for bigger techniques, the nucleation time in different areas will probably be longer than the time wanted for a retrieval or shift in an current seeded cluster and there will probably be sufficient tiles to nucleate many copies of the identical construction at completely different locations.