Difference between revisions of "Singlerot.m"

From Spinach Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
Fokker-Planck magic angle spinning context. Generates a Liouvillian superoperator and passes it on to the pulse sequence function, which should be supplied as a handle. Syntax:
+
{{DISPLAYTITLE:function.m}}
 +
Fokker-Planck single angle spinning context. Generates a Liouvillian superoperator and passes it on to the pulse sequence function, which should be supplied as a handle.
 +
 
 +
==Syntax==
  
 
     answer=singlerot(spin_system,pulse_sequence,parameters,assumptions)
 
     answer=singlerot(spin_system,pulse_sequence,parameters,assumptions)
  
where pulse sequence is a function handle to one of the pulse sequences located in the experiments directory, assumptions is a string that would be passed to [[assume.m]] when the Hamiltonian is built and parameters is a structure with the following subfields:
+
==Arguments==
  
     parameters.rate    - spinning rate in Hz
+
  pulse_sequence     - pulse sequence function handle. See the
    parameters.axis    - spinning axis, given as a normalized
+
                        experiments directory for the list of
                          3-element vector
+
                        pulse sequences that ship with Spinach.
    parameters.spins    - a cell array giving the spins that  
+
                          the pulse sequence involves, e.g.  
+
  parameters.rate    - spinning rate in Hz. Positive numbers
                          {'1H','13C'}
+
                        for JEOL, negative for Varian and Bruker
    parameters.offset  - a cell array giving transmitter off-
+
                        due to different rotation directions.
                          sets in Hz on each of the spins listed
+
                          in parameters.spins array
+
  parameters.axis    - spinning axis, given as a normalized
    parameters.max_rank - maximum harmonic rank to retain in
+
                        3-element vector
                          the solution (increase till conver-
+
                          gence is achieved, approximately
+
  parameters.spins    - a cell array giving the spins that  
                          equal to the number of spinning si-
+
                        the pulse sequence involves, e.g.  
                          debands in the spectrum)
+
                        {'1H','13C'}
    parameters.rframes  - rotating frame specification, e.g.
+
                          {{'13C',2},{'14N',3}} requests second
+
  parameters.offset  - a cell array giving transmitter off-
                          order rotating frame transformation
+
                        sets in Hz on each of the spins listed
                          with respect to carbon-13 and third
+
                        in parameters.spins array
                          order rotating frame transformation
+
                          with respect to nitrogen-14. When
+
  parameters.max_rank - maximum harmonic rank to retain in
                          this option is used, the assumptions
+
                        the solution (increase till conver-
                          on the respective spins should be
+
                        gence is achieved, approximately
                          laboratory frame.
+
                        equal to the number of spinning si-
    parameters.grid    - spherical grid file name. See grids
+
                        debands in the spectrum)
                          directory in the kernel.
+
    parameters.sum_up  - when set to 1 (default), returns the
+
  parameters.rframes  - rotating frame specification, e.g.
                          powder average. When set to 0, returns
+
                        {{'13C',2},{'14N,3}} requests second
                          individual answers for each point in  
+
                        order rotating frame transformation
                          the powder as a cell array.
+
                        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    - spherical grid file name. See grids
 +
                        directory in the kernel.
 +
 +
  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
 +
 +
  assumptions        -  context-specific assumptions ('nmr', 'epr',
 +
                        'labframe', etc.) - see the pulse sequence
 +
                        header for information on this setting.
  
Additional subfields may be required by the pulse sequence. The parameters structure is passed to the pulse sequence with the following additional parameters set:
+
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
 
                         dynamics subspace
 
                         dynamics subspace
 +
 
   parameters.spn_dim  - matrix dimension for the spin  
 
   parameters.spn_dim  - matrix dimension for the spin  
 
                         dynamics subspace
 
                         dynamics subspace
  
 +
==Outputs==
 
This function returns the powder average of whatever it is that the pulse sequence returns.
 
This function returns the powder average of whatever it is that the pulse sequence returns.
  
Note: arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information.
+
==Examples==
 +
The following example files in the ''Spinach'' example set make use of this context function:
 +
 
 +
'''kinetics/mas_exchange_1.m''' - chemical exchange unser magic angle spinning
 +
 
 +
'''nmr_overtone/mas_glycine_1.m''' - 14N MAS quadrupo9lar overtone spectrum
 +
 
 +
'''nmr_solids/mas_powder_gly_fplanck.m''' - glycine 13C MAS NMR spectrum
 +
 
 +
'''nmr_solids/mas_powder_dip_fplanck.m''' - MAS NMR on a pair of dipole coupled spins
 +
 
 +
'''nmr_solids/mas_powder_csa_fplanck.m''' - MAS NMR on a simple system with a CSA
 +
 
 +
==Notes==
 +
# Arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information.
 +
# Use 'single_crystal' powder grid for single crystal simulations.
 +
# The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs.
 +
 
 +
==See also==
 +
Links to related functions.
 +
 
 +
 
 +
''Version 2.2, authors: [[Ilya Kuprov]]''

Revision as of 14:40, 9 July 2018

Fokker-Planck single angle spinning context. Generates a Liouvillian superoperator and passes it on to the pulse sequence function, which should be supplied as a handle.

Syntax

    answer=singlerot(spin_system,pulse_sequence,parameters,assumptions)

Arguments

  pulse_sequence      - pulse sequence function handle. See the
                        experiments directory for the list of
                        pulse sequences that ship with Spinach.

  parameters.rate     - spinning rate in Hz. Positive numbers
                        for JEOL, negative for Varian and Bruker
                        due to different rotation directions.

  parameters.axis     - spinning axis, given as a normalized
                        3-element vector

  parameters.spins    - a cell array giving the spins that 
                        the pulse sequence involves, e.g. 
                        {'1H','13C'}

  parameters.offset   - a cell array giving transmitter off-
                        sets in Hz on each of the spins listed
                        in parameters.spins array

  parameters.max_rank - 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)

  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     - spherical grid file name. See grids
                        directory in the kernel.

  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 

  assumptions        -  context-specific assumptions ('nmr', 'epr',
                        'labframe', etc.) - see the pulse sequence
                        header for information on this setting.

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

This function returns the powder average of whatever it is that the pulse sequence returns.

Examples

The following example files in the Spinach example set make use of this context function:

kinetics/mas_exchange_1.m - chemical exchange unser magic angle spinning

nmr_overtone/mas_glycine_1.m - 14N MAS quadrupo9lar overtone spectrum

nmr_solids/mas_powder_gly_fplanck.m - glycine 13C MAS NMR spectrum

nmr_solids/mas_powder_dip_fplanck.m - MAS NMR on a pair of dipole coupled spins

nmr_solids/mas_powder_csa_fplanck.m - MAS NMR on a simple system with a CSA

Notes

  1. Arbitrary order rotating frame transformation is supported, including infinite order. See rotframe.m for further information.
  2. Use 'single_crystal' powder grid for single crystal simulations.
  3. The function supports parallel processing via Matlab's Distributed Computing Toolbox - different system orientations are evaluated on different labs.

See also

Links to related functions.


Version 2.2, authors: Ilya Kuprov