Simulation of a twinned crystal

General forum for EasySpin: questions, how to's, etc.
Post Reply
thanasis
Local Expert
Posts: 245
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Simulation of a twinned crystal

Post by thanasis »

Hello,

This is a sequel to my previous topic about single-crystal rotations. My follow-up question is whether we can simulate twinned crystals.

From what I understand, for multi-component systems, the fitted variables for each component must be entered into the Sys structures. However, the molecular and crystal orientations are entered under Exp.MolFrame and Exp.CrystalOrientation, i.e. in the experimental conditions.

Is to possible to simulate different orientations for each of the two components?

Thanks in advance.
Stefan Stoll
EasySpin Creator
Posts: 1073
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Simulation of a twinned crystal

Post by Stefan Stoll »

The best way to simulate a twinned crystal is to use two orientations in Exp.CrystalOrientation (two rows with three Euler angles each). Of course, this works only if the spin centers in the two twinned domains are identical and the only difference is the orientation.

Code: Select all

clear
Sys.g = [2 2.1 2.2];
Sys.lw = 0.5;

Exp.mwFreq = 9.5;
Exp.Range = [300 360];

Exp.CrystalOrientation =[0 0 0; rand(1,3)*pi];

pepper(Sys,Exp);
If you have different amounts of spin centers in the two domains, use

Code: Select all

Opt.Output = 'separate';
[x,y] = pepper(Sys,Exp,Opt);

Weights = rand(1,2);
y = Weights(1)*y(1,:) + Weights(2)*y(2,:);
thanasis
Local Expert
Posts: 245
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Simulation of a twinned crystal

Post by thanasis »

Thanks, that seems to be what i am looking for!

However, I have trouble making it work with rotatecrystal.

After I define the initial orientations of the the initial orientation and the rotation axis, when I instruct it to use the rotatecrystal function, it has a problem with the number of Euler angles:

Code: Select all

cori0 = [0 0 0; 0 10 0]*pi/180; 
nRot_L = [1;0;0];
rotatecrystal(cori0,nRot_L,pi/4);
Throws the error:

Code: Select all

Error using rotatecrystal (line 36)
First input (CryOri) must contain three numbers, the three Euler angles.
Stefan Stoll
EasySpin Creator
Posts: 1073
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Simulation of a twinned crystal

Post by Stefan Stoll »

rotatecrystal only supports one crystal orientation at a time. You can loop over the orientations one by one to get the rotation done:

Code: Select all

clear, clc

cori0 = [0 0 0; 0 10 0]*pi/180;
nRot_L = [1;0;0];
for iOri = 1:size(cori0,1)
  cori_rot(iOri,:) = rotatecrystal(cori0(iOri,:),nRot_L,pi/4)
end
Post Reply