This AI Can Turn X-Ray Images Into ‘Movies’ of Proteins and Viruses in Action

Imagine being able to watch a virus or protein move, twist, and interact in real-time, as if it were a character in a movie. For years, researchers have been trying to capture the dynamic behavior of molecules, but the process has been slow and labor-intensive. Now, thanks to a groundbreaking machine learning method developed by a team of scientists at the Department of Energy’s SLAC National Accelerator Laboratory, this dream may be one step closer to reality.

This new method, called X-RAI (X-Ray single particle imaging with Amortized Inference), could revolutionize the way researchers study the fundamental processes of life and matter. By using X-ray lasers to capture millions of images, X-RAI allows scientists to reconstruct the three-dimensional structures of proteins and viruses with unparalleled speed and accuracy.

The Challenge of Imaging Molecules

The Linac Coherent Light Source (LCLS) at SLAC is the world’s most powerful X-ray free-electron laser, capable of capturing snapshots of atoms and molecules at work. These brief X-ray pulses, just a few millionths of a billionth of a second long, offer scientists a glimpse into the structures and motions of molecular giants like proteins and viruses. But there’s a catch: capturing these snapshots is only part of the process. To truly understand the molecule, researchers must piece together hundreds of thousands—or even millions—of images into a coherent 3D structure.

That’s where the problems start. Traditional algorithms used for this process can’t keep up with the massive amounts of data being generated by the X-ray laser. As more images are collected, the algorithms become slower and slower, causing delays in processing. This bottleneck can be a significant issue, especially since researchers may only have a limited number of days to run experiments at a facility like LCLS.

The question posed by Frédéric Poitevin, a staff scientist at SLAC and one of the study’s principal investigators, was simple but critical: “How could we make this faster to the point that we could actually do the reconstruction as we collect the data and not wait hours or days for the results?”

The Birth of X-RAI

The solution came in the form of a new machine learning algorithm developed by Poitevin and his colleagues, including researchers from Gordon Wetzstein’s lab at Stanford University. The team’s approach, dubbed X-RAI, uses an artificial intelligence model to process X-ray data on the fly, making the reconstruction process much faster.

X-RAI works by predicting the three-dimensional orientation of the particle based on the 2D X-ray images. It then goes one step further: the AI can also work in reverse, taking a 3D projection and generating 2D images from it. This bidirectional process allows the model to constantly refine its predictions, improving its understanding of how the 2D X-ray images relate to the 3D structure. The more data it receives, the better it gets at predicting the correct structure.

“We built a neural network that looks at the data as it’s being generated and refines its predictions in real time,” said Jay Shenoy, a Ph.D. student at Stanford and the study’s first author. “It’s a dynamic process that gets faster and more accurate as it goes.”

Speed and Precision Like Never Before

What sets X-RAI apart from other methods is its speed. The team demonstrated that X-RAI could process up to 160 images per second in real time. This rapid processing allows researchers to reconstruct a molecule’s 3D structure almost as soon as the images are collected, eliminating the need for hours or even days of waiting for results.

The team also tested X-RAI’s performance against other traditional algorithms. When they compared the quality of 3D reconstructions of two biomolecules— a ribosomal subunit and the protein ATP synthase—X-RAI produced sharper, more precise images. This improvement in clarity could make a significant difference in understanding the detailed structure and behavior of molecules, which is crucial for drug discovery, disease research, and materials science.

Making the Most of Limited Research Time

For researchers working at high-demand facilities like LCLS, time is precious. Only a few lucky research teams are granted access to these cutting-edge X-ray light sources, and they usually have only a handful of days to complete their experiments. X-RAI could be a game-changer in maximizing the value of this limited time.

By streamlining the process of 3D reconstruction, researchers can get more data in less time. This efficiency is vital in environments like LCLS, where every moment counts. “The goal is to make sure we are using our time as effectively as possible,” Poitevin explained. “With X-RAI, researchers can get more out of the allocated time, ensuring they collect as much useful data as possible during their experiments.”

Seeing Molecules in Motion

The potential of X-RAI goes beyond simply speeding up the data analysis process. With this new tool, researchers may finally be able to capture molecules in motion, opening a window into how they interact with their environment and other molecules. In the future, we might even be able to watch molecules “dance” in real-time.

Imagine being able to see an enzyme interacting with a drug, or a virus replicating within a cell. “You might be able to actually get a more accurate picture of how your molecule moves,” Poitevin said. This ability to observe molecular motion could revolutionize how we develop drugs, study diseases, and understand biological processes at their most fundamental level.

Why This Research Matters

The implications of this research are profound. By speeding up the process of reconstructing 3D molecular images, X-RAI can help scientists better understand the complex machinery of life—molecules that make up everything from the cells in our bodies to the proteins that enable viruses to infect. With this new tool, researchers will be able to analyze data much faster, allowing them to make real-time decisions during experiments and gain deeper insights into molecular behavior.

Furthermore, the ability to observe molecules in motion opens the door to studying their interactions as they happen, which could be a game-changer in fields like drug development and materials science. This breakthrough could accelerate our understanding of diseases, leading to faster development of new treatments and therapies.

X-RAI represents the cutting edge of scientific innovation. It is a testament to how machine learning, artificial intelligence, and X-ray imaging can come together to push the boundaries of what’s possible in molecular research. This new tool will not only improve the efficiency of experiments but could also reveal a level of detail that was previously unimaginable, unlocking new opportunities for discovery across many scientific fields.

More information: Jay Shenoy et al, Scalable 3D reconstruction for X-ray single particle imaging with online machine learning, Nature Communications (2025). DOI: 10.1038/s41467-025-62226-7

Looking For Something Else?