ham_nz
Syntax

Nuclear Zeeman Hamiltonian, nuclear magnetic dipole moment.

H = ham_nz(Sys, B)
H = ham_nz(Sys, B, idx)
H = ham_nz(Sys, B, idx, 'sparse')
[mux, muy, muz] = ham_nz(Sys)
[mux, muy, muz] = ham_nz(Sys, idx)
[mux, muy, muz] = ham_nz(Sys, idx, 'sparse')
Description

ham_nz calculates the matrix representing the nuclear Zeeman Hamiltonian (in units of MHz) for the spin system given in Sys.

Sys is a spin system structure.

idx is a number or array that indicates which nuclear spins should be included. For example, 1 indicates the first nuclear spin, and [2 3] indicates the second and third nuclear spin. If idx is omitted, all nuclear spins are included in the operators.

B is a 3-element magnetic field vector (in mT). If given, the complete nuclear Zeeman Hamiltonian is returned. B is understood to be in the molecular frame, for example [0 0 340] indicates a field along the molecular z axis.

If B is omitted, the function returns the three nuclear magnetic dipole moment component operators mux, muy and muz, defined along the principal axes of the molecular frame. They are in units of MHz/mT. The complete nuclear Zeeman Hamiltonian is obtained via H = -(mux*B(1)+muy*B(2)+muz*B(3)).

If 'sparse' is given as third argument, results are returned in sparse format instead of full format.

Examples

For the spin system

ABC = struct('S',1/2,'g',[2.1 2.1 2],'Nucs','14N','A',[1 1 1]);

the nuclear Zeeman Hamiltonian for a given magnetic field along the molecular x axis is

B = [340;0;0];
H = ham_nz(ABC,B)
H =
         0   -0.7399         0         0         0         0
   -0.7399         0   -0.7399         0         0         0
         0   -0.7399         0         0         0         0
         0         0         0         0   -0.7399         0
         0         0         0   -0.7399         0   -0.7399
         0         0         0         0   -0.7399         0
See also

ham, ham_cf, ham_ee, ham_ez, ham_ezho, ham_hf, ham_nn, ham_nq, ham_oz, ham_so, ham_zf