SAMBA-ilum 1.0.0.400__tar.gz → 1.0.0.402__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/PKG-INFO +9 -1
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/PKG-INFO +10 -2
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/SOURCES.txt +1 -2
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/__main__.py +1 -1
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/energy_scan.py +5 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/xy-scan_analysis.py +48 -101
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/setup.py +1 -1
- SAMBA_ilum-1.0.0.400/samba_ilum/src/xyz-scan - Copia.py +0 -300
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/LICENSE.txt +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/README.md +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/dependency_links.txt +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/entry_points.txt +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/requires.txt +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/SAMBA_ilum.egg-info/top_level.txt +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/__init__.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/HeteroStructure_Generator.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_a-scan +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_bader +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_bader.SO +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_bands +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_bands.SO +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_dos +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_dos.SO +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_relax +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_scf +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_scf.SO +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_xy-scan +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_xyz-scan +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/INCAR_z-scan +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/SAMBA_WorkFlow.input +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.bands +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.chgcar +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.dos +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.location +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.locpot +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.orbitals +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.spin +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/vdw_kernel.bindat +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/OLD/a-scan.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/OLD/a-scan_analysis.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/OLD/job.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/OLD/z-scan.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/OLD/z-scan_analysis.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/_info_pseudo.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/a-scan.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/a-scan_analysis.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/bader +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/bader_poscar.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/bader_update.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/charge_transfer.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/chgsum.pl +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/contcar_update.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/data-base_json.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/data-base_union.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/job.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/kpoints.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/lattice_plot3d.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/make_files.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/output.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/potcar.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/vdW_DF.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/xy-scan.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/xyz-scan.py +0 -0
- /SAMBA_ilum-1.0.0.400/samba_ilum/src/xyz-scan_analysis - Copia.py → /samba_ilum-1.0.0.402/samba_ilum/src/xyz-scan_analysis.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/z-scan.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/z-scan_analysis.py +0 -0
- {SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/setup.cfg +0 -0
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SAMBA_ilum
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.402
|
|
4
4
|
Summary: ...
|
|
5
5
|
Author: Augusto de Lelis Araujo
|
|
6
6
|
Author-email: augusto-lelis@outlook.com
|
|
7
7
|
License: Closed source
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE.txt
|
|
10
|
+
Requires-Dist: matplotlib
|
|
11
|
+
Requires-Dist: pyfiglet
|
|
12
|
+
Requires-Dist: requests
|
|
13
|
+
Requires-Dist: plotly
|
|
14
|
+
Requires-Dist: scipy
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Requires-Dist: uuid
|
|
17
|
+
Requires-Dist: vasprocar
|
|
10
18
|
|
|
11
19
|
# SAMBA_ilum Copyright (C) 2024 - Closed source
|
|
12
20
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 1.0.0.
|
|
2
|
+
Name: SAMBA_ilum
|
|
3
|
+
Version: 1.0.0.402
|
|
4
4
|
Summary: ...
|
|
5
5
|
Author: Augusto de Lelis Araujo
|
|
6
6
|
Author-email: augusto-lelis@outlook.com
|
|
7
7
|
License: Closed source
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE.txt
|
|
10
|
+
Requires-Dist: matplotlib
|
|
11
|
+
Requires-Dist: pyfiglet
|
|
12
|
+
Requires-Dist: requests
|
|
13
|
+
Requires-Dist: plotly
|
|
14
|
+
Requires-Dist: scipy
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Requires-Dist: uuid
|
|
17
|
+
Requires-Dist: vasprocar
|
|
10
18
|
|
|
11
19
|
# SAMBA_ilum Copyright (C) 2024 - Closed source
|
|
12
20
|
|
|
@@ -32,9 +32,8 @@ samba_ilum/src/potcar.py
|
|
|
32
32
|
samba_ilum/src/vdW_DF.py
|
|
33
33
|
samba_ilum/src/xy-scan.py
|
|
34
34
|
samba_ilum/src/xy-scan_analysis.py
|
|
35
|
-
samba_ilum/src/xyz-scan - Copia.py
|
|
36
35
|
samba_ilum/src/xyz-scan.py
|
|
37
|
-
samba_ilum/src/xyz-scan_analysis
|
|
36
|
+
samba_ilum/src/xyz-scan_analysis.py
|
|
38
37
|
samba_ilum/src/z-scan.py
|
|
39
38
|
samba_ilum/src/z-scan_analysis.py
|
|
40
39
|
samba_ilum/src/INPUTS/INCAR_a-scan
|
|
@@ -20,11 +20,16 @@ energia = VTemp.replace('=',' ').split()
|
|
|
20
20
|
energy.write(f'{name_dir} {energia[4]} \n')
|
|
21
21
|
|
|
22
22
|
temp_name = name_dir.replace('_', ' ').split()
|
|
23
|
+
t_temp_name = temp_name
|
|
24
|
+
#------------------------
|
|
23
25
|
if (len(temp_name) == 2):
|
|
24
26
|
if (temp_name[0] == '0.0'): temp_name[0] = '1.0'
|
|
25
27
|
if (temp_name[1] == '0.0'): temp_name[1] = '1.0'
|
|
26
28
|
if (temp_name[0] == '1.0' or temp_name[1] == '1.0'):
|
|
27
29
|
new_name_dir = str(temp_name[0]) + '_' + str(temp_name[1])
|
|
28
30
|
energy.write(f'{new_name_dir} {energia[4]} \n')
|
|
31
|
+
if (t_temp_name[0] == '0.0' and t_temp_name[1] == '0.0'):
|
|
32
|
+
energy.write(f'1.0_0.0 {energia[4]} \n')
|
|
33
|
+
energy.write(f'0.0_1.0 {energia[4]} \n')
|
|
29
34
|
|
|
30
35
|
energy.close()
|
|
@@ -32,7 +32,18 @@ n_d = 301 # O dados do xy-scan serão interpolados para um grid de (n_d x n_d)
|
|
|
32
32
|
# Obtendo a área no plano XY da Heteroestrutura =========
|
|
33
33
|
#========================================================
|
|
34
34
|
poscar = open('POSCAR.0', 'r')
|
|
35
|
-
|
|
35
|
+
info = poscar.readline().split()
|
|
36
|
+
#--------------------------------
|
|
37
|
+
delta_A1_0 = 0.0
|
|
38
|
+
delta_A2_0 = 0.0
|
|
39
|
+
#---------------
|
|
40
|
+
if (info[-7] == 'Shift_plane'):
|
|
41
|
+
delta_0 = info[-5].replace('_', ' ').split()
|
|
42
|
+
delta_A1_0 = float(delta_0[0])
|
|
43
|
+
delta_A2_0 = float(delta_0[1])
|
|
44
|
+
if (delta_A1_0 == 1.0): delta_A1_0 = 0.0
|
|
45
|
+
if (delta_A2_0 == 1.0): delta_A2_0 = 0.0
|
|
46
|
+
#-----------------------------------------------
|
|
36
47
|
VTemp = poscar.readline(); param = float(VTemp)
|
|
37
48
|
#-----------------------------------------------
|
|
38
49
|
A1 = poscar.readline().split(); A1x = float(A1[0])*param; A1y = float(A1[1])*param; A1z = float(A1[2])*param; mA1 = np.linalg.norm(A1)
|
|
@@ -65,15 +76,27 @@ line = np.argmin(date_E)
|
|
|
65
76
|
delta = date_shift[line]
|
|
66
77
|
#------------------------------------------
|
|
67
78
|
delta_min = delta.replace('_', ' ').split()
|
|
79
|
+
#------------------------------------------
|
|
68
80
|
a1_min = float(delta_min[0])
|
|
69
81
|
a2_min = float(delta_min[1])
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
if (a1_min == -0.0 or a1_min == 1.0): a1_min = 0.0
|
|
83
|
+
if (a2_min == -0.0 or a2_min == 1.0): a2_min = 0.0
|
|
84
|
+
#-------------------------------------------------
|
|
85
|
+
new_delta_A1 = delta_A1_0 + a1_min
|
|
86
|
+
new_delta_A2 = delta_A2_0 + a2_min
|
|
87
|
+
if (new_delta_A1 > 1.0): new_delta_A1 = new_delta_A1 -1.0
|
|
88
|
+
if (new_delta_A2 > 1.0): new_delta_A2 = new_delta_A2 -1.0
|
|
89
|
+
#-------------------------------------------------------------------------------------
|
|
90
|
+
if (info[-7] == 'Shift_plane'): info[-5] = str(new_delta_A1) + '_' + str(new_delta_A2)
|
|
91
|
+
new_line = ''
|
|
92
|
+
for i in range(len(info)): new_line += info[i] + ' '
|
|
93
|
+
new_line += '\n'
|
|
94
|
+
#---------------------------------------------------
|
|
95
|
+
x_min = (new_delta_A1*A1x) + (new_delta_A2*A2x)
|
|
96
|
+
y_min = (new_delta_A1*A1y) + (new_delta_A2*A2y)
|
|
75
97
|
if (x_min == -0.0): x_min = 0.0
|
|
76
98
|
if (y_min == -0.0): y_min = 0.0
|
|
99
|
+
#-------------------------------
|
|
77
100
|
|
|
78
101
|
|
|
79
102
|
#-------------------------------------
|
|
@@ -152,9 +175,9 @@ T = np.linalg.inv(np.array([a, b, c]).T) # Definindo a matriz de transformaçã
|
|
|
152
175
|
#------------------------------------------------------------------------------
|
|
153
176
|
r = np.array([delta_X, delta_Y, 0.0]) # Definindo o vetor posição cartesiano do átomo
|
|
154
177
|
#------------------------------------
|
|
155
|
-
f = np.dot(T, r) # Calculando a correspondenre posição em coordenadas fracionárias #
|
|
156
|
-
for m in range(3): #
|
|
157
|
-
f = np.where(f < 0, f + 1, f) #
|
|
178
|
+
f = np.dot(T, r) # Calculando a correspondenre posição em coordenadas fracionárias # ??????????????????? Esta correto ???????????????????
|
|
179
|
+
for m in range(3): # ?????? Ao invés de 'f' não deveria ser 'f[m]' ??????
|
|
180
|
+
f = np.where(f < 0, f + 1, f) # ??????????????????? Esta correto ???????????????????
|
|
158
181
|
f = np.where(f > 1, f - 1, f)
|
|
159
182
|
#--------------------------------
|
|
160
183
|
for m in range(3):
|
|
@@ -265,95 +288,20 @@ plt.savefig('xy-scan_direct.png', dpi = 600, bbox_inches='tight', pad_inches = 0
|
|
|
265
288
|
"""
|
|
266
289
|
|
|
267
290
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
#================================================
|
|
284
|
-
# Gerando o arquivo POSCAR deslocado no plano ===
|
|
285
|
-
#================================================
|
|
286
|
-
poscar = open('CONTCAR.0', "r")
|
|
287
|
-
poscar_new = open('CONTCAR', "w")
|
|
288
|
-
#-------------------------------
|
|
289
|
-
VTemp = poscar.readline()
|
|
290
|
-
poscar_new.write(f'{VTemp}')
|
|
291
|
-
VTemp = VTemp.split()
|
|
292
|
-
nions1 = int(VTemp[2]); nions2 = int(VTemp[3])
|
|
293
|
-
#----------------------------------------------
|
|
294
|
-
for k in range(7):
|
|
295
|
-
VTemp = poscar.readline()
|
|
296
|
-
poscar_new.write(f'{VTemp}')
|
|
297
|
-
#-------------------------------
|
|
298
|
-
for k in range(nions1):
|
|
299
|
-
VTemp = poscar.readline().split()
|
|
300
|
-
poscar_new.write(f'{VTemp[0]} {VTemp[1]} {VTemp[2]} \n')
|
|
301
|
-
#-----------------------------------------------------------
|
|
302
|
-
for k in range(nions2):
|
|
303
|
-
VTemp = poscar.readline().split()
|
|
304
|
-
#---------------------------------
|
|
305
|
-
temp_c1 = float(VTemp[0]) + a1_min
|
|
306
|
-
temp_c2 = float(VTemp[1]) + a2_min
|
|
307
|
-
#---------------------------------
|
|
308
|
-
# temp_c1 = float(VTemp[0]) + delta_A1
|
|
309
|
-
# temp_c2 = float(VTemp[1]) + delta_A2
|
|
310
|
-
#-------------------------------------
|
|
311
|
-
for i in range(3):
|
|
312
|
-
if (temp_c1 > 1.0): temp_c1 = temp_c1 -1.0
|
|
313
|
-
if (temp_c2 > 1.0): temp_c2 = temp_c2 -1.0
|
|
314
|
-
#---------------------------------------------
|
|
315
|
-
poscar_new.write(f'{temp_c1} {temp_c2} {VTemp[2]} \n')
|
|
316
|
-
#---------------------------------------------------------
|
|
317
|
-
poscar.close()
|
|
318
|
-
poscar_new.close()
|
|
319
|
-
#-----------------
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
#===========================================================================
|
|
323
|
-
# Gerando arquivo POSCAR com coordenadas cartesianas =======================
|
|
324
|
-
#===========================================================================
|
|
325
|
-
a = np.array([A1x, A1y, A1z])
|
|
326
|
-
b = np.array([A2x, A2y, A2z])
|
|
327
|
-
c = np.array([A3x, A3y, A3z])
|
|
328
|
-
T = np.linalg.inv(np.array([a, b, c]).T) # Definindo a matriz de transformação
|
|
329
|
-
#------------------------------------------------------------------------------
|
|
330
|
-
poscar = open('CONTCAR', "r")
|
|
331
|
-
poscar_new = open('POSCAR', "w")
|
|
332
|
-
#--------------------------------
|
|
333
|
-
for k in range(7):
|
|
334
|
-
VTemp = poscar.readline()
|
|
335
|
-
poscar_new.write(f'{VTemp}')
|
|
336
|
-
#------------------------
|
|
337
|
-
VTemp = poscar.readline()
|
|
338
|
-
poscar_new.write(f'Cartesian \n')
|
|
339
|
-
|
|
340
|
-
#-------------------------------------------------------------------------------------------------------
|
|
341
|
-
# Convertendo as posições atomicas diretas de todos os átomos da Supercélula para a forma cartesiana ---
|
|
342
|
-
#-------------------------------------------------------------------------------------------------------
|
|
343
|
-
for k in range(nions1 + nions2):
|
|
344
|
-
VTemp = poscar.readline().split()
|
|
345
|
-
#--------------------------------
|
|
346
|
-
k1 = float(VTemp[0]); k2 = float(VTemp[1]); k3 = float(VTemp[2])
|
|
347
|
-
#---------------------------------------------------------------
|
|
348
|
-
coord_x = ((k1*A1x) + (k2*A2x) + (k3*A3x))
|
|
349
|
-
coord_y = ((k1*A1y) + (k2*A2y) + (k3*A3y))
|
|
350
|
-
coord_z = ((k1*A1z) + (k2*A2z) + (k3*A3z))
|
|
351
|
-
poscar_new.write(f'{coord_x:>28,.21f} {coord_y:>28,.21f} {coord_z:>28,.21f} \n')
|
|
352
|
-
#-------------
|
|
353
|
-
poscar.close()
|
|
354
|
-
poscar_new.close()
|
|
355
|
-
#-----------------
|
|
356
|
-
|
|
291
|
+
#------------------------------------------------
|
|
292
|
+
shutil.copyfile(str(delta) + '/POSCAR', 'POSCAR')
|
|
293
|
+
shutil.copyfile(str(delta) + '/CONTCAR', 'CONTCAR')
|
|
294
|
+
#--------------------------------------------------
|
|
295
|
+
if (info[-7] == 'Shift_plane'):
|
|
296
|
+
#---------------------------------------------------------
|
|
297
|
+
with open('CONTCAR', 'r') as file: line = file.readlines()
|
|
298
|
+
line[0] = new_line
|
|
299
|
+
with open('CONTCAR', 'w') as file: file.writelines(line)
|
|
300
|
+
#--------------------------------------------------------
|
|
301
|
+
with open('POSCAR', 'r') as file: line = file.readlines()
|
|
302
|
+
line[0] = new_line
|
|
303
|
+
with open('POSCAR', 'w') as file: file.writelines(line)
|
|
304
|
+
#------------------------------------------------------
|
|
357
305
|
|
|
358
306
|
#=====================================================
|
|
359
307
|
info = open('info_xy-scan.dat', "w", encoding='utf-8')
|
|
@@ -361,8 +309,8 @@ info.write(f'====================================================== \n')
|
|
|
361
309
|
info.write(f'Displacement carried out over the 2nd material lattice \n')
|
|
362
310
|
#------------------------------------------------------------------
|
|
363
311
|
info.write(f'Displacement_XY = ({x_min}, {y_min}) in Å \n')
|
|
364
|
-
info.write(f'Displacement_XY = ({
|
|
365
|
-
|
|
312
|
+
info.write(f'Displacement_XY = ({new_delta_A1}*A1, {new_delta_A2}*A2) \n')
|
|
313
|
+
#-------------------------------------------------------------------------
|
|
366
314
|
# info.write(f'Displacement_XY = ({delta_X}, {delta_Y}) in Å \n')
|
|
367
315
|
# info.write(f'Displacement_XY = ({delta_A1}*A1, {delta_A2}*A2) \n')
|
|
368
316
|
info.write(f'------------------------------------------------------ \n')
|
|
@@ -370,4 +318,3 @@ info.write(f'ΔE = {Delta_E_meV:.12f} meV/Å^2 or {Delta_E_J:.12f} J/m^2 \n')
|
|
|
370
318
|
info.write(f'====================================================== \n')
|
|
371
319
|
info.close()
|
|
372
320
|
#===========
|
|
373
|
-
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C) 2024 - Closed source
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import numpy as np
|
|
5
|
-
import shutil
|
|
6
|
-
import os
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# Atenção: ================================================================
|
|
10
|
-
# O código foi escrito pensado em uma Heteroestrutura com n_Lattice = 2 ===
|
|
11
|
-
# Para redes com n_Lattice > 2 testes e generalizações devem ser feitas ===
|
|
12
|
-
#==========================================================================
|
|
13
|
-
|
|
14
|
-
# Vacuo mínimo aplicado a Heteroestrutura
|
|
15
|
-
vacuo = replace_vacuo
|
|
16
|
-
|
|
17
|
-
# Separação no eixo-z a ser aplicada entre os materiais da Heteroestrutura
|
|
18
|
-
z_scan = replace_zscan
|
|
19
|
-
|
|
20
|
-
# Deslocamentos a ser aplicado no 2º material, referente ao vetor A1 da rede
|
|
21
|
-
displacement_A1 = replace_displacement_xyz_A1
|
|
22
|
-
|
|
23
|
-
# Deslocamentos a ser aplicado no 2º material, referente ao vetor A2 da rede
|
|
24
|
-
displacement_A2 = replace_displacement_xyz_A2
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"""
|
|
28
|
-
#----------------------------------------------------------------
|
|
29
|
-
# Testando a compatibilidade do arquivo POSCAR ------------------
|
|
30
|
-
#----------------------------------------------------------------
|
|
31
|
-
poscar = open('POSCAR', "r")
|
|
32
|
-
VTemp = poscar.readline().split()
|
|
33
|
-
poscar.close()
|
|
34
|
-
#-------------
|
|
35
|
-
crit = 0
|
|
36
|
-
for k in range(len(VTemp)):
|
|
37
|
-
try:
|
|
38
|
-
inteiro = int(VTemp[k])
|
|
39
|
-
if (k > 0 and k < 3): crit += 1
|
|
40
|
-
except ValueError:
|
|
41
|
-
if (k == 0): crit += 1
|
|
42
|
-
#------------------------------
|
|
43
|
-
if (len(VTemp) < 3 or crit < 3):
|
|
44
|
-
print(f' ')
|
|
45
|
-
print(f'========================================')
|
|
46
|
-
print(f'Verifique o arquivo POSCAR utilizado! ')
|
|
47
|
-
print(f'INCOMPATIBILIDADE com o código detectada')
|
|
48
|
-
print(f'========================================')
|
|
49
|
-
print(f' ')
|
|
50
|
-
#==========
|
|
51
|
-
sys.exit()
|
|
52
|
-
#=========
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
#==========================================================================
|
|
57
|
-
# Obtendo os vetores de rede da Heteroestrutura ===========================
|
|
58
|
-
#==========================================================================
|
|
59
|
-
contcar = open('CONTCAR', "r")
|
|
60
|
-
#-----------------------------
|
|
61
|
-
VTemp = contcar.readline()
|
|
62
|
-
VTemp = contcar.readline(); param = float(VTemp)
|
|
63
|
-
VTemp = contcar.readline().split(); A1x = float(VTemp[0]); A1y = float(VTemp[1]); A1z = float(VTemp[2])
|
|
64
|
-
VTemp = contcar.readline().split(); A2x = float(VTemp[0]); A2y = float(VTemp[1]); A2z = float(VTemp[2])
|
|
65
|
-
VTemp = contcar.readline().split(); A3x = float(VTemp[0]); A3y = float(VTemp[1]); A3z = float(VTemp[2])
|
|
66
|
-
#--------------
|
|
67
|
-
contcar.close()
|
|
68
|
-
#--------------
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
#==========================================================================
|
|
72
|
-
# Obtendo a altura no eixo-z dos diferentes materiais =====================
|
|
73
|
-
#==========================================================================
|
|
74
|
-
contcar = open('CONTCAR', "r")
|
|
75
|
-
#--------------------------------
|
|
76
|
-
VTemp = contcar.readline().split()
|
|
77
|
-
n_Lattice = len(VTemp[1].replace('+', ' ').split())
|
|
78
|
-
nions_Lattice = []
|
|
79
|
-
for m in range(n_Lattice): nions_Lattice.append(int(VTemp[m+2]))
|
|
80
|
-
#----------------------------------------------------------------
|
|
81
|
-
VTemp = contcar.readline(); param = float(VTemp)
|
|
82
|
-
#----------------------------------------------------
|
|
83
|
-
for k in range(3): VTemp = contcar.readline().split()
|
|
84
|
-
fator_Z = float(VTemp[2])*param
|
|
85
|
-
#--------------------------------------------
|
|
86
|
-
for k in range(3): VTemp = contcar.readline()
|
|
87
|
-
#--------------------------------------------------------------
|
|
88
|
-
minZ = [0]*n_Lattice; dZ = [0]*(n_Lattice +1); dZ_total = 0.0
|
|
89
|
-
#--------------------------------------------------------------
|
|
90
|
-
for k in range(n_Lattice):
|
|
91
|
-
vZ = []
|
|
92
|
-
for m in range(nions_Lattice[k]):
|
|
93
|
-
VTemp = contcar.readline().split()
|
|
94
|
-
vZ.append(float(VTemp[2]))
|
|
95
|
-
#-----------------------------
|
|
96
|
-
dZ[k+1] = (max(vZ) - min(vZ))
|
|
97
|
-
dZ_total += dZ[k+1]*fator_Z
|
|
98
|
-
minZ[k] = min(vZ)
|
|
99
|
-
#--------------------
|
|
100
|
-
contcar.close()
|
|
101
|
-
#--------------
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
#==========================================================================
|
|
105
|
-
# Deslocando os materiais para Z = 0.0 ====================================
|
|
106
|
-
#==========================================================================
|
|
107
|
-
contcar = open('CONTCAR', "r")
|
|
108
|
-
poscar_new = open('POSCAR_temp', "w")
|
|
109
|
-
#------------------------------------
|
|
110
|
-
for k in range(8):
|
|
111
|
-
VTemp = contcar.readline()
|
|
112
|
-
poscar_new.write(f'{VTemp}')
|
|
113
|
-
for k in range(n_Lattice):
|
|
114
|
-
for m in range(nions_Lattice[k]):
|
|
115
|
-
VTemp = contcar.readline().split()
|
|
116
|
-
temp_z = float(VTemp[2]) -minZ[k] +dZ[k]
|
|
117
|
-
if (temp_z < 0.0): temp_z = 0.0
|
|
118
|
-
poscar_new.write(f'{float(VTemp[0])} {float(VTemp[1])} {temp_z} \n')
|
|
119
|
-
#-------------
|
|
120
|
-
contcar.close()
|
|
121
|
-
poscar_new.close()
|
|
122
|
-
#-----------------
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
#===========================================================
|
|
126
|
-
# Convertendo as coordenadas para a forma cartesiana =======
|
|
127
|
-
#===========================================================
|
|
128
|
-
poscar = open('POSCAR_temp', "r")
|
|
129
|
-
poscar_new = open('POSCAR_cart', "w")
|
|
130
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
131
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
132
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}'); VTemp = VTemp.split(); A = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
133
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}'); VTemp = VTemp.split(); B = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
134
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}'); VTemp = VTemp.split(); C = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
135
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
136
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
137
|
-
VTemp = poscar.readline(); poscar_new.write(f'Cartesian \n')
|
|
138
|
-
#-----------------------------------------------------------
|
|
139
|
-
# Escrita das coordenadas cartesianas ----------------------
|
|
140
|
-
#-----------------------------------------------------------
|
|
141
|
-
for k in range(n_Lattice):
|
|
142
|
-
for m in range(nions_Lattice[k]):
|
|
143
|
-
VTemp = poscar.readline().split()
|
|
144
|
-
k1 = float(VTemp[0]); k2 = float(VTemp[1]); k3 = float(VTemp[2])
|
|
145
|
-
coord_x = ((k1*A[0]) + (k2*B[0]) + (k3*C[0]))
|
|
146
|
-
coord_y = ((k1*A[1]) + (k2*B[1]) + (k3*C[1]))
|
|
147
|
-
coord_z = ((k1*A[2]) + (k2*B[2]) + (k3*C[2]))
|
|
148
|
-
poscar_new.write(f'{coord_x:>28,.21f} {coord_y:>28,.21f} {coord_z:>28,.21f} \n')
|
|
149
|
-
#-------------
|
|
150
|
-
poscar.close()
|
|
151
|
-
poscar_new.close()
|
|
152
|
-
#-----------------
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
for z in range(len(z_scan)):
|
|
156
|
-
#-----------------
|
|
157
|
-
deltaZ = z_scan[z]
|
|
158
|
-
#-----------------
|
|
159
|
-
|
|
160
|
-
#===========================================================
|
|
161
|
-
# Gerando os arquivos POSCAR para cada separação em Z ======
|
|
162
|
-
#===========================================================
|
|
163
|
-
poscar = open('POSCAR_cart', "r")
|
|
164
|
-
poscar_new = open('POSCAR_deltaZ', "w")
|
|
165
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
166
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
167
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}'); VTemp = VTemp.split(); A = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
168
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}'); VTemp = VTemp.split(); B = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
169
|
-
VTemp = poscar.readline().split(); C = [float(VTemp[0]), float(VTemp[1]), float(VTemp[2])]
|
|
170
|
-
#---------------------------------------------
|
|
171
|
-
# temp_Z = (dZ_total + deltaZ_f + vacuo)/param
|
|
172
|
-
temp_Z = (dZ_total + deltaZ + vacuo)/param; A3z = temp_Z
|
|
173
|
-
poscar_new.write(f'{float(VTemp[0]):>28,.21f} {float(VTemp[1]):>28,.21f} {float(temp_Z):>28,.21f} \n')
|
|
174
|
-
#-----------------------------------------------------------------------------------------------------
|
|
175
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
176
|
-
VTemp = poscar.readline(); poscar_new.write(f'{VTemp}')
|
|
177
|
-
VTemp = poscar.readline(); poscar_new.write(f'Cartesian \n')
|
|
178
|
-
#------------------------------------------------------------
|
|
179
|
-
for k in range(n_Lattice):
|
|
180
|
-
for m in range(nions_Lattice[k]):
|
|
181
|
-
VTemp = poscar.readline().split()
|
|
182
|
-
coord_x = float(VTemp[0]); coord_y = float(VTemp[1]); coord_z = float(VTemp[2])
|
|
183
|
-
#-------------------------------------------------------------------------------
|
|
184
|
-
coord_z = coord_z + (vacuo/2)
|
|
185
|
-
if (k > 0): coord_z = coord_z + deltaZ
|
|
186
|
-
poscar_new.write(f'{coord_x:>28,.21f} {coord_y:>28,.21f} {coord_z:>28,.21f} \n')
|
|
187
|
-
#-------------------------------------------------------------------------------
|
|
188
|
-
#-------------
|
|
189
|
-
poscar.close()
|
|
190
|
-
poscar_new.close()
|
|
191
|
-
#-----------------
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
#==========================================================================
|
|
195
|
-
# Gerando e Armazenando os arquivos POSCAR deslocados no plano ============
|
|
196
|
-
#==========================================================================
|
|
197
|
-
os.mkdir('POSCAR_temp_cart')
|
|
198
|
-
#---------------------------
|
|
199
|
-
number = 0
|
|
200
|
-
#---------
|
|
201
|
-
for ii in displacement_A1:
|
|
202
|
-
for jj in displacement_A2:
|
|
203
|
-
#-----------------------------------------------
|
|
204
|
-
displacement_X = (ii*A1x*param) + (jj*A2x*param)
|
|
205
|
-
displacement_Y = (ii*A1y*param) + (jj*A2y*param)
|
|
206
|
-
#-----------------------------------------------
|
|
207
|
-
number += 1
|
|
208
|
-
#---------------------------------
|
|
209
|
-
poscar = open('POSCAR_deltaZ', "r")
|
|
210
|
-
poscar_new = open('POSCAR_temp_cart/POSCAR_' + str(number), "w")
|
|
211
|
-
#---------------------------------------------------------------------------
|
|
212
|
-
VTemp = poscar.readline()
|
|
213
|
-
poscar_new.write(f'{VTemp}')
|
|
214
|
-
VTemp = VTemp.split()
|
|
215
|
-
nions1 = int(VTemp[2]); nions2 = int(VTemp[3])
|
|
216
|
-
#----------------------------------------------
|
|
217
|
-
for k in range(7 + nions1):
|
|
218
|
-
VTemp = poscar.readline()
|
|
219
|
-
poscar_new.write(f'{VTemp}')
|
|
220
|
-
#-------------------------------
|
|
221
|
-
for k in range(nions2):
|
|
222
|
-
VTemp = poscar.readline().split()
|
|
223
|
-
poscar_new.write(f'{float(VTemp[0]) + displacement_X} {float(VTemp[1]) + displacement_Y} {VTemp[2]} \n')
|
|
224
|
-
#-----------------------------------------------------------------------------------------------------------
|
|
225
|
-
poscar.close()
|
|
226
|
-
poscar_new.close()
|
|
227
|
-
#-----------------
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
#=============================================================================
|
|
231
|
-
# Convertendo as coordenadas dos arquivos POSCAR de cartesiano para direto ===
|
|
232
|
-
#=============================================================================
|
|
233
|
-
|
|
234
|
-
#---------
|
|
235
|
-
number = 0
|
|
236
|
-
#----------
|
|
237
|
-
a = np.array([A1x*param, A1y*param, A1z*param])
|
|
238
|
-
b = np.array([A2x*param, A2y*param, A2z*param])
|
|
239
|
-
c = np.array([A3x*param, A3y*param, A3z*param])
|
|
240
|
-
T = np.linalg.inv(np.array([a, b, c]).T) # Definindo a matriz de transformação
|
|
241
|
-
#------------------------------------------------------------------------------
|
|
242
|
-
|
|
243
|
-
for ii in displacement_A1:
|
|
244
|
-
for jj in displacement_A2:
|
|
245
|
-
#----------
|
|
246
|
-
number += 1
|
|
247
|
-
#---------------------------------
|
|
248
|
-
dir_temp = str(ii) + '_' + str(jj) + '_' + str(deltaZ)
|
|
249
|
-
os.mkdir(dir_temp)
|
|
250
|
-
if os.path.isfile('vdw_kernel.bindat'): shutil.copyfile('vdw_kernel.bindat', dir_temp + '/vdw_kernel.bindat')
|
|
251
|
-
shutil.copyfile('contcar_update.py', dir_temp + '/contcar_update.py')
|
|
252
|
-
shutil.copyfile('energy_scan.py', dir_temp + '/energy_scan.py')
|
|
253
|
-
shutil.copyfile('KPOINTS', dir_temp + '/KPOINTS')
|
|
254
|
-
shutil.copyfile('POTCAR', dir_temp + '/POTCAR')
|
|
255
|
-
shutil.copyfile('INCAR', dir_temp + '/INCAR')
|
|
256
|
-
#-----------------------------------------------------------
|
|
257
|
-
poscar = open('POSCAR_temp_cart/POSCAR_' + str(number), "r")
|
|
258
|
-
poscar_new = open(dir_temp + '/POSCAR', "w")
|
|
259
|
-
#-------------------------------------------
|
|
260
|
-
for k in range(7):
|
|
261
|
-
VTemp = poscar.readline()
|
|
262
|
-
poscar_new.write(f'{VTemp}')
|
|
263
|
-
#------------------------
|
|
264
|
-
VTemp = poscar.readline()
|
|
265
|
-
poscar_new.write(f'Direct \n')
|
|
266
|
-
|
|
267
|
-
#----------------------------------------------------------------------------------------------------
|
|
268
|
-
# Convertendo as posições atomicas cartesianas de todos os átomos da Supercélula para a forma direta,
|
|
269
|
-
# e ajustando as posições dos átomos que se encontram fora da célula.
|
|
270
|
-
#--------------------------------------------------------------------
|
|
271
|
-
for k in range(nions1 + nions2):
|
|
272
|
-
VTemp = poscar.readline().split()
|
|
273
|
-
x = float(VTemp[0])
|
|
274
|
-
y = float(VTemp[1])
|
|
275
|
-
z = float(VTemp[2])
|
|
276
|
-
#----------------------
|
|
277
|
-
r = np.array([x, y, z]) # Definindo o vetor posição cartesiano do átomo
|
|
278
|
-
#----------------------
|
|
279
|
-
f = np.dot(T, r) # Calculando a correspondenre posição em coordenadas fracionárias
|
|
280
|
-
for m in range(3):
|
|
281
|
-
f = np.where(f < 0, f + 1, f)
|
|
282
|
-
f = np.where(f > 1, f - 1, f)
|
|
283
|
-
#--------------------------------
|
|
284
|
-
for m in range(3):
|
|
285
|
-
# f[m] = round(f[m], 6)
|
|
286
|
-
if (f[m] > 0.9999 or f[m] < 0.0001):
|
|
287
|
-
f[m] = 0.0
|
|
288
|
-
poscar_new.write(f'{f[0]} {f[1]} {f[2]} \n')
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
#-------------
|
|
292
|
-
poscar.close()
|
|
293
|
-
poscar_new.close()
|
|
294
|
-
#------------------------
|
|
295
|
-
os.remove('POSCAR_deltaZ')
|
|
296
|
-
shutil.rmtree('POSCAR_temp_cart')
|
|
297
|
-
#------------------------------------
|
|
298
|
-
os.remove('POSCAR_temp')
|
|
299
|
-
os.remove('POSCAR_cart')
|
|
300
|
-
#-----------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{SAMBA_ilum-1.0.0.400 → samba_ilum-1.0.0.402}/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|