.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/1D_simulation(crystalline)/plot_12_quad_dipolar.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_1D_simulation(crystalline)_plot_12_quad_dipolar.py: Influence of 14N on 13C NMR MAS spectra of glycine ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The alpha-carbon resonance of glycine, 13C (I=1/2), attached to 14N (I=1). The 14N quadrupolar tensor parameters were obtained from Hexem `et al.` [#f1]_ .. GENERATED FROM PYTHON SOURCE LINES 10-20 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from mrsimulator import Simulator, SpinSystem, Site, Coupling from mrsimulator.method.lib import BlochDecaySpectrum from mrsimulator import signal_processor as sp from mrsimulator.spin_system.tensors import SymmetricTensor from mrsimulator.method import SpectralDimension .. GENERATED FROM PYTHON SOURCE LINES 22-23 Create a 13C-14N coupled spin system. .. GENERATED FROM PYTHON SOURCE LINES 23-40 .. code-block:: Python spin_system = SpinSystem( sites=[ Site(isotope="13C", isotropic_chemical_shift=0.0), Site( isotope="14N", isotropic_chemical_shift=0, # in ppm quadrupolar=SymmetricTensor( Cq=1.18e6, # in Hz eta=0.54, alpha=0, beta=5 * np.pi / 180, gamma=0, ), ), ], couplings=[Coupling(site_index=[0, 1], dipolar=SymmetricTensor(D=-660.2))], ) .. GENERATED FROM PYTHON SOURCE LINES 41-42 Create a BlochDecaySpectrum method. .. GENERATED FROM PYTHON SOURCE LINES 42-49 .. code-block:: Python method = BlochDecaySpectrum( channels=["13C"], magnetic_flux_density=3.5338, # in T rotor_frequency=12000, # in Hz spectral_dimensions=[SpectralDimension(count=2048, spectral_width=200)], ) .. GENERATED FROM PYTHON SOURCE LINES 50-51 Create the Simulator object and add the method and the spin system object. .. GENERATED FROM PYTHON SOURCE LINES 51-55 .. code-block:: Python sim = Simulator(spin_systems=[spin_system], methods=[method]) sim.config.integration_volume = "hemisphere" sim.run() .. GENERATED FROM PYTHON SOURCE LINES 56-57 Add post-simulation signal processing. .. GENERATED FROM PYTHON SOURCE LINES 57-67 .. code-block:: Python processor = sp.SignalProcessor( operations=[ sp.IFFT(), sp.apodization.Gaussian(FWHM="1 Hz"), sp.FFT(), ] ) processed_dataset = processor.apply_operations(dataset=sim.methods[0].simulation) processed_dataset.dimensions[0].to("Hz") .. GENERATED FROM PYTHON SOURCE LINES 68-76 .. code-block:: Python plt.figure(figsize=(4.25, 3.0)) ax = plt.subplot(projection="csdm") ax.plot(processed_dataset.real, color="black", linewidth=1) ax.invert_xaxis() plt.tight_layout() plt.show() .. image-sg:: /examples/1D_simulation(crystalline)/images/sphx_glr_plot_12_quad_dipolar_001.png :alt: plot 12 quad dipolar :srcset: /examples/1D_simulation(crystalline)/images/sphx_glr_plot_12_quad_dipolar_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 77-82 .. [#f1] Hexem, J. G., Frey, M. H., and Opella, S. J., Influence of :math:`^{14}\text{N}` on :math:`^{13}\text{C}` NMR Spectra of Solids, J. Am. Chem. Soc., 1981, **103**, 224-226. `DOI: 10.1021/ja00391a057 `_ .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.304 seconds) .. _sphx_glr_download_examples_1D_simulation(crystalline)_plot_12_quad_dipolar.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_12_quad_dipolar.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_12_quad_dipolar.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_