Calculates energy levels of a spin system in an external field.
out = levels(SpinSystem,phi,theta,B)
This function determines energy levels of the spin system specified in
the structure SpinSystem
by diagonalising its Hamiltonian. The
external field is specified in the other three function arguments.
theta
is the angle between the z axis of the molecular frame and
the magnetic field vector, phi
is the angle between x axis and the
projection of the magnetic field vector on the xy plane of the molecular
frame. B
gives the magnitude of the magnetic field in mT.
out
is a vector of the energies of the eigenstates of
SpinSystem
, in ascending order. The energies are in MHz.
phi
, theta
and B
can be vectors,
in which case energy
levels for all possible combinations of their values are calculated.
Depending on the dimensions of the three parameters, the output
out
can be an up to 4-dimensional array. The energies are always
along the last dimension.
A scalar theta
together with vectors phi
and
B
would
yield a 3D array out
. A set of energies for a single magnetic
field orientation is then in out(k,l,:)
with k
and l
indexing phi
and B
, respectively.
The three lines
Sy = struct('S',5/2,'g',[2 2 2],'D',[-250 -1750 2000]); B = 0:500; E = levels(Sy,0,0,B); plot(B,E)
produce a plot of the quite complicated dependence of the energy levels of a spin-5/2 system on the external magnetic field magnitude. A number of level anticrossings are present.
levelsplot, eigfields, resfields, sham