Reaction mechanisms and driving forces of chemical reactions

In the “language” of chemistry molecules can be schematically drawn by using letters and lines – the letters represent the chemical elements and the lines represent chemical bonds. In this picture a reaction can be simply described as a rearrangement of the letters and lines. However, reaction of organic compounds can be quite complex and proceed via multiple steps. While it is easy to schematically depict such a reaction path, it can be close to impossible to actually figure out the intermediate steps experimentally. Nevertheless, these intermediate steps are extremely important – chemical synthesis is a huge industry (about four trillion dollars per year), and the economic and ecologic optimization of fabrication of chemical products requires knowledge of the reaction mechanisms, as well as the microscopic driving forces of the reactions.

Coupling and cyclization ofsformation of enediyne molecules
A chemical reaction represented by drawing chemical wireframe structures.*

Imaging chemical reactions

In our recent work, we were able to stabilize and identify several intermediates of a complex chemical reaction on a silver surface (this surface acts as a catalyst). This was done using atomic force microscopy. Here an atomically sharp tip (usually just a metal wire) is used to scan over a surface. Images are generated by measuring and plotting the forces between the tip and the surface at each point. Some additional tricks are used to enhance the resolution and be able to image the chemical structure of molecules – just like the schematic drawings that you find in the textbooks. Importantly, this imaging is done for individual molecules, that means that a complex reaction mixture (containing reactants, intermediates and products of many competing reaction pathways) can be analyzed molecule by molecule. This is not possible using the spectroscopic techniques that are conventionally used for chemical analysis.

Atomic force microscopy images of chemical structures in a reaction pathway.
Experimental images of the reactants, intermediates, and products of a chemical reaction.*

Microscopic driving forces

To understand why only certain intermediates are stabilized at the surface (i.e. their lifetimes are long enough to catch a significant mount of them at a specific point in the reaction progress), we have conducted theoretical simulations (quantum chemical calculations, as well as numerical simulation of the reaction kinetics). It turns out that that it is not enough to consider the potential energy landscape alone (that is the energies of reactants, intermediates, and products, as well as their transformation barriers). Energy dissipation to the substrate (i.e. transfer of the released chemical energy to the silver surface), as well as molecular entropy changes along the reaction pathway need to be taken into account.

Interestingly, the catalyst (i.e. the silver surface) plays a crucial role for both of these effects: the interaction of the molecule with the surface determines the efficiency of the energy dissipation, and changes in the translational and rotational movement (non-radical molecular species can translate and rotate, while radicals can not) of the molecules across the surface explain the relatively large entropy changes.

In conclusion, we have resolved the reaction mechanism of a complex chemical reaction that is catalyzed by a silver surface, and we have determine the microscopic driving forces (selective dissipation and entropy) that govern the global reaction kinetics. And we have produced a few beautiful images at the same time.

Calculation of selective dissipation
Theoretical calculation of microscopic energy dissipation for a specific reaction step. The brightness of the atoms shows where the release chemical energy is dissipated.

Why is it important?

The investigated chemical transformation (coupling and cyclization of so-called “enediyne” molecules) is a promising route for the on-surface synthesis of two-dimensional carbon based materials, such as graphene nanoribbons. While we did not yet demonstrate a viable pathway towards such structures at high yield (even though polymeric chains have been synthesized using this approach), further design of the molecular precursors is based on the understanding gained in this study. Of course, real life catalysts often exhibit a variety of defects and impurities, which were not considered in this investigation, but the microscopic understanding demonstrated here is nevertheless important for more complex systems as well.

In summary, this study is a proof of principle that stabilization and identification of intermediates of complex organic reactions is possible at the single-molecule level using atomic force microscopy. Furthermore, the microscopic insights about the driving forces of surface-supported reactions (selective dissipation and entropy) are important for many different fields, such as catalysis, nanotechnology, and biochemistry.

To read more about this work, check out our publication in Nature Chemistry: “Imaging single-molecule reaction intermediates stabilized by surface dissipation and entropy” (doi: 10.1038/nchem.2506)

* Images adapted by permission from Macmillan Publishers Ltd: Nature Chemistry, advance online publication, 2 May 2016 (doi:10.1038/nchem.2506).

Pi day: Pi on the keyboard

On my computers I am using Windows, Linux, and sometimes MacOS. Regarding the keyboard layout, I prefer the US English layout – it is just so much better for programming, anything you do on the shell, or whatever. On my Windows Desktop, I have designed my own keyboard layout (using Microsoft Keyboard Layout Creator) that is based on the standard US English configuration: it adds the German special characters (ä, ö, ü, ß), as well as many mathematical and scientific symbols, including Greek letters, which are used very often in science.

Recently, I have bought a new used laptop, ordered a US English replacement keyboard on ebay. The machine is running Linux. So far, so good. However, I did not want to have to go over the hassle of assigning my own special functions to the keyboard keys again (even though there are tools such as Keyboard Layout Editor available). I have not found any program that can automatically convert a Windows keyboard layout into its Linux counterpart. That is why – with some creative help from these regular expressions – I have made my own python script to convert from Windows to Linux. It turns out, that the most annoying part is the conversion of the key identifiers – these have very different names in the two operating systems.

