mas_drifts.m

From Spinach Documentation Wiki
Revision as of 11:01, 18 September 2026 by Kuprov (talk | contribs) (sync with Spinach main 3975f139: new function page from the source header)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Drift Hamiltonians under magic angle spinning, resolved in rotor phase, for every combination of a two-angle powder grid orientation and an initial rotor phase. The Hamiltonian is taken to second order in the rotating frame of the nucleus, and is held constant within each rotor phase tick. The laboratory frame Hamiltonian and its rotational basis are obtained from hamiltonian.m, the carrier from carrier.m, and the powder grid is loaded from the kernel grid directory; for each grid orientation (a parallel loop) and each rotor phase tick, the anisotropic part is rotated with the composition of the crystallite orientation, the rotor axis tilt, and the rotor rotation Wigner matrices, symmetrised, and transformed into the second order rotating frame with rotframe.m. The resulting rotor stack of one rotor period is then sliced into parameters.n_slices ticks for each initial rotor phase, the phases being spaced by n_ticks/n_phases ticks.

Syntax

             drifts=mas_drifts(spin_system,parameters)

Parameters

   parameters.spins    - the nucleus, a cell array with one
                         isotope string, e.g. {'27Al'}
   parameters.axis     - spinning axis, a normalised row
                         vector with three elements
   parameters.grid     - two-angle powder grid name; the grid
                         must have uniform weights because the
                         ensemble average in optimcon is unweighted
   parameters.n_ticks  - rotor phase ticks per rotor period
   parameters.n_phases - number of initial rotor phases, must
                         be a divisor of parameters.n_ticks
   parameters.n_slices - number of ticks in the pulse

Outputs

   drifts   - cell array over the ensemble, grid orientations in
              the outer index and initial rotor phases in the in-
              ner index; each element is a cell array of n_slices
              Hamiltonian matrices, one per tick of the pulse

Examples

See the 27Al MQMAS pulse optimisations in examples/optimal_control/case_studies/Smelko_ChemRxiv_2026 directory.

Notes

The crystallite orientation uses all three Euler angles of the grid, as in singlerot.m; two-angle grids keep the azimuth in the third angle and have zero first angles, which the rotor phase then supplies. The spin system must carry laboratory frame assumptions, call assume.m first. The output is intended for control.drifts in the optimal control module.

See also

optimcon.m, hamiltonian.m, carrier.m, rotframe.m, singlerot.m, wigner.m, Optimal control module

Version 2.13, authors: Ilya Kuprov