-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsurface_points.py
314 lines (284 loc) · 13.5 KB
/
surface_points.py
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
#!/usr/bin/env python
# Defines the positions (on a 2D grid) of the positions of under-coordinated
# atoms at the surface of a material
################################################################################
# Copyright Keith T Butler (2015) #
# #
# This file is part of SMACT: builder.py is free software: you can #
# redistribute it and/or modify it under the terms of the GNU General Public #
# License as published by the Free Software Foundation, either version 3 of #
# the License, or (at your option) any later version. #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# You should have received a copy of the GNU General Public License along with #
# this program. If not, see <http://www.gnu.org/licenses/>. #
# #
################################################################################
'''
The general form of the surface_points file.
Each new species or class of materials is defined as a function, the function contains a dictionary of the known surfaces of that material or class.
The surfaces contain the 2D projection of the under-coordinated surface atoms, there may be several possible terminations, then there are all listed.
The function has a list called 'exists', this contains all surfaces for which surface points are available. If you add a new surface be sure to include it in this list too.
Each dictionary item contains a list of the surface cuts and must end with an empty tuple, note the ,() at the end of each item.
'''
from __future__ import print_function
def anatase(miller):
exists = ['001','010','110','100','101']
if miller in exists:
surfaces = {}
surfaces['110'] = ([0.,0.],[0.2,0],[0.3,0.5],[0.5,0.5],[0.7,0.5],[0.8,0.]),()
surfaces['001'] = ([0.5,0.],[0.5,0.5]),()
surfaces['010'] = ([0.5,0.],[0.,0.],[0.,0.2],[0.5,0.5],[0.5,0.75],[0.8,0.]) ,()
surfaces['100'] = ([0.5,0.],[0.,0.],[0.,0.2],[0.5,0.5],[0.5,0.75],[0.8,0.]) ,()
surfaces['101'] = ([0.,0.17],[0.5,0.12],[0.,0.37],[0.,0.62],[0.5,0.67],[0.5,0.87]),([0.,0.14],[0.,0.34],[0.5,0.68],[0.5,0.84]),([0.,0.15],[0.,0.36],[0.5,0.4],[0.,0.57],[0.5,0.65],[0.5,0.86],[0.,0.9]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def TiO2a(miller):
exists = ['001','010','110','100','101']
if miller in exists:
surfaces = {}
surfaces['110'] = ([0.,0.],[0.2,0],[0.3,0.5],[0.5,0.5],[0.7,0.5],[0.8,0.]),()
surfaces['001'] = ([0.5,0.],[0.5,0.5]),()
surfaces['010'] = ([0.5,0.],[0.,0.],[0.,0.2],[0.5,0.5],[0.5,0.75],[0.8,0.]) ,()
surfaces['100'] = ([0.5,0.],[0.,0.],[0.,0.2],[0.5,0.5],[0.5,0.75],[0.8,0.]) ,()
surfaces['101'] = ([0.,0.17],[0.5,0.12],[0.,0.37],[0.,0.62],[0.5,0.67],[0.5,0.87]),([0.,0.14],[0.,0.34],[0.5,0.68],[0.5,0.84]),([0.,0.15],[0.,0.36],[0.5,0.4],[0.,0.57],[0.5,0.65],[0.5,0.86],[0.,0.9]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def WO3(miller):
exists = ['100','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.,0.25],[0,0.75],[0.5,0.25],[0.5,0.75]),([0.25,0.2],[0.5,0.25],[0.5,0.75],[0.7,0.7],[0.5,1.0],[1.0,1.0]),()
surfaces['110'] = ([0.5,0.3],[0.75,0.3],[1.0,0.8],[0.75,0.80]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def perovskite(miller):
exists = ['100','110','112']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0.5,0.5]),([0.5,0],[0,0.5],[0.5,0.5]),()
surfaces['112'] = ([0.,0.],[0.5,0.],[0.5,0.5]),()
surfaces['110'] = ([0.,0.],[0.,0.5],[0.75,0.5]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def CH3NH3PbI3(miller):
exists = ['100','110','112']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0.5,0.5]),([0.5,0],[0,0.5],[0.5,0.5]),()
surfaces['112'] = ([0.,0.],[0.5,0.],[0.5,0.5]),()
surfaces['110'] = ([0.,0.],[0.,0.5],[0.75,0.5]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def SrTiO3(miller):
exists = ['100','110','112']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0.5,0.5]),([0.5,0],[0,0.5],[0.5,0.5]),()
surfaces['112'] = ([0.,0.],[0.5,0.],[0.5,0.5]),()
surfaces['110'] = ([0.,0.],[0.,0.5],[0.75,0.5]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def zincblende(miller):
exists = ['100','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.75,0.25],[0.,0.]),()
surfaces['110'] = ([0.25,0.9],[0.25,0.4],[0.5,0.7],[0.5,0.2]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def CuIz(miller):
exists = ['100','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.75,0.25],[0.,0.]),()
surfaces['001'] = ([0.75,0.25],[0.,0.]),()
surfaces['110'] = ([0.25,0.9],[0.25,0.4],[0.5,0.7],[0.5,0.2]),()
surfaces['011'] = ([0.25,0.9],[0.25,0.4],[0.5,0.7],[0.5,0.2]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def rocksalt(miller):
exists = ['001','100','110','011']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.,0.],[0.5,0.5]),()
surfaces['001'] = ([0.,0.],[0.5,0.5]),()
surfaces['110'] = ([0.,0.],[0.,0.5],[0.5,0.],[0.5,0.5]),()
surfaces['011'] = ([0.,0.],[0.,0.5],[0.5,0.],[0.5,0.5]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def ZnTe(miller):
exists = ['001','100','110','011']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.,0.],[0.5,0.5]),()
surfaces['001'] = ([0.,0.],[0.5,0.5]),()
surfaces['110'] = ([0.,0.],[0.,0.5],[0.5,0.],[0.5,0.5]),()
surfaces['011'] = ([0.,0.],[0.,0.5],[0.5,0.],[0.5,0.5]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def bixybite(miller):
exists = ['100']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.2,0.9],[0.6,0.9],[0.9,0.6],[0.4,0.4],[0.9,0.4],[0.7,0.1]),([0.2,0.2],[0.2,0.7],[0.7,0.2],[0.7,0.7],[0.0,0.3],[0.3,0.5],[0.8,0.5],[0.5,0.8]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def rutile(miller):
exists = ['001','010','110','011']
if miller in exists:
surfaces = {}
surfaces['001'] = ([0.5,0.5],[0.2,0.8],[0.8,0.2]),()
surfaces['010'] = ([0.5,0.5],[0.7,0.0]),()
surfaces['110'] = ([0.0,0.9],[0.0,0.45]),()
surfaces['011'] = ([0.0,0.7],[0.3,0.9],[0.2,0.4],[0.5,0.2]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def MoO3(miller):
exists = ['001','101']
if miller in exists:
surfaces = {}
surfaces['001'] = ([0.9,0.75],[0.7,0.25],[0.6,0.25],[0.4,0.25]),([0.9,0.75],[0.7,0.25],[0.6,0.25],[0.6,0.75],[0.4,0.25],[0.4,0.75],[0.3,0.75],[0.,0.25]),()
surfaces['101'] = ([0.25,1.0],[0.75,0.7],[0.75,0.66],[0.25,0.5],[0.75,0.3],[0.25,0.1]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def wurtzite(miller):
exists = ['100','010','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0,0.37]),()
surfaces['010'] = ([0,0],[0,0.37]),()
surfaces['110'] = ([0,0.8],[0.37,0.8],[0.5,0.17],[0.87,0.17]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def GaN(miller):
exists = ['100','010','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0,0.37]),()
surfaces['010'] = ([0,0],[0,0.37]),()
surfaces['110'] = ([0,0.8],[0.37,0.8],[0.5,0.17],[0.87,0.17]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def SiC(miller):
exists = ['100','010','110']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0,0],[0,0.37]),()
surfaces['010'] = ([0,0],[0,0.37]),()
surfaces['110'] = ([0,0.8],[0.37,0.8],[0.5,0.17],[0.87,0.17]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def Cu2O(miller):
exists = ['100','110','001','011']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.,0.],),()
surfaces['110'] = ([0.,0.],),()
surfaces['001'] = ([0.,0.],),()
surfaces['011'] = ([0.,0.],),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def In2S3(miller):
exists = ['001','010']
if miller in exists:
surfaces = {}
surfaces['001'] = ([0.,0.25],[0.5,0.]),([0.,0.],[0.5,0.],[0.25,0.75],[0.75,0.75],[0.,0.5],[0.5,0.]),([0.,0.],[0.75,0.25],[0.,0.5],[0.25,0.75],[0.25,0.25]),()
surfaces['010'] = ([0.5,0.],[0.75,0.2],[0.25,0.2],[0.75,0.25],[0.75,0.3],[0.25,0.3],[0.,0.45],[0.75,0.5],[0.25,0.5],[0.75,0.6,0.25,0.6],[0.75,0.66],[0.25,0.66],[0.5,0.7],[0.,0.8],[0.25,0.84],[0.75,0.84],[0.75,0.92],[0.75,0.92]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def MnTiO3(miller):
exists = ['010']
if miller in exists:
surfaces = {}
surfaces['010'] = ([0.6,0.1],[0.9,0.15],[0.2,0.25],[0.9,0.36],[0.52,0.42],[0.25,0.58],[0.9,0.64],[0.6,0.75],[0.9,0.85],[0.23,0.9]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def ZnTiO3(miller):
exists = ['011']
if miller in exists:
surfaces = {}
surfaces['011'] = ([0.45,0.09],[0.30,0.45],[0.82,0.26],[0.97,0.60],[0.73,0.82]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def SnS2(miller):
exists = ['100']
if miller in exists:
surfaces = {}
surfaces['100'] = ([0.0,0.0],),([0.67,0.33],),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def Ce2O3(miller):
exists = ['101']
if miller in exists:
surfaces = {}
surfaces['101'] = ([0.69,0.54],),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def LiNbO3(miller):
exists = ['010']
if miller in exists:
surfaces = {}
surfaces['010'] = ([0.60,0.90],[0.89,0.83],[0.19,0.73],[0.89,0.61],[0.51,0.57],[0.21,0.40],[0.89,0.33],[0.58,0.23],[0.89,0.11],[0.28,0.07]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []
def Ce2S3(miller):
exists = ['101','110','100','010']
if miller in exists:
surfaces = {}
surfaces['101'] = ([0.25,0.99],[0.25,0.80],[0.25,0.64],[0.25,0.47],[0.75,0.30],[0.25,0.22],[0.75,0.11]),()
surfaces['110'] = ([0.93,0.65],[0.89,0.25],[0.78,0.88],[0.70,0.14],[0.72,0.47],[0.54,0.56],[0.43,0.36],[0.39,0.76],[0.29,0.46],[0.20,0.87],[0.04,0.45]),()
surfaces['100'] = ([0.75,0.89],[0.75,0.70],[0.25,0.57],[0.75,0.46],[0.75,0.28],[0.25,0.20],[0.75,0.07]),()
surfaces['010'] = ([0.73,0.04],[0.13,0.07],[0.85,0.22],[0.35,0.28],[0.23,0.46],[0.63,0.43],[0.99,0.61],[0.36,0.70],[0.86,0.80],[0.49,0.89]),()
return surfaces[miller]
else:
print("No non-polar surface",miller,"is currently in the database, maybe you want to add it.")
return []