-
Notifications
You must be signed in to change notification settings - Fork 25
/
frames.html
366 lines (289 loc) · 18 KB
/
frames.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="icon" href="img/eslogo196.png">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="highlight/matlab.css">
<script src="highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<title>Frames</title>
</head>
<body>
<header>
<ul>
<li><img src="img/eslogo42.png">
<li class="header-title">EasySpin
<li><a href="index.html">Documentation</a>
<li><a href="references.html">Publications</a>
<li><a href="http://easyspin.org" target="_blank">Website</a>
<li><a href="http://easyspin.org/academy" target="_blank">Academy</a>
<li><a href="http://easyspin.org/forum" target="_blank">Forum</a>
</ul>
</header>
<section>
<h1>Coordinate frames in EasySpin</h1>
<p>
To simulate EPR spectra, EasySpin needs to know about the relative orientations of the various tensors within a spin center or paramagnetic molecule, of the molecule within a sample such as a crystal, and of the sample within the spectrometer in the lab. For this purpose, EasySpin defines a set of cartesian coordinate frames. Specify the relative orientation between these frames in order to describe the geometry of your sample and your experiment.
</p>
<!-- ======================================================================================= -->
<div class="subtitle"><a name="frametypes">Overview</a></div>
<p>
The figure below summarizes EasySpin's frames. There are four frame types: the lab frame, the sample/crystal frame, the molecular frame, and a set of tensor frames (one for each tensor). The orientation of the sample (crystal, film, powder, frozen solution, etc.) in the lab frame is given in <code>Exp.SampleFrame</code>, the orientation of the paramagnetic molecule in the sample frame is given in <code>Exp.MolFrame</code>, and the orientations of the various tensors in the molecular frame are given in <code>Sys.gFrame</code>, <code>Sys.AFrame</code>, <code>Sys.DFrame</code>, <code>Sys.QFrame</code>, <code>Sys.eeFrame</code>, <code>Sys.nnFrame</code>, and <code>Sys.DiffFrame</code>.
</p>
<div align="center">
<img src="img/frames.png" width="600">
</div>
<p>
This overview explains at how these frames are defined in EasySpin and shows how you can specify the relative orientations between them. All frames are right-handed cartesian with orthonormal axes.
</p>
<ul>
<li><a href="#labframe">Lab frame</a>
<li><a href="#sampleframe">Sample frame</a>
<li><a href="#molframe">Molecular frame</a>
<li><a href="#tensorframes">Tensor frames</a>
<li><a href="#TM">Tensor orientations within the molecule</a>
<li><a href="#MC">Molecule orientation within the sample</a>
<li><a href="#CL">Sample orientation within the spectrometer</a>
</ul>
<!-- ======================================================================================= -->
<div class="subtitle"><a name="labframe">Lab frame</a></div>
<p>
The <em>lab frame</em> L is fixed in the laboratory. Its three unit vectors are denoted xL, yL, zL. EasySpin defines the three axes of the lab frame as follows:
</p>
<ul>
<li>zL is along the static magnetic field B<sub>0</sub>, in agreement with the universal convention in magnetic resonance. For an electromagnet with horizontal B<sub>0</sub>, zL is horizontal and points to the left. For a standard superconducting magnet with vertical B<sub>0</sub>, zL is vertical and points up. For a split-coil superconducing magnet with horizontal B<sub>0</sub>, zL is horizontal and points to the left.</li>
<li>yL points away from the user.</li>
<li>xL is defined such that the (xL, yL, zL) coordinate frame is right-handed. For an electromagnet, xL is vertical and points up. For a standard superconducting magnet, xL is horizontal and points to the right.</li>
</ul>
<p>
The following figure illustrates this.
</p>
<div align="center">
<img src="img/labframe.png" width="400">
</div>
<p>
By default, the B<sub>1</sub> field of the incident microwave excitation is along xL for the standard perpendicular mode. For parallel-mode EPR, B<sub>1</sub> is along zL. You can specify non-standard mirowave excitation geometries using <code>Exp.mwMode</code>.
</p>
<p>
For photoexcited samples, the incident optical excitation beam (from a laser) is assumed to travel along yL by default, which is the common setup used with electromagnets. To specify other laser excitation geometries, use <code>Exp.lightBeam</code>.
</p>
<div class="subtitle"><a name="sampleframe">Sample frame</a></div>
<p>
The <em>sample frame</em> S is a sample-fixed frame with orthonormal unit vectors xS, yS, zS. The sample can be a crystal, a film, a frozen solution, etc.
</p>
<p>
In the case of a crystal, EasySpin follows the conventions prevalent in X-ray crystallography where the axis convention depends on the space group of the crystal:
</p>
<ul>
<li>1-2 (triclinic; point groups C1, Ci=S2): xS, yS and zS are arbitrary.
<li>3-15 (monoclinic; point groups C2, Cs=C1h, C2h): For short Hermann-Mauguin symbols (like P2, Cm, P21/m, etc), yS is along the unique axis. For full Hermann-Mauguin symbols (like P211, P121, P112, etc), the space group symbol defines the unique axis (P211: xS, P121: yS, P112: zS, etc). In all cases, the other two axes are arbitrary.
<li>16-74 (orthorhombic; point groups D2, C2v, D2h): xS, yS and zS are along the three two-fold axes. The assignment is arbitrary.
<li>75-88 (tetragonal; point groups C4, S4, C4h): zS is along the four-fold axis. xS and yS are arbitrary.
<li>89-142 (tetragonal; point groups D4, C4v, D2d, D4h): zS is along the four-fold axis. xS is along one of the two-fold axes.
<li>143-148 (tetragonal; point groups C3, C3i=S6): zS is along the three-fold axis. xS and yS are arbitrary.
<li>149-167 (trigonal; point groups D3, C3v, D3d): zS is along the three-fold axis. xS is along one of the two-fold axes.
<li>168-176 (hexagonal; point groups C6, C3h, C6h): zS is along the six-fold axis. xS and yS are arbitrary.
<li>177-194 (hexagonal; point groups D6, C6v, D3h, D6h): zS is along the six-fold axis, and xS is along one of the two-fold axes.
<li>195-206 (cubic; point groups T, Th): xS, yS and zS are along the three two-fold axes. The assignment is arbitrary.
<li>207-230 (cubic; point groups O, Td, Oh): xS, yS and zS are along the three four-fold axes. The assignment is arbitrary.
</ul>
<p>
For crystal simulations, it is important to be aware of these conventions, as EasySpin relies on them to compute the orientations of all sites in the unit cell of a crystal given the orientation of a site in the asymmetric unit.
</p>
<p>
For an oriented film sample, xS, yS, and zS are arbitrary. One possibility is to define the zS axis to be perpendicular to the plane of the film.
</p>
<p>
For powders and frozen solution samples, the definition of xS, yS and zS is also arbitrary.
</p>
<p>
In versions of EasySpin prior to 6, the sample frame was called crystal frame, and the axes were denoted as xC, yC and zC.
</p>
<div class="subtitle"><a name="molframe">Molecular frame</a></div>
<p>
The <em>molecular frame</em> M is a reference frame that is fixed in the molecule or paramagnetic center. Its three unit axes are denoted xM, yM, and zM. You are free to choose the orientation of the molecular frame within the molecule, but it's best to align it with the local molecular symmetry. For example, put the zM axis along the plane normal of an aromatic radical or a planar transition metal complex. For a nitroxide radical, xM is conventionally along the N-O bond, and zM is perpendicular to the C-NO-C plane.
<p>
If you import data from quantum chemistry programs like ORCA, then you can take the frame from those calculations as the molecular frame. All imported atom coordinates and calculated tensors will be defined in this frame. EasySpin can <a href="orca.html">import ORCA calculation results</a>.
</p>
<div class="subtitle"><a name="tensorframes">Tensor frames</a></div>
<p>
Last, there are the <em>tensor frames</em> T, with unit vectors xT, yT, zT. There is one frame for each tensor in the spin Hamiltonian, such as g, A, D, and Q tensors, as well as the rotational diffusion tensor. The tensor frame for a given tensor is its eigenframe. Its axes are aligned with the principal axes of the tensor. The particular order of principal values, and therefore the assignment of the associated principal axes to xT, yT, and zT, is arbitrary and up to you.
</p>
<p>
Next, let's look at how you can tell EasySpin about the relative orientations between these frames.
</p>
<!-- ======================================================================================= -->
<div class="subtitle"><a name="TM">Tensor orientations within the molecule</a></div>
<p>
In paramagnetic centers, there often exists some local symmetry. An aromatic molecule has a unique plane normal axis, and square-planar transition metal complex has a four-fold symmetry axis perpendicular to the plane. For such a center, atomic coordinates and tensor orientations are best expressed in a coordinate reference frame that aligns with these local symmetry elements. However, any molecule-fixed frame can be chosen as a reference frame. This coordinate frame is the <em>molecular reference frame</em>, or <em>molecular frame</em> for short. The corresponding axes are labeled xM, yM, and zM.
</p>
<p>
The orientation of every tensor you specify in EasySpin is related to the molecular reference frame. If the tensor is fully aligned with the molecular frame, then it is enough to simply give the three principal values of the tensor
</p>
<pre class="matlab">
Sys.g = [2.0 2.1 2.2];
</pre>
<p>
For EasySpin, this means that the tensor axes - let's call them xT, yT, and zT - align with the molecular frame. The first g principal axis xT, with the principal value 2.0, is along xM, the second (2.1, yT) is along yM, and the third (2.2, zT) is along zM.
</p>
<p>
If the tensor is tilted with respect to the molecular frame, you can specify the tilt in terms of three <a href="eulerangles.html">Euler angles</a> that describe the transformation from the <em>molecular frame to the tensor frame</em> (M→T). For a g tensor, specify this in the field <code>Sys.gFrame</code>. Here is an example:
</p>
<pre class="matlab">
Sys.g = [2.0 2.1 2.2];
Sys.gFrame = [30 27 81]*pi/180; % Euler angles, molecular frame -> g frame
</pre>
<p>
This means that to transform the molecular frame (M) to the g tensor frame (T), you first rotate the molecular frame by 30 degrees around zM, then by 27 degrees around the resulting y axis, and then by 81 degrees around the resulting z axis. It's important to realize that you rotate the <em>frame</em>, and not the tensor. The tensor stays untouched.
</p>
<p>
To convert this M→T transformation to the associated T→M transformation (as used in old EasySpin versions prior to 5.0 by the obsolete <code>Sys.gpa</code>), just invert the order and the sign of the three <a href="eulerangles.html">Euler angles</a>.
</p>
<pre class="matlab">
a_M2T = [30 27 81]*pi/180; % Euler angles for M->T transformation
a_T2M = [-81 -27 -30]*pi/180; % Euler angles for corresponding T->M transformation
Sys.gFrame = a_M2T; % EasySpin 5 and later
% Sys.gpa = a_T2M; % Obsolete! (valid prior to EasySpin 5)
</pre>
<p>
This works similarly for the other tensors. For hyperfine tensors, use <code>Sys.AFrame</code>, for zero-field tensors <code>Sys.DFrame</code>, for quadrupole tensors <code>Sys.QFrame</code>, for electron-electron interaction tensors <code>Sys.eeFrame</code>, for chemical shielding tensors <code>Sys.sigmaFrame</code>, and for nucleus-nucleus interaction tensors <code>Sys.nnFrame</code>.
</p>
<p>
If you want to get the coordinates of the tensor principal axes in molecular frame coordinates, use the following:
</p>
<pre class="matlab">
Sys.gFrame = [30 27 81]*pi/180; % Euler angles for M->T transformation
R_M2T = erot(Sys.gFrame) % corresponding M->T transformation matrix
</pre>
<pre class="mloutput">
R_M2T =
-0.3731 0.9251 -0.0710
-0.8404 -0.3045 0.4484
0.3932 0.2270 0.8910
</pre>
<p>
The first <em>row</em> is xT, the second one is yT, and the third one is zT, all expressed in molecular frame coordinates:
</p>
<pre class="matlab">
% tensor axes in molecular coordinates
xT_M = R_M2T(1,:).';
yT_M = R_M2T(2,:).';
zT_M = R_M2T(3,:).';
</pre>
<p>
Vice versa, the first <em>column</em> is xM, the second column is yM, and the third column is zM, all expressed in tensor frame coordinates.
</p>
<pre class="matlab">
% molecular axes in tensor coordinates
xM_T = R_M2T(:,1);
yM_T = R_M2T(:,2);
zM_T = R_M2T(:,3);
</pre>
<p>
Prior to version 5, EasySpin used <code>Sys.gpa</code>, <code>Sys.Apa</code> etc. instead of <code>Sys.gFrame</code>, <code>Sys.AFrame</code> etc. To update old scripts, invert the signs of all the angles, and reverse the order. So the old <code>Sys.gpa = [10 -20 34]*pi/180;</code> is now
<code>Sys.gFrame = [-34 20 -10]*pi/180;</code>.
</p>
<!-- ======================================================================================= -->
<div class="subtitle"><a name="MC">Molecule orientation within a crystal</a></div>
<p>
In crystals, the spin centers rarely align with the crystal axes. Therefore, it is often necessary to specify a tilt between the sample frame (S), which is fixed relative to the crystal, and the molecular frame (M), which is fixed relateive to the spin center. In EasySpin, you can do this with <code>Exp.MolFrame</code>. This field takes a set of three values that specify the <a href="eulerangles.html">Euler angles</a> (in radians) for the transformation of the <em>sample/crystal frame to the molecular frame</em> (C→M).
</p>
<pre class="matlab">
Exp.MolFrame = [33 12 -76]*pi/180; % Euler angles for S->M transformation
</pre>
<p>
This means that to transform the sample/crystal frame (S) to the molecular frame (M), you first rotate counterclockwise by 33 degrees around zS, then by 12 degrees around the resulting y axis, and then by -76 degrees around the resulting z axis. Again, this transforms the <em>frames</em>, but leaves the physical objects (crystal and molecule) untouched.
</p>
<p>
To get the vectors xM, yM, zM expressed in sample frame coordinates (we'll denote these as xM_S, yM_S, zM_S), use <a href="erot.html">erot</a> to calculate the corresponding transformation matrix:
</p>
<pre class="matlab">
a_S2M = [33 12 -76]*pi/180; % Euler angles for S->M transformation
R_S2M = erot(a_S2M) % corresponding transformation matrix
</pre>
<pre class="mloutput">
R_S2M =
0.7269 -0.6849 -0.0503
0.6642 0.7198 -0.2017
0.1744 0.1132 0.9781
</pre>
<p>
The three <em>columns</em> give the sample/crystal axes as vectors expressed in molecular frame coordinates.
</p>
<pre class="matlab">
% sample/crystal axes in molecular coordinates
xS_M = R_S2M(:,1);
yS_M = R_S2M(:,2);
zS_M = R_S2M(:,3);
</pre>
<p>
The three <em>rows</em> give the molecular axes vectors expressed in sample/crystal frame coordinates.
</p>
<pre class="matlab">
% molecular axes in sample/crystal coordinates
xM_S = R_S2M(1,:).';
yM_S = R_S2M(2,:).';
zM_S = R_S2M(3,:).';
</pre>
<!-- ======================================================================================= -->
<div class="subtitle"><a name="CL">Sample orientation in the spectrometer</a></div>
<p>
To describe the alignment of a sample (crystal, film, etc.) in the spectrometer, you need to provide the relative orientation between the lab frame and the sample frame. For this, use the field <code>Exp.SampleFrame</code>. This field takes a set of three values that specify the <a href="eulerangles.html">Euler angles</a> (in radians) for the transformation of the <em>lab frame to the sample frame</em> (L→C).
</p>
<p>
Here is a simple example.
</p>
<pre class="matlab">
Exp.SampleFrame = [30 45 -10]*pi/180; % Euler angles for L->C transformation
</pre>
<p>
This indicates that the lab frame (xL,yL,zL) has to be rotated by 30 degrees around its zL axis, followed by a rotation by 45 degrees around the resulting new y axis, followed by a -10 degree rotation around the resulting z axis, to bring it into overlap with the sample frame (xS,yS,zS).
</p>
<p>
<code>Exp.SampleFrame</code> describes the lab-to-sample frame transformation (L→S). In order to find the <a href="eulerangles.html">Euler angles</a> for the reverse transformation, from the sample to the lab frame (S→L), invert the order and the signs of the angles. Here is an example:
</p>
<pre class="matlab">
a_L2S = [72 15 -108]*pi/180; % angles for sample -> lab frame transformation
a_S2L = [+108 -15 -72]*pi/180; % angles for corresponding lab -> sample frame transformation
Exp.SampleFrame = a_L2S; % EasySpin expects a lab -> sample frame transformation
</pre>
<p>
To find out how the sample axes lie in the spectrometer, or how the lab axes lie relative to the sample frame, use EasySpin's <a class="esf" href="erot.html">erot</a> to get the associated transformation matrix. Here is an example:
</p>
<pre class="matlab">
a_L2S = [10 45 0]*pi/180; % Euler angles for L->S transformation
Exp.SampleFrame = a_L2S;
R_S2L = erot(Exp.SampleFrame) % corresponding transformation matrix
</pre>
<pre class="mloutput">
R_S2L =
0.6964 0.1228 -0.7071
-0.1736 0.9848 0
0.6964 0.1228 0.7071
</pre>
<p>
In this matrix, the three columns are the three lab axis vectors xL, yL, zL, represented in sample coordinates. Conversely, the three rows are the sample axis vectors xS, yS, zS, represented in lab coordinates.
</p>
<pre class="matlab">
% lab axes in sample coordinates
xL = R_L2S(:,1);
yL = R_L2S(:,2);
zL = R_L2S(:,3);
% sample axes in lab coordinates
xS = R_L2S(1,:).';
yS = R_L2S(2,:).';
zS = R_L2S(3,:).';
</pre>
<p>
Prior to EasySpin 6, the relative orientation between lab and sample frame was defined in the field <code>Exp.CrystalOrientation</code>. To convert code containing this to <code>Exp.SampleFrame</code>, invert the order of the three Euler angles and flip their signs.
</p>
<pre class="matlab">
%Exp.CrystalOrientation = [-20 47 73]*pi/180; % EasySpin 5 - obsolete!
Exp.SampleFrame = [-73 -47 20]*pi/180; % EasySpin 6 and later
</pre>
<hr>
</section>
<footer></footer>
</body>
</html>