Models of well-mixed chemical reaction networks (CRNs) have provided a solid foundation for the study of programmable molecular systems, but the importance of spatial organization in such systems has increasingly been recognized. In this paper, we explore an alternative chemical computing model introduced by Qian & Winfree in 2014, the surface CRN, which uses molecules attached to a surface such that each molecule only interacts with its immediate neighbours. Expanding on the constructions in that work, we first demonstrate that surface CRNs can emulate asynchronous and synchronous deterministic cellular automata and implement continuously active Boolean logic circuits. We introduce three new techniques for enforcing synchronization within local regions, each with a different trade-off in spatial and chemical complexity. We also demonstrate that surface CRNs can manufacture complex spatial patterns from simple initial conditions and implement interesting swarm robotic behaviours using simple local rules. Throughout all example constructions of surface CRNs, we highlight the trade-off between the ability to precisely place molecules and the ability to precisely control molecular interactions. Finally, we provide a Python simulator for surface CRNs with an easy-to-use web interface, so that readers may follow along with our examples or create their own surface CRN designs. They can make a dizzying variety of molecules—medicines, fuels, poisons, flavouring, detergents, paints, fertilizers, explosives. They can use combinations of molecules to build materials—fabrics, plastics, glass, concrete, metals and their alloys. They can change important properties of liquids, like salinity or acidity, or even redox potential, which lets them make a battery. They can make molecules change form or colour, which gives them the ability to detect light, starch, oxygen, pH, and build air or water quality sensors. With the right salts or other dissolved compounds, they can grow beautiful crystal structures, which can be made into jewellery and pottery.But even the most skilled chemists cannot make anything as sophisticated as life—a large collection of molecules with impressive information-processing capabilities underlying fundamental behaviours such as development, learning, and self-repair . The basIs it possible to create much more complex chemical systems than current technologies?Theoretically, yes. Perhaps the most well-known and well-understood formal model of chemistry is the abstract chemical reaction network (CRN), which encodes each chemical reaction in a system of chemical reactions as a mapping from a (multi)set of abstract reactant species to a (multi)set of abstract product species, along with a rate constant. CRN models differ in how these mappings are applied. Stochastic, discrete CRN models give positive integer values to molecular counts and typically treat reactions as events in a continuous-time Markov chain . For verDeterministic mass-action CRNs are Turing-universal , suggestEven though in theory well-mixed chemistry is sufficiently powerful for carrying out arbitrarily complex information-processing tasks, practically, it is hard to scale up the complexity beyond certain limits. For example, deterministic mass-action CRNs are Turing-universal only if concentrations can be guaranteed to have arbitrarily small relative errors, as these concentrations must encode arbitrarily precise analogue values used in the computation . Stochasaccuracy and speed of a CRN-based computation.One problem fundamental to both deterministic and stochastic CRNs is that the entire ‘program’ of a CRN is encoded in the interactions between molecules, and designing a large collection of molecules to interact with each other with specificity is, in general, difficult. It is inevitable that when two or more molecules come into contact with each other in a well-mixed system, even if they are not designed to interact with each other, unwanted side reactions will occasionally occur. A larger collection of molecules necessarily has a higher probability of side reactions, simply because there are more possibilities for every molecule to interact with every other molecule. High-order side reactions can be repressed by using smaller concentrations of chemical species—but reducing the concentrations will also slow down a CRN. Thus, there is a trade-off between the spatial position. Two AND gates, for example, do not interact unless they are physically connected by a wire, even though their design is identical and their signal carrier (electrons) is identical. Moreover, it is relatively easy to place electronic components with high accuracy, and we can leverage this power to build enormously complex devices from a remarkably small set of unique interacting component types. Biology found this solution long before engineers did. In the brain, neural circuits are largely determined by their spatial layout and connectivity; release of the same neurotransmitter yields different results depending on where it is released. Even at the subcellular level, biology exploits spatial organization to control biochemical circuit function, with scaffold proteins being a primary example [polymers or tethering molecules onto a surface so that geometry will limit which molecules can reach each other (in the best case they can only touch their immediate neighbours). This prospect has engendered a considerable body of theoretical and experimental work in DNA nanotechnology [One possible solution to the problem of restraining undesirable interactions relies on spatial separation rather than specificity. This strategy is familiar from the world of electronic engineering: in silicon circuits, interactions between components are encoded by  example . Turningchnology –36.better at doing than well-mixed CRNs and polymer CRNs.In the course of his explorations of reversible computing and the thermodynamics of computation, Charles Bennett exhibited a theoretical polymer CRN capable of simulating arbitrary Turing machines, with each polymer in solution acting independently and in parallel . HoweverAs it happens, chemistry on a surface can do quite a lot. Like well-mixed chemistry, even simple natural surface chemistry can encode surprisingly complex behaviour. In one striking example, administration of oxygen and carbon monoxide gasses to a well-defined platinum surface can induce bulk oscillations, spiral patterns, or turbulence, depending on the ratios of gasses used . Other, chemical reactions between spatially constrained molecules using a simple model. Qian & Winfree used surface CRNs to generate complex dynamic spatial patterns and showed them capable of directly emulating both Boolean logic circuits and Turing machines. We will expand on these examples and demonstrate several other things that surface CRNs can do, some of which are obvious and some not. You can follow along with our examples using our surface CRN simulator, either online or on your own computer with Python  or from our GitHub page at https://github.com/sclamons/surface_crns. This will let you watch your surface CRNs run in ‘real-time’, and lets you step through simulations one reaction at a time. If you are comfortable programming with Python, you can also use our Python package to define surface CRNs with more complex custom geometry or visualization.For users who prefer to run our code directly, or would like to extend it, our simulator is also available as the pip-installable Python package ‘surface_crns’. You can install it from the Python Package Index . The state at each site is always a single species, so we will often use ‘state’ and ‘species’ interchangeably. A species represents some smallest physical unit of the system  such that local interactions can be represented as reactions. The connections between sites in the graph define which pairs of species are physically close enough to interact. Where applicable, an ‘empty’ state (e.g. E) may be defined for sites which do not hold anything. Note that the state of the Markov chain under this definition encompasses the entire surface, and thus the states of all sites together.More formally, a surface CRN is a continuous-time Markov chain specified by a lattice As in traditional CRNs, we refer to the species on the left-hand side of the ‘ → ’ in a reaction as reactants and the species on the right-hand side of the ‘ → ’ as products.A → B) can occur at any site with a state matching the reactant. For example, the rule ON → OFF would cause any ON species to spontaneously and instantly flip to an OFF species when the reaction  occurs. Again, a reaction rate associated with the rule determines the average frequency at which the reaction will occur.Unimolecular reactions (those of the form A + B → C + D) can occur anywhere that the two reactant species are present and next to each other according to the connectivity of the surface on which they sit. At the moment when it occurs, a bimolecular reaction simultaneously and instantaneously transforms both reactants into products. Note that surface CRNs do not have any absolute orientation, so the absolute order of the reactants does not matter; however, the orientation of the products will match the orientation of the reactants in the lattice. Thus, the rule A + B → X + Y can occur anywhere that an A is next to a B, no matter their orientations, and will always convert A into X and B into Y (but never A into Y or B into X).Bimolecular reactions , where I is a set of one or two sites, r is a transition rule with the same number of sites as I, t is the time of the last event (or 0 if it is the first event), and Δt is the time between the event and the previous event. At the beginning of the process and immediately after each jump event, the possible events are all  for which {si}, i ∈ I are exactly the reactants of r, with Δt drawn from an exponential distribution with mean 1/λr. The event with the minimum Δt then occurs at time t + Δt, at which time the reactant states at sites I are replaced by the products of r. At this point, the list of possible events is recalculated, and the process is repeated. Simulation of surface CRNs can, therefore, be considered a variant of the Gillespie algorithm [Box 2.t = 0.1. Initialize with a global state at time r that can occur at a site or pair of sites, draw a time-to-event Δt for that reaction from an exponential distribution with mean 1/λr. Schedule this reaction to occur at time t + Δt.2. For each reaction t = t + Δt.3. For the reaction with the smallest scheduled time, change the reactants of that reaction to its products and set 4. Repeat from step 2 until a stop condition.Surface CRNs can be simulated using a variation of the Gillespie algorithm for simulating stochastic chemical reaction networks. Briefly, using variables from the text:O(N × R), where N is the number of sites in the surface CRN and R is the total number of reaction events simulated. We instead leverage previously calculated next-reaction times by storing all possible reactions in a priority queue, sorted by the time at which each reaction will occur:t = 0.1. Initialize with a global state at time t + Δt.2. For each reaction that can occur, draw a time-to-event as described and add that reaction to a priority queue sorted by t = t + Δt.3. Pop the first reaction from the queue. Change reactants to products. Set 4. Remove from the queue all reactions involving any of the same sites as the current reaction.5. If any new reactions can occur that involve any of the same sites as the current reaction, add them to the queue as per step 2.6. Repeat from step 3 until a stop condition.The naive method redundantly recalculates time-to-events for every site and pair of neighbouring sites after every reaction, with total time complexity roughly O(log Q) operation (where Q is the maximum number of reactions in the queue at any given time) and checking for new reactions is constant in N, R and Q, giving total time complexity O(N + R log Q) ignoring step 4. However, step 4 (removing outdated reactions) is linear with Q. Our simulation avoids the need for step 4 by storing the times when each reaction is issued and the times when each site was last changed. When an event is popped off the queue, if any of its reactants were updated between the reaction’s issue time and the current time, the reaction is scrapped and another one popped off the queue. This optimization comes at the cost of bloating the queue with outdated reactions, which can slow dequeueing somewhat.Popping a reaction from the queue is an Jumps in the surface CRN process correspond to reaction events. An event is defined as a tuple  to low-count (stochastic) has a practical upside: real-world realizations of surface CRNs can be very, very small. Where a whole test tube’s worth of chemicals might be required to accurately run a bulk-reaction chemical computer, one test tube could easily hold billions or trillions of tiny surfaces, each with its own surface CRN. In short, surface CRNs ought to be aggressively parallelizable.Importantly, as we will see in several examples, putting chemical reactions on a surface opens up an interesting trade-off between the difficulty of controlling specific molecular interactions and the difficulty of laying out components in a specific spatial arrangement. If one has the technology to position many molecules precisely on a surface, surface CRN designs with few species and reactions can accomplish complex tasks yet it will be relatively easy to design the few desired molecular interactions; conversely, if one has the technology to implement many desired molecular interactions precisely, there are other surface CRN designs that can leverage that ability to create precise, complex spatial patterns from a simple initial spatial arrangement.Now, what exactly can a surface CRN do?3.3.1.G and S, for gas and space, respectively, along with the reaction G + S → S + G. When a few G species are speckled on a field of S, the gas species will diffuse about at random on the lattice, gas-like, with a diffusion rate set by the rate of the reaction G + S → S + G. With the addition of reactions that change the species identities, we have a form of stochastic reaction–diffusion system, as mentioned earlier.To begin with, surface CRNs can model many familiar chemical processes. Consider diffusion of gas particles in a two-dimensional (lattice) space. We define states Q (quiescent), A (active) or R (refractory). At each step of the automaton: any quiescent cell next to an active cell becomes active; any active cell becomes refractory; and any refractory cell becomes quiescent. Depending on the automaton’s initial configuration, it can produce single waves, infinite spirals, or complex spiral patterns .Surface CRNs can also model chemistry at a more coarse-grained scale. Consider the patterns generated by the Greenberg–Hastings (GH) cellular automaton , which ia). This CRN has the property that if all possible reactions were examined simultaneously, and all species changes were applied simultaneously, then the behaviour of the synchronous GH cellular automaton would be reproduced exactly. However, as surface CRNs have asynchronous local updates, the GH surface CRN is stochastic and its qualitative behaviour depends on each reaction’s exact rate constant. With the rates shown in figure 1a, the surface CRN approximates some features of the behaviour of the GH automaton, but the waves and spirals produced in the surface CRN version of the GH system are thick and uneven, with ragged edges.The GH automaton can be modelled by a three-reaction surface CRN a. This Cd). Structures in the CRN are brittle—a clean wavefront will quickly break apart as some parts of the wave spread more rapidly than others. This causes the wavefront to break up, peter out, or double back on itself, so that a spiral that lasts forever in the synchronous GH automaton will be a temporary storm in the surface CRN. In this case, at least, asynchronicity in reactions washes out fine structure in the surface CRN.The GH surface CRN lacks the strict synchronicity of the GH automaton, which is what allows the original GH automaton to produce fine-grained, structured patterns like the spiral wave d. Structexcitable media that support propagation of temporary activity through an otherwise quiescent space. Systems as diverse as metal surface oxidation, protein signalling on oocyte membranes, neural action potentials, heart muscle contractions, slime mould aggregation, lichen growth, forest fires, infectious disease outbreaks and star formation, all can exhibit spiral waves and have been studied as excitable media [Q, A and R states corresponding to green, burning and burnt trees, or to susceptible, infected and resistant hosts, respectively [The GH cellular automaton can be thought of not just as a specific model of the Belousov–Zhabotinsky reaction, but rather as a generic model of le media –58. Inteectively ,58.Box 3.Q → A → R (in either direction). The net number of such cycles the path crosses (forward minus reverse) is its winding number. A simple way to compute the winding number is to traverse the path, tallying +1 for each forward step, − 1 for each backward step, and then dividing the total by 3. As an example, we write down the states along a possible path, and below them, the tallies for going from the given cell to the next cell:The GH cellular automaton has a conserved property called the ‘winding number’ that is important for several proofs of its behaviour. Pick any directed, closed path through lattice sites in a GH automaton. That path will cross through zero or more ‘cycles’ of The tallies sum to 3 so the winding number is 1.— Does the surface CRN version of the GH automaton preserve winding number? Why or why not?— Can you identify any other conserved quantities in the surface CRN GH automaton, or modify the reactions such that analogous quantities are conserved?Interestingly, the winding number of any particular spatial path in a GH automaton with a fixed initial condition will remain the same as the automaton progresses, regardless of the initial configuration of the automaton or the topology of the lattice . This conserved quantity can be used to prove, for example, conditions under which a particular GH automaton will continue indefinitely or peter out to a uniform quiescent state.You may wish to revisit these exercises for the other surface CRN implementations of the GH automaton given in later sections.Going back to the example of the GH model, we saw that an inherently asynchronous surface CRN implementation of the same local logic (and with well-tuned rate constants) can generate some similar kinds of behaviours as the original synchronous cellular automata (e.g. wave propagation), while other important features (e.g. wavefronts remaining unbroken) fail in the asynchronous surface CRN implementation. These differences can be understood in terms of conserved quantities that the synchronous updates preserve , but whiMore generally, it has long been known in the cellular automaton literature that asynchronous updates often destroy behaviours that were of great interest in the synchronous case ,61. To p3.2.Yes, it can, at least in the most important senses. Again, the cellular automata literature provides some guidance: many techniques have been invented whereby an asynchronous cellular automaton can, by incorporating extra states and extra rules, enforce that the information flow of the synchronous system remains intact within the asynchronous system –65. Howedo spin completely without deadlocking ?The spinning-arrow emulation scheme shown in this section requires careful arrangement of initial conditions—with the wrong starting arrangement, arrows can easily become deadlocked, unable to update.One way for a surface CRN to emulate the function of a synchronous automaton is for each site to (a) accumulate information about all of its neighbours and (b) update itself based on that information in a way that (c) guarantees that it will not update itself before all of its neighbours have learned its state . In general, this requires careful set-up of both the transition rules and initial conditions of the surface CRN, particularly to avoid deadlocking. Here, we will describe such a scheme for emulating any cellular automaton with a square-grid geometry and Von Neumann neighbourhood . The basic principle is that the identity of the state at each site, in addition to specifying the current state of the cell that it is emulating, also has a directional arrow pointing to the next site it needs information from. When two sites’ arrows point toward each other, both sites spin their arrows in opposite directions (e.g. both clockwise) and update an internal label that tracks what information that site has gathered from its neighbours. Once a site’s arrow has spun once all the way around, a set of unimolecular rules changes that site’s state according to the information it has gathered from its neighbours, resetting the arrow and preparing it for the next update. Note that care must be taken in the initial set-up of the CRN so that every site’s arrows king see .Box 4.Ssame ‘clock tick’ as its neighbour—it is locally synchronous. Note that there is no guarantee of exact synchronicity between distant cells in a locally synchronous automaton . Nevertheless, because each cell only communicates with other cells at the same ‘clock tick’, the state history of each cell is guaranteed to match that of an equivalent cell in a globally synchronous cellular automaton. In other words, the system will behave as though it were a synchronous automaton, but with some variation in the speed at which each cell updates.Critically, each emulated cell cannot update its state until it has received state information from all of its neighbours, and it cannot receive information from its neighbours without simultaneously sending its own state information. The result is that a cell can never be more than one ‘clock tick’ ahead of any of its neighbours, and will only send its state information when it is at the f ). Adding site labels allows reactions to distinguish arrows pointing together from arrows pointing apart—for example, ← at a 2 site and → at a 1 site point toward each other, while ← at site 2 and → at a site 3 point away from each other.One immediate problem with the spinning-arrow scheme is that species in a surface CRN do not perceive local orientation. Sites can be next to each other or not next to each other, but reactions cannot be restricted based on reactants being ‘to the left of’ or ‘to the right of’ each other, so two arrows ‘pointing toward each other’ could just as easily be ‘pointing away from each other’ and the same reactions will apply. To introduce a notion of directionality to the scheme, we initialize the surface in a pattern with location labels at each site, dividing the grid into a repeating 3 × 3 grid f . Addin— The current state of the emulated cell in the synchronous automaton.— Local positional information within a 3 × 3 repeating grid.— The direction of an ‘arrow’ pointing toward the next site to update from.— A memory recording information that the site has received from neighbours during this update cycle.So, each site in the spinning-arrow emulation has a state that encodes:k states f where d ∈ { ← , ↑ , ↓ , → } is the direction of the site’s arrow, p ∈ {1, …, 9} is the local position of the site, and More formally, consider any synchronous cellular automaton with Von Neumann neighbourhood, p ∈ {1, …, 9}, N, E, S, W are the emulated states to the north, east, south and west of p at positions n, e, s, w ∈ {1, …, 9}, respectively:f .State exchange is mediated by bimolecular reactions of the following form, where p ∈ {1, …, 9} and n, e, w, s ∈ {1, …, 9} and Finally, states are updated using unimolecular rules of the form:By construction, only one reaction is ever possible at a time at each site, and this reaction choice is unchanged by updates elsewhere. Consequently, the rate of each chemical reaction can only affect the timing of the surface CRN’s evolution, not its ultimate results. Thus, for this and other similar examples, we will ignore reaction rates .c, middle-left) and in an equivalent locally synchronous surface CRN implemented as above . Under the right initial conditions, the spiral patterns characteristic of the fully synchronous automaton are clearly visible, but they are ‘fuzzy’ because the molecules implementing the synchronous automaton are updated inherently randomly. No site will ever get ‘too far’ ahead of its neighbours, or cause them to update in an order different from that of the synchronous version, but there is no guarantee of global synchronicity.As a specific case, consider a spiral wave in a (truly) synchronous GH cellular automaton  synchronicity is possible in a surface CRN, it is not a very satisfying construction. All of the logic handling memory storage, state updating, and arrow-spinning has to be hard-coded by ‘brute force’ into the species and reactions defining the surface CRN. Generally speaking, a locally synchronous spinning-arrow surface CRN representing a cellular automaton with 3.3.Another way to emulate a synchronous automaton with a locally synchronous surface CRN is to emulate each synchronous automaton cell with an array of multiple sites in the surface CRN. A several-to-one scheme also allows simulating cellular automata with Moore neighbourhoods  without requiring direct communication across corners. We will also see that splitting a single cell into multiple sites allows us to separate the logic of site-to-site communication from the logic of site updating, which allows us to emulate the same automaton using dramatically fewer transition rules.— Any live cell with zero or one live neighbours dies (underpopulation).— Any live cell with two or three live neighbours remains alive .— Any live cell with four or more live neighbours dies (overpopulation).— Any dead cell with exactly three neighbours becomes alive (colonization).— Any other dead cell remains dead.For example, consider a surface CRN implementation of Conway’s Game of Life, an automaton that uses information with a more complex update rule than the GH automaton . In the a). The centre molecule (position E) stores the current state of the Game of Life cell (0 or 1). The eight-molecule ring around E handles signal communication and processing.In a broadcast-swap-sum emulation, each cell in the Game of Life is represented by a 3 × 3 grid of sites in the surface CRN, labelled A through I from top to bottom, left to right a. The cei ∈ {0, 1, 2, 3, 4} is a number representing either the state of the emulated cell or the current count in a running sum of the cell’s neighbours’ states.We will write states in this scheme in the form b) using the following transition rules:Update of an emulated cell begins with site E ‘transmitting’ its state to positions B, D, F and H b using tb, f, h and d in the species’ names indicate the last position that was updated; w indicates a state that has received information from site E but that has not yet transmitted that information to the corner sites; and i ∈ {0, 1} is the current state of the emulated cell.Here, the flags Bi, Di, Fi and Hi, indicating that those sites are ready to transmit their current state information to neighbouring 3 × 3 blocks:Next, similar rules transmit the emulated cell’s state from positions B, D, F, and H to positions A, G, C, and I, respectively, and set positions B, D, F and H to states c), using the reactionsi, j ∈ {0, 1} are the states of each emulated cell and the n flag indicates that the site has received information from the neighbouring emulated cell. Concurrently, corners communicate in a similar fashion. However, since corners cannot directly communicate with one another, corner sites swap states in a two-step fashion (d), first swapping horizontallyNow emulated cells can ‘talk’ horizontally by swapping the states in positions F and D, and vertically by swapping the states in positions B and H c, using  fashion d, first n flag and will contain the state of one of the emulated cell’s eight neighbours. At this point, the total number of active neighbours is summed in a circular fashion (e) using reactions of the formx is a running sum of the number of neighbouring emulated cells with state 1, which is capped at 4 for compression since the behaviour of a cell of the Game of Life does not change past four neighbouring ‘alive’ cells. The s flag indicates that the site currently holds the running sum for the emulated cell. This set of reactions also resets the ring and prepares it for the next round.After swapping along sides and corners, each of the eight border sites will have an  fashion e using rG is the update rule for the Game of Life—that is, 1 if x = 3 or if i = 1 and x = 2, otherwise 0. An example of a glider from the Game of Life is shown in figure 2f (dark green centre squares).Finally, the sum in position D is combined with the current state, setting the new state and resetting D, by a set of rules of the form g). This same strategy can be used to emulate any Moore-neighbourhood totalistic synchronous cellular automaton , or, with a more complex neighbour-summarization procedure , any Moore-neighbourhood non-totalistic cellular automaton.A similar construction can be used to make a locally synchronous GH automaton with a broadcast-swap-sum emulation g. This sAltogether, including reactions to handle boundary conditions, the broadcast-swap-sum Game of Life automaton requires 132 rules, and nine sites for each Game of Life cell, and the broadcast-swap-sum GH automaton requires only 102 reactions and 104 states—a considerable improvement over the spinning-arrow emulation technique, at least in terms of number of transition rules required to implement the behaviour. This efficiency of transition rules (which we might expect to be of prime importance in any laboratory implementation of a surface CRN) comes at two costs—larger surface CRN area per area of emulated cellular automaton, and more reaction steps per cellular automaton update.4.A properly constructed Game of Life of sufficient size can either simulate a Turing machine  or a BooIf desired, one could program a Turing machine directly as a surface CRN, as shown by Qian & Winfree . In the B (blank wire) that are embedded in a field of inert states I (a). Information thus flows as discrete packets that perform a random walk along wires using two diffusion reactions 0 + B → B + 0 and 1 + B → B + 1. For the sake of brevity, we will write this pair of reactions as 0/1 + B → B + 0/1. We will continue to use this notational convention—any rule written with a ‘/’ represents two logically related reactions, compressed for space.To review, our Boolean logic circuits are based around signal states 0 and 1, which diffuse along linear paths of wire sites states I a. Informb. The NOT gate is constructed from several states of the form SNL, where S ∈ {B, 0, 1} represents the data currently held at this position , N designates the state as belonging to a NOT gate and L ∈ {x, y} distinguishes the input and output locations. This gate uses three sets of reactions—one to load incoming data packets (either ‘0’ or ‘1’) from a wire onto the front half of the gate, one to invert those packets and move them to the back half of the gate, and one to unload the inverted packet from the back half of the gate to another wire. For example, when the front half of a NOT gate is in a waiting state BNx and is next to an incoming 0 packet, the rule 0 + BNx → B + 0Nx loads the zero signal onto the front of the NOT gate and removes it from the wire. Similarly, a 1 can be loaded using the reaction 1 + BNx → B + 1Nx. Note that unlike wires, which allow bidirectional information flow, NOT gates only allow signals to pass in one direction, causing computation to ratchet forward.To compute, we use logic gates constructed from several adjacent sites representing input and output positions. The simplest gate we construct is the NOT gate, shown in figure 3c. Four rules load incoming signals onto the Ax and Ay positions. Two more rules move the Ax signal onto the Az position, putting the Ax position into a holding state (HAx). By combining the signals from the Ax and Ay lines, four more rules calculate the correct output signal (now on the Az position). The output is then unloaded onto a wire, leaving the Az position in a reset state RRAz, which triggers two reactions that reset the gate and prepare it for new incoming signals. The output signal can now diffuse away, but cannot be re-loaded into the gate. Note that the AND logic occurs entirely in the four rules that combine the Ax and Ay signals—the gate can be changed to implement other logic simply by changing these four reactions. We will use OR and XOR gates in later examples built in this way.A two-input logic gate can be built with an architecture similar to that of the NOT gate. A 14-reaction AND gate is shown in figure 3d. It uses reactions similar to those of the AND gate but with opposite flow—two rules read a signal into the centre of the gate, four rules ‘split’ the signal into the two output positions, and four more rules unload each output position’s signal onto its respective wire. A three-output fan-out can be built in a similar fashion using 14 reactions.So far, a single wire in this implementation cannot feed a signal to more than one gate , as each data packet (0 or 1) is consumed when it is detected by a gate. To make circuits where one line can feed to multiple gate inputs, we will need an explicit fan-out mechanism. A gate implementing a two-output fan-out is shown in figure 3e shows an example wire cross ‘gate’. For each axis , the wire cross requires two rules to load a signal on the front end, two rules to push the signal to the centre , two rules to push the signal to an output gate, two rules to unload the signal onto a wire, and two rules to send a reset signal to the front of the gate to prepare it for the next input.Finally, in order to build circuits of any reasonable complexity on a two-dimensional grid, we will need a mechanism that allows wires to cross without mixing up their signals. Figure 3Note that here (unlike in the logic gates shown earlier), holding and resetting the input lines is important for guaranteed wire cross function, at least for use in recurrent circuits. A circuit can be laid out such that both of the wires of the wire cross feed the same two-input gate. In such a case, a wire cross (such as the one presented in ) withoutFinally, a gate that is not strictly necessary, but that will be helpful for a later construction, is what we term a ‘synchronization gate’ (or ‘sync gate’). This gate is essentially two linked repeater gates (NOT gates with the inversion logic removed) that wait until both inputs are present before sending them on their respective journeys, which can be used to ensure synchronization between different parts of a circuit. This gate could instead be built purely using the other logic gates already shown above, at the cost of clarity.a. Input signals (0 or 1) are initiated at x1, …, x4. These signals could be set manually during construction of the circuit, or they could be fed from an upstream source (perhaps another circuit). Signals asynchronously propagate through the circuit, with computations analogous to those in electronic circuits performed at each gate. The speed and exact timing of each reaction is random, but the eventual output of the circuit is guaranteed to be correct.Given these reactions and gate layouts, we can compose circuit elements and scale up to larger circuits by simply laying out signals in different initial conditions on the surface. An example surface CRN circuit that adds two 2-bit numbers is shown in figure 4b). At the top of this circuit, a signal diffuses around a ring with a NOT gate (which latches diffusion to one direction), switching back and forth between 0 and 1. This signal is duplicated and passed through a series of sequential half-adder circuits, where each half-adder’s inputs are its last computed value and the value computed by the previous half-adder. To make the counter’s function clearer, a wire at the output of each half-adder stores the output history of that adder, with positions farther down the wire holding older values than positions closer to the half-adder. The output can be read as a series of binary numbers, where the nth packet (starting from the end) of the mth output line is the mth bit of the nth number. These outputs could be hooked to the input of another circuit to ‘clock’ that circuit, or the counter could be used to create repeating spatial patterns.Another example that takes advantage of the continuous and reusable nature of logic circuits on a surface CRN is a 6-bit binary counter shown in its initial condition, after several rounds of output, and in its final state b. At thec shows a single cell from a Game of Life, implemented with a roughly 40 × 40 surface CRN. For scale, if such a cell were implemented on the surface of a metal crystal, with a single site at each atom, it would be order of magnitude 10 nm square; if instead it were implemented using the existing DNA origami-based scheme in [E. coli, with each cell’s circuit layout covering a 3 × 3 array of origami tiles.Just as we can emulate logic circuits in a Game of Life, we can emulate the Game of Life using feedback logic circuits. Figure 4cheme in , with orcheme in , it would, is general for simulating any synchronous cellular automata with local update rules computable by a logic circuit, with different circuits in the logic ring yielding different automata.Each cell consists of: a core loop in the centre of the device that holds the cell’s current state (0 or 1); an outer loop that transmits a copy of the cell’s current state to each of its neighbours; and a ring-shaped block of logic that decides what the core loop’s next state should be based on the values of the cell’s neighbours. This basic structure, outlined in figure 4f) at these junctions ensure that no cell can update more than one step ahead of its neighbours. Once the neighbour’s signal is received, it is fed into the logic ring, where a circuit in the logic ring determines what the cell’s next state should be. Finally, the result of that computation is fed into the core loop, replacing the previous value, and the cycle begins again.At the beginning of each generation update, the state in the core loop is duplicated and sent (a) to the outer loop for transmission, and (b) back to the core loop for storage and computation of the next cycle state. The split signal runs clockwise around the outer ring starting from the top. At each border with another cell, a copy of the state signal is created and waits until a matching signal is received from the neighbour. Synchronization gates see f at thesc shows a five-gate motif that produces output with every four consecutive signals it receives, yielding ‘1’ if exactly three of those signals are ‘1’s and ‘0’ otherwise. An equivalent standard Boolean logic circuit would require two additional logic gates and approximately five wire crosses and four fan-outs. Note that sequential logic gates use exactly the same states and transition rules as a standard surface CRN logic gate, only arranged differently on the surface.The Game of Life update calculation involves detecting whether or not exactly three or four out of nine neighbours are ‘alive’ , which is somewhat cumbersome to check using a Boolean logic circuit. To keep this circuit to a reasonable size, we take advantage of the digital, sequential nature of surface CRN logic circuits to make ‘sequential’ logic gates that act on two sequential signals from the same input line, rather than two parallel inputs on separate input lines. For example, the inset shown in figure 4Box 5.— What is the smallest rule set you can come up with that still allows you to build continuously active recurrent logic circuits?— What is the smallest number of distinct species for which it is still possible to create a rule set that allows you to build continuously active recurrent logic circuits?different sites, but in which each single site may only flip between N different species. Our logic circuit implementation requires up to seven species at any single site. What is the minimum number of species per site you need for logic? Can you do it with three? With two?— Consider a surface CRN with a limited number of states available at each site. One might, for example, build a surface CRN with many different species at — Can you build Boolean logic circuits using only reversible reactions? (Hint: you can.) What would drive these gates forward?Wires, signal diffusion, two- and three-output fan-out, wire-crossing, synchronization and repeater gates, NOT, OR, XOR and NOT gates—as we have done here—requires a total of 110 transition rules. That is a lot of molecular interactions, from the point of view of an experimenter trying to physically build such a circuit. We can shrink this rule set considerably, sacrificing only spatial compactness and readability of the final circuit design, by removing repeater, sync, AND, OR, XOR and NOT gates (as these can be emulated with only NOR gates), and by eliminating the three-output fan-out gate. This brings the total number of reactions required for logic down to 46 transition rules and about as many unique species. Can you do better?At first glance, this implementation of the Game of Life seems cumbersome compared to the much more compact emulation method described in §Moreover, the same strategy can be used to construct any synchronous cellular automata using exactly the same rule set, varying only the initial layout of species on the surface. This is a considerable advantage in an experimental setting, as only one set of on-surface reactions need be designed and validated, along with the ability to lay down arbitrary initial surface layouts, in order to build any molecularly implemented (synchronous or asynchronous!) cellular automata, recurrent digital circuit, or Turing machine. In principle, even a fully functional microprocessor  could beThis ease of scaling contrasts with existing programmable molecular implementations of logic using, for example, DNA complexes in a well-mixed test tube or protein in a cell. In those schemes, each wire is encoded with a different species, and each new gate requires the design of a set of chemical reactions with new molecular species.interaction design for difficulty of molecular placement. If you want to build a large logic circuit by implementing a surface CRN, you must be able to precisely position a large number of molecules into the correct initial state; in return, you can build circuits of arbitrary size with a relatively small, fixed number of molecular interaction designs.Of course, the benefits of surface CRNs are not free, and this example is the first that clearly illustrates the design trade-off alluded to at the end of §5.spatial arrangement and placement of molecules in order to reduce the complexity of desired molecular interactions for accomplishing the same task. We can also invert this paradigm to do the opposite—harness the ability to specify and implement precise and diverse molecular interactions in order to achieve complex spatial arrangement and placement from simple initial conditions.We have now seen that a major advantage of performing chemistry on a surface is that you can exploit power in the form of Readers of a certain bent may have noticed that the 6-bit binary counter presented in §a). This immediately allows the construction of striping, aperiodic chaos, tree structures and Sierpiński triangles, and much more . There is a rich history of using cellular automata to model biological pattern formation and morphogenesis [We have already shown that the space of surface CRNs effectively contains all cellular automata, so patterns producible by a cellular automata ought to be producible by a surface CRN as well. For example, we can make spirals with a surface CRN GH excitable media. Any of Stephen Wolfram’s one-dimensional elementary cellular automata, along with their time histories , can be figure 5ogenesis ,74 so inO), on which we add a single seed state (S). Here is a set of rules that converts the initial seed into an irregular blossom with area exactly 32 (b)F). Five rules are required to encode the splitting behaviour, and four diffusion rules prevent intermediate numbered states from becoming stuck in a sea of Fs. From a single seed state , we obtain a large irregular shape with a defined size . With two more rules, we can double the area of the blossom; in general, the number of rules required scales with the log of the size of the blossom.What about specific shapes that do not correspond easily to known automata, or that might be generated more easily with a direct surface CRN implementation? We can start with a very simple manufacturing example—construction of an irregular ‘blossom’ of fixed, arbitrary size. We begin with a field of blank species .One such example is an infinite straight line, again starting from a single seed ts stuck c.straight line on a surface CRN. As with the spinning-arrow construction of synchronous cellular automata, here we must contend with the fact that the surface has no built-in orientation, no structure that distinguishes left from right, top from bottom, straight from sideways. Our line will have to create such a structure. One way to do this is to make the line two molecules thick, with different states on the left and right sides. A reaction, S + O → RH + LH breaks the symmetry of the background and sets the line in motion. The two head states (reversibly) extrude probes, which look for the forward direction:It is less obvious, however, how to build a RP + LP → RH + LH, which can then extrude its own probes and continue extending the line indefinitely. Note that the initial direction in which the line grows is random, determined stochastically by the first reaction and the first probe-connecting growth move, but once growth begins, it will continue indefinitely in a straight line (d).The only places where the probes can be extended such that they touch is in front of the growing line; when they are next to each other, the two probes can convert themselves into a new head with the reaction ght line d.Box 6.— Our line-growing construction relies very much on an underlying square-grid geometry. It will not, for example, work as-written on a hexagonal grid. Can you design a version that does?— Can you build a CRN that constructs, from an initial seed, a straight line of a specific length, rather than an infinite line? Can you do it in a way such that the number of rules required scales less than linearly with the length of the line? What about a square?R and K, define R reactions and K species, starting from a single S in a sea of O on a 2D square grid. Here, ‘reliably produced’ means that there are a finite number of reachable states, one or more of which are terminal in the sense that no further reactions are possible, every reachable state can reach a terminal state, and every terminal state has the same number of 1s . The ‘blossom’ construction, for example, already provides a set of lower bounds BBCRN concerns a stochastic CRN starting with a single S.— Consider the Busy Beaver problem in computer science: what is the largest finite number of 1s that can be generated using a Turing machine with a given number of states and symbols, starting with a blank tape? Similarly, we can consider the surface CRN Busy Beaver problem: given integers It is safe to say that the field of surface CRN manufacturing is a young one, and many challenges remain. Here are three for you to tackle:A single line extending infinitely in a random direction is admittedly not, in itself, a particularly compelling shape. However, a line can be used as a manufacturing primitive in the construction of larger, more complex shapes, like a square or triangle, which could themselves be combined into yet-more-complex shapes, perhaps eventually forming a house, or a factory. The reader might enjoy trying these and other more complex manufacturing challenges and exploring their connection to computability via the Busy Beaver problem  see box.Box 6.Me). In our implementation, a seed picks a random direction in which to extend a two-pixel-wide line in which each pixel has a unique address (i.e. there are unique species for each position), forming one edge of the image. A second, orthogonal two-pixel-wide line with unique addressing forms a second edge of the image. Then a series of reactions fill in the image starting from the corners, again with unique addressing. Finally, one reaction for each pixel converts the addressed site to a coloured final state. This algorithm requires a fairly large number of reactions, which scale linearly with the number of painted pixels. Our construction could be easily modified to simulate tile self-assembly models [As an extreme example of construction-by-reaction, it is possible to extend the line-creation example to create a surface CRN that builds an arbitrary bitmap pattern around a single-site seed against an otherwise-uniform background e. In oury models , in whicy models . The abiy models .cannot place molecules on a surface with high precision, but you can implement many desired reactions between molecules, then you can use a surface CRN to build complex designs from simple initial conditions—even, given enough reactions, arbitrarily complex patterns from a single randomly placed seed (e). Either way, surface CRNs can be a helpful abstraction, but they perform different work depending on what technology you already have available.Again, we wish to highlight the nature of the trade-off in surface CRN design between the required number of molecular interactions and the required number of precisely placed molecules. If you can already place molecules on a surface with high precision, then you do not need complex manufacturing algorithms of the kind shown in this section, and you will probably want to leverage surface CRNs in other ways (perhaps the ones outlined in earlier sections). If you ced seed e. Either6.If we wish to construct complex patterns from stochastic reactions, we would do well to take inspiration from nature. For natural examples of complex construction, we need only look to ant and termite colonies. Termites, for example, begin to construct their nests using a simple set of stochastic behaviours: walk about at random; eventually pick up a mudball; wander with the mudball and eventually put it down, preferentially dropping it where there are other mudballs. A simple set of rules of this sort  is sufficient for a colony of termites to collectively build piles, then towers, and eventually complex nest structures .a. We begin with dirt species scattered randomly and uniformly on a field of open spaces. We place ants on this resource-rich field, and allow the ants to diffuse at random using rules similar to those used at the beginning of §While recognizing that ants are not termites, out of deference to Langton’s ant  and the figure 66-fold smaller length scale, with about 1018-fold less mass.While an observer could hardly mistake the products of this series of reactions for the complex nests of real ants, our surface CRN mound-builders are at least capable of clustering scattered dirt particles into rudimentary piles. Furthermore, they do so with considerably less underlying complexity than a real ant, and are far smaller: using molecular implementations of surface CRNs along the same lines as those in , our surAnts, of course, do much more than build small piles of dirt. Collective behaviours in animals and insects—ants included—have inspired a remarkable variety of algorithms for swarm robotics and distributed computation –83. So wA) that diffuses about randomly, converting open spaces (O) in its wake to pheromone species P, with the reaction A + O → P + A. When the ant finds food, it picks up the food and converts to a ‘food-bearing ant’ state H with the reaction A + F → P + H. A food-bearing ant walks back down its pheromone trail with the reaction H + P → O + H, converting it back into open space, until it reaches its home (b). This simple ant works … so long as it does not loop back on itself and become stuck. Adding two probabilistic reactions can occasionally help the ant escape such traps. To be more effective, we can improve the ant scout’s performance by adding ‘rails’ to the side of its trail to prevent the trail from overlapping with itself, and by adding a very slow reaction that causes the ant to spontaneously run back to the nest, destroying its trail along the way, so that it can unstick itself from loops (see the ‘Smarter Scouting Ant’ example on our simulator webpage for implementation details). The problem of defining and implementing a better search algorithm for molecules on a surface is an open one.What about scouting for food and bringing it back to the nest? We can make an extremely simple (and extremely unintelligent) food-scouting ant  that diffuses around a field of open sites (O) searching for two types of cargo (C1 and C2), which it carries back to two goal sites . This algorithm bears close resemblance to the ant mound-building algorithm at the beginning of this section. The primary difference between the two is that the cargo-sorting robot distinguishes between a cargo and its goal, and can mark dropped cargo as belonging to the goal. Because these robots drop the cargo as soon as they encounter a goal, the resulting piles develop shapes similar to diffusion-limited aggregation [Figure 6regation . Whetherregation , could uWe may note at this point that a common pattern with surface CRN swarm robots is that they all must contend with the extremely limited local information available to each species. A molecule on a surface can tell if it is next to, for example, a ‘dirt’ molecule, but it has no way to directly measure whether that dirt is part of a larger pile, or how big that pile is—information which an ant brain can, presumably, compute from a number of non-local sensory cues from its eyes, limbs, olfactory system, and antennae.limitation of surface CRN chemistry, which requires extra design effort to circumvent. Viewed another way, these difficulties are clarifying. If you are a molecule, or even an assemblage of molecules as staggeringly complex as, say, a bacteria, you do not necessarily have immediate access to ‘obvious’ information like which direction is forward, or how big a nearby object is. These are real limitations on molecular systems, and molecular machines must either work without such information, or dedicate resources to computing it.Difficulties of extreme information locality can be viewed as an inherent X and Y, compete to pick up and move a ball to a goal protected by the other team. Fixed transition rules govern basic mechanics . The game is played between teams with various (constrained) transition rules controlling the movement of players on their team. See Box 7.X players and seven Y players, and a goal for each made of GX and GY states, respectively. The background of the playing field is made up of states n ∈ {0, 1, …, 9}, initialized to 0. A set of fixed rules governs the interactions between ball, players, and goals, allowing each team to pick up the ball, tackle other players to steal the ball, and score by bringing the ball to the appropriate goal:X or Y) and the background, i.e. reactions of the form X + n → X + n′ or X + n → n′ + X, so that your team has a better chance of winning. No other reactions are allowed. The fixed reactions each have rate 10, and you have a total rate budget of 200 to distribute among your team’s reactions.— We provide two team implementations  on our simulator website, in the ‘Molecular Rugby’ example. Can you build a ruleset that beats ours more than half the time?K teams, each team plays each other team N times. If one team makes at least — In a competition between X1, X2, …. Perhaps….— Invent your own variant of molecular rugby. Perhaps start with different background patterns, such as vertical stripes as yard lines. Perhaps let the background decay like pheromones using reactions 9 → 8, 8 → 7, …. Perhaps have more or less background states. Perhaps allow team players to have more internal states, e.g. Molecular rugby is played on a fixed initial field, with a ball, seven To explore these and other difficulties of molecular design, we propose a new molecular sport—molecular rugby. In molecular rugby, states representing players on two opposing teams, 7.What, in principle, can chemistry on a surface do?We have addressed this question with a simple asynchronous cellular-automata-like framework—the surface CRN—that serves as a tractable and comprehensible model of chemistry on a surface. In this model, unimolecular and bimolecular reactions specified in a rule set can occur at any site and between any two neighbouring sites on a surface, respectively. Surface CRNs may not capture the full richness of all possible physics that can occur on a surface surrounded by chemicals, but we claim that they capture many of the important features of chemistry-on-a-surface in much the same way that well-mixed CRNs capture many of the important features of chemistry-in-a-tube.What can chemistry do on a surface, according to the surface CRN model? The short answer is that chemistry on a surface is Turing-universal, and so in principle can do anything that a computer can do.More concretely, there are relatively simple and comprehensible surface CRN designs of reaction–diffusion behaviour, direct simulation of synchronous cellular automata, and arbitrary Boolean logic circuits. We have also defined surface CRNs with simple pattern formation and simple swarm behaviours, and we believe that more complex and diverse behaviours are possible with larger rule sets involving more surface reactions.What constraints, if any, does being on a surface impose on chemistry?According to the surface CRN model, as we have seen from the manufacturing and swarm examples, computation with just local information and no absolute orientation requires different algorithms compared to that with both local and global information. The differences often lead to either larger numbers of reaction steps to accomplish a task or larger rule sets to compute the information that are not immediately available.What is surface CRN better at doing than well-mixed CRNs and polymer CRNs?molecular interaction for complexity of spatial placement—if you can precisely place molecules on a surface, then you can program behaviours with fewer molecular interactions, which will allow skilled chemists to build more complex chemical systems with dynamic and algorithmic behaviours.In well-mixed CRNs, a larger number of specific molecular interactions is required for computing a more complex task. In practice, any compromise in that specificity would result in undesired side reactions that limit the scalability of the CRNs. Surface CRNs trade off complexity of As an example, let us compare the logic circuit designs shown in §Moreover, surface CRNs can be massively parallel. Billions to trillions of tiny surfaces could float around in one test tube, each carrying out a distinct computation. By contrast, a well-mixed CRN in one test tube can compute exactly one thing at any time. In principle, polymer CRNs can be parallel , but exiThe theoretical understanding that we have explored in this work will hopefully inspire construction of increasingly interesting chemical systems on surfaces. There already exist systematic methods for implementing arbitrary well-mixed CRNs using DNA nanotechnology, both in theory  and pracBeyond guiding efforts to engineer molecular machines, studying the surface CRN model will also help answer a fundamental question: what capabilities and constraints of molecular interactions guided the origin and evolution of life? While surface CRNs are more scalable and parallel than well-mixed and polymer CRNs, no single type of chemistry alone provides the sole solution for life-level complexity. The receptors on cell membranes represent an example of surface chemistry. The filaments in cytoskeletons represent an example of polymer chemistry. The transcription factors in genetic regulatory circuits represent an example of well-mixed chemistry. Understanding the advantages and trade-offs of each type of chemistry will clarify the design principles for both engineered and natural molecular systems, for example defining what the best geometry (or combination of geometries) is for solving a given molecular task. Naturally, this will require investigation of more complex possibilities—including three-dimensional geometry, reconfiguration between different geometries, and integration of different geometries—and will put us on the road toward understanding and engineering molecular systems with behaviours as sophisticated as those seen in biology.


Chemical 24/7 we compare and contrast the chemical practices of youth working at leisure industry sites in the global North to those of the low-income service sector and manual workers in the global South, and discuss how these different working conditions perpetuate chemical use. Our interlocutors rely on a range of chemicals for their work and social lives, and they develop practices to moderate their use in order to avoid adverse effects. Yet their practices differ depending on the availability, marketing, and policing of the substances.This chapter shines a light on what happens in the dark: specifically, we present ethnographic insights from the nightlife economy and how chemicals enable youth to work “24/7.” Producers, promoters, DJs, hosts, artists, performers, drag queens, musicians, stage managers, bartenders, hospitality girls, and dancers from Amsterdam, Brooklyn, Bira (Indonesia), and Puerto Princesa (the Philippines) share with the ChemicalYouth team the various stimulants they use to stay awake and perform their jobs during non-typical working hours, and the other chemicals that they take in order to be able to sleep and recover afterwards. In  We have so many ethnographic stories to tell about how young people use chemicals for energy, so many, that I have had a hard time developing a structure for this chapter. Having just moved back from to the Netherlands from the United States because of the coronavirus pandemic, I’m also still a bit jetlagged. I need a coffee. Thinking this, I’m reminded of a conversation I had with one of the youth ethnographers, Daan Kamps, a student and DJ in the Amsterdam nightlife scene, which he studied for the ChemicalYouth project. A few years ago, we were having lunch to discuss his interviews and observations, and I had just returned from a fieldwork visit to the Philippines. “I need a coffee,” I told him. I’m jetlagged. Having just completed a course on chronobiology to educate himself on the circadian rhythms of humans, he lectured me on the health risks of jetlag: it can impair cognition, concentration, and motor coordination as well as cause metabolic disorders, such as obesity and high blood pressure , such as Ritalin and dexamphetamine, by students trying to increase their focus and attention when studying, and to stay up late when partying. But these studies generally focus on student populations. In this chapter, we present ethnographic insights on the use of various stimulants to stay awake and fight fatigue by workers in the nighttime leisure economy, the bartenders, DJs, sound technicians, photographers, and event organizers who must perform professionally during the night. We contrast the 24/7 chemical practices in Brooklyn and Amsterdam, two leisure industry sites in the global North, with the 24/7 chemical practices of low-income service sector and manual workers in our field sites in the global South: Puerto Princesa and Cagayan de Oro (the Philippines), and Makassar (Indonesia). Here the substances are not only used to stay awake, but also to endure heavy physical labor. We find that practices differ depending on the availability, marketing, and policing of the various legal and illegal stimulants, and that risks are shaped by the structure of everyday life, the rhythms of stimulant use, and workplace policies. We also show how—across the sites—users moderate intake in order to avoid adverse effects, including their negative influence on the quality of sleep, and how they mitigate such effects by using other substances, such as cannabis or alcohol, to calm down.In Brooklyn and Amsterdam our youth ethnographers conducted focused research on the nighttime leisure industry, with Tait Mandler studying DIY queer parties in Brooklyn and Daan Kamps studying popular clubs in Amsterdam. In these field sites, event managers organize the artists, barkeepers provide drinks, DJs create music, and sound technicians fine tune it. Mandler and Kamps found that the workers in these entertainment spaces balanced their engagement in the party and staying fit for work. All moderated their alcohol intake and they took stimulants to stay alert till the end of the night. Mandler  observesOur interlocutors in these two cities presented themselves as experienced moderators of circadian rhythms. They had developed personal strategies of stimulant use, aimed at generating the right amount of alertness, while also enabling pleasure at work. They scheduled their use around work and other responsibilities, monitored their dosage to ensure moderation, and took breaks from using when necessary. But all attested to the heavy toll that nightwork has on their bodies, especially if they combine nightwork with daytime jobs, or coursework, both of which require rapid transitions from night wakefulness to daytime alertness.That morning I go to work all day, so I’ll have a coffee there. I get home around 6:30 pm or 7 pm. … [I] get to the club around 10:30 pm … and drink a big non-alcoholic drink to bookend the night with. Like seltzer and a fruit juice … Then right around midnight I start drinking … something like vodka with a fruit mixer. Throughout the night I’ll probably have two and half of those. Maybe someone had coke and I’ve done a bump [small snort] or two. Around 3 am or 3:30 am I’ll have left the club … I’ll sleep for three and half or four hours before I have to get up and go to work where I’ll drink a little coffee. Mandler , p. 263In Brooklyn, Mandler , 2018 foAlice produced underground queer events in warehouses that usually started around 11 pm and continued well past 4 am. She also worked for a nightlife magazine and was active on social media, which has made her a popular party host. Alice explained that she did not really enjoy the nightlife culture and was mainly interested in her own friends. However, her job was to promote events as if they were going to make for the best night ever. She didn’t drink much at these parties, but made sure to hold a drink; this made her feel as if she was engaged in the party, and dissuaded people from asking why she was not drinking. If she consumed alcohol, she said, she could not produce the parties well, and she would be tired before they were over. Cocaine, in contrast, helped her be more assertive, “but sometimes this also [led] her to stand on the stage at the end of a party and watch the crowd dance to the final songs in awe” Mandler , p. 2.I take smaller bumps, I try not to do a whole line. I space it out throughout the night. Also sharing kind of helps. If I’m going to do some and I have someone else to do it with, it sort of tricks me. Mandler , p. 269For Cassandra, and many other nightlife workers, the use of cocaine was not the event of the night. They moderated use, spacing and sharing it, as Dan explains:doesn’t really affect my ability to judge … so that’s sort of the stimulant choice. I don’t like coffee; it wrecks my stomach. I hate things like Adderall, they’re too strong. Cocaine is light and it can keep me awake and after I get home I’ll fall asleep maybe an hour later. Mandler , p. 263Val explained that he preferred cocaine because it:Moderating their substance use was a common goal among these nightlife workers. They monitored the chemical use of their friends, specifically checking if it negatively affected their ability to function on the job or socially; and used the same criteria to evaluate their own chemical practice. Some limited themselves to a few drinks or bumps. Even so, at times, they felt that they had gone too far, at which point they took a break from using a specific drug, or even all chemicals Mandler .Kamps interviewed 24 people who work in Amsterdam clubs. He recorded systematically which stimulants they used to stay alert and awake at work. Out of the 24 participants, 23 drank energy drinks and/or Coca Cola, 16 consumed amphetamines ( including ADHD drugs), and 15 used cocaine. As was the case in Brooklyn, the workers he spoke with asserted that they had developed personal strategies to stay awake and alert on the job. Many smoked cigarettes and drank alcohol; the two go well together, they said. Alcohol helped them feel more engaged with and connected to the clients at the clubs. But they felt compelled to moderate their alcohol consumption so as not to become too drunk to work.Event organizers and venue programmers are responsible for the overall success of the party. They pick up the DJs, manage the guest list, decorate the venue, and are present for the sound check. They feel responsible for getting the dance floor filled and creating the euphoric ambience. Maarten, a venue manager used cocaine to stay alert and be sociable when preparing for events and to tune in with the atmosphere of the party. Meike, an event organizer and hostess, said she often worked long, 10-hour shifts, till 8 am the next morning. Besides taking smoking breaks, she often drank Club Mate, which she combined with vodka. Club Mate is an energy drink with 50 mg caffeine per 250 ml and low sugar content (less sugar than Red Bull). Nadine, too, who worked as a barkeeper, used cocaine for energy, alertness, and confidence.DJs need to keep the crowd going through the night. Sander, a well-known DJ, talked about using ADHD drugs to keep up the vibe. His girlfriend had been diagnosed with ADHD and prescribed dexamphetamine. Before he left for work in the evening, Sander usually took two 20 mg tablets of dexamphetamine, and then took another dose if he felt tired during the night. Sander said that dextroamphetamine worked well: it kept him alert, without anyone noticing that he had taken drugs. The DJs interviewed by Kamps all attested to the highly desirable effects of amphetamines. The substances create very energetic states of being that contribute to the party atmosphere. The sound technician makes sure the music reaches the audience as well as possible. “Being alert and focused—paying continuous attention to sound levels, depth, clarity, and space—is of utmost importance, and the longer the event lasts, the greater the challenge,” explained one sound tech .While moderating their stimulant use, and complementing it with other substances such as cannabis and melatonin to sleep, many of the interlocutors admitted to feeling burned out over time, which they attributed not only to their substance use but also simply to the lack of daylight in their lives.yaba (crazy drugs) in its pill form in Thailand, and shabu in its powder form  in Indonesia and the Philippines—entered the market in the 1990s to enhance performance in physically demanding roles. A young construction worker in Thailand reports:yaba we would be able to deliver only one or two trailers. But when we took yaba we became diligent.  porters in the harbor, vendors to the bus passengers that frequent the port, and occasionally at night as sex workers. Their work comprised of long hours hanging around till boats and buses arrived. Some of them combined working as a porter with selling freshly roasted peanuts and drinks to bus passengers. Lasco learned that their work as street vendors also, ocassionally, involved stealing mobile phones from travelers, joining in “car-napping operations,” and engaging in sex work.Participating in the ChemicalYouth project, Lasco examined the use of Shabu, they asserted, provided them with confidence and stamina, and reduced their inhibitions, allowing them to engage in a multitude of services. One told Lasco (shabu?” (p. 785). Young men were initiated into shabu inhaling by their barkada, which is both a social and economic group consisting of peers. The cost of one small sachet of shabu, which can be used by three people, is 500 pesos (US $12.5); the paraphernalia, consisting of three bits of aluminum foil and a lighter to heat the substance, was also shared. Everyone in a barkada uses shabu, which expresses loyalty, thereby forging social bonding in the group. “Scoring” sessions take place in ordinary port houses called “pwesto” . The owner of the pwesto collects 20 pesos from the users, in exchange for providing them with the security of being in a private home where the substance can be used away from the gaze of the police. The young men said that, after an immediate euphoria, they experience a sustained effect of being “kalmado”  and “ganado” (enthusiastic). They said that using shabu boosted their skills, abilities, and industriousness. Like Kamps’s informants in Amsterdam, they treated any insomnia caused by their shabu use with cannabis and Red Horse beer, which they routinely used to fall asleep. Several evenings a week, the barkadas gathered at night to drink alcohol together (inuman); this was leisure time. The costs for these evenings were shared by the whole barkada, unless someone was celebrating his birthday, in which case, the celebrant was expected to foot the bill. In the inuman, Red Horse often gave way to harder alcohol, such as a brandy called “Empi Light” .Lasco described how his informants killed time while “standing by” by smoking cigarettes, as many as 10–20 cigarettes a day. ld Lasco , “We areAlerted to the precariousness of his interlocutors’ lives, Lasco  calculatshabu, there were also a few young men who resisted doing so. One of them explained that users often lost the ability to distinguish between using in order to work, and working in order to use  and bought their lunch (US $1). Most of our interlocutors also supported families and other dependents, and struggled in the face of the rising costs of basic necessities, such as rice, fish, and gasoline. Many fell into debt, and lived in a perpetual struggle to pay their bills and promissory notes. The precarious economic situation of most security guards meant that they depended on keeping their jobs, and any absence from work meant that they lost pay. Furthermore, many feared being caught sleeping on the job, which could result in an instant dismissal. Many security guards thus resorted to chemical stimulants, which they called “Generally, “to be alert” meant being aware of anything in the vicinity. Troubles and crimes could come along at any time. In this manner, the guards’ lives were at risk, as they were expected to protect people and the establishment for which they are responsible. Most security guards were men, and most were on duty at night. Some security agencies told us that female guards were not permitted to work the night shift, because, they said, female guards were not on par with male guards in terms of alertness and self-defense. But still, female guards were often found at the entrances of department stores and malls, to name a few.Fourteen of the security guards interviewed by Diego drank instant coffee to keep themselves awake , and 12 of them also drank energy drinks during their shifts, see Table Table sari-sari stores  and the brand is heavily advertised on TV and through Twitter, Facebook, and YouTube. Everyone in the Philippines knows Cobra’s slogans: “May Laban Ka” (you’re up against it) and “Tunay na Lakas” (full of strength). Its popularity is attributed to the fact that it is promoted by the award-winning Filipino actor Coco Martin (the attractive muscular guy on the left in below advertisement) . It also contains B vitamins, ginseng, and sugar. Cobra is the market leader in the energy drinks segment of the beverages market in the Philippines, accounting for 74% of sales  Fig. .Fig. 6.1See Fig. Despite the popularity of this energy drink, users’ experiences are mixed. Bryan, a 25-year-old security guard at a department store, told us that sometimes when he uses Cobra he felt wide awake, but there were also times when he couldn’t help falling asleep. Charm, a female guard at a university, said that Cobra caused her to suffer a urinary tract infection. When she stopped using Cobra, she just walked around her post in order to avoid feeling sleepy while on duty.shabu to stay alert during the night shift, perhaps because Puerto Princesa has a zero tolerance policy for drug use. One of the guards, Joker, told us of how he used shabu when he needed to serve as a shift reliever, meaning he had to be at his post almost 22 hours in a row. He also shared that there was a popular drug called Fly High that could also be used to stay alert and was also effective in increasing stamina during sexual intercourse. He said that this drug was a combination of methamphetamine, Viagra, and ecstasy, and could be bought for around US $30–60 per tablet. When asked about the effect of the drug, Joker responded, “For three to four days you will not feel hungry, your being awake is continuous, your awareness will be active, you are unstoppable, and you have more stamina for sex” , “jiwa laki bukan pengecut” (men’s souls not cowardly), and “ Extra Joss, perfect goal”  that stimulate men to buy and consume them. The sachets are also marketed by sales promotion girls, see Fig. Energy drinks, which are classified as “health drinks” in Indonesia, were the most commonly used stimulants in these fieldwork sites. Kuku Bima and Extra Joss are popular local brands, sold in sachets (US $0.06/sachet) in groceries and informal stalls, and mixed with water by vendors ; and strength —but also competition .Although advertising plays an important role in promoting the use of energy drinks, workers generally learned about energy drinks from their coworkers who first consumed them. Table Limited rest periods and the heavy workload made it difficult for manual laborers to take a lunch break, so consuming energy drinks became a substitute for lunch. Surti (24-year-old construction worker), for example, felt full and energetic after consuming KukuBima Ener-G, even when she had not eaten. Ulla, a 24-year-old dockworker, admitted to frequently consuming KukuBima Ener-G (grape flavor) while resting in order to restore her stamina before her next shift. Ella and her coworkers would regularly consume such energy drinks in large volumes, often mixing five or six sachets with a jug of cold water.Energy drinks were used not only to work during the day but also for overtime shifts. Foremen regularly asked workers to work 12 hours a day and to continue working over the weekend to get the job done. Ariana, a 23-year-old construction worker, said she drank energy drinks (Extra Joss Active) only when working overtime, after a 12-hour shift. For some of our interlocutors, energy drinks were panaceas, used to overcome body aches, increase appetite, and improve sleep quality.In the workplace, they buy it for us, usually bought in the morning, and also the afternoon, the foreman notes it. Usually we make one box of grape flavored KukuBima Ener-G mixed with milk, mixed with water in a jug, and we drink it together. Anwar , p. 196The construction workers preferred KukuBima Ener-G. Their foreman bought the sachets for them, and deducted these costs from their salary. Ratih, a 20-year-old, explained:Energy drinks were consumed not only for work but also for fun. After receiving their wages, the construction and dock workers would gather and hang out with friends, staying up late watching movies together while eating junk foods and drinking energy drinks. Energy drinks were mixed with milk or with cheap alcohol. Our interlocutors explained that the alcoholic mixes made them sleep well, relieved body aches, and strengthened them for work the next day.The widespread use of energy drinks for both work and recreation in our field sites in Makassar meant that the workers had a relatively high intake of caffeine. We wondered: did our interlocutors care about the dangers of consuming energy drinks? Sari, a 24-year-old construction worker, claimed she did not know about the high level of caffeine, and was surprised that energy drinks were considered harmful in excess. Ruslan, a 24-year-old dockworker, said that he had tried to consume a M-150, but experienced heart palpitations. Although Extra Joss Active did not have a negative effect on his body, he preferred KukuBima Ener-G because of its grape flavor, which he found delicious. Asril, a  20-year-old construction worker, moved from one energy drink brand to another. While he found Extra Joss Active tasty, he, like Ruslan, preferred KukuBima Ener-G because of its grape taste; for him, Kratingdaeng was not an option because it caused a variety of negative effects: heartburn, dizziness, stomach ulcers, and nausea. Kamaruddin, a  20-year-old dockworker, also chose KukuBima Ener-G rather than Extra Joss Active, because Extra Joss Active caused a burning sensation in his throat every time he consumed it.Among those concerned about the side effects of regularly consuming energy drinks, some had reduced their energy drink consumption, and some were looking for alternatives to overcome tiredness. Jamal, a 20-year-old construction worker, had limited his consumption of energy drinks, replacing them with other cold drinks that contain lots of sugar (like Teh Gelas) or water. Others quit consuming energy drinks cold turkey. Muhlis, a 24-year-old dockworker, for example, stopped consuming all energy drinks because he often experienced stomach pain and heat in his throat. He tried to prevent these adverse effects by consuming plain soda water mixed with milk and Pilkita—an analgesic drug sold as a “strength drug”—because he believed that the mixture could relieve his pain. Ulla, a 24-year-old dockworker, had replaced energy drinks with a mixture of soda water and raw chicken eggs.Scholars of youth have described how young people use stimulants—mostly ADHD drugs—to work long hours to keep up with academic requirements, a practice that is considered problematic because it is an “ off-label” use and because it may create academic advantage in allowing users to unfairly enhance their performance (Coveney et al. One of the rare studies that examines the use of energy drinks by youth found that nearly one in five students of a secondary school in Ontario consumed energy drinks to be alert (Reid et al. Our approach of examining situated chemical practices allowed our youth ethnographers to observe both the use of stimulants and the use of chemicals to address sleep problems. Across our sites in Amsterdam, Brooklyn, Puerto Princesa, and Makassar, we found that patterns of stimulant use differed. The porters in the Philippines earned money not only by carrying wares from buses to boats and back. They also earned money by selling goods and sex. For this interactional labor, they valued the confidence enhancement that amphetamines offer. The security guards whom we interviewed in Puerto Princesa sought products to keep them awake during their night shifts. For them, energy drinks did the trick. But they earned very little money, and energy drinks took a substantial part of their limited income, which forced them to moderate their use. In Indonesia, energy drinks are very cheap, and people used them as a panacea, not only to have stamina at work but also for virility and for bodily aches, and they valued the flavor that energy drinks brought to mixed alcoholic drinks. But the consumption of the caffeine in these drinks can lead to adverse effects, such as heart palpitations and nausea. Several of our interlocutors were trying to quit using energy drinks for these reasons. In Amsterdam, our ethnographic research found that nightlife workers also used amphetamines to stay alert, but they could easily get ahold of ADHD drugs for this purpose. Moreover, in both Brooklyn and Amsterdam night workers often used cocaine, which is much more expensive than crystal meth, to enhance their work performance. Both ADHD drugs and cocaine have less potential for addiction and less severe adverse effects than crystal meth NIDA . In bothHarm reduction programs, designed to mitigate drug harms, fail to recognize the health risks, including tiredness and sleep problems, related to the widespread use of energy drinks and other legal stimulants by youth (Hardon and Hymans Our field studies suggest that, to address these health risks, student and occupational health programs are needed to not only inform youth of the risks of using stimulants frequently but also to address the study demands and work conditions that give rise to the need for these drugs in the first place. Academic cultures place high demands on students, normalizing night work. Participating in stress-inducing academic cultures, working the night shift as security guards and club staff, and putting in long hours doing heavy labor on construction sites and in harbors—all of these fuel demands for energy drinks and amphetamines to stay alert, to have the stamina, and to feel the physical strength needed for the job.The tiredness and sleep problems experienced by our interlocutors need to be remedied by better work conditions, as pointed out by Costa  and WolfDaan Kamps graduated from the Research Master’s program in Social Sciences at the University of Amsterdam. His current research interests lie in urban nightlife work, chronobiology, and drug use, which he studied as a researcher for the ChemicalYouth project. For more than five years, he has been active within the Amsterdam club circuit as a DJ and event organizer, which provided him the opportunity to become familiar with the field Fig. .Fig. 6.5Tait Mandler carried out research in Brooklyn, New York, on the lives of workers in queer nightlife spaces. Their research explored the ways that workers use chemicals to get their jobs done and how they care for themselves and others Fig. .Fig. 6.6Philippine Daily Inquirer, where he writes about health, culture, and society (Fig. Gideon Lasco is a physician and medical anthropologist. He obtained his Ph.D. from the University of Amsterdam and his M.D. from the University of the Philippines, where he currently teaches anthropology. His research examines the chemical practices of young people, the meanings of human height, the politics of health care, and the lived realities of the Philippine “ drug war.” A Palanca-winning essayist, he maintains a weekly column in the ety Fig. .Fig. 6.7Leo Diego was a researcher for the ChemicalYouth project at the Palawan Studies Center at Palawan State University and conducted fieldwork on security guards’ chemical practices in the Philippines.Ahsani Amalia Anwar was a researcher for the ChemicalYouth project at the Palawan Studies Center at Palawan State University and conducted fieldwork on the social lives of energy drinks among physical laborers in Indonesia.