Difference between revisions of "Crystal.m"

From Spinach Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
Single-crystal interface to pulse sequences. Generates a Liouvillian superoperator and passes it on to the pulse sequence function, which should be supplied as a handle. Syntax:
+
{{DISPLAYTITLE:crystal.m}}
 +
Static single crystal simulation context. This function positions the spin system at a particular angle in the laboratory frame of reference, generates Hamiltonian, relaxation superoperator, kinetics superoperator, applies the necessary offsets and rotating frame transformations, updates the parameter set, and passes all of that to the pulse sequence.
  
    answer=crystal(spin_system,pulse_sequence,parameters,assumptions)
+
==Syntax==
  
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:
+
    answer=crystal(spin_system,@pulse_sequence,parameters,assumptions)
 +
 +
    the pulse sequence should have the following input syntax:
 +
 +
    answer=pulse_sequence(spin_system,parameters,H,R,K)
  
    parameters.spins    - a cell array giving the spins that
+
==Arguments==
                          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.orientation - a row vector of the three Euler angles
 
                            (in radians) giving the orientation of
 
                              the system relative to the input orien-
 
                              tation.
 
    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.
 
  
Additional subfields may be required by the pulse sequence. The parameters structure is passed to the pulse sequence with the following additional parameters set:
+
  @pulse_sequence    - pulse sequence function handle
 +
 +
  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.orientation - a row vector of the three Euler angles
 +
                          (in radians) giving the orientation of
 +
                            the system relative to the input orien-
 +
                            tation.
 +
 +
  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.*        - additional subfields may be required
 +
                        by your pulse sequence - check its
 +
                        documentation page
 +
 +
  assumptions        - a character string setting the simulation
 +
                        assumptions, e.g. 'nmr' - see [[assume.m]]
 +
                        for further details.
 +
 
 +
==Outputs==
 +
This function returns whatever the pulse sequence returns. 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
  
This function returns whatever it is that the pulse sequence returns.
+
==Examples==
 +
The following examples files in the Spinach example set make use of this context function:
 +
 
 +
; cross_effect_freq_scan_1.m
 +
 
 +
==Notes==
 +
Arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information.
 +
 
 +
==See also==
 +
Links to related functions.
 +
 
  
Note: arbitrary order rotating frame transformation is supported, including infinite order. See [[rotframe.m]] for further information.
+
''Version 2.1, authors: [[Ilya Kuprov]]''

Revision as of 19:44, 8 January 2018

Static single crystal simulation context. This function positions the spin system at a particular angle in the laboratory frame of reference, generates Hamiltonian, relaxation superoperator, kinetics superoperator, applies the necessary offsets and rotating frame transformations, updates the parameter set, and passes all of that to the pulse sequence.

Syntax

    answer=crystal(spin_system,@pulse_sequence,parameters,assumptions)

    the pulse sequence should have the following input syntax:

    answer=pulse_sequence(spin_system,parameters,H,R,K)

Arguments

  @pulse_sequence     - pulse sequence function handle

  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.orientation - a row vector of the three Euler angles
                          (in radians) giving the orientation of
                           the system relative to the input orien-
                           tation.

  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.*        - additional subfields may be required
                        by your pulse sequence - check its 
                        documentation page 

  assumptions         - a character string setting the simulation 
                        assumptions, e.g. 'nmr' - see assume.m
                        for further details.

Outputs

This function returns whatever the pulse sequence returns. 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

Examples

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

cross_effect_freq_scan_1.m

Notes

Arbitrary order rotating frame transformation is supported, including infinite order. See rotframe.m for further information.

See also

Links to related functions.


Version 2.1, authors: Ilya Kuprov