mrfmsim is a Python framework for simulating magnetic resonance force microscopy (MRFM) experiments. The package is based on the mmodel framework, which provides modular modeling capabilities for the experiments.
This mrfmsim package contains tools to simulate signals in a Magnetic Resonance Force Microscope (MRFM) [1] [2] [3] experiment. The code in the package simulates signal from electron spins, particularly the nitroxide spin radical “TEMPO” to selected nuclear spins (1H, 19F, and 71Ga).
The package host variety of MRFM experiments with the tip-on-cantilever setup. It can simulate signals from both Curie-law spin magnetization and spin fluctuations (in the small polarization limit); and can simulate force experiments and force-gradient experiments (in the small-cantilever-amplitude limit and without the small amplitude approximation — in the large amplitude limit). It can simulate signal with the cantilever and field-aligned in both the hangdown [4] and SPAM [5] [6] experimental geometries.
Quickstart
Installation
mrfmsim installation
To install the package, run:
pip install mrfmsim
For development from a cloned repository, run:
pip install .
Graphviz installation
Graphviz is required only for graph visualization: Graphviz Installation For Windows installation, please choose “add Graphviz to the system PATH for all users/current users” during the setup.
For macOS systems, sometimes brew install results in an unexpected installation path, it is recommended to install with conda:
conda install -c conda-forge pygraphviz
Examples and documentation
The full documentation is available at mrfmsim documentation. Step-by-step examples are available in the overview documentation, including a downloadable overview notebook. Detailed experiment examples are documented in the experiment pages.
Tests
To run the tests locally:
python -m pytest
To test in different environments:
tox
Contributing
We welcome contributions! Please see our Contributing Guide for details on how to follow our development guidelines and submit pull requests.
References
Metadata
Release files for mrfmsim 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrfmsim-0.4.2.tar.gz | 29.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mrfmsim-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.4 kB
Release files / mrfmsim-0.4.2.tar.gz
| Download URL | mrfmsim-0.4.2.tar.gz |
|---|---|
| Size | 29.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f15d4139aa56431c79bac94254be6dc102cb98de4428738ae6090aa04fc72465
|
|
BLAKE2b-256 checksum How to use checksums |
494f677ff872131e072f64e85ecef6383eab5a8166cdd05a75a8bc3ba6d578e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.15 Darwin/25.3.0
|
Release files / mrfmsim-0.4.2-py3-none-any.whl
| Download URL | mrfmsim-0.4.2-py3-none-any.whl |
|---|---|
| Size | 36.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcd6d3c3bf4e3ac403587f609487c53ac3911b07130d29d4a3ec64ad8608cd55
|
|
BLAKE2b-256 checksum How to use checksums |
2fe43141e59d1793a42cad963abda5b5b0e8bd670b7e02c24b6dafd80b5cef5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.15 Darwin/25.3.0
|