arXiv:cs.LG· Alec H. Follmer·· 7 小时前
TorchSpin:基于 PyTorch 的可微分电子顺磁共振模拟框架
TorchSpin: Differentiable Electron Paramagnetic Resonance Simulation in PyTorch
AI 导读
TorchSpin 是开源 PyTorch 框架,将 EasySpin 的数值约定移植到张量计算环境,覆盖连续波 EPR、ENDOR、脉冲 EPR、自旋动力学等计算,结果与 EasySpin 高度一致。
正文
Abstract:Interpreting electron paramagnetic resonance (EPR) spectra commonly requires repeated forward simulation and optimization of spin Hamiltonian parameters. Established software provides mature simulation and fitting methods, but these calculations are not generally available as differentiable components within machine-learning workflows. We present TorchSpin, an open-source PyTorch framework that ports the organization and numerical conventions of EasySpin into a tensor-based computational environment. Representative calculations spanning continuous-wave EPR, ENDOR, pulse EPR, spin dynamics, trajectory simulation, and magnetometry closely reproduced corresponding EasySpin results. In matched benchmarks, TorchSpin CPU execution was faster than EasySpin for six of nine workloads although performance depended strongly on the calculation. We therefore focused on the capabilities enabled by automatic differentiation in PyTorch. In a Cu(II) powder-spectrum demonstration, feedback propagated through TorchSpin improved the quality of a supervised convolutional neural network (CNN) without using parameter labels during refinement. Models trained from randomly initialized CNNs using only noisy spectra and TorchSpin reconstruction loss achieved median similarities of $\geq$ 0.99. CNNs trained on TorchSpin-generated libraries also transferred without adaptation to independently generated EasySpin spectra with performance comparable to EasySpin-trained controls. Once trained, the CNN produced initial parameter estimates in approximately 1 ms per spectrum while a batch of 512 was processed in approximately 1.3 ms with GPU acceleration. TorchSpin therefore provides both a tested Python implementation of established EPR calculations and a differentiable physical layer for rapid learned inference, spectral refinement, and parameter-label-free training.
| Comments: | GitHub Repo: this https URL |
| Subjects: | Chemical Physics (physics.chem-ph); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.18924 [physics.chem-ph] |
| (or arXiv:2610.18924v1 [physics.chem-ph] for this version) | |
| https://doi.org/10.48550/arXiv.2610.18924 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Alec Follmer [view email]
[v1]
Mon, 12 Oct 2026 23:01:01 UTC (9,773 KB)
来源:arXiv:cs.LG · arxiv.org