(CNN)Next time you pour back a sour beer, you might like to know that tart and tangy goodness is the result of an immensely complex set of microbial interactions that chemists are only just beginning to figure out.
Sour beer: The chemistry behind this wondrously complex craft brew
"We know the beers taste amazing and look beautiful," said Teresa Longin, a professor of chemistry at the University of Redlands in California, who is presenting the new research this week at the American Chemical Society.
Her husband, David Soulsby, also a Redlands professor of chemistry, kept urging her to use her expertise to help explain the seemingly endless varieties and complexities of sour beer.
The two researchers performed a chemical analysis to find out which molecules were springing up during sour beers' brewing and fermenting processes, and to get a sense of how densely or sparsely a given compound was dispersed in the mix.
While scientists have previously studied the chemical makeup of a finished batch of sour beer, it's rare to get a look into the ways the microbes and chemicals are playing off each other as the beer actually is being made.
"As far as we're aware, people haven't done this before," Longin said. "Each individual barrel is its own ecosystem. It's a very parallel process to the way wine is made."
Sour beers are created with a process in which wild yeast and bacteria are able to colonize freshly brewed beer, and that mixture undergoes spontaneous fermentation. Brewers cool the mixture and place it in barrels so that it can age for months or years.
The process has been used in Europe for centuries and is popular in the exploding American craft beer scene.
"The Belgians are experts at aging," Soulsby said. Sours often include fruit additives, such as peaches or blackberries, which help contribute to the far-flung tastes they're known for.
Various chemical processes occur in sour brewing including the interactions between acetic acid, found in vinegar, and lactic acid, which is cultured to make yogurt.
"When it ages, those flavors blend together," Soulsby explained. "Over time sugar is released, and it can become more balsamic."
In practice, though, the process is wildly unpredictable, subject to innumerable microscopic whims.
"Some batches of beer made three or four days apart could end up with different concentrations," he said.
For fans, the allure of a sour comes in its uniquely tangy aroma and taste.
"That's what hooked me. I still get that every time I open a barrel," said Bryan Doty, who co-founded with his wife, Chintya, the brewery Sour Cellars in Rancho Cucamonga, California, about 40 miles east of Los Angeles.
Sour Cellars gave the Redlands researchers access to the beers fermenting in its barrels.
After he began home brewing around 2011, Bryan Doty's passion for sour beers was born after only a few batches. He was captivated by the many ways the beers could be crafted as well as the unique flavor possibilities when they reached a connoisseur's lips.
"It was a hobby that got out of control," he said.
Today, that hobby has fermented into a warehouse housing upward of 300 oak barrels, formerly used for red and white wines, each now incubating a batch of original sour beer during some stage of its lifestyle. Sour Cellars produces about 20 different beers each year, depending on which fruits might be available or in season.
The brewery seeks to follow "laborious and time-consuming traditional Belgian methods, combined with modern technologies to create more interesting aromas and flavors."
Through practice, Bryan Doty has found that fiddling with one variable or another can result in vastly different tastes once the beer is ready for bottling.