Difference between revisions of "Create.m"

From Spinach Documentation Wiki
Jump to: navigation, search
Line 22: Line 22:
  
 
==Examples==
 
==Examples==
A description of what is done in the example below:
+
A simple spin system specification followd by a call to [[create.m]] appears below. There are hundreds of further examples in the example set.
  
     % Comment
+
     % Set the spin system
     matlab code
+
     sys.isotopes={'1H','1H'};
+
    inter.zeeman.scalar={0.0 0.0};
     % Comment
+
    inter.coordinates={[0.00 0.00 0.00];
     matlab code
+
                        [0.00 0.00 2.00]};
 +
   
 +
     % Magnet field
 +
     sys.magnet=14.1;
  
==Notes==
+
    % Relaxation theory parameters
Further notes on good and bad practices.
+
    inter.relaxation={'redfield'};
 +
    inter.equilibrium='dibari';
 +
    inter.rlx_keep='kite';
 +
    inter.temperature=298;
 +
    inter.tau_c={1e-9};
  
==See also==
+
    % Proximity cut-off
Links to related functions.
+
    sys.tols.prox_cutoff=4.0;
  
 +
    % Spinach housekeeping
 +
    spin_system=create(sys,inter);
  
''Version 2.4, authors: [[Author 1]]''
+
==See also==
 
+
[[basis.m]], [[assume.m]], [[operator.m]], [[state.m]], [[hamiltonian.m]]
 
 
 
 
the function that creates the [[Appendix D: kernel data structures|spin_system]] object. Syntax:
 
  
  spin_system=create(sys,inter)
 
  
where the two parameters contain the information about the spin system and the interactions.
+
''Version 2.4, authors: [[Ilya Kuprov]], [[Hannah Hogben]], [[Konstantin Pervushin]], [[Luke Edwards]]''

Revision as of 14:48, 9 July 2019

The entry function of the Spinach kernel that creates the spin system object that the rest of the library requires to run. It checks and absorbs interaction specifications, and writes some useful diagnostics to the console.

Syntax

    spin_system=create(sys,inter)

Arguments

   sys   - spin system and instrument specification
           structure, see the spin system specification
           section of the online manual

 inter   - interaction specification structure, see
           see the spin system specification section
           of the online manual

Outputs

 spin_system   - the primary object used by Spinach
                 to store simulation information

Examples

A simple spin system specification followd by a call to create.m appears below. There are hundreds of further examples in the example set.

    % Set the spin system
    sys.isotopes={'1H','1H'};
    inter.zeeman.scalar={0.0 0.0};
    inter.coordinates={[0.00 0.00 0.00];
                       [0.00 0.00 2.00]};
    
    % Magnet field
    sys.magnet=14.1;
    % Relaxation theory parameters
    inter.relaxation={'redfield'};
    inter.equilibrium='dibari';
    inter.rlx_keep='kite';
    inter.temperature=298;
    inter.tau_c={1e-9};
    % Proximity cut-off
    sys.tols.prox_cutoff=4.0;
    % Spinach housekeeping
    spin_system=create(sys,inter);

See also

basis.m, assume.m, operator.m, state.m, hamiltonian.m


Version 2.4, authors: Ilya Kuprov, Hannah Hogben, Konstantin Pervushin, Luke Edwards