Skip to main content
Log in

CRN++: Molecular programming language

  • Published:
Natural Computing Aims and scope Submit manuscript

Abstract

Synthetic biology is a rapidly emerging research area, with expected wide-ranging impact in biology, nanofabrication, and medicine. A key technical challenge lies in embedding computation in molecular contexts where electronic micro-controllers cannot be inserted. This necessitates effective representation of computation using molecular components. While previous work established the Turing-completeness of chemical reactions, defining representations that are faithful, efficient, and practical remains challenging . This paper introduces CRN++, a new language for programming deterministic (mass-action) chemical kinetics to perform computation. We present its syntax and semantics, and build a compiler translating CRN++ programs into chemical reactions, thereby laying the foundation of a comprehensive framework for molecular programming. Our language addresses the key challenge of embedding familiar imperative constructs into a set of chemical reactions happening simultaneously and manipulating real-valued concentrations. Although some deviation from ideal output value cannot be avoided, we develop methods to minimize the error, and implement error analysis tools. We demonstrate the feasibility of using CRN++on a suite of well-known algorithms for discrete and real-valued computation. CRN++ can be easily extended to support new commands or chemical reaction implementations, and thus provides a foundation for developing more robust and practical molecular programs.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Notes

  1. Although certain pathological CRNs can drive concentrations to infinity in finite time (e.g., \(2A \rightarrow 3A\)), and thereby drive certain other species to 0 in finite time (e.g., with an additional \(B + A \rightarrow A\) ), these cases cannot be implemented with any reasonable chemistry.

  2. A problematic feature of this module is that the concentration of H increases without bound if [A] < [B]. Although this does not affect the correctness of the computation, it is an interesting open question whether there is another truncated subtraction module that satisfies composability and exhibits exponential convergence but has bounded concentrations for any input regime.

  3. This convergence happens irrespective of the initial concentrations of the flag species \(X_{gtY}\) and \(X_{ltY}\) (as long as they sum to 1), so they do not have to be reset before the mapping.

References

  • Baccouche A, Montagne K, Padirac A, Fujii T, Rondelez Y (2014) Dynamic DNA-toolbox reaction circuits: a walkthrough. Methods 67(2):234–249

    Article  Google Scholar 

  • Bournez O, Graça DS, Pouly A (2017) Polynomial time corresponds to solutions of polynomial ordinary differential equations of polynomial length. J ACM 64(6):38

    Article  MathSciNet  Google Scholar 

  • Buisman HJ, ten Eikelder HMM, Hilbers PAJ, Liekens AML (2009) Computing algebraic functions with biochemical reaction networks. Artif Life 15:5–19

    Article  Google Scholar 

  • Cardelli L, Csikász-Nagy A (2012) The cell cycle switch computes approximate majority. Sci Rep 2:656

    Article  Google Scholar 

  • Chen YJ, Dalchau N, Srinivas N, Phillips A, Cardelli L, Soloveichik D, Seelig G (2013) Programmable chemical controllers made from DNA. Nat Nanotechnol 8(10):755

    Article  Google Scholar 

  • Chou CT (2017) Chemical reaction networks for computing logarithm. Synth Biol 2(1):ysx002

    Article  MathSciNet  Google Scholar 

  • CRN++ Github page. https://github.com/marko-vasic/crnPlusPlus

  • CRNSimulator Mathematica package. http://users.ece.utexas.edu/~soloveichik/crnsimulator.html

  • Fages F, Le Guludec G, Bournez O, Pouly A (2017) Strong turing completeness of continuous chemical reaction networks and compilation of mixed analog-digital programs. In: International conference on computational methods in systems biology, pp 108–127

    Chapter  Google Scholar 

  • Ge L, Zhong Z, Wen D, You X, Zhang C (2016) A formal combinational logic synthesis with chemical reaction networks. IEEE Trans Mol Biol Multi-Scale Commun 3(1):33–47

    Article  Google Scholar 

  • Hjelmfelt A, Weinberger ED, Ross J (1991) Chemical implementation of neural networks and Turing machines. Proc Nat Acad Sci 88(24):10983–10987

    Article  Google Scholar 

  • Hjelmfelt A, Weinberger ED, Ross J (1992) Chemical implementation of finite-state machines. Proc Nat Acad Sci 89(1):383–387

    Article  Google Scholar 

  • Huang DA, Jiang JHR, Huang RY, Cheng CY (2012) Compiling program control flows into biochemical reactions. In: Proceedings of the international conference on computer-aided design, pp 361–368

  • Jiang H, Riedel M, Parhi K (2011) Synchronous sequential computation with molecular reactions. In: 2011 48th ACM/EDAC/IEEE design automation conference (DAC), pp 836–841

  • Lachmann M, Sella G (1995) The computationally complete ant colony: Global coordination in a system with no hierarchy. In: European conference on artificial life. Springer, pp 784–800

  • Magnasco MO (1997) Chemical kinetics is Turing universal. Phys Rev Lett 78(6):1190

    Article  Google Scholar 

  • Perron E, Vasudevan D, Vojnovic M (2009) Using three states for binary consensus on complete graphs. In: IEEE INFOCOM 2009. IEEE, pp 2527–2535

  • Salehi SA, Liu X, Riedel MD, Parhi KK (2018) Computing mathematical functions using DNA via fractional coding. Sci Rep 8(1):8312

    Article  Google Scholar 

  • Salehi SA, Parhi KK, Riedel MD (2017) Chemical reaction networks for computing polynomials. ACS Synth Biol 6(1):76–83

    Article  Google Scholar 

  • Senum P, Riedel M (2011) Rate-independent constructs for chemical computation. PLoS ONE 6:e21414

    Article  Google Scholar 

  • Soloveichik D, Seelig G, Winfree E (2010) DNA as a universal substrate for chemical kinetics. Proc Nat Acad Sci 107(12):5393–5398

    Article  Google Scholar 

Download references

Acknowledgements

We thank the fellow students of EE 381V (Programming With Molecules) at The University of Texas at Austin for constructive discussions on the material presented in this paper. We also thank Keenan Breik, Cameron Chalk, Milos Gligoric, Aleksandar Milicevic, Boya Wang and Kaiyuan Wang for their feedback on this work. This research was partially supported by the US National Science Foundation under Grants Nos. CCF-1618895, CCF-1718903, CCF-1652824, and CCF-1704790.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marko Vasić.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Vasić, M., Soloveichik, D. & Khurshid, S. CRN++: Molecular programming language. Nat Comput 19, 391–407 (2020). https://doi.org/10.1007/s11047-019-09775-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11047-019-09775-1

Navigation