-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpathsLabels.py
More file actions
271 lines (263 loc) · 13.5 KB
/
pathsLabels.py
File metadata and controls
271 lines (263 loc) · 13.5 KB
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
"""
High-symmetry paths and labels of special points for different types
of Brillouin lattices, including an option to break z-symmetry.
Data for high-symmetry paths obtained from:
W. Setyawan and S. Curtarolo, Comp. Mat. Sci. 49, 2, 299-312 (2010)
doi.org/10.1016/j.commatsci.2010.05.010
Exported functions
------------------
get_path_and_labels: data for high-symmetry paths in the Brillouin zone
Written by Matthew Houtput ([email protected])
"""
def get_path_and_labels(lattice_type, break_z=False):
""" Path and labels of high-symmetry paths in the Brillouin zone
Arguments
---------
lattice_type: str
Three-letter code for the type of Brillouin lattice
Currently implemented:
- "CUB", simple cubic
- "FCC", face-centered cubic
- "BCC", body-centered cubic
- "TET", simple tetragonal
- "ORC", simple orthorhombic
break_z: bool
- True: return high-symmetry path for material with broken
z-symmetry (e.g. by an electric field)
- False: return the usual high-symmetry path
Returns
-------
path: list of list of list of real
High-symmetry path, written in direct coordinates in the same
conventions as PhonoPy
- First level: list of connected path segments
- Second level: list of points that mark path segments
- Third level: direct coordinates of points
path_labels: list of str
List of names of the edge points of the path, in order,
written in LaTeX markup.
If break_z == True, labels of the high-symmetry structure
are used, adding subscripts _1, _2, ... if necessary
"""
match lattice_type:
case "CUB":
# Simple cubic lattice
if break_z:
path = [ # CUB label | TET label
[ # ---------------------
[0.0, 0.0, 0.0], # Gamma | Gamma
[0.0, 0.5, 0.0], # X | X
[0.5, 0.5, 0.0], # M | M
[0.0, 0.0, 0.0], # Gamma | Gamma
[0.0, 0.0, 0.5], # X1 | Z
[0.0, 0.5, 0.5], # M1 | R
[0.5, 0.5, 0.5], # R | A
[0.0, 0.0, 0.5], # X1 | Z
],
[
[0.0, 0.5, 0.0], # X | X
[0.0, 0.5, 0.5], # M1 | R
],
[
[0.5, 0.5, 0.0], # M | M
[0.5, 0.5, 0.5] # R | A
]
]
path_labels = ["$\\Gamma$", "X", "M", "$\\Gamma$", "X$_1$",
"M$_1$", "R", "X$_1$", "X", "M$_1$", "M", "R"]
else:
path = [
[
[0.0, 0.0, 0.0], # Gamma
[0.0, 0.5, 0.0], # X
[0.5, 0.5, 0.0], # M
[0.0, 0.0, 0.0], # Gamma
[0.5, 0.5, 0.5], # R
[0.0, 0.5, 0.0], # X
],
[
[0.5, 0.5, 0.0], # M
[0.5, 0.5, 0.5] # R
]
]
path_labels = ["$\\Gamma$", "X", "M", "$\\Gamma$", "R", "X",
"M", "R"]
case "FCC":
# Face-centered cubic lattice
if break_z:
path = [ # FCC label | BCT label
[ # ---------------------
[0.0 , 0.0 , 0.0 ], # Gamma | Gamma
[0.5 , 0.0 , 0.5 ], # X | X
[0.5 , 0.25 , 0.75 ], # W | Y
[0.375, 0.375, 0.75 ], # K | Sigma
[0.0 , 0.0 , 0.0 ], # Gamma | Gamma
[0.5 , 0.5 , 0.0 ], # X1 | Z
[0.625, 0.625, 0.25 ], # U1 | Sigma1
[0.5 , 0.5 , 0.5 ], # L | N
[0.75 , 0.25 , 0.5 ], # W1 | P
[0.75 , 0.375, 0.375], # K1 | -
[0.75 , 0.5 , 0.25 ], # W2 | Y1
[0.5 , 0.5 , 0.0 ], # X1 | Z
],
[
[0.5 , 0.0 , 0.5 ], # X | X
[0.75 , 0.25 , 0.5 ] # W1 | P
]
]
path_labels = ["$\\Gamma$", "X", "W", "K", "$\\Gamma$",
"X$_1$", "U$_1$", "L", "W$_1$", "K$_1$",
"W$_2$", "X$_1$", "X", "W$_1$"]
else:
path = [
[
[0.0 , 0.0 , 0.0 ], # Gamma
[0.5 , 0.0 , 0.5 ], # X
[0.5 , 0.25 , 0.75 ], # W
[0.375, 0.375, 0.75 ], # K
[0.0 , 0.0 , 0.0 ], # Gamma
[0.5 , 0.5 , 0.5 ], # L
[0.625, 0.25 , 0.625], # U
[0.5 , 0.25 , 0.75 ], # W
[0.5 , 0.5 , 0.5 ], # L
[0.375, 0.375, 0.75 ] # K
],
[
[0.625, 0.25 , 0.625], # U
[0.5 , 0.0 , 0.5 ] # X
]
]
path_labels = ["$\\Gamma$", "X", "W", "K", "$\\Gamma$", "L",
"U", "W", "L", "K", "U", "X"]
case "BCC":
# Body-centered cubic lattice
if break_z:
path = [ # BCC label | BCT label
[ # ---------------------
[ 0.0 , 0.0 , 0.0 ], # Gamma | Gamma
[ 0.0 , 0.0 , 0.5 ], # N | X
[-0.5 , 0.5 , 0.5 ], # H1 | M
[ 0.0 , 0.0 , 0.0 ], # Gamma | Gamma
[ 0.5 , 0.5 ,-0.5 ], # H2 | Z
[ 0.25, 0.25, 0.25], # P | P
[ 0.0 , 0.5 , 0.0 ], # N1 | N
[-0.5 , 0.5 , 0.5 ], # H1 | Z1
],
[
[ 0.0 , 0.0 , 0.5 ], # N | X
[ 0.25, 0.25, 0.25] # P | P
]
]
path_labels = ["$\\Gamma$", "N", "H$_1$", "$\\Gamma$", "H$_2$",
"P", "N$_1$", "H$_1$", "N", "P"]
else:
path = [
[
[ 0.0 , 0.0 , 0.0 ], # Gamma
[ 0.5 ,-0.5 , 0.5 ], # H
[ 0.0 , 0.0 , 0.5 ], # N
[ 0.0 , 0.0 , 0.0 ], # Gamma
[ 0.25, 0.25, 0.25], # P
[ 0.0 , 0.0 , 0.0 ], # H
],
[
[ 0.25, 0.25, 0.25], # P
[ 0.0 , 0.0 , 0.5 ] # N
]
]
path_labels = ["$\\Gamma$", "H", "N", "$\\Gamma$", "P", "H",
"P", "N"]
case "TET":
# Simple tetragonal lattice
if break_z:
# Breaking the z-symmetry wouldn't actually do anything.
# Here, we break the x- or y-symmetry, which is more useful.
path = [ # TET label | ORC label
[ # ---------------------
[0.0, 0.0, 0.0], # Gamma | Gamma
[0.5, 0.0, 0.0], # X1 | X
[0.5, 0.5, 0.0], # M | S
[0.0, 0.5, 0.0], # X | Y
[0.0, 0.0, 0.0], # Gamma | Gamma
[0.0, 0.0, 0.5], # Z | Z
[0.5, 0.0, 0.5], # R1 | U
[0.5, 0.5, 0.5], # A | R
[0.0, 0.5, 0.5], # R | T
[0.0, 0.0, 0.5], # Z | Z
],
[
[0.0, 0.5, 0.0], # X | Y
[0.0, 0.5, 0.5], # R | T
],
[
[0.5, 0.0, 0.5], # R1 | U
[0.5, 0.0, 0.0], # X1 | X
],
[
[0.5, 0.5, 0.0], # M | S
[0.5, 0.5, 0.5], # A | R
]
]
path_labels = ["$\\Gamma$", "X$_1$", "M", "X", "$\\Gamma$", "Z",
"R$_1$", "A", "R", "Z", "X", "R", "R$_1$", "X$_1$",
"M", "A"]
else:
path = [
[
[0.0, 0.0, 0.0], # Gamma
[0.0, 0.5, 0.0], # X
[0.5, 0.5, 0.0], # M
[0.0, 0.0, 0.0], # Gamma
[0.0, 0.0, 0.5], # Z
[0.0, 0.5, 0.5], # R
[0.5, 0.5, 0.5], # A
[0.0, 0.0, 0.5], # Z
],
[
[0.0, 0.5, 0.0], # X
[0.0, 0.5, 0.5], # R
],
[
[0.5, 0.5, 0.0], # M
[0.5, 0.5, 0.5], # A
]
]
path_labels = ["$\\Gamma$", "X", "M", "$\\Gamma$", "Z", "R",
"A", "Z", "X", "R", "M", "A"]
case "ORC":
# Simple orthorhombic lattice
# The electric field doesn't break any symmetries here,
# regardless of the direction. We may simply use the usual path
path = [
[
[0.0, 0.0, 0.0], # Gamma
[0.5, 0.0, 0.0], # X
[0.5, 0.5, 0.0], # S
[0.0, 0.5, 0.0], # Y
[0.0, 0.0, 0.0], # Gamma
[0.0, 0.0, 0.5], # Z
[0.5, 0.0, 0.5], # U
[0.5, 0.5, 0.5], # R
[0.0, 0.5, 0.5], # T
[0.0, 0.0, 0.5], # Z
],
[
[0.0, 0.5, 0.0], # Y
[0.0, 0.5, 0.5], # T
],
[
[0.5, 0.0, 0.5], # U
[0.5, 0.0, 0.0], # X
],
[
[0.5, 0.5, 0.0], # S
[0.5, 0.5, 0.5], # R
]
]
path_labels = ["$\\Gamma$", "X", "S", "Y", "$\\Gamma$", "Z", "U",
"R", "T", "Z", "Y", "T", "U", "X", "S", "R"]
case _:
raise NameError(("Unknown lattice_type '"+str(lattice_type)+"': \n"
"please choose from the implemented list \n"
"{'CUB', 'FCC', 'BCC', 'TET', 'ORC'}"))
return path, path_labels