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. By default, it uses the spin_dependent_cluster_nmr_solver
to evaluate the spectrum. It is exact up to the maximum cluster size (set by default to 10) 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 in ppm half_width_ppm
, the frequencies omegas
at which the spectral function was evaluated, as well as the spin-dependent contributions to the spectral function stored in values
.
For a quick introduction to this method check out the example notebooks. You can obtain them as explained in the getting started section.
calculate_spectrum
accepts the following arguments:
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 initial 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 frequency 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.