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.
Simulation of a twinned crystal
-
- EasySpin Creator
- Posts: 1120
- Joined: Mon Jul 21, 2014 10:11 pm
- Location: University of Washington
Re: Simulation of a twinned crystal
The best way to simulate a twinned crystal is to use two orientations in
If you have different amounts of spin centers in the two domains, use
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);
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,:);
Re: Simulation of a twinned crystal
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:
Throws the error:
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);
Code: Select all
Error using rotatecrystal (line 36)
First input (CryOri) must contain three numbers, the three Euler angles.
-
- EasySpin Creator
- Posts: 1120
- Joined: Mon Jul 21, 2014 10:11 pm
- Location: University of Washington
Re: Simulation of a twinned crystal
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