Table of Contents
Fetching ...

mrfmsim: a modular, extendable, and readable simulation platform for magnetic resonance force microscopy experiments

Peter Sun, Corinne E. Isaac, Michael C. Boucher, Eric W. Moore, Zhen Wang, John A. Marohn

TL;DR

It is demonstrated how a one-off approach to experimental simulation yielded erroneous results, and how the modularity, extendibility, and readability of the new platform enabled correct results and a significantly accelerated development cycle.

Abstract

We present mrfmsim, an open-source package that facilitates the design, simulation, and signal validation of magnetic resonance force microscopy experiments. The mrfmsim package uses directed acyclic graphs (DAGs) to model experiments and employs a plugin system that enables adding custom experiments and functionalities. Unlike common DAG-powered workflow packages, mrfmsim allows flexible customization of experiments post-definition, such as optimized looping, without requiring rewriting the internal model. In this paper, we highlight the challenges of building simulation packages for experiments that undergo continuous development in a graduate research setting. We demonstrate how a one-off approach to experimental simulation yielded erroneous results, and how the modularity, extendibility, and readability of the new platform enabled correct results and a significantly accelerated development cycle.

mrfmsim: a modular, extendable, and readable simulation platform for magnetic resonance force microscopy experiments

TL;DR

It is demonstrated how a one-off approach to experimental simulation yielded erroneous results, and how the modularity, extendibility, and readability of the new platform enabled correct results and a significantly accelerated development cycle.

Abstract

We present mrfmsim, an open-source package that facilitates the design, simulation, and signal validation of magnetic resonance force microscopy experiments. The mrfmsim package uses directed acyclic graphs (DAGs) to model experiments and employs a plugin system that enables adding custom experiments and functionalities. Unlike common DAG-powered workflow packages, mrfmsim allows flexible customization of experiments post-definition, such as optimized looping, without requiring rewriting the internal model. In this paper, we highlight the challenges of building simulation packages for experiments that undergo continuous development in a graduate research setting. We demonstrate how a one-off approach to experimental simulation yielded erroneous results, and how the modularity, extendibility, and readability of the new platform enabled correct results and a significantly accelerated development cycle.
Paper Structure (14 sections, 29 equations, 11 figures, 3 tables)

This paper contains 14 sections, 29 equations, 11 figures, 3 tables.

Figures (11)

  • Figure 1: mrfmsim architecture. The mrfmsim package uses mmodel as its backend and adds MRFM-specific functionality, including configuration files, modifiers, and shortcuts. Additional functionalities such as experiments, units, plots, and a command-line interface can be added to mrfmsim through plug-in libraries.
  • Figure 2: mrfmsim workflow. A new experiment model can be created using Python scripts or a YAML configuration file (mrfmsim-yaml) and converted to a Python object. A new experiment model can reuse components from existing experiments, imported directly from a YAML file or a plugin library. Experiments can be modified using modifiers and shortcuts. Experiment objects can run as a Python script, in a Jupyter notebook, or in the command-line interface (CLI) via the mrfmsim-cli plugin.
  • Figure 3: Schematic for Ref. Longenecker2012nov spin-noise experiment. Cantilever: Silicon cantilever with the dimensions of 4 $\unit{\um}$$\times$ 200 $\unit{\um}$$\times$ 0.4 $\unit{\um}$. The cantilever has a resonance frequency $f_\mathrm{c}= 6644$ Hz, an intrinsic quality factor of $Q=8.4 \times 10^4$ in vacuum, and a spring constant of $k=1.0$ mN/m. Magnet: cobalt magnet with dimensions 225 $\unit{\nm}$$\times$ 79 $\unit{\nm}$$\times$ 1494 $\unit{\nm}$. The magnet extends past the leading edge of the cantilever by 300 nm. RF source: lithographically defined copper microwire on a silicon substrate. Sample: a 40 nm uniform layer of polystyrene (molecular weight = 200000) film, spin-coated onto the microwire substrate.
  • Figure 4: Experiment data from Ref. Longenecker2012nov at different tip-sample separations (circle). Signals at different magnet saturation magnetizations ($\mu_0M_s$) with different damage layers are simulated. The sample used in the simulations is a 40 nm thick polystyrene film with a spin density of 49 protons/nm$^{3}$, $T_1$ of 10 s, $T_2$ of 5 $\unit{\us}$, external field $B_0$ of 2360.5 mT, and $\Delta f_\mathrm{FM}$ of 2 MHz. The gray dashed line is the Larmor frequency expected in the absence of the tip field.
  • Figure 5: Simulated signal of experiment in Ref. Longenecker2012nov with the magnet saturation magnetization of 1.8 T, an inactive layer of 45 nm, and at a tip-sample separation of 13.53 nm. The dashed vertical teal lines at 112 MHz, 116 MHz, and 122.5 MHz indicate the points where the lineshape is visually analyzed.
  • ...and 6 more figures