A versatile machine learning image recognition software for automating synchrotron Macromolecular Beamlines
Lead Research Organisation:
Diamond Light Source
Abstract
Macromolecular Crystallography is one of the most used techniques for the study of the most important molecular machines in biology - Proteins - as it allows us to determine the 3D structure of these molecules and infer their function. This is particularly relevant to and has proven results in addressing human diseases ranging from genetic disorders, cancers and fighting of human pathogens. This technique is also used in agricultural and food research areas like the development of novel herbicides or drought resistant crops to address current impacts of climate change. Finally, energy storage and battery technologies have also more recently benefited from crystallography synchrotron instruments helping key manufacturing and clean growth challenges of our era. Crystallography is used by a huge range of researchers from academic to industry pharmacological companies. These researchers often send their samples to large research facilities, like synchrotrons, and then collect X-ray diffraction data remotely or use fully automated systems. With recent advances in synchrotron technology the bottlenecks have moved from the lack of intensity of the synchrotron X-rays or the speed of the detector technology to the hardware and software that makes the sample visible to X-rays by centering the sample and preparing it for data collection. A data collection on a single crystal usually takes less than 10 seconds but all the other tasks bring the time per sample to ~2 minutes. Recent advances in AI have created a paradigm shift in image analysis. There are already a few prototypes in synchrotron facilities outside of the UK using AI to improve the speed and reliability of these essential tasks. We propose to use one of the proven prototypes and further develop it for sample centring, synchrotron X-ray beamline diagnostics, and robot collision risk mitigation. This will be extremely beneficial for the MX beamlines at the UK national Synchrotron - Diamond Light Source (DLS). Many DLS sister facilities can benefit from the application of AI but lack the "know-how" to implement working AI code from scratch. This project aims to bring the technology to the UK but also facilitate the usage of AI in macromolecular crystallography beamlines across the world. Starting by integrating the French national Synchrotron - SOLEIL - trained neural network for sample holder and sample identification into an easily accessible module for use at any synchrotron worldwide would be of huge benefit. This system will then be extended by leveraging our different synchrotron databases of prior images that will be used to train even more advanced models. The coming SwissLight Source (SLS) shutdown at the Paul Scherrer Institute creates an opportunity where their staff are available for collaborations and their planned sabbatical program aligns strongly with our project vision. Finally, this project would help significantly with the roadmap for the Diamond 2 planned upgrade.
Publications
Aragao D
(2025)
Accelerating Synchrotron MX Beamlines: Automated Sample Centering with Machine Learning and Bluesky Orchestration
in Structural Dynamics
| Description | The primary achievement of this project was the development and successful deployment of an intelligent, automated system for aligning microscopic protein crystals in a synchrotron X-ray beam. Historically, the slowest part of a protein crystallography experiment was the manual or semi-automated alignment of the sample. By implementing a machine learning model called Murko within a modern software framework called Bluesky, we have essentially given the beamline smart eyes. This work resulted in three main achievements: 1) New Research Capability: The system successfully moved from a development prototype to a functional tool. In December 2025, we began running the system with real-world users at the I04 beamline. It is now part of our routine operations and is offered to visiting scientists as a highly efficient tool for sample alignment. 2) Important New Research Resources: We created a live feedback loop. By running the system with actual users, we are continuously gathering data to refine the network, making it increasingly robust for different and challenging types of sample loops. 3) Dissemination of New Knowledge: We presented the results of this software architecture and its future directions to the international scientific community at the American Crystallographic Association meeting in Chicago in July 2025. |
| Exploitation Route | The software developed during this grant is entirely open-source, allowing other synchrotron facilities and research institutes worldwide to adopt the same automation strategies. By using containerisation technology (Docker and Kubernetes), we have made the system highly portable. This means other laboratories can download and run the Murko centring service with minimal technical overhead. Additionally, the integration with the Bluesky orchestration framework provides a blueprint for other facilities to modernise their own control systems, fostering a more collaborative and interoperable global research environment. For non-academic routes, such as pharmaceutical companies utilising the beamlines for drug discovery, these outcomes are taken forward as an enhanced paid service, providing them with faster and more reliable high-throughput data collection. |
| Sectors | Digital/Communication/Information Technologies (including Software) Healthcare Manufacturing including Industrial Biotechology Pharmaceuticals and Medical Biotechnology |
| URL | https://github.com/DiamondLightSource/mx-bluesky |
| Description | The research funded by this award has led to a demonstrable increase in the operational efficiency of the I04 beamline at Diamond Light Source. By implementing an automated centring pipeline using the Murko machine learning model, we have reduced the alignment overhead for protein crystallography experiments to 15 seconds or less. This represents a significant technical breakthrough in the effectiveness of a national research facility, allowing for a higher volume of scientific data collection within the same timeframe. Since December 2025, the system has transitioned into live use with the research community. This includes scientists from both academia and the pharmaceutical industry who rely on high-throughput facilities for drug discovery and structural biology. By significantly reducing the setup time for complex samples, Diamond Light Source gains a distinct operational advantage. This increased throughput and enhanced reliability directly support the economic competitiveness of the United Kingdom. It makes UK-based research infrastructure more attractive to global pharmaceutical companies, offering a compelling reason for industrial users to choose Diamond over overseas synchrotrons for their critical structural biology workloads. The project has solved a fundamental challenge in automation by providing a more resilient 3D centring method using a full 360 degrees of optical data. This breakthrough has opened new pathways for research, such as the development of AI-based tomography for aligning complex samples in multiple orientations. The technical results of this work and the software architecture supporting it were shared with the international scientific community at the American Crystallographic Association meeting in Chicago in July 2025. |
| First Year Of Impact | 2025 |
| Sector | Digital/Communication/Information Technologies (including Software),Healthcare,Manufacturing, including Industrial Biotechology,Pharmaceuticals and Medical Biotechnology |
| Impact Types | Economic Policy & public services |
| Title | Automated AI-Driven Loop Centring Pipeline on I04 |
| Description | The implementation of a versatile, modular machine learning vision system into the physical control layer of the I04 macromolecular crystallography beamline. While the core Murko image recognition model originated at SOLEIL, this infrastructure upgrade fully integrated the model with Diamond Light Source's hardware and Bluesky orchestration. This created a seamless, automated 360-degree optical centring capability for real-world user experiments. |
| Type Of Material | Improvements to research infrastructure |
| Year Produced | 2025 |
| Provided To Others? | Yes |
| Impact | This upgrade significantly improves the national research infrastructure by drastically reducing the time required for sample alignment. By cutting X-ray grid scan times to 15 seconds or less, it increases the overall throughput of the I04 beamline. This directly benefits the academic and pharmaceutical users who rely on the facility for high-volume structural biology data collection. |
| Title | dodal (Murko centring devices) |
| Description | A public repository containing Python-based Ophyd device drivers and a hardware abstraction layer for Diamond Light Source. This award specifically funded the development of the device drivers required for automated optical loop centring, such as the On-Axis Video (OAV) camera system, backlight control, and the SmarGon multi-axis goniometer, within this broader repository. |
| Type Of Technology | Software |
| Year Produced | 2025 |
| Open Source License? | Yes |
| Impact | This software enables stable, event-driven control of the precise hardware components needed for automated machine-learning sample alignment. It provides a shared community platform that fosters international collaboration, allowing other facilities to more easily adapt the hardware control layer for their own automated centring upgrades. |
| URL | https://github.com/DiamondLightSource/dodal |
| Title | mx-bluesky (Murko automated centring integration) |
| Description | Open-source orchestration scripts built on the Bluesky framework. This specific award funded the development and integration of the automated sample centring plans and the Murko machine learning callbacks within this broader Diamond Light Source repository. |
| Type Of Technology | Software |
| Year Produced | 2025 |
| Open Source License? | Yes |
| Impact | The centring plans developed under this grant serve as a production-ready blueprint for future upgrades at the facility. By moving to this modern modular framework, it allows for highly flexible event-driven data collection, directly supporting the high-throughput needs of academic and pharmaceutical users. |
| URL | https://github.com/DiamondLightSource/mx-bluesky |
