# Exploring the programmability of autocatalytic chemical reaction networks

### Influencing the rate of autocatalysis

We first examined the influence of the metal ions (Ca^{2+}, La^{3+} and Nd^{3+}) on the rate of trypsin autocatalysis under batch conditions. Tg (100 μM), Tr (1 μM) and Ca^{2+} (20 mM) were initially mixed, and we monitored the change in the concentration of Tr, [Tr], using a standard assay with Na-Benzoyl-DL-arginine 4-nitroanilide, Nα-Benzoyl-DL-arginine 4-nitroanilide hydrochloride (BAPNA). Figure 2a depicts a typical sigmoidal curve—a sharp transition that is characteristic to an autocatalytic conversion—can be initiated earlier when La^{3+} or Nd^{3+} was added to the mixture. In greater detail, Fig. 2b–d depicts the [Tr] at three specific time points of a set of experiments wherein we varied the concentration of the three metal ions (Supplementary Fig. 3). Two important effects were observed in the examined range of concentrations of the ions: (I) La^{3+} can accelerate the rate of autocatalysis, and the acceleration is much stronger than when Ca^{2+} was used. Figure 2b, c show that [Tr] increases until it saturates as the initial concentration of Ca^{2+} and La^{3+} ([Ca^{2+}]_{0} and [La^{3+}]_{0}) are increased. (II) Nd^{3+}, in contrast, can accelerate and decelerate the rate of autocatalysis. Figure 2d shows that the [Tr] increases when the initial concentration of Nd^{3+} ([Nd^{3+}]_{0}) increases from 0 to 0.3 mM. Upon further increase of [Nd^{3+}]_{0}, however, the [Tr] decreases. This pattern was established in any of the three time points. Overall, the observations suggest that all examined ions change the apparent rate of autocatalysis, affecting the rate to a different extent.

How the metal ions (X) affect Tr autocatalysis is proposed in Fig. 3. Based on the batch experiments, we assume that (I) autocatalysis cannot occur without any of the metal ions; (II) binding of the ions to Tr (depicted as [TrX]) can ‘activate’ autocatalysis, changing the apparent rate constant for the conversion of Tg into Tr (indicated by *k*_{x}); (III) binding of Nd^{3+} to Tg (depicted as [Nd^{3+}Tg]) can ‘de-activate’ autocatalysis, slowing down the conversion of Tg into Tr. Notably, this effect was not observed when La^{3+} or Ca^{2+} were used. We performed control experiments using gel electrophoresis (i*.*e., SDS-PAGE) for samples from the reaction mixtures to examine the product distribution as a function of [Nd^{3+}]_{0} (Supplementary Fig. 4). The gels revealed that, only at optimal [Nd^{3+}]_{0} (0.3–0.4 mM), Tg is fully hydrolysed after 16 min of the reaction.

Intrigued by this observation, we investigated if the effect of [Nd]_{0} on autocatalysis can be explained using a Michaelis–Menten model. Supplementary Fig. 6, however, shows that both kinetic parameters (*K*_{M} and *k*_{cat}) change as a function of [Nd^{3+}]_{0}, and led us to the conclusion that the Michaelis–Menten approach could not provide a straightforward explanation for the observed nonlinear effect. Alternatively, a first-order degradation of Tr was also investigated but Supplementary Fig. 7 showed that such degradation step could not explain the nonlinear effect either. Considering these limitations, we developed a mathematical model based on the set of ordinary differential equations according to the processes in Fig. 3. Arithmetic equations are incorporated to account for the binding of the ions to the proteins. Details of the mathematical model is appended to Supplementary Methods *Mathematical modelling* section.

### Nonlinear effect of Nd^{3+} in flow

Next, we establish control over trypsin concentration in time under flow conditions. Figure 4a depicts a flow experiment wherein we changed the [Nd^{3+}]_{0} (from 0 to 0.7 mM and back in steps of 0.05 mM per 30 min) and monitored [Tr] continuously. Essentially, the residence time in the CSTR, *τ* (determined by the volume of the CSTR divided over the total flow rate), was comparable to our batch experiments with a reaction time of 6 min. In accordance with our batch experiments, a maximum in [Tr] could indeed be reached when the input satisfied the condition 0.20 ≤ [Nd^{3+}]_{0} ≤ 0.40 mM. Outside this range, we found that [Tr] was significantly lower. Figure 4b summarises how the use of *τ* as a flow parameter could tune the behaviour of the system, characterised by an apparent non-equilibrium steady state, [Tr]*, which we determined as the average [Tr] over the last 5 min before [Nd^{3+}]_{0} was changed. The use of a higher residence time (*τ* = 10 min) could maintain the nonlinear response but with an elevate values of [Tr]. Hence, while a change in the flow parameter changes the absolute concentrations in [Tr]*, the nonlinear effect of Nd^{3+} on Tr autocatalysis remains.

