Have you ever wanted to hear molecules?

Literally take a listen to what chemicals are trying to tell you.

Nicolò Tampellini
The Startup
5 min readMay 2, 2020

--

In Organic Chemistry, molecules are often so complex that their allure is hard to decode for the novice eye. So, how can we distill the fingerprint of a given molecule into something easily understandable? Something that everybody from a kid to a Ph.D. in Chemistry would be able to understand? Music!

We crafted a script to convert the Free Induction Decay (FID) signal coming from an NMR Spectrometer into an audible file, so you can hear by yourself what your molecule is trying to tell you. Would you be able to guess the difference between these two molecules just by hearing their sounds?

In this article, we will guide you through the understanding of how different molecules have different sounds, and what are the main features we can interpret. But first, let’s give a short introduction to the tools we’ve used.

What is NMR?

NMR internal structure — courtesy linde-gas.com

Nuclear Magnetic Resonance is a parent technology of the Magnetic Resonance Imaging (MRI) that is in use in hospitals to diagnose various diseases. In a completely analogous way, NMR has been an essential tool for characterizing chemicals since its invention in the ’50s. Much like our bodies in an MRI machine, placing molecules in the field of an incredibly strong magnet makes many of their nuclei — the ones with magnetic properties — to precess.

This phenomenon is similar to the twirling of a spinner that is tipped off-axis, and the spinning atoms orient themselves parallel or antiparallel to the applied magnetic field. This orientation can be inverted with radio waves because they have the right wavelength, which corresponds to the small energy difference between these two states.

After we excited the nuclei with a short impulse of radio waves, they come back to their original state and we observe and record their decay emission, taking note of what frequencies are present. This process gives us information on the nature of the atoms present in our molecules and their connectivity. The whole process is similar to ringing a bell by hitting it with an object and then listening to the resonant sound it emits afterward, but everything happens in the radio waves portion of the electromagnetic spectrum.

NMR excitation and resonance

So how can we hear it? The core idea is that we are not interested in the decay frequencies that the instrument emits directly, but rather in their difference from a set reference for that specific atom. When applied to the signals obtained for the Hydrogen atoms of a given molecule, this “subtraction” process shifts the frequency range from the radio waves to about 1–10 kHz, which falls into the human audible spectrum! This transposition process usually happens inside the instrument, so the signal sent to the computer, the Free Induction Decay (FID), is already in the 1–10 kHz range.

Translating FID into sound

Unfortunately, FID files are generally encoded as binary format and little documentation is available on how to decode them. Therefore, only dedicated scientific (expensive) software is used to perform NMR Analysis.

Luckily enough, an open-source python module named nmrglue comes to the rescue, providing a robust environment for the rapid development of new methods for processing, analyzing, and visualizing NMR data. Different NMR Spectrometers producers use different FID files encodings, and nmrglue amazingly provides methods to parse any kind of FID file!

These tools give us a way to interpret the file and fill up a data structure — precisely, a 1D vector. Finally, the vector will be transformed into a .wav file by using a sample rate of 8 kHz so that the frequency information is brought to the most easily comprehensible range for the human ear.

FID2WAV — Translating FIDs into sound

What the Molecules are saying

What language do atoms speak? As of right now, frequencies. Take the two molecules you just heard at the beginning of this article: anyone can distinguish the two sounds, even if they don’t know what they are listening to. If you pay attention, you can distinctly hear the different frequencies resonating as long, sustained, fluctuating notes. Being even more focused, you can appreciate the different parts of this speech: the initial sharp, percussive start leading to the early clash between the most prominent frequencies, which then decay rapidly into a cleaner, more personal monologue. And lastly, after the clutter and the heart, comes the tail of the signal, the final sentence of this molecular Identity Card.

But who are they? Technically, their names are 2-Methyl-5-(1-methylethenyl)-2-cyclohexenone and 2-Isopropyl-5-methylcyclohexanol. But for friends, they are just (R)-Carvone and (-)-Menthol, respectively. Here you can take a look at their structures and their NMR spectra, representations that chemists are familiar with.

Their chemical structure is, as you could have anticipated, quite dissimilar. But if you take a closer look at their structural formulae, you’d notice that their difference is not that big. Their shape, dimension, and natural occurrence are not too different, and you’ll be impressed to know that both these molecules smell like mint oil! Therefore, after all, listening to their talks led us further than we could do with just our sight (since they’re both colorless!), smell, or any other sense. Chemists use this kind of frequency analyses every day, and they are called spectroscopies. Scientists just use computers instead of ears to distinguish signals. But from now on, thanks to this tool we developed, both scientists and everyone else can get a glimpse — or, rather, give a listen — to the molecular world in a novel way.

“The most important thing in communication is hearing what isn’t said.” — Peter Drucker

Authors

This project was born from two close friends: Nicolò Tampellini, student of Industrial Chemistry in Bologna, Italy and Mattia Strocchi, Computer Science & Engineering student based in Delft, The Netherlands.

Want to hear some other molecules? Here is the program we created!

--

--

Nicolò Tampellini
The Startup

Chemistry student, musician and inveterate creative.