nucspinadd
Synopsis

Adds a nuclear spin to a spin system.

NewSys = nucspinadd(Sys,Nuc,A)
NewSys = nucspinadd(Sys,Nuc,A,Apa)
NewSys = nucspinadd(Sys,Nuc,A,Apa,Q)
NewSys = nucspinadd(Sys,Nuc,A,Apa,Q,Qpa)

NewSys = nucspinadd(Sys,Nuc,Afull)
NewSys = nucspinadd(Sys,Nuc,Afull,Qfull)
Description

This function adds the isotope specified in Nuc to the spin system structure given in Sys. A is a vector containing the hyperfine principal values, Q contains the quadrupole principal values. Apa and Qpa contain the Euler tilt angles for the respective tensors. See the page on spin system structures.

If any of Apa, Q or Qpa is missing or set to [], it is set to [0 0 0].

Alternatively, full 3x3 hyperfine and quadrupole matrices can be given in Afull and Qfull, respectively.

Examples

The following two lines defines a system of an electron spin coupled to a Cu and a N 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('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('14N',A,Q);
See also

spin system structures, nucspinrmv