AiiDA helps automating calculations for muon spectroscopy

This was published on February 19, 2025

A collaboration between groups in Switzerland and Italy has proposed a fully automated workflow that makes it much easier for scientists to calculate the stopping site of muons and their interaction with the environment during muon spectroscopy, increasing the power of this experimental technique when it comes to studying fine details in the magnetic properties of materials.  The workflow integrates existing codes and libraries with newly developed algorithm and takes advantage of the AiiDA infrastructure. The article that describes it was published in Digital Discovery.

By Nicola Nosengo/NCCR MARVEL

Muon spectroscopy is a widely used experimental technique that allows to study the magnetic properties of a material by implanting a polarized muon inits crystal and exploiting its spin as a probe of the atomic environment, similarly to what is done with the nuclear spin in nuclear magnetic resonance (NMR). 

While this works well for studying phase transitions, typically the onset of magnetic order and the coexistence of different phases, the technique has limitations when it comes to quantifying finer details, such as the values of the ordered atomic moments. The main reason is that – unlike what happens with nuclei that have precisely known positions in the crystal structure – it's very difficult to know where the muon stops. There is a computational method to do it: it is based on density functional theory and is known as DFT+µ. Its adoption has been growing significantly, but it still remains not easily accessible to non-experts, and even for experts it requires significant effort and time to coordinate many different calculations.

A collaboration between groups in Switzerland and Italy has now proposed a fully automated workflow that makes it much easier for scientists to calculate the stopping site of muons and their interaction with the environment after implantation. The workflow is described in a publication in Digital Discovery, by MARVEL members Giovanni Pizzi and Miki Bonacci from the PaulScherrer Institute in Villigen, Pietro Bonfà, Ifeanyi J. Onuorah, Marcello Mazzoni and Roberto De Renzi from the University of Parma in Italy, and EcosisterSpoke 6, plus Muhammad Isah from the University of Bologna.

The workflow, written in Python, integrates existing codes and libraries with newly developed algorithms. It takes as input a crystallographic structure, generates a set of initial muon interstitial sites, calculates the relaxation of the structure and finds the lowest energy sites that correspond to the most probable stopping sites in the experiment. It takes advantage of the AiiDA (Automated Interactive Infrastructure and Database for ComputationalScience) infrastructure, created within NCCR MARVEL to make computational models easily shareable with the scientific community. In particular, AiiDA handles the interaction with high-performance computing facilities, fetches and parses the result and stores them in a database.

“The collaboration between theorists and experimentalists was key to ensure the workflow’s effectiveness in terms of accuracy and simplicity of use,” says Pizzi. Such effectiveness was validated by comparing the workflow calculations on selected compounds with experimental data. “In particular, the comparison involved the family of Kagome-structured superconductors (AV3Sb5 with A = K, Rb, Cs), calcium fluoride (CaF2), the antiferromagnetic insulator La2NiO4 and the ferromagnetic metal LaCoPO”, says Onuorah. 

In addition to ease of automation and reproducibility, the use of the AiiDA platform also helps to keep the framework open and to add relevant methods and tools from other domains. The platform also allows for the design of “code agnostic” workflows which can work with any method that calculates forces and total energies for a given structure. 

In the future, the authors want to expand the workflow by incorporating methods and parameters that can make the search for muon sites more accurate and that are not currently considered – from the zero-point-motion (ZPM) effect to the temperature dependence of the signal. And to increase usability, “we are integrating the workflow in a graphical user interface in AiiDAlab that will allow users to use it as a plug-in of the Quantum ESPRESSO app for DFT calculations”, says Bonacci.  

Reference

Ifeanyi J. Onuorah, Miki Bonacci, Muhammad M. Isah, Marcello Mazzani, Roberto De Renzi, Giovanni Pizzi and Pietro Bonfà, Automated computational workflows for muon spin spectroscopy, Digital Discovery, 4, 523-538 (2025). DOI https://doi.org/10.1039/D4DD00314D

Stay in touch with the MARVEL project

Low-volume newsletters, targeted to the scientific and industrial communities.

Subscribe to our newsletter