SAMBA-ilum 1.0.0.503__tar.gz → 1.0.0.504__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.503 → samba_ilum-1.0.0.504}/PKG-INFO +1 -1
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/PKG-INFO +1 -1
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/__main__.py +1 -1
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/HeteroStructure_Generator.py +2 -2
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/cell_check.py +59 -31
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/setup.py +1 -1
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/LICENSE.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/README.md +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/SOURCES.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/dependency_links.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/entry_points.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/requires.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/SAMBA_ilum.egg-info/top_level.txt +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/__init__.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/BZ_2D.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_a-scan +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_bader +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_bader.SO +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_bands +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_bands.SO +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_dos +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_dos.SO +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_relax +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_scf +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_scf.SO +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_xy-scan +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_xyz-scan +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/INCAR_z-scan +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/SAMBA_WorkFlow.input +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.bands +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.chgcar +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.dos +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.location +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.locpot +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.orbitals +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.spin +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/INPUTS/vdw_kernel.bindat +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/_info_pseudo.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/a-scan.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/a-scan_analysis.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/bader +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/bader_poscar.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/bader_update.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/charge_transfer.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/chgsum.pl +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/contcar_update.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/data-base_json.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/data-base_union.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/energy_scan.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/hubbard_correction.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/job.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/kpoints.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/lattice_plot3d.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/make_files.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/output.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/potcar.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/vdW_DF.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/xy-scan.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/xy-scan_analysis.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/xyz-scan.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/xyz-scan_analysis.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/z-scan.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/samba_ilum/src/z-scan_analysis.py +0 -0
- {samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/setup.cfg +0 -0
|
@@ -1647,8 +1647,8 @@ for s in range(len(files0)):
|
|
|
1647
1647
|
for i in range(len(files)):
|
|
1648
1648
|
#--------------------------
|
|
1649
1649
|
structure = Poscar.from_file(diret2 + files0[s] + '/' + files[i]).structure # Lendo o arquivo POSCAR
|
|
1650
|
-
matcher = StructureMatcher()
|
|
1651
|
-
reduced_structure = matcher._get_reduced_structure(structure)
|
|
1650
|
+
matcher = StructureMatcher() # Criando um objeto StructureMatcher
|
|
1651
|
+
reduced_structure = matcher._get_reduced_structure(structure) # Obtendo a correspondente célula unitária reduzida
|
|
1652
1652
|
Poscar(reduced_structure).write_file(diret2 + files0[s] + '/' + 'temp_' + str(i+1) + '.vasp')
|
|
1653
1653
|
|
|
1654
1654
|
poscar1 = open(diret2 + files0[s] + '/' + files[i], "r")
|
|
@@ -6,6 +6,7 @@ print("Espere um momento ================")
|
|
|
6
6
|
print("==================================")
|
|
7
7
|
print("")
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
from pymatgen.io.vasp import Poscar
|
|
10
11
|
from pymatgen.core import Structure
|
|
11
12
|
from pymatgen.analysis.structure_matcher import StructureMatcher
|
|
@@ -22,9 +23,9 @@ poscar_dir_path = os.path.join(dir_files, dir_poscar)
|
|
|
22
23
|
files0 = [name for name in os.listdir(poscar_dir_path) if os.path.isfile(os.path.join(poscar_dir_path, name))]
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
# Testando a compatibilidade dos arquivos POSCAR
|
|
27
|
-
|
|
26
|
+
#===================================================
|
|
27
|
+
# Testando a compatibilidade dos arquivos POSCAR ===
|
|
28
|
+
#===================================================
|
|
28
29
|
A1x0 = []; A1y0 = []; A2x0 = []; A2y0 = []
|
|
29
30
|
#--------------------------------------------
|
|
30
31
|
for k in range(len(files0)):
|
|
@@ -53,19 +54,49 @@ for k in range(len(files0)):
|
|
|
53
54
|
print(f'A3 = [0.0, 0.0, A3z]')
|
|
54
55
|
print(f'========================================')
|
|
55
56
|
print(f' ')
|
|
56
|
-
|
|
57
|
+
#-------------
|
|
57
58
|
poscar.close()
|
|
58
59
|
sys.exit()
|
|
59
|
-
|
|
60
|
+
#-------------
|
|
60
61
|
poscar.close()
|
|
61
|
-
|
|
62
|
+
#-------------
|
|
63
|
+
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
#=====================================================================
|
|
66
|
+
# Testando se os arquivos POSCAR correspondem há células unitárias ===
|
|
67
|
+
#=====================================================================
|
|
68
|
+
supercell_files = []
|
|
69
|
+
#-------------------------
|
|
70
|
+
for filename in files0:
|
|
71
|
+
poscar_path = os.path.join(poscar_dir_path, filename)
|
|
72
|
+
try:
|
|
73
|
+
original_structure = Structure.from_file(poscar_path)
|
|
74
|
+
primitive_structure = original_structure.get_primitive_structure()
|
|
75
|
+
if (len(original_structure) > len(primitive_structure)): supercell_files.append(filename)
|
|
76
|
+
except Exception as e: print(f"Aviso: Não foi possível analisar o arquivo '{filename}'.")
|
|
77
|
+
#----------------------------
|
|
78
|
+
if (len(supercell_files) > 0):
|
|
79
|
+
print(f'========================================')
|
|
80
|
+
print(f'Verifique os arquivos POSCAR utilizados!')
|
|
81
|
+
print(f'Foram identificadas as seguinte células não-unitárias: {supercell_files}')
|
|
82
|
+
print(f'----------------------------------------')
|
|
83
|
+
print(f'Deseja prosseguir com estes arquivos? ')
|
|
84
|
+
print(f'Digite: [0] para NÃO e [1] para SIM ')
|
|
85
|
+
print(f'========================================')
|
|
86
|
+
print(f' ')
|
|
87
|
+
selected_option = input(" "); selected_option = int(selected_option)
|
|
88
|
+
if (selected_option != 1): sys.exit()
|
|
89
|
+
#------------------------------------
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#========================================================
|
|
93
|
+
# Chegando e Corrigindo o eixo de rotação das células ===
|
|
94
|
+
#========================================================
|
|
95
|
+
axis_correction = 0
|
|
96
|
+
#------------------
|
|
66
97
|
for name in files0:
|
|
67
98
|
Lattice = os.path.join(poscar_dir_path, name)
|
|
68
|
-
|
|
99
|
+
#--------------------------------------------
|
|
69
100
|
try:
|
|
70
101
|
estrutura = Structure.from_file(Lattice)
|
|
71
102
|
sga = SpacegroupAnalyzer(estrutura, symprec=1e-3)
|
|
@@ -74,7 +105,7 @@ for name in files0:
|
|
|
74
105
|
|
|
75
106
|
angulos_z = []
|
|
76
107
|
angulos_z_na_origem = []
|
|
77
|
-
|
|
108
|
+
#--------------------------------------------------
|
|
78
109
|
# Loop 1: Encontra todos os ângulos de rotação em Z
|
|
79
110
|
for op in operacoes_0:
|
|
80
111
|
R = op.rotation_matrix
|
|
@@ -88,7 +119,7 @@ for name in files0:
|
|
|
88
119
|
angle_deg = round(np.degrees(angle), 4)
|
|
89
120
|
if 0.1 < angle_deg < 360.0 and angle_deg not in angulos_z:
|
|
90
121
|
angulos_z.append(angle_deg)
|
|
91
|
-
|
|
122
|
+
#--------------------------------------------------
|
|
92
123
|
# Loop 2: Encontra rotações em Z que fixam a origem
|
|
93
124
|
z = np.array([0, 0, 1])
|
|
94
125
|
for op in operacoes_1:
|
|
@@ -102,34 +133,33 @@ for name in files0:
|
|
|
102
133
|
angle_deg = round(np.degrees(angle), 4)
|
|
103
134
|
if 0.1 < angle_deg < 360.0 and angle_deg not in angulos_z_na_origem:
|
|
104
135
|
angulos_z_na_origem.append(angle_deg)
|
|
105
|
-
|
|
106
|
-
|
|
136
|
+
#------------------------------------------------
|
|
107
137
|
temp_name = name.replace('_',' ').split()
|
|
108
138
|
menor_0 = min(angulos_z) if angulos_z else 0.0
|
|
109
139
|
menor_1 = min(angulos_z_na_origem) if angulos_z_na_origem else 0.0
|
|
110
|
-
|
|
140
|
+
#----------------------------------------------------------
|
|
111
141
|
# Se houver diferença, calcula, corrige e salva o new file.
|
|
112
142
|
if (menor_0 != menor_1 and menor_0 != 0.0):
|
|
113
|
-
|
|
114
|
-
|
|
143
|
+
axis_correction += 1
|
|
144
|
+
#--------------------------------------------------------------
|
|
115
145
|
# 1. Definindo os diretórios de backup e criando se necessário
|
|
116
146
|
backup_dir = os.path.join(dir_files, 'POSCAR_original')
|
|
117
147
|
os.makedirs(backup_dir, exist_ok=True)
|
|
118
|
-
|
|
148
|
+
#---------------------------------------------------------
|
|
119
149
|
# 2. Definindo os caminhos do arquivo original e do backup
|
|
120
150
|
original_filepath = os.path.join(poscar_dir_path, name)
|
|
121
151
|
backup_filepath = os.path.join(backup_dir, name)
|
|
122
|
-
|
|
152
|
+
#-----------------------------------------------------
|
|
123
153
|
# 3. Movendo o arquivo original para a pasta de backup
|
|
124
154
|
shutil.move(original_filepath, backup_filepath)
|
|
125
|
-
|
|
126
|
-
if (
|
|
155
|
+
#----------------------------------------------
|
|
156
|
+
if (axis_correction == 1):
|
|
127
157
|
print(" ")
|
|
128
158
|
print(f"-------------------------------------------------------------")
|
|
129
|
-
|
|
130
159
|
print(f"POSCAR file: {name}")
|
|
131
160
|
print(f"Discrepância encontrada em relação ao ângulo de rotação em torno do eixo Z")
|
|
132
161
|
print(f"Min. Rotation Angle: {int(menor_0)}º / Angle at Origin: {int(menor_1)}º")
|
|
162
|
+
#-------------
|
|
133
163
|
op_alvo = None
|
|
134
164
|
for op_cart in operacoes_1:
|
|
135
165
|
R_cart = op_cart.rotation_matrix
|
|
@@ -140,34 +170,32 @@ for name in files0:
|
|
|
140
170
|
if np.isclose(np.degrees(np.arccos(cos_theta_3d)), menor_0, atol=1e-4):
|
|
141
171
|
op_alvo = op_cart
|
|
142
172
|
break
|
|
143
|
-
|
|
173
|
+
#------------
|
|
144
174
|
if op_alvo:
|
|
145
175
|
R = op_alvo.rotation_matrix
|
|
146
176
|
t = op_alvo.translation_vector
|
|
147
177
|
celula = estrutura.lattice.matrix.T
|
|
148
|
-
|
|
178
|
+
#----------------------------------
|
|
149
179
|
try:
|
|
150
180
|
M = R - np.eye(3)
|
|
151
181
|
p_cart, *_ = np.linalg.lstsq(M, -t, rcond=None)
|
|
152
182
|
p_direto = np.linalg.solve(celula, p_cart)
|
|
153
|
-
|
|
183
|
+
#--------------------------------------------------------------
|
|
154
184
|
deslocamento_frac = np.array([-p_direto[0], -p_direto[1], 0.0])
|
|
155
185
|
print(f"Coordenadas diretas do eixo de rotação apropriado: ({p_direto[0]:.9f}, {p_direto[1]:.9f})")
|
|
156
186
|
print(f"Movendo arquivo original para a pasta 'POSCAR_original' e criando versão corrigida.")
|
|
157
|
-
|
|
187
|
+
#------------------------------------
|
|
158
188
|
estrutura_corrigida = estrutura.copy()
|
|
159
189
|
indices_dos_sites = list(range(len(estrutura_corrigida)))
|
|
160
190
|
estrutura_corrigida.translate_sites(indices_dos_sites, deslocamento_frac, frac_coords=True)
|
|
161
|
-
|
|
191
|
+
#----------------------------------------------------------------------
|
|
162
192
|
# Salvar o arquivo corrigido com o nome_original no diretório original.
|
|
163
193
|
Lattice_new_file = os.path.join(poscar_dir_path, name)
|
|
164
194
|
estrutura_corrigida.to(fmt="poscar", filename=Lattice_new_file)
|
|
165
|
-
|
|
166
195
|
print(f"-------------------------------------------------------------")
|
|
167
|
-
|
|
168
196
|
except np.linalg.LinAlgError:
|
|
169
197
|
print("ERRO: Não foi possível calcular o deslocamento devido a um erro numérico.")
|
|
170
|
-
|
|
198
|
+
#---------------------
|
|
171
199
|
except Exception as e:
|
|
172
200
|
print(f"Erro Crítico ao processar o file {name}: {e}")
|
|
173
|
-
if (
|
|
201
|
+
if (axis_correction > 0): sys.exit()
|
|
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
|
{samba_ilum-1.0.0.503 → samba_ilum-1.0.0.504}/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
|