forked from MHoutput/1e2ph-spectral
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpathsLabels.py
More file actions
180 lines (172 loc) · 8.82 KB
/
Copy pathpathsLabels.py
File metadata and controls
180 lines (172 loc) · 8.82 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
"""
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 (matthew.houtput@uantwerpen.be)
"""
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
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 _:
raise NameError(("Unknown lattice_type '"+str(lattice_type)+"': \n"
"please choose from the implemented list \n"
"{'CUB', 'FCC', 'BCC'}"))
return path, path_labels