We increase the level of control by forcing competitive binding^{32,33,34} among several ions. Figure 4c illustrates our approach wherein five different values of [Nd^{3+}]_{0} was used to change the rate of Tr autocatalysis in the presence of a second ion (La^{3+} or Ca^{2+}). The addition of a slower catalysing ion [Ca^{2+}]_{0} (20 mM) resulted in the same nonlinear response as in the absence of a second ion (black line) but changed in the position of its local maximum (dashed line). That is, the maximum [Tr]* remained around 35 µM but moved towards slightly higher [Nd^{3+}]_{0} compared to the systems without Ca^{2+}. Similarly, the addition of the faster acting catalyst [La^{3+}] also resulted in the same nonlinear response but led to a change in the position of its local maximum into the direction of a lower [Nd^{3+}]_{0} (dotted line). We used our model to confirm the observation that the local maximum can shift in different directions in the presence of the metal ions (Supplementary Fig. 8).

The opposing effects that the mixtures of ions induce can be mapped onto polynomial functions with different degrees (Fig. 4d). The relation between [Tr]* and [Nd^{3+}]_{0} can be approximated with a quadratic function in the absence of an additional ion, and the degree of the polynomial function is therefore 2. In the presence of Ca^{2+}, this relation changes but only at higher concentrations of [Nd^{3+}]_{0} and therefore the nature of the polynomial function, its degree, does not change and remains 2. In the presence of La^{3+}, however, the behaviour can change from a quadratic to a linear relation, and the degree of the polynomial function becomes 1. An experiment with both La^{3+} and Ca^{2+} shows that the competition for different binding sites allows for a combination of two opposing effects, creating a mechanism to maintain [Tr]* within the narrow range of [Nd^{3+}]_{0}. In the presence of Ca^{3+} and La^{3+}, the behaviour became close to constant (i.e., a polynomial function with the degree 0). The mapping of a chemical output onto polynomial functions as demonstrated here underscores the flexibility of using metal ions in controlling the autocatalytic network.

### Nd^{3+}-induced temporal logic operations

Next, we developed a procedure to obtain Boolean functions for [Tr]* by varying only [Nd^{3+}]_{0}. Figure 5a illustrates our concept wherein three different values for [Nd^{3+}]_{0} of a given range (a minimum, maximum and a value in between) correspond to four binary combinations (0|0; 0|1; 1|1; 1|0). The notation [Nd^{3+}]_{A|B} is used to represent the input sequence [Nd^{3+}]_{0|0}; [Nd^{3+}]_{1|0}; [Nd^{3+}]_{1|1}; [Nd^{3+}]_{0|1}. As an example, Fig. 5b shows the output sequences for the gates NAND and XOR. We chose the not-AND (NAND) and exclusive-OR (XOR) gates because they are exemplary for functional completeness^{35} and nonlinear classification^{36}, and are considered difficult to construct using chemical systems^{37,38}. The differences between the two gates reside on the range of [Nd^{3+}]_{0} that was applied: the maximum [Nd^{3+}]_{0} in both cases is 0.6 mM but minimum [Nd^{3+}]_{0} is 0.2 and 0 mM, respectively. The top graph in Fig. 5b, shows five conditions wherein [Nd^{3+}]_{0} is changed in steps of 45 min. The first four conditions represent the input 0|0; 0|1; 1|1; 1|0, with the corresponding response in Tr for the two sequences demonstrated in the below graph. A threshold [Tr] with an arbitrary value (20 µM), was used to determine if the observed values in the sequence were true, ‘1’ or false, ‘0’. For the first sequence, [Tr]* exceeded the threshold (red line) at all conditions, except for [Nd^{3+}]_{1|1}. Hence, the input combination resulted in an output sequence representing the NAND-gate: [Tr]_{0|0} = **1**; [Tr]_{0|1} = **1**; [Tr]_{1|0} = **1**; [Tr]_{1|1} = **0**. For XOR, [Tr]* exceeded the threshold at two conditions, namely for [Nd^{3+}]_{0|1} and [Nd^{3+}]_{1|0}, yielding the sequence representing the XOR gate: [Tr]_{0|0} = **0**; [Tr]_{0|1} = **1**; [Tr]_{1|0} = **1**; [Tr]_{1|1} = **0**. The initial value was recovered in the final condition ([Tr]* at [Nd^{3+}]_{0|0}), demonstrating that the output signal can be reset.

