mrsimulator
A fast solid-state NMR spectrum simulation and analysis library.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 10 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
3 of 11 committers (27.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Keywords
Repository
A fast solid-state NMR spectrum simulation and analysis library.
Basic Info
- Host: GitHub
- Owner: deepanshs
- License: bsd-3-clause
- Language: Python
- Default Branch: master
- Homepage: https://mrsimulator.readthedocs.io
- Size: 43.7 MB
Statistics
- Stars: 39
- Watchers: 3
- Forks: 14
- Open Issues: 31
- Releases: 16
Topics
Metadata Files
README.md
The MRSimulator project
| | |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Deployment |
|
| Build Status |
|
| License |
|
| Metrics |
|
MRSimulator is an open-source Python package designed for fast and comprehensive analysis of NMR (Nuclear Magnetic Resonance) spectra in fluid and solid phases. It introduces a new approach to spectral simulation in the frequency domain based on approximations valid for most commonly used solid-state NMR methodologies, significantly improving numerical efficiency.
Key Features
- Open-Source and Free: MRSimulator is fully documented, freely available, and open-source.
- Versatile Simulations: Capable of simulating one- and two-dimensional static, MAS (Magic Angle Spinning), and VAS (Variable Angle Spinning) spectra from a variety of NMR multiple-pulse sequences for nuclei experiencing chemical shift (nuclear shielding) and quadrupolar coupling interactions, as well as weak J and dipolar couplings. Furthermore, it includes the ability to create customized methods for modeling spectra from more sophisticated one and two-dimensional NMR methodologies.
- Efficiency: Achieves high benchmarks by assuming no degeneracies in energy eigenstates and no rotational resonances during evolution periods. It further restricts coherence transfer among transitions to pure rotations about an axis in the rotating frame or through an artificial total mixing operation between selected transitions of adjacent free evolution periods.
- Ease of Use: Simple-to-use, versatile, and extendable package with a stable and straightforward API.
- Integration: Easily incorporated into Python scripts and web apps and compatible with modern Python packages such as scikit-learn and Keras.
- FAIR Principles: Helps researchers follow FAIR (Findability, Accessibility, Interoperability, and Reusability) data practices.
MRSimulator is not intended as a general magnetic resonance simulation package for exploring complicated spin dynamics. Other software packages can handle these more demanding simulations, albeit at a more significant cost in computational time. Instead, MRSimulator focuses on the more tractable applications of solid-state NMR spectroscopy in the chemical and materials sciences. It is the ideal tool for users who want to model and fit experimental spectra to understand site populations and interaction parameters of multiple spin systems, as commonly found in disordered or heterogeneous materials.
Packages Using MRSimulator
Install
sh
pip install mrsimulator
Please refer to our installation documentation for details.
A 1D static and MAS example
```py from mrsimulator import Simulator, SpinSystem, Site from mrsimulator.method.lib import BlochDecaySpectrum import matplotlib.pyplot as plt
Make Site and SpinSystem objects
Hsite = Site(isotope="1H", shieldingsymmetric={"zeta": 13.89, "eta": 0.25}) spinsystem = SpinSystem(sites=[Hsite])
Make static and MAS one-pulse acquire Method objects
static = BlochDecaySpectrum(channels=["1H"] ) mas = BlochDecaySpectrum(channels=["1H"], rotor_frequency=1000) # in Hz
Setup and run the Simulation object
sim = Simulator(spinsystems=[spinsystem], methods=[static, mas]) sim.run()
Plot the spectra
fig, ax = plt.subplots(1, 2, figsize=(6, 3), subplotkw={"projection": "csdm"}) ax[0].plot(sim.methods[0].simulation.real, color="black", linewidth=1) ax[0].settitle("Static") ax[1].plot(sim.methods[1].simulation.real, color="black", linewidth=1) ax[1].settitle("MAS") plt.tightlayout() plt.show() ```
This should produce the following figure.

Check out our extensive documentation and more example.
Features
The MRSimulator package currently offers the following
Fast simulation of one and two-dimensional solid-state NMR spectra.
Simulation of coupled and uncoupled spin system
- for spin I=1/2, and quadrupole I>1/2 nuclei
- at arbitrary macroscopic magnetic flux density
- at arbitrary rotor angles
- at arbitrary spinning frequency
A library of NMR methods,
- 1D Bloch decay spectrum
- 1D Bloch decay central transition spectrum
- 2D Multi-Quantum Variable Angle Spinning (MQ-VAS)
- 2D Satellite-transition Variable Angle Spinning (MQ-VAS)
- 2D isotropic/anisotropic sideband correlation spectrum (e.g. PASS and MAT)
- 2D Magic Angle Flipping (MAF)
- 2D Dynamic Angle Spinning (DAS)
- Custom user-defined methods (Method)
Models for tensor parameter distribution in amorphous materials.
- Czjzek
- Extended Czjzek
- Custom user-defined models
For more information, refer to the documentation.
Reporting Bugs
Submit bug reports or feature requests on the Github issue tracker.
Discussions are welcome on the Github discussion page.
How to cite
If you use MRSimulator in your publication, please consider citing the following work implemented in MRSimulator.
Srivastava D.J., Giammar M., Venetos M.C., McCarthy-Carney L., and Grandinetti P.J. (2024) MRSimulator: A cross-platform, object-oriented software package for rapid solid-state NMR spectral simulation and analysis. J. Chem. Phys. 161, 212501, https://doi.org/10.1063/5.0237608
Srivastava D.J. and Grandinetti P.J. (2024) Simulating multipulse NMR spectra of polycrystalline solids in the frequency domain. J. Chem. Phys. 160, 234110, https://doi.org/10.1063/5.0209887
Srivastava D.J., Baltisberger J.H and Grandinetti P.J. (2024) Rapid simulation of two-dimensional spectra with correlated anisotropic dimension. J. Chem. Phys. 160, 134104, https://doi.org/10.1063/5.0200042
Srivastava D.J., Vosegaard T, Massiot D, Grandinetti P.J. (2020) Core Scientific Dataset Model: A lightweight and portable model and file format for multi-dimensional scientific dataset. PLOS ONE 15(1): e0225953. https://doi.org/10.1371/journal.pone.0225953
Additionally, if you use lmfit for least-squares fitting, consider citing the lmfit package. Zenodo. https://doi.org/10.5281/zenodo.4516651
Owner
- Name: Deepansh Srivastava
- Login: deepanshs
- Kind: user
- Location: New Haven, CT
- Company: Hyperfine
- Website: https://deepanshs.github.io/
- Repositories: 4
- Profile: https://github.com/deepanshs
Senior Scientist at Hyperfine
Citation (CITATION.cff)
cff-version: 1.2.0
title: mrsimulator
message: >-
Please cite this software using the metadata from
'preferred-citation'.
abstract: A fast solid-state NMR spectrum simulation and analysis library.
type: software
authors:
- given-names: Deepansh J.
family-names: Srivastava
email: deepansh2012@gmail.com
affiliation: Hyperfine
orcid: https://orcid.org/0000-0003-1341-2197
- given-names: Matthew
family-names: Giammar
email: giammar.7@osu.edu
affiliation: The Ohio State University
- given-names: Maxwell C.
family-names: Venetos
affiliation: 'University of California, Berkeley'
- given-names: Lexi
family-names: McCarthy-Carney
affiliation: The Ohio State University
email: mccarthy.677@osu.edu
- given-names: Philip J.
family-names: Grandinetti
email: grandinetti@chemistry.ohio-state.edu
affiliation: The Ohio State University
orcid: https://orcid.org/0000-0003-0102-316X
license: BSD-3-Clause
repository-code: https://github.com/deepanshs/mrsimulator
identifiers:
- description: "Release version 0.7.0 of Mrsimulator"
type: doi
value: "10.5281/zenodo.6892947"
- description: "Release version 0.6.1post1 of Mrsimulator"
type: doi
value: "10.5281/zenodo.5559730"
- description: "Release version 0.5.1 of Mrsimulator"
type: doi
value: "10.5281/zenodo.4315456"
- description: "Release version 0.4.0 of Mrsimulator"
type: doi
value: "10.5281/zenodo.4014009"
- description: "Release version 0.3.0 of Mrsimulator"
type: doi
value: "10.5281/zenodo.3978780"
preferred-citation:
type: article
authors:
- given-names: "Deepansh J."
family-names: "Srivastava"
affiliation: "Hyperfine"
orcid: "https://orcid.org/0000-0003-1341-2197"
- given-names: "Matthew"
family-names: "Giammar"
affiliation: "The Ohio State University"
- given-names: "Maxwell C."
family-names: "Venetos"
affiliation: "University of California, Berkeley"
- given-names: "Lexi"
family-names: "McCarthy-Carney"
affiliation: "The Ohio State University"
- given-names: "Philip J."
family-names: "Grandinetti"
affiliation: "The Ohio State University"
orcid: "https://orcid.org/0000-0003-0102-316X"
doi: "10.1063/5.0237608"
journal: "The Journal of Chemical Physics"
title: "MRSimulator: A cross-platform, object-oriented software package for rapid solid-state NMR spectral simulation and analysis"
month: 12
year: 2024
issue: 21
volume: 161
start: 212501
url: "https://doi.org/10.1063/5.0237608"
GitHub Events
Total
- Release event: 1
- Watch event: 7
- Delete event: 16
- Issue comment event: 5
- Push event: 22
- Pull request review comment event: 6
- Pull request review event: 17
- Pull request event: 40
- Fork event: 1
- Create event: 21
Last Year
- Release event: 1
- Watch event: 7
- Delete event: 16
- Issue comment event: 5
- Push event: 22
- Pull request review comment event: 6
- Pull request review event: 17
- Pull request event: 40
- Fork event: 1
- Create event: 21
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 1,408
- Total Committers: 11
- Avg Commits per committer: 128.0
- Development Distribution Score (DDS): 0.359
Top Committers
| Name | Commits | |
|---|---|---|
| Deepansh Srivastava | d****2@g****m | 903 |
| Matthew Giammar | m****r@g****m | 224 |
| mVenetos97 | 5****7@u****m | 81 |
| Shyam Dwaraknath | s****d@l****v | 75 |
| Philip J. Grandinetti | 4****i@u****m | 68 |
| dependabot[bot] | 4****]@u****m | 25 |
| Matthew Giammar | 4****r@u****m | 13 |
| mccarthy677 | m****7@o****u | 11 |
| Philip Grandinetti | g****1@o****u | 4 |
| Alexis McCarthy | 7****7@u****m | 3 |
| codefactor-io | s****t@c****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 50
- Total pull requests: 253
- Average time to close issues: 4 months
- Average time to close pull requests: 28 days
- Total issue authors: 8
- Total pull request authors: 7
- Average comments per issue: 1.24
- Average comments per pull request: 0.99
- Merged pull requests: 181
- Bot issues: 0
- Bot pull requests: 76
Past Year
- Issues: 3
- Pull requests: 37
- Average time to close issues: 9 days
- Average time to close pull requests: 5 days
- Issue authors: 2
- Pull request authors: 4
- Average comments per issue: 4.67
- Average comments per pull request: 0.22
- Merged pull requests: 27
- Bot issues: 0
- Bot pull requests: 19
Top Authors
Issue Authors
- deepanshs (21)
- pjgrandinetti (13)
- mgiammar (9)
- MHFrey (3)
- mccarthy677 (2)
- mjauau (1)
- subhradip-paul (1)
- mitchell2370 (1)
Pull Request Authors
- deepanshs (136)
- dependabot[bot] (83)
- mgiammar (45)
- pjgrandinetti (17)
- mccarthy677 (4)
- mVenetos97 (4)
- wushanyun64 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 698 last-month
- Total dependent packages: 0
- Total dependent repositories: 3
- Total versions: 22
- Total maintainers: 1
pypi.org: mrsimulator
A python toolbox for simulating fast real-time solid-state NMR spectra.
- Homepage: https://github.com/deepanshs/mrsimulator/
- Documentation: https://mrsimulator.readthedocs.io/
- License: BSD-3-Clause
-
Latest release: 1.0.0
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- black * development
- breathe ==4.34.0 development
- csdmpy >=0.4.1 development
- cython >=0.29.11 development
- joblib >=1.0.0 development
- lmfit >=1.0.3 development
- matplotlib >=3.3.4 development
- monty >=2.0.4 development
- nmrglue >=0.9 development
- numexpr >=2.7.1 development
- numpy >=1.20 development
- pandas >=1.1.3 development
- pillow >=7.1.2 development
- pre-commit >=2.11.1 development
- psutil >=5.4.8 development
- pydantic >=1.9 development
- pytest >=5.3 development
- pytest-cov * development
- recommonmark * development
- sphinx >=2.0 development
- sphinx-gallery >=0.10 development
- sphinx-tabs >=1.1.13 development
- sphinx-version-warning * development
- sphinx_copybutton >=0.3.0 development
- sphinxjp.themes.basicstrap * development
- sybil >=3.0.0 development
- sympy * development
- typing-extensions >=3.7 development
- csdmpy >=0.4.1
- joblib >=1.0.0
- lmfit >=1.0.3
- matplotlib >=3.3.4
- monty >=2.0.4
- nmrglue >=0.9
- numexpr >=2.7.1
- numpy >=1.20
- pandas >=1.1.3
- psutil >=5.4.8
- pydantic >=1.9
- typing-extensions >=3.7
- csdmpy >=0.4.1
- joblib >=1.0.0
- lmfit >=1.0.2
- matplotlib >=3.3.4
- monty >=2.0.4
- numpy >=1.20
- pandas >=1.1.3
- psutil >=5.4.8
- pydantic >=1.9
- typing-extensions >=3.7
- actions/checkout v3 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3.1.1 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- codecov/codecov-action v3.1.1 composite
- docker/setup-qemu-action v2 composite
- cython >=0.29.11
- fftw >=3.3.9
- matplotlib >=3.3.4
- numpy >=1.20
- openblas *
- pandas >=1.1.3
- requests >=2.21.0
- setuptools >=27.3
- breathe ==4.34.0
- csdmpy >=0.4.1
- cython >=0.29.11
- joblib >=1.0.0
- lmfit >=1.0.2
- matplotlib >=3.3.3
- monty >=2.0.4
- nmrglue >=0.9
- numexpr >=2.7.1
- numpy >=1.20
- pandas >=1.1.3
- pillow >=7.1.2
- psutil >=5.4.8
- pydantic >=1.0
- recommonmark *
- sphinx >=2.0
- sphinx-gallery >0.6.2
- sphinx-version-warning *
- sphinx_copybutton >=0.3.0
- sphinx_tabs >3.0
- sphinxjp.themes.basicstrap *
- typing-extensions >=3.7
- csdmpy >=0.4.1
- cython >=0.29
- joblib >=1.0.0
- lmfit >=1.0.2
- matplotlib >=3.3.4
- monty >=2.0.4
- nmrglue >=0.9
- numpy >=1.20
- pandas >=1.1.3
- psutil >=5.4.8
- pydantic >=1.9
- typing-extensions >=3.7