SAMBA-ilum 1.0.0.509__tar.gz → 1.0.0.511__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.509 → samba_ilum-1.0.0.511}/PKG-INFO +3 -2
- samba_ilum-1.0.0.511/README.md +4 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/PKG-INFO +3 -2
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/SOURCES.txt +0 -1
- samba_ilum-1.0.0.511/samba_ilum/__init__.py +5 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/__main__.py +31 -34
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/BZ_2D.py +15 -14
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/HeteroStructure_Generator.py +1 -1
- samba_ilum-1.0.0.511/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input +62 -0
- samba_ilum-1.0.0.511/samba_ilum/src/INPUTS/SAMBA_WorkFlow.input +82 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/_info_pseudo.py +2 -2
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/a-scan.py +12 -12
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/a-scan_analysis.py +17 -17
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/bader_poscar.py +3 -2
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/bader_update.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/cell_check.py +50 -41
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/charge_transfer.py +17 -17
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/contcar_update.py +6 -6
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/data-base_json.py +56 -57
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/data-base_union.py +5 -3
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/energy_scan.py +3 -3
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/hubbard_correction.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/job.py +13 -13
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/kpoints.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/lattice_plot3d.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/make_files.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/output.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/potcar.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/vdW_DF.py +1 -13
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/xy-scan.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/xy-scan_analysis.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/xyz-scan.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/xyz-scan_analysis.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/z-scan.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/z-scan_analysis.py +1 -1
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/setup.py +1 -1
- samba_ilum-1.0.0.509/README.md +0 -3
- samba_ilum-1.0.0.509/samba_ilum/__init__.py +0 -5
- samba_ilum-1.0.0.509/samba_ilum/src/HeteroStructure_Generator_OLD.py +0 -2162
- samba_ilum-1.0.0.509/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input +0 -63
- samba_ilum-1.0.0.509/samba_ilum/src/INPUTS/SAMBA_WorkFlow.input +0 -82
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/LICENSE.txt +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/dependency_links.txt +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/entry_points.txt +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/requires.txt +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/SAMBA_ilum.egg-info/top_level.txt +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_a-scan +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_bader +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_bader.SO +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_bands +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_bands.SO +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_dos +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_dos.SO +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_relax +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_scf +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_scf.SO +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_xy-scan +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_xyz-scan +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/INCAR_z-scan +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.bands +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.chgcar +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.dos +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.location +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.locpot +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.orbitals +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.spin +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/INPUTS/vdw_kernel.bindat +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/bader +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/samba_ilum/src/chgsum.pl +0 -0
- {samba_ilum-1.0.0.509 → samba_ilum-1.0.0.511}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SAMBA_ilum
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.511
|
|
4
4
|
Summary: ...
|
|
5
5
|
Author: Augusto de Lelis Araujo
|
|
6
6
|
Author-email: augusto-lelis@outlook.com
|
|
@@ -17,6 +17,7 @@ Requires-Dist: numpy
|
|
|
17
17
|
Requires-Dist: uuid
|
|
18
18
|
Requires-Dist: vasprocar
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# SAMBA\_ilum Copyright (C) 2025 - Closed source
|
|
21
21
|
|
|
22
22
|
...
|
|
23
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SAMBA_ilum
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.511
|
|
4
4
|
Summary: ...
|
|
5
5
|
Author: Augusto de Lelis Araujo
|
|
6
6
|
Author-email: augusto-lelis@outlook.com
|
|
@@ -17,6 +17,7 @@ Requires-Dist: numpy
|
|
|
17
17
|
Requires-Dist: uuid
|
|
18
18
|
Requires-Dist: vasprocar
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# SAMBA\_ilum Copyright (C) 2025 - Closed source
|
|
21
21
|
|
|
22
22
|
...
|
|
23
|
+
|
|
@@ -12,7 +12,6 @@ samba_ilum/__init__.py
|
|
|
12
12
|
samba_ilum/__main__.py
|
|
13
13
|
samba_ilum/src/BZ_2D.py
|
|
14
14
|
samba_ilum/src/HeteroStructure_Generator.py
|
|
15
|
-
samba_ilum/src/HeteroStructure_Generator_OLD.py
|
|
16
15
|
samba_ilum/src/_info_pseudo.py
|
|
17
16
|
samba_ilum/src/a-scan.py
|
|
18
17
|
samba_ilum/src/a-scan_analysis.py
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C)
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import subprocess
|
|
@@ -16,11 +16,11 @@ dir_samba = os.path.dirname(os.path.realpath(__file__))
|
|
|
16
16
|
print(f'{dir_samba}')
|
|
17
17
|
#--------------------
|
|
18
18
|
|
|
19
|
-
version = '1.0.0.
|
|
19
|
+
version = '1.0.0.511'
|
|
20
20
|
|
|
21
21
|
print(" ")
|
|
22
22
|
print("=============================================================")
|
|
23
|
-
print(f'SAMBA_ilum v{version} Copyright (C)
|
|
23
|
+
print(f'SAMBA_ilum v{version} Copyright (C) 2025 --------------------')
|
|
24
24
|
print("Closed source: Adalberto Fazzio's research group (Ilum|CNPEM)")
|
|
25
25
|
print("Author: Augusto de Lelis Araujo -----------------------------")
|
|
26
26
|
print("=============================================================")
|
|
@@ -75,14 +75,14 @@ if (run_input == 'yes'):
|
|
|
75
75
|
|
|
76
76
|
if(run_input == 'not'):
|
|
77
77
|
print("######################################################################")
|
|
78
|
-
print("#
|
|
78
|
+
print("# What do you want to run? ? =========================================")
|
|
79
79
|
print("# ====================================================================")
|
|
80
|
-
print("# [0]
|
|
80
|
+
print("# [0] Generate SAMBA execution inputs ")
|
|
81
81
|
print("# --------------------------------------------------------------------")
|
|
82
|
-
print("# [1]
|
|
82
|
+
print("# [1] Heterostructure Generator ")
|
|
83
83
|
print("# [2] WorkFlow: High Throughput DFT (inputs + job) ")
|
|
84
84
|
print("# --------------------------------------------------------------------")
|
|
85
|
-
print("# [3]
|
|
85
|
+
print("# [3] Customize internal WorkFlow inputs (INPUTS folder) ")
|
|
86
86
|
print("######################################################################")
|
|
87
87
|
tarefa = input(" "); tarefa = int(tarefa)
|
|
88
88
|
print(" ")
|
|
@@ -104,11 +104,10 @@ if (tarefa == 1):
|
|
|
104
104
|
#------------------------------------------------------------------------------------------------------
|
|
105
105
|
print(" ")
|
|
106
106
|
print("==============================================================")
|
|
107
|
-
print("
|
|
108
|
-
print("Arquivo SAMBA_HeteroStructure.input gerado !!! ===============")
|
|
107
|
+
print("Generated SAMBA_HeteroStructure.input file !!! ===============")
|
|
109
108
|
print("--------------------------------------------------------------")
|
|
110
|
-
print("Configure
|
|
111
|
-
print("
|
|
109
|
+
print("Configure the SAMBA_HeteroStructure.input file and run the ---")
|
|
110
|
+
print(" code again ---")
|
|
112
111
|
print("==============================================================")
|
|
113
112
|
print(" ")
|
|
114
113
|
#--------------------------------------------------------
|
|
@@ -121,20 +120,20 @@ if (tarefa == 1):
|
|
|
121
120
|
#------------------------------------------------------------
|
|
122
121
|
|
|
123
122
|
|
|
124
|
-
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
|
|
123
|
+
#======================================================
|
|
124
|
+
# Checking the structure of POSCAR files, regarding the
|
|
125
|
+
# rotation angle in relation to the z-axis ============
|
|
126
|
+
#======================================================
|
|
128
127
|
exec(open(dir_codes + '/cell_check.py').read())
|
|
129
|
-
|
|
128
|
+
#======================================================
|
|
130
129
|
|
|
131
130
|
|
|
132
131
|
if (loop_ht == 1):
|
|
133
132
|
#--------------
|
|
134
133
|
n_Lattice = 2
|
|
135
|
-
|
|
136
|
-
#
|
|
137
|
-
|
|
134
|
+
#--------------------------------------------------------------------------
|
|
135
|
+
# Checking for existence of non-empty file 'check_list_loop.txt' ----------
|
|
136
|
+
#--------------------------------------------------------------------------
|
|
138
137
|
temp_check = 0
|
|
139
138
|
#-------------
|
|
140
139
|
check_list_dir = dir_files + '/check_list_loop.txt'
|
|
@@ -159,13 +158,13 @@ if (tarefa == 1):
|
|
|
159
158
|
bilayer_materials.append((material1, material2))
|
|
160
159
|
#-------------------------------------------------------
|
|
161
160
|
vistos = set()
|
|
162
|
-
new_bilayer_materials = [] #
|
|
161
|
+
new_bilayer_materials = [] # List to store unique elements
|
|
163
162
|
for elemento in bilayer_materials:
|
|
164
|
-
elem_ordenado = tuple(sorted(elemento)) #
|
|
163
|
+
elem_ordenado = tuple(sorted(elemento)) # Sorts the elements (ignoring permutations)
|
|
165
164
|
if elem_ordenado not in vistos:
|
|
166
|
-
new_bilayer_materials.append(elemento) #
|
|
165
|
+
new_bilayer_materials.append(elemento) # Adding elements that do not have permutations
|
|
167
166
|
vistos.add(elem_ordenado)
|
|
168
|
-
bilayer_materials = new_bilayer_materials #
|
|
167
|
+
bilayer_materials = new_bilayer_materials # Saving the new list with the permutations removed
|
|
169
168
|
#-------------------------------------------------------
|
|
170
169
|
for loop in range(len(bilayer_materials)):
|
|
171
170
|
Lattice1 = bilayer_materials[loop][0]
|
|
@@ -182,9 +181,9 @@ if (tarefa == 1):
|
|
|
182
181
|
#---------------------------------------------------------------------------------------------------------------------------------
|
|
183
182
|
|
|
184
183
|
if ( temp_check == 0 or (temp_check == 1 and run == 1) ):
|
|
185
|
-
|
|
186
|
-
#
|
|
187
|
-
|
|
184
|
+
#------------------------------------------------------------------
|
|
185
|
+
# Heterostructure loop check_list ---------------------------------
|
|
186
|
+
#------------------------------------------------------------------
|
|
188
187
|
nloop += +1
|
|
189
188
|
if (nloop >= 0 and nloop < 10): nloop2 = '000' + str(nloop)
|
|
190
189
|
if (nloop >= 10 and nloop < 100): nloop2 = '00' + str(nloop)
|
|
@@ -223,11 +222,9 @@ if (tarefa == 2):
|
|
|
223
222
|
#----------------------------------------------------------------------------------------
|
|
224
223
|
print(" ")
|
|
225
224
|
print("==============================================================")
|
|
226
|
-
print("
|
|
227
|
-
print("Arquivo SAMBA_WorkFlow.input gerado !!! ======================")
|
|
225
|
+
print("SAMBA_WorkFlow.input file generated !!! ======================")
|
|
228
226
|
print("--------------------------------------------------------------")
|
|
229
|
-
print("Configure
|
|
230
|
-
print(" novamente --")
|
|
227
|
+
print("Configure the SAMBA_WorkFlow.input file and run the code again")
|
|
231
228
|
print("==============================================================")
|
|
232
229
|
print(" ")
|
|
233
230
|
#--------------------------------------------------------
|
|
@@ -253,9 +250,9 @@ if (tarefa == 2):
|
|
|
253
250
|
0 == 0
|
|
254
251
|
else:
|
|
255
252
|
print('')
|
|
256
|
-
print('
|
|
257
|
-
print('
|
|
258
|
-
print('
|
|
253
|
+
print('Warning: -----------------------------------------')
|
|
254
|
+
print('Missing POTCAR folder and POTCAR_[ion] files -----')
|
|
255
|
+
print('Enter and then press [ENTER] to continue ---------')
|
|
259
256
|
print('--------------------------------------------------')
|
|
260
257
|
confirmacao = input (" "); confirmacao = str(confirmacao)
|
|
261
258
|
#------------------------------------
|
|
@@ -288,6 +285,6 @@ if (tarefa == 3): shutil.copytree(dir_codes + '/INPUTS', dir_files + '/WorkFlow
|
|
|
288
285
|
|
|
289
286
|
print(" ")
|
|
290
287
|
print("=============")
|
|
291
|
-
print("
|
|
288
|
+
print("Completed ===")
|
|
292
289
|
print("=============")
|
|
293
290
|
print(" ")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
|
+
|
|
2
3
|
import numpy as np
|
|
3
4
|
import sys
|
|
4
5
|
import os
|
|
@@ -13,7 +14,7 @@ from scipy.spatial import Voronoi
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
#============================================================
|
|
16
|
-
#
|
|
17
|
+
# Extracting the k-path used in the Band Structure plot =====
|
|
17
18
|
#============================================================
|
|
18
19
|
kpoints_file = []
|
|
19
20
|
kpath = []
|
|
@@ -57,8 +58,8 @@ for i in range(len(kpoints_file)):
|
|
|
57
58
|
line[3] = line[3].replace('!', '').replace('#1', 'Gamma').replace('#', '')
|
|
58
59
|
kpath.append([float(line[0]), float(line[1]), float(line[2]), str(line[3])])
|
|
59
60
|
#-----------------------------------------------------------------------------------------
|
|
60
|
-
#
|
|
61
|
-
|
|
61
|
+
# Removing adjacent and repeated elements from the k-path list
|
|
62
|
+
#-------------------------------------------------------------
|
|
62
63
|
i = 0
|
|
63
64
|
while i < (len(kpath) -1):
|
|
64
65
|
if kpath[i] == kpath[i +1]: del kpath[i +1]
|
|
@@ -72,9 +73,9 @@ for sublista in kpath:
|
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
#
|
|
77
|
-
|
|
76
|
+
#====================================================================
|
|
77
|
+
# Extracting information about the Direct and Reciprocal lattices ===
|
|
78
|
+
#====================================================================
|
|
78
79
|
contcar = open(dir_kpath + '/CONTCAR', "r")
|
|
79
80
|
VTemp = contcar.readline().split()
|
|
80
81
|
n_materials = len(VTemp[1].replace('+', ' ').split())
|
|
@@ -107,20 +108,20 @@ B2 = [B2x*ft, B2y*ft]
|
|
|
107
108
|
|
|
108
109
|
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
#
|
|
112
|
-
|
|
111
|
+
#==============================================================
|
|
112
|
+
# 2D plot of the 1st Brillouin Zone ===========================
|
|
113
|
+
#==============================================================
|
|
113
114
|
fig, ax = plt.subplots()
|
|
114
115
|
#-----------------------
|
|
115
116
|
|
|
116
117
|
#-------------------------------------------------------------
|
|
117
|
-
#
|
|
118
|
+
# Constructing the 2D BZ using Voronoi (Supercell S) ---------
|
|
118
119
|
#-------------------------------------------------------------
|
|
119
|
-
nx, ny = 6, 6 #
|
|
120
|
+
nx, ny = 6, 6 # Number of points in the grid
|
|
120
121
|
points = np.dot(np.mgrid[-nx:nx+1, -ny:ny+1].reshape(2, -1).T, np.array([B1, B2]))
|
|
121
122
|
vor = Voronoi(points)
|
|
122
|
-
|
|
123
|
-
#
|
|
123
|
+
#-------------------------------
|
|
124
|
+
# Plotting the 2D Brillouin zone
|
|
124
125
|
#--------------------------------
|
|
125
126
|
for simplex in vor.ridge_vertices:
|
|
126
127
|
simplex = np.asarray(simplex)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# SAMBA Copyright (C) 2025 - Closed source
|
|
2
|
+
|
|
3
|
+
#=========================================================================================================================
|
|
4
|
+
# Important notes !!! ====================================================================================================
|
|
5
|
+
#=========================================================================================================================
|
|
6
|
+
# Use only 2D lattices whose vectors (A1,A2) lie in the KxKy plane, and whose vector A3 lies in the z-axis direction -----
|
|
7
|
+
# A1 = (A1x, A1y, 0.0) | A2 = (A2x, A2y, 0.0) | A3 = (0.0, 0.0, A3z)
|
|
8
|
+
#-------------------------------------------------------------------------------------------------------------------------
|
|
9
|
+
# Use a 2D unit cell for each material, non-unit cells limit the number of structures generated, in addition to introducing
|
|
10
|
+
# "slowness" in the code execution ---------------------------------------------------------------------------------------
|
|
11
|
+
#=========================================================================================================================
|
|
12
|
+
|
|
13
|
+
#=========================================================================================================================
|
|
14
|
+
# Tuning parameters: =====================================================================================================
|
|
15
|
+
#=========================================================================================================================
|
|
16
|
+
dir_o = 'Structures' # Heterostructures Output Directory
|
|
17
|
+
dir_poscar = 'POSCAR' # Location directory of POSCAR files to be used
|
|
18
|
+
|
|
19
|
+
#=============================================================================================================
|
|
20
|
+
# Enable or Disable code execution in Loop: functional only to generate bilayers (n_Lattice = 2) =============
|
|
21
|
+
#=============================================================================================================
|
|
22
|
+
loop_ht = 0 # [0] Disables; [1] Enables the loop, generating heterostructures for all combinations of
|
|
23
|
+
# POSCAR files contained in the "dir_poscar" directory
|
|
24
|
+
#===============================================================
|
|
25
|
+
# Parameters if the loop is Disabled ===========================
|
|
26
|
+
#===============================================================
|
|
27
|
+
if (loop_ht == 0):
|
|
28
|
+
n_Lattice = 2 # number of materials to be stacked, use 2 or 3.
|
|
29
|
+
Lattice1 = 'C2.vasp' # 1st Material "Substrate: Material initially kept fixed
|
|
30
|
+
Lattice2 = 'hBN.vasp' # 2nd Material "Material to be deposited on the Substrate"
|
|
31
|
+
Lattice3 = 'SnTe.vasp' # 3rd Material "Material to be deposited on the 2nd Material"
|
|
32
|
+
|
|
33
|
+
#===============================================================
|
|
34
|
+
# Other parameters =============================================
|
|
35
|
+
#===============================================================
|
|
36
|
+
separacao1 = 3.00 # Separation distance (in Angs.) between the 1st and 2nd material.
|
|
37
|
+
separacao2 = 3.00 # Separation distance (in Angs.) between the 2nd and 3rd material.
|
|
38
|
+
vacuum = 15.0 # Vacuum (in Angs.) to be introduced into the Heterostructure cell.
|
|
39
|
+
#----------------------------------
|
|
40
|
+
cell_fator = [10, 10] # Multiplication factor of the unit cell as a function of vectors A1, A2.
|
|
41
|
+
# Note: Very high values can lead to excessive code slowness.
|
|
42
|
+
#----------------------------------
|
|
43
|
+
crit_mod_vector = 3 # Percentage variation % of the module between the vectors (A and B) of the lattices: A1_with_A2 and B1_with_B2
|
|
44
|
+
crit_distorc_lattice = 3 # Percentage variation % of the module between the vectors (A and B) of the same lattice: A1_with_B1 and A2_with_B2
|
|
45
|
+
crit_angle_perc = 2 # Percentage variation % of the angle formed between the vectors (A and B) of the lattices: Theta1_with_Theta2
|
|
46
|
+
crit_angle_diff = 2 # Variation (in module) of the angle in degrees (º) formed between the vectors (A and B) of the lattices: Theta1_with_Theta2
|
|
47
|
+
crit_area = 5 # Percentage variation % of the area of the lattices that will make up the Heterostructure: Area1_with_Area2
|
|
48
|
+
#----------------------------------
|
|
49
|
+
ions_crit_i = 1 # Criterion for the minimum number of atoms allowed in the Heterostructure.
|
|
50
|
+
ions_crit_f = 100 # Criterion for the maximum number of atoms allowed in the Heterostructure.
|
|
51
|
+
# Note: When looping many structures, I advise sweeping small ranges of ions for example: (1, 10); (10, 20); (50,60)
|
|
52
|
+
#----------------------------------
|
|
53
|
+
# By default we will always have: angle > 0.0 and angle < 180.0
|
|
54
|
+
angle_min = 15.0 # Minimum opening angle between vectors A1 and A2
|
|
55
|
+
angle_max = 165.0 # Maximum opening angle between vectors A1 and A2
|
|
56
|
+
#----------------------------------
|
|
57
|
+
mismatch_type = 0 # Applied deformation: [0] Distributed proportionally among the materials
|
|
58
|
+
# [1], [2] or [3] keeps the 1st, 2nd or 3rd material fixed, deforming the others.
|
|
59
|
+
#----------------------------------
|
|
60
|
+
rot_angle_calc = 'center_cell' # 'center_cell', 'A1' or 'A2': Vector with respect to which the rotation angle between the materials is calculated
|
|
61
|
+
#----------------------------------
|
|
62
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# SAMBA Copyright (C) 2025 - Closed source
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
#=======================================================
|
|
5
|
+
# Python virtual environment directory -----------------
|
|
6
|
+
dir_virtual_python = '/home/dlelis/codes/python_virtual'
|
|
7
|
+
#=======================================================
|
|
8
|
+
# Workflow Output Directory ----------------------------
|
|
9
|
+
dir_o = 'WorkFlow_output'
|
|
10
|
+
#=======================================================
|
|
11
|
+
# information to be added to the database --------------
|
|
12
|
+
replace_type_pseudo = 'PAW_PBE'; replace_type_XC = 'GGA'
|
|
13
|
+
#=======================================================
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
#=======================================================
|
|
17
|
+
type_lattice = 2 # [1] 1D lattices (Periodic in X); [2] 2D lattices (Periodic in XY); [3] 3D lattices - Bulk
|
|
18
|
+
#=======================================================
|
|
19
|
+
tasks = ['relax', 'scf', 'bands', 'dos'] # tasks = ['z-scan', 'xy-scan', 'relax', 'scf', 'bands', 'dos', 'bader']
|
|
20
|
+
type = ['sem_SO','com_SO'] # type = ['sem_SO','com_SO']
|
|
21
|
+
#=======================================================
|
|
22
|
+
ispin = 2 # [1] for non-spin-polarized calculation; [2] for spin-polarized calculation
|
|
23
|
+
#=======================================================
|
|
24
|
+
dipol = 'none' # Use the options: 'none', 'center_cell' or 'center_mass'
|
|
25
|
+
#=======================================================
|
|
26
|
+
magnet_mode = 'default' # Use the options: 'default', 'MAGMOM=0' or 'NUPDOWN=0'
|
|
27
|
+
#=======================================================
|
|
28
|
+
U_correction = 0 # Hubbard Correction (U): [0] to disable, [1] to enable
|
|
29
|
+
#=======================================================
|
|
30
|
+
vdW = 0 # Van der Waals correction used: [0] disables van der Waals correction.
|
|
31
|
+
# Correction applied to all calculations (with and without OS)
|
|
32
|
+
#-------------------------------------------------------
|
|
33
|
+
vdWDF = 'none' # Non-local functional vdW_DF used: 'none' disables the non-local functional vdW_DF.
|
|
34
|
+
# Choice: 'none', 'DF', 'DF2', 'optPBE', 'optB88', 'optB86b', 'rev-DF2', 'DF-cx', 'DF3-opt1', 'DF3-opt2'
|
|
35
|
+
# Note: Functional applied only in structural optimization calculations ('xyz-scan', 'xy-scan', 'z-scan', 'a-scan', 'relax')
|
|
36
|
+
# Note: vdW != 0 will override any choice of vdWDF
|
|
37
|
+
#=======================================================
|
|
38
|
+
ENCUT_min = 500 # Minimum value for cut-off energy in eV
|
|
39
|
+
# Note: If (ENCUT_min < ENCUT*fator_encut), then ENCUT_min = ENCUT*encut_factor
|
|
40
|
+
# ENCUT refers to the highest cutting energy value present in the POTCAR file
|
|
41
|
+
fator_encut = 1.3 # Multiplication factor for the criterion of the cutting energy used
|
|
42
|
+
#=======================================================
|
|
43
|
+
type_k_dens = 1 # [1] KPOINTS (Monkhorst-Pack); [2] KPOINTS (Gamma); [3] INCAR (KSPACING Monkhorst-Pack); [4] INCAR (KSPACING Gamma)
|
|
44
|
+
k_dens_relax = 12 # Relaxation calculation: number of k-points per Å^-1
|
|
45
|
+
k_dens_scf = 12 # Self-consistent calculation (scf): number of k-points per Å^-1
|
|
46
|
+
k_dens_dos = 12 # DOS Calculation: number of k-points per Å^-1
|
|
47
|
+
k_dens_bader = 12 # Bader Charge Calculation: number of k-points perr Å^-1
|
|
48
|
+
n_kpoints = 50 # Band calculation (nscf): number of k-points in each section of the band plot
|
|
49
|
+
nions_split = 100 # number of ions in the POSCAR file, so that the band calculation is performed in steps (split)
|
|
50
|
+
vacuo = 15.0 # Vacuum applied to Heterostructure
|
|
51
|
+
NCORE = 8 # Number of "cores" per "node"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
#============================
|
|
55
|
+
# a-scan parameters =========
|
|
56
|
+
# Functional for 3D bulk ====
|
|
57
|
+
#============================
|
|
58
|
+
k_dens_a_scan = 6 # a-scan calculation: number of k-points per Å-1
|
|
59
|
+
factor_var = 5 # % variation of the lattice parameter (modulo the smallest lattice vector)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
#============================
|
|
63
|
+
# z-scan parameters =========
|
|
64
|
+
#============================
|
|
65
|
+
k_dens_z_scan = 6 # z-scan calculation: number of k-points per Å-1
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
#============================
|
|
69
|
+
# xy-scan parameters ========
|
|
70
|
+
#============================
|
|
71
|
+
k_dens_xy_scan = 6 # xy-scan calculation: number of k-points per Å-1
|
|
72
|
+
r_displacement_A1 = [0.0, (1/8), (1/6), (1/4), (1/3), (1/2), (2/3), (3/4), (5/6)] # Displacements in the direction of vector A1 (2nd material)
|
|
73
|
+
r_displacement_A2 = [0.0, (1/8), (1/6), (1/4), (1/3), (1/2), (2/3), (3/4), (5/6)] # Displacements in the direction of vector A2 (2nd material)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
#============================
|
|
77
|
+
# xyz-scan parameters =======
|
|
78
|
+
#============================
|
|
79
|
+
k_dens_xyz_scan = 6 # xyz-scan calculation: number of k-points Å-1
|
|
80
|
+
displacement_Z = [1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5] # Vertical separation (z-axis) between layers
|
|
81
|
+
displacement_xyz_A1 = [0.0, 0.2, 0.4, 0.6, 0.8] # Displacements in the direction of vector A1 (2nd material)
|
|
82
|
+
displacement_xyz_A2 = [0.0, 0.2, 0.4, 0.6, 0.8] # Displacements in the direction of vector A2 (2nd material)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C)
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import os
|
|
@@ -6,7 +6,7 @@ import os
|
|
|
6
6
|
cut_off_energy = open('cut_off_energy.py', "w")
|
|
7
7
|
|
|
8
8
|
#---------------------------------------------------------
|
|
9
|
-
#
|
|
9
|
+
# Listing files present in the 'POTCAR' directory --------
|
|
10
10
|
#---------------------------------------------------------
|
|
11
11
|
files = os.listdir()
|
|
12
12
|
#-------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C)
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
@@ -6,12 +6,12 @@ import shutil
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
vacuo = replace_vacuo #
|
|
10
|
-
factor_var = replace_factor_var #
|
|
9
|
+
vacuo = replace_vacuo # Minimum vacuum applied to heterostructure
|
|
10
|
+
factor_var = replace_factor_var # Percentage change in network parameter (modulo the smallest lattice vector)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
#----------------------------------------------------------------------------
|
|
14
|
-
#
|
|
14
|
+
# Function to list all folders within a given directory ---------------------
|
|
15
15
|
#----------------------------------------------------------------------------
|
|
16
16
|
def list_folders(dir):
|
|
17
17
|
l_folders = [name for name in os.listdir(dir) if os.path.isdir(os.path.join(dir, name))]
|
|
@@ -22,7 +22,7 @@ dir = os.getcwd()
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
#==========================================================================
|
|
25
|
-
#
|
|
25
|
+
# Obtaining the Heterostructure Lattice Vectors ===========================
|
|
26
26
|
#==========================================================================
|
|
27
27
|
contcar = open('CONTCAR', "r")
|
|
28
28
|
#-----------------------------
|
|
@@ -40,9 +40,9 @@ contcar.close()
|
|
|
40
40
|
#--------------
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
#
|
|
45
|
-
|
|
43
|
+
#=====================================================================================
|
|
44
|
+
# Adopting the lattice parameter as the modulus of the smallest lattice vector =======
|
|
45
|
+
#=====================================================================================
|
|
46
46
|
A1 = np.array([float(A1x), float(A1y), float(A1z)]); module_a1 = float(np.linalg.norm(A1))
|
|
47
47
|
A2 = np.array([float(A2x), float(A2y), float(A2z)]); module_a2 = float(np.linalg.norm(A2))
|
|
48
48
|
A3 = np.array([float(A3x), float(A3y), float(A3z)]); module_a3 = float(np.linalg.norm(A3))
|
|
@@ -63,9 +63,9 @@ A3x = A3x/param; A3y = A3y/param; A3z = A3z/param
|
|
|
63
63
|
#--------------------------------------------------
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
#
|
|
68
|
-
|
|
66
|
+
#===================================================
|
|
67
|
+
# Checking the current calculation step ============
|
|
68
|
+
#===================================================
|
|
69
69
|
file = open('check_steps.txt', "r")
|
|
70
70
|
VTemp = file.readline()
|
|
71
71
|
step = int(VTemp)
|
|
@@ -101,7 +101,7 @@ if (step > 1):
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
#============================================================
|
|
104
|
-
#
|
|
104
|
+
# Generating POSCAR files for each value of a (param) =======
|
|
105
105
|
#============================================================
|
|
106
106
|
|
|
107
107
|
for param in a_scan:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C)
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
from scipy.interpolate import interp1d
|
|
@@ -9,7 +9,7 @@ import os
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
#==========================================================================
|
|
12
|
-
#
|
|
12
|
+
# Obtaining the Heterostructure Lattice Vectors ===========================
|
|
13
13
|
#==========================================================================
|
|
14
14
|
poscar = open('POSCAR.0', "r")
|
|
15
15
|
#-----------------------------
|
|
@@ -23,9 +23,9 @@ poscar.close()
|
|
|
23
23
|
#-------------
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
#
|
|
28
|
-
|
|
26
|
+
#=====================================================================================
|
|
27
|
+
# Adopting the lattice parameter as the modulus of the smallest lattice vector =======
|
|
28
|
+
#=====================================================================================
|
|
29
29
|
A1 = np.array([float(A1x), float(A1y), float(A1z)]); module_a1 = float(np.linalg.norm(A1))
|
|
30
30
|
A2 = np.array([float(A2x), float(A2y), float(A2z)]); module_a2 = float(np.linalg.norm(A2))
|
|
31
31
|
A3 = np.array([float(A3x), float(A3y), float(A3z)]); module_a3 = float(np.linalg.norm(A3))
|
|
@@ -42,9 +42,9 @@ if (module_a2 < module_a1):
|
|
|
42
42
|
#-----------------
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
|
|
45
|
+
#====================================================
|
|
46
|
+
# Extracting information ============================
|
|
47
|
+
#====================================================
|
|
48
48
|
shutil.copy('energy_scan.txt', 'a-scan.dat')
|
|
49
49
|
#-------------------------------------------
|
|
50
50
|
file0 = np.loadtxt('a-scan.dat')
|
|
@@ -72,7 +72,7 @@ shutil.copyfile(str(a_opt) + '/CONTCAR', 'CONTCAR')
|
|
|
72
72
|
|
|
73
73
|
"""
|
|
74
74
|
#=======================================
|
|
75
|
-
#
|
|
75
|
+
# Interpolating a-scan data ============
|
|
76
76
|
#=======================================
|
|
77
77
|
n_d = 250
|
|
78
78
|
#--------
|
|
@@ -82,14 +82,14 @@ y_interp = f(x_interp)
|
|
|
82
82
|
"""
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
listas_combinadas = list(zip(date_a, date_E)) #
|
|
89
|
-
listas_ordenadas = sorted(listas_combinadas) #
|
|
90
|
-
new_date_a, new_date_E = zip(*listas_ordenadas) #
|
|
91
|
-
new_date_a = list(new_date_a) #
|
|
92
|
-
new_date_E = list(new_date_E) #
|
|
85
|
+
#=============================================
|
|
86
|
+
# Reordering the lists date_a and date_E =====
|
|
87
|
+
#=============================================
|
|
88
|
+
listas_combinadas = list(zip(date_a, date_E)) # Combining the lists
|
|
89
|
+
listas_ordenadas = sorted(listas_combinadas) # Sorting the combined lists based on the elements of the first list
|
|
90
|
+
new_date_a, new_date_E = zip(*listas_ordenadas) # Separating the lists
|
|
91
|
+
new_date_a = list(new_date_a) # Converting to list format
|
|
92
|
+
new_date_E = list(new_date_E) # Converting to list format
|
|
93
93
|
#============================================
|
|
94
94
|
|
|
95
95
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SAMBA_ilum Copyright (C)
|
|
1
|
+
# SAMBA_ilum Copyright (C) 2025 - Closed source
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
#---------------------------------------
|
|
@@ -32,8 +32,9 @@ for m in range(n_Lattice):
|
|
|
32
32
|
os.mkdir(dir_task + '/Charge_transfer')
|
|
33
33
|
os.mkdir(dir_task + '/Charge_transfer' + '/inputs')
|
|
34
34
|
shutil.copyfile(dir_codes + '/INPUTS/inputs_VASProcar/input.vasprocar.chgcar', dir_task + '/Charge_transfer' + '/inputs' + '/input.vasprocar.chgcar')
|
|
35
|
+
|
|
35
36
|
#---------------------------------------------------------------------------------------------------------------
|
|
36
|
-
#
|
|
37
|
+
# Updating the input.vasprocar.chgcar file ---------------------------------------------------------------------
|
|
37
38
|
#---------------------------------------------------------------------------------------------------------------
|
|
38
39
|
with open(dir_task + '/Charge_transfer' + '/inputs/input.vasprocar.chgcar', "r") as file: content = file.read()
|
|
39
40
|
content = content.replace('replace_nfiles', str(n_Lattice +1))
|