NMR spectra calculations

For most use cases the calculate_spectrum function should be sufficient to perform NMR spectra calculations. The function takes as input a NMRParameters object and the spectrometer frequency and determines automatically the spectral function. Per default it uses the spin_dependent_cluster_nmr_solver to evaluate the spectrum. It is exact up to the maximum cluster size (set per default to ten) and for larger systems still extremely accurate, while also being very fast. It returns the spectrum as a Spectrum object, which contains the broadening parameter eta, the frequencies omegas at which the spectral function was evaluated, as well as the spin dependent contributions to the spectral function stored in values.

Check out this [tutorial](link to tutorial 1) to get started right away.

There are further options that can be used to customize the function to your needs. Check out this second [tutorial](link to tutorial 2) to get an impression of some of the options listed below.

molecule_parms: datatypes.NMRParameters

The molecular isotopes, shifts and J-coupling values.

frequency: float

Spectrometer frequency for 1H. Proportional to the static magnetic field along z-axis:

gyromagnetic_ratios: Optional[dict[tuple[int, str], float]] = None

Dictionary of gyromagnetic ratios in radians per second per Tesla.

homoisotope: tuple[int, str] = (1, "H")

Symbol of the isotope to define the frequency w=gamma*field of the rotating frame. Defaults to (1, "H").

solver_str: str = "spin_dependent_cluster_nmr_solver"

Solver to be used for calculation. Options are:

  • "direct_nmr_solver"
  • "direct_nmr_solver (conserved)"
  • "cluster_nmr_solver"
  • "cluster_nmr_solver (symmetry)"
  • "spin_dependent_cluster_nmr_solver"
  • "spin_dependent_cluster_nmr_solver (symmetry)"
  • "automated_solver"

estimate_solver_str: Optional[str] = None

Solver to be used for inital spectrum estimation. If None, solver_str is used. Options: See solver_str.

sample_factor: float = 1.0

Factor to change the number of omega points. Defaults to 1.

frequency_window_ppm: Optional[tuple[int, int]] = None

Optional upper and lower bound of user defined freuency window in ppm.

solver_kwargs: Optional[Dict[str, Any]] = None

Optional arguments passed to the solver as **kwargs.

half_width: Optional[float] = None

The artificial broadening or intrinsic line width to use in ppm. If None the solver will choose a broadening based on the J-coupling values in the molecule.

calc_greens_function: bool = False

Flag that indicates whether the Green's function should be calculated rather than the spectral function.