Other gates (AND, OR, NOR) can be developed using a similar procedure (Supplementary Fig. 9). Figure 5c summarises these experiments by plotting the output concentration as a function of [Nd^{3+}]_{0}. The results underline that a change in the minimum and maximum of [Nd^{3+}]_{0} is sufficient to create different logic operations. We, thus, showed that the autocatalytic reaction can accept instructions (in this case, encoded as an input sequence based on [Nd^{3+}]) to perform a range of logic operations.

We used our mathematical model to simulate the response of this autocatalytic network based on changes in the residence time and the concentration of the metal ion. A procedure was developed to discriminate between the different types of logic. Briefly, the ratio [Tr]_{1|1}:[Tr]_{1|0} was used to distinguish AND, OR and XOR and the ratio ([Tr]_{1|1} + [Tr]_{1|0}):[Tr]_{0|0} was used to distinguish NAND and NOR (Supplementary Methods *Criteria for distinguishing logic gates* section). Figure 5d depicts the simulated phase space of the autocatalytic network and shows that the regions of AND, NAND, NOR, XOR and OR can be found in a narrow range of parameters and depending on the [Nd^{3+}]_{0|0} the regions can overlap. Each grid in the phase space represents a predicted response in [Tr]_{ss} as a function of input sequence (0|0; 0|1; 1|1; 1|0), and [Nd^{3+}]_{1|1} is placed on the Y axis. [Nd^{3+}]_{0|0} on Fig. 5d for AND, OR, XOR equals 0 mM and for NAND and NOR equals 0.2 mM. The phase plot shows that a parameter window exists to maintain each logic operation, ensuring that the desired functions of the system are robust^{39}. This robustness, however, differs per operation. A comparison between the simulated areas for, and experimentally observed, logic gates (open symbols) demonstrates that the model is in good agreement with the experiments. The method of creating logic gates is not restricted to Nd^{3+}, and ions can be combined to change the phase space (Supplementary Fig. 10). More importantly, we show that lowering the residence time during the experiment (indicated with the red symbols) could change the output sequence from a XOR or an AND into an OR gate, demonstrating that the Boolean functions can be readily tuned (Supplementary Fig. 11).

### Increasing the control over temporal logic operations

The use of an external component such as an inhibitor for thresholding provides further control over the network properties (Fig. 6a). Without the inhibitor, the low steady state was stabilised by continuously depleting Tr using flow, which leads to an unstable steady state. The incorporation of the inhibitor enables a stable and low steady state (as Tr becomes inactive) but does not change the stability of the high steady state, which is supported by autocatalytic production of Tr^{30}. Figure 6b shows a sequence wherein the [Nd^{3+}]_{0} was changed from a low to a high value, and vice versa, in the presence of a trypsin inhibitor (I, at a concentration of 8, 4, and 2 µM). Overall, [Tr] changes from a high to a low concentration when [Nd^{3+}]_{0} was changed from 0.3 to 0.8 mM. At an inhibitor concentration that appeared to be too high ([I]_{0} = 8 µM), we observed that original [Tr]* cannot be recovered and instead remains low when [Nd^{3+}]_{0} was changed in the opposite direction (from 0.8 to 0.3 mM). The observation that a pulse in [Nd^{3+}]_{0} (i*.*e., the sequence 0.3–0.8–0.3 mM) enabled a retention of the low [Tr]* demonstrates that the autocatalytic network, in the presence of the inhibitor, is capable of a so-called long-term depression of the input. This effect disappeared when the inhibitor concentration was lowered to [I]_{0} = 4 µM but notably [Tr]* remains to depend on the amount of inhibitor present in its preceding state, I*.e*., the response is history dependent. Validations in Supplementary Fig. 12 supports the observation that the XOR gate is (and perhaps other logic gates are) history dependent. The history dependency was lost when [I]_{0} = 2 µM was applied and, instead, the response became bistable. That the signal could fully recover, however, shows that a trace of inhibitor allows for an increased robustness of the output signal. Hence, while the metal ion provides control for tuning and switching of the logic operation, an inhibitor was introduced as an additional control parameter for strengthening or weakening its history dependency.

link