Difference between revisions of "Create.m"
(→Examples) |
(Sync syntax/arguments/outputs with current Spinach source) |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:create.m}} __NOTOC__ | {{DISPLAYTITLE:create.m}} __NOTOC__ | ||
| + | |||
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. | 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== | ==Syntax== | ||
| − | + | [[spin_system]]=create([[sys]],[[inter]]) | |
==Arguments== | ==Arguments== | ||
| − | + | sys - spin system and instrument specification | |
| − | structure, see the | + | structure, see the spin system specifica- |
| − | section of the online manual | + | tion section of the online manual |
| − | + | ||
| − | + | inter - interaction specification structure, see | |
| − | see the | + | see the spin system specification section |
of the online manual | of the online manual | ||
==Outputs== | ==Outputs== | ||
| − | + | [[spin_system]] - the primary object used by Spinach | |
to store simulation information | to store simulation information | ||
==Examples== | ==Examples== | ||
| + | |||
A simple spin system specification followed by a call to [[create.m]] appears below. There are hundreds of further examples in the example set. | A simple spin system specification followed by a call to [[create.m]] appears below. There are hundreds of further examples in the example set. | ||
| Line 37: | Line 39: | ||
==See also== | ==See also== | ||
| + | |||
[[basis.m]], [[assume.m]], [[operator.m]], [[state.m]], [[hamiltonian.m]] | [[basis.m]], [[assume.m]], [[operator.m]], [[state.m]], [[hamiltonian.m]] | ||
''Version 2.4, authors: [[Ilya Kuprov]], [[Hannah Hogben]], [[Konstantin Pervushin]], [[Luke Edwards]]'' | ''Version 2.4, authors: [[Ilya Kuprov]], [[Hannah Hogben]], [[Konstantin Pervushin]], [[Luke Edwards]]'' | ||
Revision as of 15:05, 5 April 2026
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 specifica-
tion 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 followed 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;
% 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