Adds a nuclear spin to a spin system.
NewSys = nucspinadd(Sys,Nuc,A) NewSys = nucspinadd(Sys,Nuc,A,AFrame) NewSys = nucspinadd(Sys,Nuc,A,AFrame,Q) NewSys = nucspinadd(Sys,Nuc,A,AFrame,Q,QFrame)
This function adds the nucleus specified in Nuc
to the spin system structure given in Sys
and returns the spin system structure with this additional nucleus. A
is an array containing the isotropic hyperfine coupling, the hyperfine principal values, or the full hyperfine tensor. Similarly, Q
contains the quadrupole principal values or the full quadrupole tensor. AFrame
and QFrame
contain the Euler tilt angles for the respective tensors. See the page on spin system structures for details on how to specify A
, Q
, AFrame
, and QFrame
.
If any of AFrame
, Q
or QFrame
is missing or set to []
, it is set to [0 0 0]
.
The following two lines defines a system of an electron spin coupled to a 63Cu and a 14N nucleus.
Sys = struct('S',1/2,'g',[2 2 2.2]); Sys = nucspinadd(Sys,'63Cu',[50 50 520]); Sys = nucspinadd(Sys,'14N',[3 3 9],[],[-1 -1 2]);
Note that the above is more convenient than the manual construction
Sys = struct('S',1/2,'g',[2 2 2.2],'Nucs','63Cu,14N'); Sys.A = [50 50 520; 3 3 9]); Sys.Q = [0 0 0; -1 -1 2]);
since a nucleus can be included and excluded just by adding or removing a line.
To add a full hyperfine matrix, use
A = [10 0 0; 0 15 0; 0 0 30]; Sys = nucspinadd(Sys,'14N',A);
To add a full hyperfine matrix and a full quadrupole matrix, use
A = [10 0 0; 0 15 0; 0 0 30]; Q = [-1 0 0; 0 -1 0; 0 0 2]; Sys = nucspinadd(Sys,'14N',A,[],Q);
spin system structures, nucspinrmv