<i>mrfmsim</i> : A modular, extendable, and readable simulation package for magnetic resonance force microscopy experiments

P Peter Sun C Corinne E. Isaac (Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,) M Michael C. Boucher (Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,) E Eric W. Moore (Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,) Z Zhen Wang J John A. Marohn (Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,)

Abstract

We present mrfmsim, an open-source Python package that facilitates the design, simulation, and analysis of magnetic resonance force microscopy (MRFM) experiments. MRFM is a scanning-probe technique that detects magnetic resonance from nanoscale ensembles of nuclear or electron spins with a force sensor. Because MRFM experiments are complex and operate at sensitivity limits, numerical simulation is essential for designing experiments and estimating per-spin sensitivity and imaging resolution from measured signals. In this paper, we highlight the challenges of developing MRFM simulations and show that software designed to simulate specific experiments only in a rapidly evolving experimental field can yield erroneous results. The mrfmsim package addresses these challenges by supporting post-definition customization without rewriting the internal model and by employing a plugin system for extending functionality. We show that the package’s modular, extendable, and readable architecture improves reproducibility and accelerates development.

Article Details

Volume / Issue Vol. 164, Issue 22
Published June 14, 2026
ISSN 0021-9606
Publisher American Institute of Physics

Journal Info

The Journal of Chemical Physics

American Institute of Physics

ISSN: 0021-9606 Physical Sciences

Authors (6)

P

Peter Sun

C

Corinne E. Isaac

Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,

M

Michael C. Boucher

Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,

E

Eric W. Moore

Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,

Z

Zhen Wang

J

John A. Marohn

Department of Chemistry and Chemical Biology, Cornell University , Ithaca, New York 14853,