forked from ThFriedrich/rmsd_parameterization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tfm_rmsd.m
executable file
·400 lines (381 loc) · 36.4 KB
/
tfm_rmsd.m
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
classdef tfm_rmsd
% This class provides a convenient way to estimate Debye-Waller
% factors (B) and root mean squared displacements (u) for many
% elemental Crystals and some Compounds. It is using the data and formulas of:
% Cao, H. X., & Peng, L. M. (1999).
% Parameterization of the temperature dependence of the Debye-Waller factors.
% Acta Crystallographica Section A: Foundations of Crystallography, 55(5), 926–932.
% https://doi.org/10.1107/s0108767399005176
%
% The class has two public functions:
% tfm_rmsd.plot_DW_T -> Plot B and u over T for a given crystal
% tfm_rmsd.rmsd_at_T -> Return B and u for a crystal at given
% temperature
properties (Access = private, Constant)
t_prm = cell2table({
'He','H.c.p.',16.0310000000000,0.0192600000000000,0.0684600000000000,-0.00567000000000000,0.000927500000000000,0.0100000000000000,0;
'He','F.c.c.',4.55880000000000,-0.00283000000000000,0.00917000000000000,-0.00167000000000000,0.000133400000000000,0.0100000000000000,0;
'Li','B.c.c.',0.901690000000000,0.00878000000000000,3.03900000000000e-05,-5.94000000000000e-08,4.44800000000000e-11,0.330000000000000,1;
'Li','B.c.c.',1.20400000000000,-0.000414200000000000,0.000126400000000000,-3.58400000000000e-07,-5.32700000000000e-10,0.0300000000000000,0;
'Be','H.c.p.',0.358510000000000,-0.000142100000000000,3.22500000000000e-06,-3.13600000000000e-09,1.13900000000000e-12,0.690000000000000,1;
'Be','H.c.p.',0.362750000000000,6.59000000000000e-06,-7.25600000000000e-07,2.24900000000000e-08,-5.36600000000000e-11,0.0100000000000000,0;
'C','Diamond',0.120340000000000,-2.23100000000000e-05,3.34800000000000e-07,-2.10800000000000e-10,5.32000000000000e-14,0.0900000000000000,1;
'C','Diamond',0.119180000000000,-6.36000000000000e-08,1.96200000000000e-07,3.16700000000000e-10,-1.85800000000000e-12,0.0100000000000000,0;
'Ne','F.c.c.',1.66120000000000,0.00243000000000000,-0.000328000000000000,0.000119700000000000,-2.69600000000000e-06,0.0300000000000000,0;
'Na','B.c.c.',0.385310000000000,0.0183100000000000,2.17600000000000e-05,-5.38900000000000e-08,5.10500000000000e-11,0.120000000000000,1;
'Na','B.c.c.',0.811760000000000,-0.00138000000000000,0.000395400000000000,-3.46400000000000e-06,1.24000000000000e-08,0.0800000000000000,0;
'Mg','H.c.p.',0.226680000000000,0.00483000000000000,3.23900000000000e-06,-3.49900000000000e-09,1.36200000000000e-12,1,1;
'Mg','H.c.p.',0.424250000000000,0.000171400000000000,2.93500000000000e-05,1.40500000000000e-07,-1.44900000000000e-09,0.0600000000000000,0;
'Al','F.c.c.',0.184960000000000,0.00163000000000000,2.46900000000000e-06,-2.63000000000000e-09,1.01500000000000e-12,1.31000000000000,1;
'Al','F.c.c.',0.271960000000000,-4.25400000000000e-05,7.43300000000000e-06,7.04200000000000e-08,-4.39100000000000e-10,0.0200000000000000,0;
'Si','Diamond',0.142360000000000,0.000926100000000000,1.62300000000000e-06,-1.67700000000000e-09,6.35100000000000e-13,0.930000000000000,1;
'Si','Diamond',0.192840000000000,1.67000000000000e-05,-7.47500000000000e-07,1.41000000000000e-07,-8.17400000000000e-10,0.0200000000000000,0;
'Ar','F.c.c.',0.820480000000000,-0.00258000000000000,0.000910500000000000,-1.04700000000000e-05,4.60300000000000e-08,0.290000000000000,0;
'K','B.c.c.',0.249600000000000,0.0337700000000000,1.62400000000000e-05,-4.26300000000000e-08,4.26200000000000e-11,0.0200000000000000,1;
'K','B.c.c.',0.788470000000000,-0.000223300000000000,0.000896300000000000,-1.05500000000000e-05,4.71100000000000e-08,0.370000000000000,0;
'Ca','B.c.c.',0.144410000000000,0.00801000000000000,2.13100000000000e-06,-2.31700000000000e-09,9.05700000000000e-13,0.570000000000000,1;
'Ca','F.c.c.',0.122380000000000,0.00607000000000000,1.81500000000000e-06,-1.97500000000000e-09,7.72600000000000e-13,0.620000000000000,1;
'Ca','F.c.c.',0.313760000000000,-0.000180400000000000,8.11800000000000e-05,-4.50200000000000e-07,8.29900000000000e-10,0.0500000000000000,0;
'Ca','B.c.c.',0.378940000000000,-0.000421000000000000,0.000131300000000000,-1.00600000000000e-06,3.20400000000000e-09,0.0500000000000000,0;
'Sc','H.c.p.',0.118920000000000,0.00165000000000000,1.66500000000000e-06,-1.79100000000000e-09,6.95200000000000e-13,1.06000000000000,1;
'Sc','H.c.p.',0.202010000000000,-9.23000000000000e-05,5.81000000000000e-06,1.37300000000000e-07,-9.44000000000000e-10,0.0400000000000000,0;
'Ti','H.c.p.',0.107640000000000,0.00114000000000000,1.47000000000000e-06,-1.57300000000000e-09,6.08800000000000e-13,1.12000000000000,1;
'Ti','H.c.p.',0.166770000000000,2.66900000000000e-05,2.06800000000000e-06,1.02200000000000e-07,-6.03000000000000e-10,0.0200000000000000,0;
'V','B.c.c.',0.0990500000000000,0.00137000000000000,1.33400000000000e-06,-1.42400000000000e-09,5.50000000000000e-13,1.02000000000000,1;
'V','B.c.c.',0.154210000000000,6.05700000000000e-05,1.25300000000000e-05,-5.13000000000000e-08,1.30500000000000e-10,0.0300000000000000,0;
'Cr','B.c.c.',0.0897900000000000,0.000366600000000000,1.13700000000000e-06,-1.19800000000000e-09,4.58800000000000e-13,1.24000000000000,1;
'Cr','B.c.c.',0.113160000000000,-4.19300000000000e-06,2.06400000000000e-06,-1.45100000000000e-11,3.30700000000000e-11,0.0200000000000000,0;
'Mn','',0.127540000000000,2.81800000000000e-06,4.72200000000000e-06,8.58000000000000e-09,-8.76900000000000e-11,0.0100000000000000,0;
'Mn','',0.0900400000000000,0.000749100000000000,1.18700000000000e-06,-1.26100000000000e-09,4.85800000000000e-13,1.17000000000000,1;
'Fe','B.c.c.',0.0872500000000000,0.000623300000000000,1.14300000000000e-06,-1.21300000000000e-09,4.67000000000000e-13,1.22000000000000,1;
'Fe','F.c.c.',0.0941100000000000,0.00137000000000000,1.30200000000000e-06,-1.39800000000000e-09,5.42000000000000e-13,1.01000000000000,1;
'Fe','B.c.c.',0.121320000000000,-1.89300000000000e-05,3.51300000000000e-06,1.32700000000000e-08,-8.53300000000000e-11,0.0200000000000000,0;
'Fe','F.c.c.',0.155170000000000,-1.99700000000000e-05,9.98300000000000e-06,8.50600000000000e-09,-2.06400000000000e-10,0.0200000000000000,0;
'Co','',0.109550000000000,1.87900000000000e-06,3.46700000000000e-06,5.23700000000000e-09,-5.07100000000000e-11,0.0100000000000000,0;
'Co','',0.0812200000000000,0.000545200000000000,1.04500000000000e-06,-1.10400000000000e-09,4.23800000000000e-13,1.16000000000000,1;
'Ni','F.c.c.',0.0857900000000000,0.000727100000000000,1.15200000000000e-06,-1.22900000000000e-09,4.74500000000000e-13,1.24000000000000,1;
'Ni','F.c.c.',0.125730000000000,-1.97700000000000e-05,2.77500000000000e-06,3.92200000000000e-08,-2.29100000000000e-10,0.0100000000000000,0;
'Cu','F.c.c.',0.0844400000000000,0.00138000000000000,1.18500000000000e-06,-1.27600000000000e-09,4.95600000000000e-13,1,1;
'Cu','F.c.c.',0.146160000000000,-1.21200000000000e-05,8.22000000000000e-06,4.44800000000000e-08,-4.13200000000000e-10,0.0100000000000000,0;
'Zn','H.c.p.',0.105490000000000,0.00303000000000000,3.05400000000000e-06,-5.03900000000000e-09,3.07200000000000e-12,0.380000000000000,1;
'Zn','H.c.p.',0.207450000000000,-0.000290100000000000,3.69000000000000e-05,-3.61800000000000e-08,-8.71700000000000e-10,0.240000000000000,0;
'Ga','',0.128770000000000,2.24100000000000e-06,7.94000000000000e-06,1.53900000000000e-08,-2.17000000000000e-10,0.0100000000000000,0;
'Ga','',0.113030000000000,0.000396200000000000,6.60500000000000e-06,-1.77200000000000e-08,1.85400000000000e-11,0.0500000000000000,1;
'Ge','Diamond',0.0698400000000000,0.00165000000000000,9.44800000000000e-07,-1.01000000000000e-09,3.90400000000000e-13,0.820000000000000,1;
'Ge','Diamond',0.133670000000000,-0.000260900000000000,2.06100000000000e-05,-4.90800000000000e-08,-2.56900000000000e-10,0.140000000000000,0;
'As','',0.135990000000000,-2.72500000000000e-06,1.12200000000000e-05,1.32600000000000e-08,-3.00300000000000e-10,0.0200000000000000,0;
'As','',0.0766500000000000,0.00145000000000000,1.26800000000000e-06,-1.50000000000000e-09,6.42400000000000e-13,1.02000000000000,1;
'Se','',0.404580000000000,-0.000535200000000000,0.000431000000000000,-4.87000000000000e-06,2.10300000000000e-08,0.200000000000000,0;
'Se','',0.0777700000000000,0.0175000000000000,1.17700000000000e-06,-1.27700000000000e-09,4.97400000000000e-13,0.180000000000000,1;
'Kr','F.c.c.',0.211380000000000,0.0279400000000000,5.40300000000000e-05,-3.04500000000000e-07,6.83500000000000e-10,0.0100000000000000,1;
'Kr','F.c.c.',0.526670000000000,0.00125000000000000,0.000884800000000000,-1.13700000000000e-05,5.36700000000000e-08,0.860000000000000,0;
'Rb','B.c.c.',0.113460000000000,0.0444600000000000,6.97300000000000e-06,-1.76000000000000e-08,1.68400000000000e-11,0.0100000000000000,1;
'Rb','B.c.c.',0.574680000000000,0.00760000000000000,0.00116000000000000,-1.56300000000000e-05,7.64000000000000e-08,1.76000000000000,0;
'Sr','B.c.c.',0.0692400000000000,0.0122700000000000,1.05200000000000e-06,-1.15100000000000e-09,4.51500000000000e-13,0.200000000000000,1;
'Sr','B.c.c.',0.307250000000000,-0.000127600000000000,0.000285800000000000,-3.17300000000000e-06,1.36200000000000e-08,0.200000000000000,0;
'Y','H.c.p.',0.0651000000000000,0.00252000000000000,9.60600000000000e-07,-1.04400000000000e-09,4.08200000000000e-13,0.770000000000000,1;
'Y','H.c.p.',0.156510000000000,-0.000159000000000000,2.63400000000000e-05,-3.49200000000000e-08,-4.91000000000000e-10,0.110000000000000,0;
'Zr','H.c.p.',0.0613300000000000,0.00157000000000000,8.85500000000000e-07,-9.58400000000000e-10,3.73600000000000e-13,0.840000000000000,1;
'Zr','H.c.p.',0.124910000000000,-6.41700000000000e-05,1.21500000000000e-05,3.31000000000000e-08,-5.06800000000000e-10,0.0600000000000000,0;
'Nb','B.c.c.',0.0588900000000000,0.00119000000000000,8.38300000000000e-07,-9.04800000000000e-10,3.52100000000000e-13,0.880000000000000,1;
'Nb','B.c.c.',0.108620000000000,-4.08800000000000e-05,1.00300000000000e-05,-4.52900000000000e-09,-1.66400000000000e-10,0.0100000000000000,0;
'Mo','B.c.c.',0.0529200000000000,0.000439200000000000,7.14200000000000e-07,-7.62500000000000e-10,2.94600000000000e-13,1.26000000000000,1;
'Mo','B.c.c.',0.0762000000000000,3.23000000000000e-05,1.21000000000000e-06,2.18900000000000e-08,-1.05200000000000e-10,0.0200000000000000,0;
'Ru','',0.0473800000000000,1.58500000000000e-07,8.52200000000000e-07,3.80500000000000e-10,-3.29400000000000e-12,0.0100000000000000,0;
'Ru','',0.0406800000000000,0.000112500000000000,4.62100000000000e-07,-4.75400000000000e-10,1.79300000000000e-13,1.02000000000000,1;
'Rh','',0.0581600000000000,7.33400000000000e-07,1.59600000000000e-06,1.91900000000000e-09,-1.78600000000000e-11,0.0100000000000000,0;
'Rh','',0.0449700000000000,0.000245400000000000,5.63400000000000e-07,-5.92200000000000e-10,2.26500000000000e-13,1.12000000000000,1;
'Pd','F.c.c.',0.0520000000000000,0.00122000000000000,7.45800000000000e-07,-8.06200000000000e-10,3.14000000000000e-13,0.970000000000000,1;
'Pd','F.c.c.',0.102880000000000,-0.000117700000000000,1.15400000000000e-05,-6.36200000000000e-09,-2.21500000000000e-10,0.0400000000000000,0;
'Ag','F.c.c.',0.0535800000000000,0.00219000000000000,7.90100000000000e-07,-8.58800000000000e-10,3.35700000000000e-13,0.690000000000000,1;
'Ag','F.c.c.',0.129320000000000,-7.53700000000000e-05,2.37100000000000e-05,-5.67900000000000e-08,-2.67900000000000e-10,0.100000000000000,0;
'Cd','',0.122390000000000,-4.09100000000000e-05,2.15000000000000e-05,-5.40800000000000e-08,-2.06900000000000e-10,0.0600000000000000,0;
'Cd','',0.0631900000000000,0.00183000000000000,1.86100000000000e-06,-3.08200000000000e-09,1.88300000000000e-12,0.270000000000000,1;
'In','',0.232290000000000,-0.000412400000000000,0.000182100000000000,-1.83900000000000e-06,7.27100000000000e-09,0.170000000000000,0;
'In','',0.0821200000000000,0.00766000000000000,4.79500000000000e-06,-1.16900000000000e-08,1.06600000000000e-11,0.0800000000000000,1;
'Sn','Diamond',0.135410000000000,0.00190000000000000,1.11300000000000e-05,-2.64000000000000e-08,2.19300000000000e-11,1.82000000000000,1;
'Sn','Diamond',0.140570000000000,-0.000800900000000000,9.32100000000000e-05,-9.62900000000000e-07,3.90100000000000e-09,0.560000000000000,0;
'Sb','',0.111920000000000,-3.55500000000000e-05,1.91800000000000e-05,-4.56000000000000e-08,-1.99500000000000e-10,0.0600000000000000,0;
'Sb','',0.0497400000000000,0.00181000000000000,8.53800000000000e-07,-1.01700000000000e-09,4.37800000000000e-13,0.610000000000000,1;
'Te','',0.147480000000000,-0.000161100000000000,5.61500000000000e-05,-3.79300000000000e-07,9.33000000000000e-10,0.120000000000000,0;
'Te','',0.0516400000000000,0.00349000000000000,1.07500000000000e-06,-1.42400000000000e-09,6.83500000000000e-13,0.290000000000000,1;
'Xe','F.c.c.',0.106550000000000,0.0282400000000000,1.61300000000000e-05,-6.87800000000000e-08,1.15700000000000e-10,0.0100000000000000,1;
'Xe','F.c.c.',0.384520000000000,0.00482000000000000,0.000754700000000000,-1.00700000000000e-05,4.87000000000000e-08,1.23000000000000,0;
'Cs','B.c.c.',0.0734300000000000,0.0613600000000000,4.53800000000000e-06,-1.14700000000000e-08,1.09800000000000e-11,0.0100000000000000,1;
'Cs','B.c.c.',0.506980000000000,0.0216600000000000,0.00135000000000000,-1.93300000000000e-05,9.76900000000000e-08,3.58000000000000,0;
'Ba','B.c.c.',0.0445700000000000,0.0101600000000000,6.80300000000000e-07,-7.44500000000000e-10,2.92200000000000e-13,0.200000000000000,1;
'Ba','B.c.c.',0.230130000000000,-0.000311400000000000,0.000257200000000000,-2.98100000000000e-06,1.31400000000000e-08,0.380000000000000,0;
'La','F.c.c.',0.0437000000000000,0.00604000000000000,6.64600000000000e-07,-7.26900000000000e-10,2.85200000000000e-13,0.240000000000000,1;
'La','F.c.c.',0.184460000000000,-0.000658700000000000,0.000137800000000000,-1.36400000000000e-06,5.29600000000000e-09,0.260000000000000,0;
'Gd','',0.0914400000000000,-3.80500000000000e-05,1.79900000000000e-05,-5.67300000000000e-08,-1.07300000000000e-10,0.0700000000000000,0;
'Gd','',0.0372200000000000,0.00161000000000000,5.51100000000000e-07,-5.99500000000000e-10,2.34400000000000e-13,0.640000000000000,1;
'Tb','H.c.p.',0.0376500000000000,0.00320000000000000,5.68200000000000e-07,-6.20500000000000e-10,2.43200000000000e-13,0.460000000000000,1;
'Tb','H.c.p.',0.126550000000000,-0.000271800000000000,5.55900000000000e-05,-4.05000000000000e-07,1.10000000000000e-09,0.200000000000000,0;
'Dy','',0.0842500000000000,-2.74500000000000e-05,1.46200000000000e-05,-3.57600000000000e-08,-1.46400000000000e-10,0.0600000000000000,0;
'Dy','',0.0357900000000000,0.00139000000000000,5.27800000000000e-07,-5.73600000000000e-10,2.24200000000000e-13,0.830000000000000,1;
'Ho','H.c.p.',0.0362500000000000,0.00263000000000000,5.46200000000000e-07,-5.96300000000000e-10,2.33700000000000e-13,0.570000000000000,1;
'Ho','H.c.p.',0.115290000000000,-0.000234100000000000,4.00000000000000e-05,-2.20200000000000e-07,2.77500000000000e-10,0.250000000000000,0;
'Hf','',0.0638900000000000,-5.95100000000000e-06,6.94900000000000e-06,1.64800000000000e-10,-1.56600000000000e-10,0.0300000000000000,0;
'Hf','',0.0316700000000000,0.000828800000000000,4.58400000000000e-07,-4.96500000000000e-10,1.93600000000000e-13,0.890000000000000,1;
'Ta','',0.0661800000000000,-9.26700000000000e-06,8.14400000000000e-06,-4.77300000000000e-09,-1.60900000000000e-10,0.0400000000000000,0;
'Ta','B.c.c.',0.0315900000000000,0.000903900000000000,4.62500000000000e-07,-5.02100000000000e-10,1.96100000000000e-13,0.880000000000000,1;
'Ta','',0.0315000000000000,0.000917800000000000,4.58600000000000e-07,-4.97200000000000e-10,1.94000000000000e-13,0.860000000000000,1;
'Ta','B.c.c.',0.0673800000000000,1.17200000000000e-05,5.38400000000000e-06,4.13500000000000e-08,-4.00600000000000e-10,0.0700000000000000,0;
'W','B.c.c.',0.0290800000000000,0.000374800000000000,4.07300000000000e-07,-4.38200000000000e-10,1.70100000000000e-13,1.20000000000000,1;
'W','B.c.c.',0.0470200000000000,3.23400000000000e-05,9.57900000000000e-07,2.34200000000000e-08,-1.35100000000000e-10,0.0400000000000000,0;
'Re','',0.0358800000000000,7.03400000000000e-07,1.21200000000000e-06,2.00600000000000e-09,-1.98000000000000e-11,0.0100000000000000,0;
'Re','',0.0260700000000000,0.000191700000000000,3.39000000000000e-07,-3.59100000000000e-10,1.38100000000000e-13,1.17000000000000,1;
'Os','',0.0302100000000000,3.11400000000000e-07,7.67500000000000e-07,7.97800000000000e-10,-7.30000000000000e-12,0.0100000000000000,0;
'Os','',0.0238600000000000,0.000116000000000000,2.94400000000000e-07,-3.08400000000000e-10,1.17700000000000e-13,1.11000000000000,1;
'Ir','',0.0355900000000000,7.48100000000000e-07,1.25700000000000e-06,2.18800000000000e-09,-2.19300000000000e-11,0.0200000000000000,0;
'Ir','',0.0255000000000000,0.000199300000000000,3.33900000000000e-07,-3.54200000000000e-10,1.36300000000000e-13,1.16000000000000,1;
'Pt','F.c.c.',0.0293800000000000,0.00109000000000000,4.31000000000000e-07,-4.68100000000000e-10,1.82900000000000e-13,0.910000000000000,1;
'Pt','F.c.c.',0.0677000000000000,-4.03800000000000e-05,1.22300000000000e-05,-3.99800000000000e-08,-5.08300000000000e-11,0.0600000000000000,0;
'Au','F.c.c.',0.0298100000000000,0.00193000000000000,4.44400000000000e-07,-4.84200000000000e-10,1.89500000000000e-13,0.700000000000000,1;
'Au','F.c.c.',0.0876700000000000,-0.000265400000000000,3.58700000000000e-05,-2.83600000000000e-07,9.10400000000000e-10,0.0700000000000000,0;
'Hg','',0.198120000000000,0.000205600000000000,0.000289500000000000,-3.59200000000000e-06,1.65700000000000e-08,0.550000000000000,0;
'Hg','',0.0578800000000000,0.0102600000000000,5.61000000000000e-06,-1.85300000000000e-08,2.36400000000000e-11,0.0300000000000000,1;
'Tl','',0.178650000000000,-3.46100000000000e-05,0.000232400000000000,-2.79300000000000e-06,1.26000000000000e-08,0.360000000000000,0;
'Tl','',0.0375600000000000,0.00881000000000000,1.17000000000000e-06,-1.95700000000000e-09,1.20400000000000e-12,0.0700000000000000,1;
'Pb','F.c.c.',0.0363900000000000,0.00698000000000000,1.12400000000000e-06,-1.88100000000000e-09,1.15700000000000e-12,0.0800000000000000,1;
'Pb','F.c.c.',0.136250000000000,0.00148000000000000,0.000129700000000000,-1.43400000000000e-06,6.11100000000000e-09,0.190000000000000,0;
'Bi','',0.115850000000000,-0.000197500000000000,7.56100000000000e-05,-7.05000000000000e-07,2.59600000000000e-09,0.160000000000000,0;
'Bi','',0.0361000000000000,0.00358000000000000,1.11100000000000e-06,-1.85500000000000e-09,1.14000000000000e-12,0.190000000000000,1;
'Th','F.c.c.',0.0258600000000000,0.00233000000000000,3.90200000000000e-07,-4.26100000000000e-10,1.67000000000000e-13,0.350000000000000,1;
'Th','F.c.c.',0.0898100000000000,-0.000250800000000000,4.29800000000000e-05,-3.29600000000000e-07,9.57600000000000e-10,0.280000000000000,0;
'U','',0.0583600000000000,-2.04900000000000e-05,1.05100000000000e-05,-2.78900000000000e-08,-9.29500000000000e-11,0.0600000000000000,0;
'U','',0.0244900000000000,0.000981900000000000,3.61700000000000e-07,-3.93300000000000e-10,1.53800000000000e-13,0.710000000000000,1;
'GaP','Ga',0.129190000000000,-2.61100000000000e-05,4.27700000000000e-06,1.31800000000000e-07,-9.79000000000000e-10,0.110000000000000,0;
'GaP','P',0.197140000000000,-4.78600000000000e-05,4.95800000000000e-06,1.50700000000000e-07,-1.14400000000000e-09,0.100000000000000,0;
'GaSb','Ga',0.162230000000000,-0.000426200000000000,4.61000000000000e-05,-3.02100000000000e-07,6.71500000000000e-10,0.300000000000000,0;
'GaSb','Sb',0.120720000000000,-0.000368400000000000,4.14800000000000e-05,-2.71000000000000e-07,5.89500000000000e-10,0.350000000000000,0;
'GaAs','Ga',0.138900000000000,-0.000171900000000000,1.73800000000000e-05,8.26700000000000e-09,-5.76400000000000e-10,0.200000000000000,0;
'GaAs','As',0.140290000000000,-0.000226700000000000,2.05900000000000e-05,-1.25800000000000e-09,-6.30300000000000e-10,0.230000000000000,0;
'InP','In',0.140430000000000,-0.000352800000000000,3.51200000000000e-05,-9.23900000000000e-08,-4.99000000000000e-10,0.340000000000000,0;
'InP','P',0.173170000000000,-0.000137500000000000,2.21600000000000e-05,-1.67600000000000e-07,5.10100000000000e-10,0.110000000000000,0;
'InSb','In',0.157300000000000,-0.000806100000000000,0.000107000000000000,-1.09700000000000e-06,4.39400000000000e-09,0.510000000000000,0;
'InSb','Sb',0.135900000000000,-0.000623100000000000,8.83700000000000e-05,-9.24400000000000e-07,3.80500000000000e-09,0.460000000000000,0;
'InAs','In',0.139550000000000,-0.000446800000000000,4.96500000000000e-05,-3.15200000000000e-07,6.37200000000000e-10,0.350000000000000,0;
'InAs','As',0.124330000000000,-0.000199200000000000,3.18100000000000e-05,-2.60100000000000e-07,8.85400000000000e-10,0.160000000000000,0;
'ZnO','Zn',0.142630000000000,1.85000000000000e-05,9.25800000000000e-07,1.79100000000000e-07,-1.17400000000000e-09,0.0700000000000000,0;
'ZnO','O',0.216430000000000,-1.36400000000000e-05,4.67200000000000e-06,2.92200000000000e-08,-3.00900000000000e-10,0.0300000000000000,0;
'ZnS','Zn',0.173110000000000,-0.000145700000000000,1.95700000000000e-05,7.53600000000000e-08,-1.09100000000000e-09,0.160000000000000,0;
'ZnS','S',0.200610000000000,-0.000110400000000000,1.87600000000000e-05,-3.09000000000000e-08,-3.14600000000000e-10,0.0900000000000000,0;
'ZnSe','Zn',0.183970000000000,-0.000326000000000000,3.39500000000000e-05,-6.32900000000000e-08,-6.19900000000000e-10,0.250000000000000,0;
'ZnSe','Se',0.131540000000000,-0.000182000000000000,2.49600000000000e-05,-1.16900000000000e-07,8.58000000000000e-11,0.150000000000000,0;
'ZnTe','Zn',0.204730000000000,-0.000584100000000000,7.67500000000000e-05,-6.23500000000000e-07,2.02300000000000e-09,0.320000000000000,0;
'ZnTe','Te',0.125830000000000,-0.000392500000000000,6.07200000000000e-05,-5.41200000000000e-07,1.93700000000000e-09,0.300000000000000,0;
'CdTe','Cd',0.191890000000000,-0.00111000000000000,0.000168900000000000,-1.88600000000000e-06,8.10900000000000e-09,0.510000000000000,0;
'CdTe','Te',0.139370000000000,-0.000542900000000000,0.000105200000000000,-1.18200000000000e-06,5.16300000000000e-09,0.330000000000000,0;
'HgSe','Hg',0.210700000000000,-0.000531700000000000,0.000404000000000000,-5.43800000000000e-06,2.65100000000000e-08,1.59000000000000,0;
'HgSe','Se',0.155740000000000,0.000141200000000000,0.000121400000000000,-1.60800000000000e-06,7.95100000000000e-09,0.750000000000000,0;
'HgTe','Hg',0.229180000000000,0.00262000000000000,0.000512500000000000,-7.15700000000000e-06,3.57300000000000e-08,2.46000000000000,0;
'HgTe','Te',0.128890000000000,0.000728300000000000,0.000140200000000000,-1.89400000000000e-06,9.41900000000000e-09,1.18000000000000,0;
'CuCl','Cu',0.367260000000000,-0.00236000000000000,0.000314900000000000,-3.37000000000000e-06,1.39200000000000e-08,0.650000000000000,0;
'CuCl','Cl',0.314590000000000,-0.00109000000000000,0.000187900000000000,-2.12200000000000e-06,9.28400000000000e-09,0.330000000000000,0;
'CuBr','Cu',0.237940000000000,-0.000652500000000000,0.000154500000000000,-1.72500000000000e-06,7.56100000000000e-09,0.240000000000000,0;
'CuBr','Br',0.284860000000000,-0.00155000000000000,0.000247300000000000,-2.71400000000000e-06,1.15000000000000e-08,0.510000000000000,0;
'CuI','Cu',0.290830000000000,-0.00149000000000000,0.000194400000000000,-1.99300000000000e-06,8.04100000000000e-09,0.520000000000000,0;
'CuI','I',0.153100000000000,-0.000597300000000000,0.000105900000000000,-1.10700000000000e-06,4.56100000000000e-09,0.380000000000000,0;
'SiC','Si',0.128590000000000,2.24300000000000e-06,6.93900000000000e-07,3.98500000000000e-10,2.15800000000000e-11,0.0200000000000000,0;
'SiC','C',0.167710000000000,-8.42800000000000e-06,9.53200000000000e-07,-1.57000000000000e-09,6.54700000000000e-12,0.0100000000000000,0;
'GaP','Ga',0.0725800000000000,0.00127000000000000,9.75400000000000e-07,-1.04200000000000e-09,4.03000000000000e-13,1.10000000000000,1;
'GaP','P',0.135780000000000,0.00135000000000000,1.55400000000000e-06,-1.60700000000000e-09,6.09000000000000e-13,0.970000000000000,1;
'GaSb','Ga',0.0792300000000000,0.00260000000000000,1.27100000000000e-06,-1.49600000000000e-09,6.38800000000000e-13,0.500000000000000,1;
'GaSb','Sb',0.0483000000000000,0.00235000000000000,8.07000000000000e-07,-9.58300000000000e-10,4.11500000000000e-13,0.500000000000000,1;
'GaAs','Ga',0.0739400000000000,0.00169000000000000,1.00300000000000e-06,-1.07400000000000e-09,4.15900000000000e-13,0.960000000000000,1;
'GaAs','As',0.0697200000000000,0.00188000000000000,9.53400000000000e-07,-1.02100000000000e-09,3.95400000000000e-13,0.830000000000000,1;
'InP','In',0.0505900000000000,0.00266000000000000,7.41100000000000e-07,-8.06000000000000e-10,3.15100000000000e-13,0.620000000000000,1;
'InP','P',0.134900000000000,0.00117000000000000,1.53900000000000e-06,-1.58400000000000e-09,5.97200000000000e-13,0.700000000000000,1;
'InSb','In',0.0547600000000000,0.00418000000000000,1.09300000000000e-06,-1.44100000000000e-09,6.89200000000000e-13,0.210000000000000,1;
'InSb','Sb',0.0511500000000000,0.00345000000000000,1.01200000000000e-06,-1.33000000000000e-09,6.34800000000000e-13,0.340000000000000,1;
'InAs','In',0.0501300000000000,0.00288000000000000,7.27500000000000e-07,-7.89600000000000e-10,3.08400000000000e-13,0.560000000000000,1;
'InAs','As',0.0688000000000000,0.00174000000000000,9.25300000000000e-07,-9.87000000000000e-10,3.80900000000000e-13,0.780000000000000,1;
'ZnO','Zn',0.0802500000000000,0.00131000000000000,1.10700000000000e-06,-1.18900000000000e-09,4.61200000000000e-13,1.12000000000000,1;
'ZnO','O',0.194570000000000,0.000530000000000000,1.66200000000000e-06,-1.59500000000000e-09,5.74600000000000e-13,0.440000000000000,1;
'ZnS','Zn',0.0823700000000000,0.00237000000000000,1.15200000000000e-06,-1.24200000000000e-09,4.82700000000000e-13,0.710000000000000,1;
'ZnS','S',0.137630000000000,0.00167000000000000,1.65600000000000e-06,-1.72800000000000e-09,6.57900000000000e-13,0.790000000000000,1;
'ZnSe','Zn',0.0835300000000000,0.00281000000000000,1.17500000000000e-06,-1.26700000000000e-09,4.92600000000000e-13,0.720000000000000,1;
'ZnSe','Se',0.0672500000000000,0.00183000000000000,9.24200000000000e-07,-9.91200000000000e-10,3.84100000000000e-13,0.720000000000000,1;
'ZnTe','Zn',0.0854400000000000,0.00397000000000000,1.21500000000000e-06,-1.31200000000000e-09,5.10500000000000e-13,0.660000000000000,1;
'ZnTe','Te',0.0454400000000000,0.00293000000000000,6.71200000000000e-07,-7.40900000000000e-10,2.94300000000000e-13,0.540000000000000,1;
'CdTe','Cd',0.0521900000000000,0.00615000000000000,7.66600000000000e-07,-8.34500000000000e-10,3.26400000000000e-13,0.310000000000000,1;
'CdTe','Te',0.0458200000000000,0.00406000000000000,6.64500000000000e-07,-7.21800000000000e-10,2.82100000000000e-13,0.320000000000000,1;
'HgSe','Hg',0.0416000000000000,0.0125400000000000,1.64500000000000e-06,-3.25300000000000e-09,2.39000000000000e-12,0.0500000000000000,1;
'HgSe','Se',0.0903900000000000,0.00422000000000000,3.19700000000000e-06,-6.10400000000000e-09,4.36400000000000e-12,0.110000000000000,1;
'HgTe','Hg',0.0411800000000000,0.0183200000000000,1.58800000000000e-06,-3.08100000000000e-09,2.22300000000000e-12,0.0300000000000000,1;
'HgTe','Te',0.0591600000000000,0.00536000000000000,2.15300000000000e-06,-4.11700000000000e-09,2.94200000000000e-12,0.0900000000000000,1;
'CuCl','Cu',0.107690000000000,0.0114300000000000,2.61000000000000e-06,-3.83500000000000e-09,2.05800000000000e-12,0.160000000000000,1;
'CuCl','Cl',0.165360000000000,0.00670000000000000,3.58800000000000e-06,-5.15100000000000e-09,2.72300000000000e-12,0.250000000000000,1;
'CuBr','Cu',0.103010000000000,0.00603000000000000,2.42000000000000e-06,-3.53800000000000e-09,1.89300000000000e-12,0.270000000000000,1;
'CuBr','Br',0.0865100000000000,0.00906000000000000,2.10600000000000e-06,-3.10100000000000e-09,1.66700000000000e-12,0.170000000000000,1;
'CuI','Cu',0.105930000000000,0.00753000000000000,2.55500000000000e-06,-3.75000000000000e-09,2.01100000000000e-12,0.230000000000000,1;
'CuI','I',0.0542500000000000,0.00426000000000000,1.32100000000000e-06,-1.94700000000000e-09,1.04700000000000e-12,0.170000000000000,1;
'SiC','Si',0.120470000000000,7.43600000000000e-05,1.16800000000000e-06,-1.16300000000000e-09,4.30100000000000e-13,0.910000000000000,1;
'SiC','C',0.165360000000000,3.38500000000000e-05,7.34600000000000e-07,-5.64800000000000e-10,1.71300000000000e-13,0.210000000000000,1},...
'VariableNames',{'Crystal','Structure_Element','a0','a1','a2','a3','a4','ME','T_rng'});
end
properties (Access = public, Constant)
available_crystals = unique(tfm_rmsd.t_prm(:,{'Crystal'}));
end
methods (Access = public, Static = true)
function h_out = plot_DW_T(crystal, T_range)
% Plots the root mean squared displacement u,
% and the Debye-Waller factor B for a given set of crystals
% and (optional) Temperature range (in Kelvin) and (optionally)
% returns the figure handle.
%
% Syntax:
% tfm_rmsd.plot_DW_T(crystl, [T_min T_max])
% tfm_rmsd.plot_DW_T({crystl1, crystal2, ...}, [T_min T_max])
%
% Examples:
% tfm_rmsd.plot_DW_T('Pt')
% tfm_rmsd.plot_DW_T('Pt', [290 600])
% tfm_rmsd.plot_DW_T({'GaAs','SiC'})
if ~exist('T_range','var') || isempty(T_range)
T_range = [0 1000];
end
p = tfm_rmsd.get_prms(crystal);
[T1, T2, n_struc, b_data] = fcn_input_check(p, T_range(1), T_range(2));
if b_data
h = figure('Name',['Debye-Waller factors and Root-Mean-Square-Displacements for ' strjoin(fcn_cell(crystal), ' and ' )],'NumberTitle','off'); clf;
for ix = 1:n_struc
t = linspace(T1(ix),T2(ix),32);
[u, B] = fcn_calc_u_B(p(ix),t);
subplot(1,2,1); hold on;
plot(t,u,'.-'); hold off;
subplot(1,2,2); hold on;
plot(t,B,'.-'); hold off;
end
subplot(1,2,1);
ylabel('RMSD [$\mathrm{\AA}$]','interpreter','latex')
xlabel('Temperature [K]','interpreter','latex')
legend(p.s,'Location','northwest')
grid on;
subplot(1,2,2);
ylabel('B [$\mathrm{\AA^2}$]','interpreter','latex')
xlabel('Temperature [K]','interpreter','latex')
legend(p.s,'Location','northwest','interpreter','latex')
grid on;
end
if nargout > 0
h_out = h;
end
end
function [u, B, st] = rmsd_at_T(crystal, T)
% Returns the root mean squared displacement u,
% the Debye-Waller factor B and the
% lattice type for a set of given Crystals and Temperatures (in Kelvin)
%
% Syntax:
% [u, B, st] = tfm_rmsd.rmsd_at_T(crystal,T)
% [u, B, st] = tfm_rmsd.rmsd_at_T({crystl1, crystal2, ...}, [T1, T2, ...])
%
% Examples:
% [u, B, st] = tfm_rmsd.rmsd_at_T('Fe',290)
% u =
% 0.0654
% 0.0850
% B =
% 0.3379
% 0.5706
% st =
% {'Fe B.c.c.'}
% {'Fe F.c.c.'}
%
% [u, B, s] = tfm_rmsd.rmsd_at_T({'ZnS','ZnTe'},100:100:400)
% u =
% 0.0636 0.0816 0.0972 0.1112
% 0.0646 0.0867 0.1048 0.1206
% 0.0660 0.0909 0.1107 0.1276
% 0.0790 0.1078 0.1310 0.1509
% B =
% 0.3195 0.5251 0.7463 0.9768
% 0.3297 0.5933 0.8674 1.1476
% 0.3444 0.6528 0.9672 1.2849
% 0.4933 0.9184 1.3545 1.7969
% s =
% {'ZnS S' }
% {'ZnS Zn' }
% {'ZnTe Te'}
% {'ZnTe Zn'}
p = tfm_rmsd.get_prms(crystal);
[T_min, T_max, n_struc, b_data] = fcn_input_check(p, T, T);
t = min(max(T,T_min),T_max);
if b_data
st = {p.s}';
B = zeros(size(t));
u = zeros(size(t));
for ix = 1:n_struc
[u(ix,:), B(ix,:)] = fcn_calc_u_B(p(ix),t(ix,:));
end
end
end
end
methods (Access = private, Static = true)
function prms = get_prms(crystal)
b_el = ismember(tfm_rmsd.t_prm.Crystal, fcn_cell(crystal));
sub_tab = tfm_rmsd.t_prm(b_el,:);
crys = sub_tab(:,{'Crystal','Structure_Element'});
crys_u = unique(crys,'rows');
for ix = 1:size(crys_u,1)
b_t_rng = table2array(sub_tab(:,'T_rng'));
b_crys = ismember(crys,crys_u(ix,:),'rows');
prms(ix).h = sub_tab{b_crys & b_t_rng,{'a0','a1','a2','a3','a4'}};
prms(ix).l = sub_tab{b_crys & ~b_t_rng,{'a0','a1','a2','a3','a4'}};
prms(ix).s = strjoin(crys_u{ix,:});
end
end
end
end
function [u, B] = fcn_calc_u_B(p,t)
b_th = t > 80;
B = zeros(size(t,1),1);
if sum(b_th) > 0
B(b_th) = fcn_polynom(p.h, t(b_th));
end
if sum(~b_th) > 0
B(~b_th) = fcn_polynom(p.l, t(~b_th));
end
u = real(fcn_B_to_rms(B));
end
function crystal = fcn_cell(crystal)
if ~iscell(crystal)
crystal = {crystal};
end
end
function [t_min, t_max, n_struc, b_data] = fcn_input_check(prms, t_min, t_max)
b_data = true;
n_struc = numel(prms);
t_min = repmat(t_min,n_struc, 1);
t_max = repmat(t_max,n_struc, 1);
for i_s = 1:n_struc
if isempty(prms(i_s).h) && ~isempty(prms(i_s).l)
if t_max(i_s) > 80
t_max(i_s) = 80;
fprintf(2,"There is no parameterization data for Temperatures >80K available for this structure. \n The plot range is adjusted accordingly. Output values are given for T=80K. \n")
end
end
if ~isempty(prms(i_s).h) && isempty(prms(i_s).l)
if t_min(i_s) <= 80
t_min(i_s) = 81;
fprintf(2,"There is no parameterization data for Temperatures <80K available for this structure. \n The plot range is adjusted accordingly. Output values are given for T=81K. \n")
end
end
if isempty(prms(i_s).h) && isempty(prms(i_s).l)
fprintf(2,"There is no parameterization data available for this structure. \n")
b_data = false;
end
if t_min > t_max
fprintf(2,"There is no parameterization data available for this structure in the given temperature range. \n")
b_data = false;
end
end
end
function B = fcn_polynom(p,t)
B = p(1) + t * p(2) + t.^2 * p(3) + t.^3 * p(4) + t.^4 * p(5);
end
function u = fcn_B_to_rms(B)
u = sqrt(B / (8 * pi^2 ));
end