Difference between revisions of "Doublerot.m"
(sync with Spinach main f053e432: Hilbert-space operation described; grid guidance (two-angle Liouville, three-angle Hilbert); rframes lab-frame assumption note) |
|||
| (20 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | {{DISPLAYTITLE:doublerot.m}} | + | {{DISPLAYTITLE:doublerot.m}} __NOTOC__ |
| − | + | Double angle spinning context. In Liouville space, this wrapper builds the Fokker-Planck evolution generator and passes it on to the pulse sequence function, which should be supplied as a handle. In Hilbert space, this wrapper builds the stack of spin Hamiltonians, one for each pair of rotor phases on the two-rotor phase grid, and hands that stack to the pulse sequence. | |
| − | should be supplied as a handle. | ||
==Syntax== | ==Syntax== | ||
| − | |||
| − | == | + | [answer,sph_grid]=doublerot(spin_system,pulse_sequence,... |
| + | parameters,assumptions) | ||
| + | |||
| + | ==Parameters== | ||
pulse_sequence - function handle to a pulse sequence, which must have | pulse_sequence - function handle to a pulse sequence, which must have | ||
the following call syntax: | the following call syntax: | ||
| − | + | ||
answer=pulse_sequence(spin_system,parameters,H,R,K) | answer=pulse_sequence(spin_system,parameters,H,R,K) | ||
| Line 17: | Line 18: | ||
the Hamiltonian, R is relaxation superoperator, and K | the Hamiltonian, R is relaxation superoperator, and K | ||
is the kinetics superoperator | is the kinetics superoperator | ||
| − | + | ||
assumptions - the string that will be passed to [[assume.m]] when | assumptions - the string that will be passed to [[assume.m]] when | ||
the Hamiltonian is built | the Hamiltonian is built | ||
| Line 52: | Line 53: | ||
with respect to carbon-13 and third | with respect to carbon-13 and third | ||
order rotating frame transformation | order rotating frame transformation | ||
| − | with respect to nitrogen-14 | + | with respect to nitrogen-14. When |
| + | this option is used, the assumptions | ||
| + | on the respective spins should be | ||
| + | laboratory frame. | ||
| + | |||
| + | parameters.grid - [[Appendix I: powder grids|powder averaging grid]]; | ||
| + | two-angle grids should be used in | ||
| + | Liouville space and three-angle | ||
| + | grids in Hilbert space | ||
| + | |||
| + | parameters.needs - a cell array of character strings spe- | ||
| + | cifying additional requirements that | ||
| + | the sequence has: | ||
| + | |||
| + | 'iso_eq' - thermal equilibrium state | ||
| + | of the isotropic Hamiltonian will be | ||
| + | placed into parameters.rho0 | ||
| + | |||
| + | parameters.serial - if set to true, disables automatic pa- | ||
| + | rallelisation | ||
| + | |||
| + | parameters.sum_up - when set to 1 (default), returns the | ||
| + | powder average. When set to 0, returns | ||
| + | individual answers for each point in | ||
| + | the powder as a cell array. | ||
| + | |||
| + | parameters.* - additional subfields may be required by your | ||
| + | pulse sequence - check its documentation page | ||
| − | + | The parameters structure is passed to the pulse sequence with the following additional parameters set: | |
parameters.spc_dim - matrix dimension for the spatial | parameters.spc_dim - matrix dimension for the spatial | ||
| Line 63: | Line 91: | ||
==Outputs== | ==Outputs== | ||
| − | |||
| − | + | answer - powder average, or a cell array, of whatever the pulse sequence returns | |
| − | + | ||
| + | sph_grid - spherical grid used in the calculation | ||
==Notes== | ==Notes== | ||
# Arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information. | # Arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information. | ||
# The state projector assumes a powder - single crystal DOR is not currently supported. | # The state projector assumes a powder - single crystal DOR is not currently supported. | ||
| + | # The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs. | ||
==See also== | ==See also== | ||
| − | [[ | + | [[assume.m]], [[rotframe.m]], [[crystal.m]], [[floquet.m]], [[gridfree.m]], [[imaging.m]], [[liquid.m]], [[meshflow.m]], [[powder.m]], [[singlerot.m]], [[Kernel contexts]], [[Built-in_experiments]] |
| − | |||
| − | ''Version 2. | + | ''Version 2.8, authors: [[Ilya Kuprov]]'' |
Latest revision as of 06:40, 30 August 2026
Double angle spinning context. In Liouville space, this wrapper builds the Fokker-Planck evolution generator and passes it on to the pulse sequence function, which should be supplied as a handle. In Hilbert space, this wrapper builds the stack of spin Hamiltonians, one for each pair of rotor phases on the two-rotor phase grid, and hands that stack to the pulse sequence.
Syntax
[answer,sph_grid]=doublerot(spin_system,pulse_sequence,...
parameters,assumptions)
Parameters
pulse_sequence - function handle to a pulse sequence, which must have
the following call syntax:
answer=pulse_sequence(spin_system,parameters,H,R,K)
where parameters is a structure described below, H is
the Hamiltonian, R is relaxation superoperator, and K
is the kinetics superoperator
assumptions - the string that will be passed to assume.m when
the Hamiltonian is built
parameters.rate_outer - outer rotor spinning rate in Hz
parameters.rate_inner - inner rotor spinning rate in Hz
parameters.axis_outer - spinning axis of the outer rotor,
given as a normalized 3-element
vector
parameters.axis_inner - spinning axis of the inner rotor,
given as a normalized 3-element
vector
parameters.rank_outer - maximum harmonic rank to retain in
the solution (increase till conver-
gence is achieved, approximately
equal to the number of spinning si-
debands in the spectrum) for the
outer rotor
parameters.rank_inner - maximum harmonic rank to retain in
the solution (increase till conver-
gence is achieved, approximately
equal to the number of spinning si-
debands in the spectrum) for the
inner rotor
parameters.rframes - rotating frame specification, e.g.
{{'13C',2},{'14N,3}} requests second
order rotating frame transformation
with respect to carbon-13 and third
order rotating frame transformation
with respect to nitrogen-14. When
this option is used, the assumptions
on the respective spins should be
laboratory frame.
parameters.grid - powder averaging grid;
two-angle grids should be used in
Liouville space and three-angle
grids in Hilbert space
parameters.needs - a cell array of character strings spe-
cifying additional requirements that
the sequence has:
'iso_eq' - thermal equilibrium state
of the isotropic Hamiltonian will be
placed into parameters.rho0
parameters.serial - if set to true, disables automatic pa-
rallelisation
parameters.sum_up - when set to 1 (default), returns the
powder average. When set to 0, returns
individual answers for each point in
the powder as a cell array.
parameters.* - additional subfields may be required by your
pulse sequence - check its documentation page
The parameters structure is passed to the pulse sequence with the following additional parameters set:
parameters.spc_dim - matrix dimension for the spatial
dynamics subspace
parameters.spn_dim - matrix dimension for the spin
dynamics subspace
Outputs
answer - powder average, or a cell array, of whatever the pulse sequence returns
sph_grid - spherical grid used in the calculation
Notes
- Arbitrary order rotating frame transformation is supported, including infinite order. See rotframe.m for further information.
- The state projector assumes a powder - single crystal DOR is not currently supported.
- The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs.
See also
assume.m, rotframe.m, crystal.m, floquet.m, gridfree.m, imaging.m, liquid.m, meshflow.m, powder.m, singlerot.m, Kernel contexts, Built-in_experiments
Version 2.8, authors: Ilya Kuprov