Page 1 of 1

Orientation using Exp.Ordering

Posted: Mon Jan 18, 2021 10:49 am
by HarryD95

I am looking to produce orientation dependent spectra of a semi-ordered structure, with preferential orientation along the molecular z-axis. When this axis is positioned horizontal and the structure rotated about the vertical (y-)axis, orientation dependence of hyperfine splitting is shown experimentally. I managed to reproduce such orientation dependence and a full rotation pattern assuming a single crystal orientation using the exp.crystalorientation function, however attempting to use the exp.ordering function results in a loss of orientation dependence in simulations. Neither exp.crystalorientation or exp.molframe functions seem to impact the orientation distribution of the exp.ordering function, even though as as defined I would have thought exp.molframe would effect the molecular z-axis in the exp.ordering function.

Any suggestions would be greatly appreciated! Thanks.


Re: Orientation using Exp.Ordering

Posted: Mon Jan 18, 2021 2:33 pm
by Stefan Stoll

This is indeed a problem with Exp.Ordering in EasySpin 5.2 and the current 6.0.0-dev versions. We are working on fixing this.

Meanwhile, here is a workaround by applying the sample rotation directly within Exp.Ordering:

Code: Select all

clear, clc

Sys.g = [2 2.1 2.2];
Sys.lw = 1;

Exp.mwFreq = 9.5;

sampleOri = [0 0 0];
Exp.Ordering = @(phi,theta)orifun(phi,theta,sampleOri);
[B,spc0] = pepper(Sys,Exp);
sampleOri = [0 pi/2 0];
Exp.Ordering = @(phi,theta)orifun(phi,theta,sampleOri);
[B,spc1] = pepper(Sys,Exp);

plot(B,spc0,B,spc1)

function P = orifun(phi,theta,sampleOri)

% Apply sample rotation to phi and theta
v = ang2vec(phi,theta); % vector
R = erot(sampleOri); % rotation matrix
v = R*v; % rotated vector
[phi,theta] = vec2ang(R*v); % angles of rotated vector

% Evaluate orientational distribution function
P = exp((3*cos(theta).^2-1)/2);

end

Re: Orientation using Exp.Ordering

Posted: Wed Jan 20, 2021 3:15 pm
by HarryD95

Thanks for the reply. Apologies, but this workaround doesn't appear to quite work correctly either, with spectra at 'sampleOri' of [0 0 0] and [0 pi/2 0] appearing identical (I'm using easyspin-6.0.0-dev.29). Also the case for [pi/2 0 0 and [0 0 pi/2]. Interestingly [0 pi/4 0] and [pi/2 pi/2 0] appears to give what I would expect from the [0 pi/2 0] or [pi/2 0 0] orientations (gx==gy=/=gz and Ax==Ay=/=Az). A sampleOri of [0 pi/2 pi/2] also gives some orientation dependence, although no z-axis orientation dependence should be observed based on the parameters given. It's as if the frame isn't oriented correctly, but I'm unsure what is causing this. Specifying Exp.MolFrame and/or Exp.CrystalOrientation of [0 0 0] has no effect.

I can add a lambda term to the 'orifun' function below (like how lambda appears in the Exp.Ordering documentation) and adjust the sign of lambda to mimic the orientation dependence observed at 0 and 90 degrees, keeping sampleOri = [0 0 0], but doing so isn't particularly helpful to reproduce the spectra at different angles or a full orientation pattern (in 10 degree steps). I would hope it would be possible to call Exp.Ordering within a for loop of different sampleOri (from your code below) to achieve this, plotting using a stackplot.

Is it necessary to specify values for phi and theta? I'm unsure on its definition, especially since I want to control sample orientation by varying sampleOri, but doing so results in no orientation dependence with any values of sampleOri, or any change in the produced spectra. Omitting phi and theta values results in multiple columns of vector values for v to be generated, which also doesn't seem right.

Could I ask what the separate terms in the Exp.Ordering function control, i.e. Exp.Ordering = @(phi,theta)orifun(phi,theta,sampleOri), and why phi and theta are referred to twice? I'm by no means an easyspin or matlab expert.

Code: Select all

lambda = 2.5;                 
U = -lambda*(3*cos(theta).^2-1)/2; P = exp(-U);

Re: Orientation using Exp.Ordering

Posted: Fri Feb 26, 2021 3:58 am
by HarryD95

Hello,

I was wondering if there had been any updates or thoughts on these issues with the Exp.Ordering function.

Much appreciated,

Harry