Calculate dipolar tensors.
T = diptensor(spin1,spin2,rvec)
diptensor calculates the dipolar coupling tensor T between spin1 and spin2, using the inter-spin distance vector rvec. It works for dipolar couplings between two electrons, for dipolar couplings between two nuclei, and for dipolar hyperfine couplings between an electron and a nucleus. See the corresponding interactions in the spin Hamiltonian.
spin1 and spin2 specify the type of spin. For an electron, use 'e'. For a nucleus, give the isotope, for example '1H', '2H', '13C', '15N', etc.
rvec is the 3-element vector pointing from the first spin to the second spin, in units of nm.
The tensor T is a 3x3 matrix, in units of MHz. It is for the Hamiltonian H = J1*T*J2, where J1 is the spin vector operator of spin1, and J2 is the spin vector operator for spin2.
The dipolar coupling tensor between two electrons spaced 1 nm apart along the z direction is
rvec = [0; 0; 1]; % nm
T = diptensor('e','e',rvec)
T =
52.0410 0 0
0 52.0410 0
0 0 -104.0820
The hyperfine coupling tensor between an electron and a proton located 0.3 nm away along the x axis is
A = diptensor('e','1H',[0.3;0;0])
A =
19.7661 0 0
0 -9.8830 0
0 0 -9.8830
The dipolar coupling tensor between two electrons 1.5 nm apart in the direction given by polar angles theta = pi/4 and phi = pi/3 is
phi = pi/3; % rad
theta = pi/4; % rad
r = 1.5; % nm
rvec = ang2vec(phi,theta)*r;
T = diptensor('e','e',rvec)
T =
9.6372 -10.015 -11.565
-10.015 -1.9274 -20.031
-11.565 -20.031 -7.7098
The eigenvalues of this matrix give the principal values of the tensor
eig(T)
ans =
-30.8391
15.4196
15.4196
The associated principal directions are the columns of the eigenvector matrix
[Tpd,Tpv] = eig(T); Tpd % eigenvector matrix
Tpd =
0.3536 0.8660 0.3536
0.6124 -0.5000 0.6124
0.7071 0 -0.7071
ang2vec, angstrom, bmagn, eeint, gfree, hfine, isotopes, mu0, nmagn, nucgval