Friday, April 21, 2017

Molecular computers

Definition by Marius Buliga, Build a molecular computer. In Journal of Brief Ideas, 2015

DEFINITION. Define a molecular computer as one molecule which transforms, by random chemical reactions mediated by a collection of enzymes, into a predictable other molecule, such that the output molecule can be conceived as the result of a computation encoded in the initial molecule.  

Chemlambda - Is an artificial chemistry based on a graph rewrite system and various (random or deterministic) algorithms for applications of rewrites. The graphs in chemlambda are called "molecules" and they are stored as .mol files. Each mol file is a list of nodes, one node/line. Each line is a list of: type of node, port variables. Ref.:

M. Buliga: Can you believe that such a complex, intricate sequence of hundreds of chemical reactions is possible, in the right order, in the presence of randomness and without any assistance from a human director? At a molecular level?

Yes, it is possible. Here is why. What you see in this video is a virtual molecule, which enters in random chemical reactions in a soup of invisible enzymes. All chemical reactions consist in the enzymes interacting with a small number of atoms (color coded in the video), in a random order, and facilitating certain, well chosen reactions. Everything is purely local, there is nothing else behind the scenes. And still it works.
This is not real chemistry (but who knows? I believe it is, with the condition to identify real chemical reactions like those virtual ones). The chemical reactions needed are listed at this page,
If you want to play with this (made-up) chemistry, called "Chemlambda", then go to the github repository , clone it and just type: bash and then choose one of the molecules, encoded as .mol files, from the list.
There are a bunch of demos, which show animations for different molecules, made in d3.js, at the link What is different in this video, which is a screen recording at 4X speed of an animation made with the script, is that it is now possible to see the virtual molecules as made of "atoms" (they may be smaller, well chosen molecules themselves).
This is possible because of a modification of the script called by the sh script, i.e. the awk script check_1_mov2_rand_metabo.awk . The visualization of the "true" virtual atoms is realized by representing the chemlambda nodes and their ports according to a color scheme which uses the "all_nodes_atom" field of the nodes and ports.

Blog by M. Buliga -
Videos by M. Buliga -
Papers by M. Buiga