However, eventually I figured it out, merged the generated file with my /usr/share/X11/xkb/symbols/us file, and now I am enjoying the easy access to π (via AltGr-p) and also Π (via Shift-AltGr-p) on my keyboard. Happy Pi day! Ok, The article is a day late. Happy belated Pi day! Or how about this (in German): Fröhlichen Π Tag!

I admit, I might spend too much time on these things, but it just makes me happy when it all works out automatically – or at least semi-automatically. I dislike repetitive tasks.

xkcd - Automation
xkcd – Automation

If you want to check out the script, or my keyboard layout, you can download it from github: Keyboard Layout Converter (GPL v3).

Gmail statistics

On which days of the week do you send or receive emails? What time of the day? Well, let’s find out.

I have been somewhat inspired by Stephen Wolfram and used some of the fabulous open-source libraries that are available for data exploration: I have been playing around with imaplib, pandas, seaborn/matplotlib and came up with a script to analyze your email behavior. You can use it with any IMAP account (yes, that includes your Gmail account). Of course, only the emails that are not yet deleted are analyzed – but usually Gmail users archive most of the emails – they are then accessible in the “All Mail” folder. The typical output gives you bar plots as well as violin plots, such as here:

bar plots and violin plots for the sent and received emails.

Interestingly, the analysis here shows that a significant amount of emails is sent after the “classical” work hours (particularly after midnight). As expected, almost no emails are sent during the sleep time (between ~2am and ~8am). Also, the weekend is rather quiet, albeit with Monday approaching increased activity is observed.

The script is released under GPL and can be found at:

Pythonic heart rate

Using python and the great matplotlib library, I have made a little app that measures the hart rate and computes various heart rate variability parameters (such as rMSSD, pNN50, LF, HF). On the hardware side, the pulse sensor connected to an Arduino Uno microcontroller is used. Parts of the code are based on other open source libraries. I am also planning to release the code as open source.

Here is a screenshot of the app:

HeartRateEx Screenshot
HeartRateEx Screenshot

A few things still need to be worked out. For instance, the heart beat detection (which is made by the Arduino) is not perfect. A few percent of beats are misclassified – depending on the positioning of the pulse sensor.

Update: I have now uploaded the source code. You can find it on GitHub.

Migrating Gmail

I wanted to migrate all my emails from one gmail account to another. Unfortunately, Google does not seem to offer an easy automated method. When I tried importing the mails from the other account via POP, my label system was not reproduced (I am an avid labeler). People suggest to use IMAP (where labels are represented as IMAP folders). You can use an email client (such as Mozilla Thunderbird) to download all emails form one account. And then copy all the emails to the other account. While downloading worked well for me, uploading of the emails to the other account always ended up in connection errors.

Eventually I found a tool called larch, which automates the process. It is a ruby program (which can be very easily installed on Windows, Linux, or MacOS) and it deals with all the problems of the IMAP migration for you. I can’t say that it is fast, but at least it seems robust. Simple command line interface. Highly recommended.

Heart rate variability

Heart Rate Variability (HRV) describes the variation in the time interval between heartbeats and it is often calculated based on RR intervals (i.e. the interval between two successive R-peaks in the ECG wave). HRV is relevant for clinical monitoring of patients, in psychophysiology, as well as in sports.

There are several approaches to measure HRV “at home”, such as:

  • Mobile Apps that try to measure the HRV from a photoplethysmogram (similar to pulse oxymetry) using the integrated camera and LED light.
  • Apps that connect to heart rate monitors (capable of RR-interval measurement) and calculate HRV from the data.
  • Record an ECG, analyze the graph to find the positions of the R peaks and compute the HRV descriptors from there.

In the next months, I want to compare these methods. I have already played around with the first method (using the Android apps “Stress Check” and “Heartservice“), but I am quite concerned about the precision of this approach. For the second method an adequate heart rate monitor is needed, which are available from Viiiva, Garmin, Wahoo TICKR, and Polar. It seems like chest straps are needed for precise measurements. Connection to the mobile phone via ANT+ or Bluetooth LE is possible. While Bluetooth LE seems easier, I have set up ANT+ on my Nexus 5 relatively quickly using the “ANT+ enabler” and some of the official ANT+ apps. As I still need to buy a heart rate monitor capable of measuring RR intervals, I have not yet tested any of the apps.

For the third method (recording an ECG), I am planning to use an Arduino microcontroller and the Olimex EKG-EMG shield. An interesting alternative is the E-Health platform by cooking hacks that will work with  Arduino, Raspberry Pi and Intel Galileo boards, and can be connected to various other medical sensors.

Update: I found the Pulse Sensor, a lightsuccessful kickstarter project allowing you to measure the heart rate using a light sensor (it basically records a photoplethysmogram). The clip is connected to a microcontroller (such as an Arduino) and can be easily attached to your finger or ear lobe. That makes it one of the easiest methods to get HRV data.

Once the measurements are set up for robust everyday use, I want to study how certain HRV descriptors correlate with workout intensity, recovery, food intake, and so on.

Stay tuned for more.