Given its 13,000-year history, one might assume we’d have beer figured out by now. But recent research examines the bubbly liquid’s composition with unprecedented focus, singling out a new quality-control measure.

Beer contains three complex organic ingredients: grain, hops and yeast. Throughout the brewing process, these all interact with one another’s by-products, creating hundreds of chemical derivatives that can influence taste. Although some food chemists consider beer’s complexity daunting, Stefan Pieczonka, a Technical University of Munich researcher pursuing what he calls a “Ph.D. in beer,” saw untapped potential in it. Working with T.U.M. chemist Philippe Schmitt-Kopplin, Pieczonka ran 400 samples of commercially available beers through a high-powered mass spectrometer—a machine that teases apart mixtures of chemicals and identifies them by splitting their molecules into charged ions, which it sorts using magnetic fields. The team also ran a subset of the beers through a second type of mass spectrometer, and Schmitt-Kopplin says combining these processes let the researchers identify more than 7,000 unique ions never before found in beer. Working backward, they deduced the tens of thousands of molecules giving rise to these ions and traced each molecule to one of the original ingredients of the brew. (Leftover samples made for exciting lab happy hours, the researchers add.)

One newfound molecule originated from a reaction among compounds in yeast, hops and rice—the last sometimes contaminates brewery tools or batches of grains for brewing. As no quality-control test currently exists for detecting rice in beer as a contaminant or allergen, the researchers propose testing for this new chemical. Their new work is detailed in Frontiers in Chemistry.

Beer expert Gwen Conley, who directs quality and innovation at Cutwater Spirits and was not involved in the research, says such a test could augment quality assurance for both beer and distilled spirits. “When it comes to beer,” she says, “every single stage could be tested.”

Knowing more about a beer’s ingredients can also aid historical research efforts. Pieczonka and Schmitt-Kopplin are running the same analysis on an 1885 German beer to learn more about 19th-century brewing practices—and to re-create its taste.