Relaxation properties#

This module provides a RelaxationProperties class that stores information on the relaxation theory settings. It is assigned as part of SpinSystem upon its instantiation. The relaxation properties can be accessed as follows:

import spinguin as sg                       # Import the package
spin_system = sg.SpinSystem(["1H"])         # Create an example spin system
spin_system.relaxation.theory = "redfield"  # Set relaxation theory
class RelaxationProperties(spin_system: SpinSystem)[source]#

This class stores information on the relaxation properties of a spin system.

property R1: ndarray#

Contains the longitudinal relaxation rates for each spin in the system.

property R2: ndarray#

Contains the transverse relaxation rates for each spin in the system.

property T1: ndarray#

Specifies the longitudinal relaxation time constants for each spin. These are used to create the phenomenological relaxation superoperator. Two input types are supported:

  • If ArrayLike: A 1D array of size N containing T1 times.

  • If str: Path to the file containing the T1 times.

The input will be converted and stored as a NumPy array.

Examples:

# Using array input
spin_system.relaxation.T1 = np.array([5.5, 6.0, 2.7])

# Using string input
spin_system.relaxation.T1 = "/path/to/the/file/T1.txt"
property T2: ndarray#

Specifies the transverse relaxation time constants for each spin. These are used to create the phenomenological relaxation superoperator. Two input types are supported:

  • If ArrayLike: A 1D array of size N containing T2 times. Example:

  • If str: Path to the file containing the T2 times.

The input will be stored as a NumPy array.

Examples:

# Using array input
spin_system.relaxation.T2 = np.array([5.5, 6.0, 2.7])

# Using string input
spin_system.relaxation.T2 = "/path/to/the/file/T2.txt"
property antisymmetric: bool#

Specifies whether to consider the antisymmetric part of the interaction tensors in the Redfield relaxation theory.

property dynamic_frequency_shift: bool#

Specifies whether to include the dynamic frequency shift in the Redfield relaxation theory. This corresponds to the imaginary part of the relaxation superoperator.

property relative_error: float#

Specifies the relative error for the Redfield relaxation theory. This corresponds to the convergence criterion for the Redfield integral.

property sr2k: bool#

Specifies whether to include the scalar relaxation of the second kind (SR2K) in the relaxation superoperator.

property tau_c: float#

Specifies the correlation time (in seconds) for the Redfield relaxation theory.

property theory: str#

Specifies the relaxation theory to be used. Can be either “redfield” or “phenomenological”.

property thermalization: bool#

Specifies whether to apply Levitt-di Bari thermalization to the relaxation superoperator.