sham
Introduced in 0.99
Synopsis

Constructs spin Hamiltonian operators.

[F,Gx,Gy,Gz] = sham(Sys)
[F,G] = sham(Sys,B)
H = sham(Sys,B)
Description

This function returns the spin Hamiltonian or its components. Sys is the structure defining the spin system, the optional B is the 3-element external magnetic field vector (in mT) in the molecular frame of the spin system.

If no magnetic field is given, sham returns the four Hamiltonian components F, Gx, Gy and Gz. F is the Hamiltonian containing all field-independent interactions, and the other three matrices are the components of the Zeeman interaction Hamiltonian for the three principal directions of the molecular frame of the spin system (see zeeman).

If a magnetic field B is given, sham returns either the overall Hamiltonian H or its two components F (field-independent interactions) and G (Zeeman interactions along the direction of B).

F and H are in MHz, the components G, Gx, Gy and Gz are in MHz/mT.

The general form of the spin Hamiltonian and the terms contained in it are explained in the section about the spin system structure.

Examples

The Hamiltonian of a simple S=I=1/2 system is

g = [2 2 2]; A = [1 1 2]*100; B = [0 0 340];
Sy = struct('S',.5,'g',g,'Nucs','1H','A',A);
H = sham(Sy,B)
H =
   1.0e+03 *
    4.8015         0         0         0
         0    4.7160    0.0500         0
         0    0.0500   -4.8160         0
         0         0         0   -4.7015

To get its eigenvalues in GHz and their associated eigenvectors, use

[V,E] = eig(H); E = diag(E).'/1e3, V
E =
   -4.8162   -4.7015    4.7162    4.8015

V =
         0         0         0    1.0000
   -0.0052         0   -1.0000         0
    1.0000         0   -0.0052         0
         0    1.0000         0         0
See also

eeint, hfine, internal, nquad, zeeman, zfield