Rotate Principal Frame for high order crystal field terms

General forum for EasySpin: questions, how to's, etc.
Post Reply
robstew500
Newbie
Posts: 2
Joined: Fri Apr 02, 2021 7:40 am

Rotate Principal Frame for high order crystal field terms

Post by robstew500 »

Hello, I would like to change the principal frame for some higher order crystal field terms, and found this example for how to do so in the documentation:

angles = rand(1,3)*pi; % Euler tilt angles, in radians
B2 = [3 4 5 0 2]; % B(2,q) tensor components
R = wignerd(2,angles); % rotation matrix for rank-2 tensor
B2 = R * B2; % rotated tensor
Sys.B2 = B2.';

However in this example R has 2k+1 columns and B2 has only one row, is this a typo?

Stefan Stoll
EasySpin Creator
Posts: 1053
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Rotate Principal Frame for high order crystal field terms

Post by Stefan Stoll »

There is a bug in this example: The second to last line should have R*B2.', with a transpose.

Post Reply