ShimNet: A neural network for post-acquisition improvement of NMR spectra distorted by magnetic-field inhomogeneity

08 April 2025, Version 1
This content is a preprint and has not undergone peer review at the time of posting.

Abstract

Despite commonly applied corrections, known as shimming, the magnetic field in an NMR spectrometer is never perfectly homogeneous. This undesired effect distorts the lineshapes, degrades the resolution, and lowers the signal-to-noise ratio in the collected spectra. As a remedy, numerical techniques have been developed to correct the spectra after acquisition, with reference deconvolution being the most popular example. However, these methods require a precarious parameter guess from the user, making them inconvenient and prone to errors. We propose a post-acquisition shimming tool named ShimNet based on a convolutional neural network with the attention mechanism. The model learns the distortion characteristics of a given spectrometer from a series of calibration measurements. Once trained, it can correct any spectrum from the same machine in a fully automatic way. It achieves slightly better reconstruction quality than the existing methods and is considerably faster. This makes ShimNet an excellent tool for laboratories performing routine and massive NMR measurements for chemists. As an exemplary application, we demonstrate that the model properly corrects liquid-state spectra of small molecules, such as azarone, styrene, Cresol Red, or sodium butyrate. The open-source Python code is freely available from https://github.com/center4ml/shimnet.

Keywords

Nuclear Magnetic Resonance
shimming
neural network

Supplementary weblinks

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.