Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Deployment | |
Build Status | |
License | |
Metrics |
Shortly after the birth of Nuclear Magnetic Resonance (NMR) spectroscopy, it was realized that spin and spatial degrees of freedom could be manipulated on a time scale faster than the coherence lifetimes of the nuclear spin transitions. This led to an explosion of multi-pulse and sample reorientation methodologies in magnetic resonance for probing the structure and dynamics of matter over a wide range of length and time scales.
Numerical simulations of the NMR spectra from these methods have long been a critical
part of their analyses. The most robust and rigorous numerical approaches employ the full density
operator, ideal for dealing with finite pulse effects, weak to intermediate to strong couplings,
non-commuting Hamiltonians, and relaxation and exchange processes. However, such approaches can be
highly inefficient, particularly when Hamiltonians commute, pulses are ideal, and transverse relaxation
can be treated as an ad-hoc line broadening. mrsimulator
, an open-source python package, achieves
high benchmarks in spectral simulations and analyses by limiting itself to these simpler situations.
Fortunately, working within this limit only prevents mrsimulator
from modeling spectra of a small
fraction of popular NMR methods. The efficiency gains with this approach over conventional density
operator simulations are tremendous.
Why use mrsimulator?
pip install mrsimulator
Please refer to our installation documentation for details.
from mrsimulator import Simulator, SpinSystem, Site
from mrsimulator.method.lib import BlochDecaySpectrum
import matplotlib.pyplot as plt
# Make Site and SpinSystem objects
H_site = Site(isotope="1H", shielding_symmetric={"zeta": 13.89, "eta": 0.25})
spin_system = SpinSystem(sites=[H_site])
# 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(spin_systems=[spin_system], methods=[static, mas])
sim.run()
# Plot the spectra
fig, ax = plt.subplots(1, 2, figsize=(6, 3), subplot_kw={"projection": "csdm"})
ax[0].plot(sim.methods[0].simulation.real, color="black", linewidth=1)
ax[0].set_title("Static")
ax[1].plot(sim.methods[1].simulation.real, color="black", linewidth=1)
ax[1].set_title("MAS")
plt.tight_layout()
plt.show()
This should produce the following figure.
Check out our extensive documentation and more example.
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
A library of NMR methods,
Models for tensor parameter distribution in amorphous materials.
For more information, refer to the documentation.
Submit bug reports or feature requests on the Github issue tracker.
Discussions are welcome on the Github discussion page.
If you use mrsimulator in your publication, please consider citing the following.
Deepansh J. Srivastava, Matthew Giammar, Maxwell C. Venetos, Shyam Dwaraknath, Philip J. Grandinetti, & Alexis McCarthy. (2021). mrsimulator: v0.6.1. Zenodo. https://doi.org/10.5281/zenodo.5559730
Srivastava DJ, Vosegaard T, Massiot D, Grandinetti PJ (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
FAQs
A python toolbox for simulating fast real-time solid-state NMR spectra.
We found that mrsimulator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.