SAMBA-ilum 1.0.0.416__tar.gz → 1.0.0.418__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.
Files changed (63) hide show
  1. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/PKG-INFO +1 -1
  2. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/PKG-INFO +1 -1
  3. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/SOURCES.txt +1 -0
  4. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/__main__.py +1 -1
  5. samba_ilum-1.0.0.418/samba_ilum/src/BZ_2D.py +163 -0
  6. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_xy-scan +1 -1
  7. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_xyz-scan +1 -1
  8. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_z-scan +1 -1
  9. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/data-base_json.py +11 -9
  10. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/job.py +4 -0
  11. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/xy-scan.py +2 -2
  12. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/xy-scan_analysis.py +31 -19
  13. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/setup.py +1 -1
  14. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/LICENSE.txt +0 -0
  15. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/README.md +0 -0
  16. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/dependency_links.txt +0 -0
  17. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/entry_points.txt +0 -0
  18. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/requires.txt +0 -0
  19. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/SAMBA_ilum.egg-info/top_level.txt +0 -0
  20. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/__init__.py +0 -0
  21. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/HeteroStructure_Generator.py +0 -0
  22. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_a-scan +0 -0
  23. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_bader +0 -0
  24. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_bader.SO +0 -0
  25. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_bands +0 -0
  26. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_bands.SO +0 -0
  27. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_dos +0 -0
  28. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_dos.SO +0 -0
  29. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_relax +0 -0
  30. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_scf +0 -0
  31. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/INCAR_scf.SO +0 -0
  32. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/SAMBA_HeteroStructure.input +0 -0
  33. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/SAMBA_WorkFlow.input +0 -0
  34. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.bands +0 -0
  35. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.chgcar +0 -0
  36. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.dos +0 -0
  37. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.location +0 -0
  38. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.locpot +0 -0
  39. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.orbitals +0 -0
  40. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/inputs_VASProcar/input.vasprocar.spin +0 -0
  41. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/INPUTS/vdw_kernel.bindat +0 -0
  42. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/_info_pseudo.py +0 -0
  43. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/a-scan.py +0 -0
  44. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/a-scan_analysis.py +0 -0
  45. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/bader +0 -0
  46. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/bader_poscar.py +0 -0
  47. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/bader_update.py +0 -0
  48. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/charge_transfer.py +0 -0
  49. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/chgsum.pl +0 -0
  50. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/contcar_update.py +0 -0
  51. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/data-base_union.py +0 -0
  52. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/energy_scan.py +0 -0
  53. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/kpoints.py +0 -0
  54. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/lattice_plot3d.py +0 -0
  55. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/make_files.py +0 -0
  56. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/output.py +0 -0
  57. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/potcar.py +0 -0
  58. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/vdW_DF.py +0 -0
  59. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/xyz-scan.py +0 -0
  60. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/xyz-scan_analysis.py +0 -0
  61. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/z-scan.py +0 -0
  62. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/samba_ilum/src/z-scan_analysis.py +0 -0
  63. {samba_ilum-1.0.0.416 → samba_ilum-1.0.0.418}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: SAMBA_ilum
3
- Version: 1.0.0.416
3
+ Version: 1.0.0.418
4
4
  Summary: ...
5
5
  Author: Augusto de Lelis Araujo
6
6
  Author-email: augusto-lelis@outlook.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: SAMBA_ilum
3
- Version: 1.0.0.416
3
+ Version: 1.0.0.418
4
4
  Summary: ...
5
5
  Author: Augusto de Lelis Araujo
6
6
  Author-email: augusto-lelis@outlook.com
@@ -10,6 +10,7 @@ SAMBA_ilum.egg-info/requires.txt
10
10
  SAMBA_ilum.egg-info/top_level.txt
11
11
  samba_ilum/__init__.py
12
12
  samba_ilum/__main__.py
13
+ samba_ilum/src/BZ_2D.py
13
14
  samba_ilum/src/HeteroStructure_Generator.py
14
15
  samba_ilum/src/_info_pseudo.py
15
16
  samba_ilum/src/a-scan.py
@@ -16,7 +16,7 @@ dir_samba = os.path.dirname(os.path.realpath(__file__))
16
16
  print(f'{dir_samba}')
17
17
  #--------------------
18
18
 
19
- version = '1.0.0.416'
19
+ version = '1.0.0.418'
20
20
 
21
21
  print(" ")
22
22
  print("=============================================================")
@@ -0,0 +1,163 @@
1
+ #-----------------
2
+ import numpy as np
3
+ import os
4
+ #----------------
5
+ import matplotlib
6
+ import matplotlib.colors as mcolors
7
+ import matplotlib.pyplot as plt
8
+ #--------------------------------
9
+ from scipy.spatial import Voronoi
10
+ #--------------------------------
11
+
12
+
13
+
14
+ #============================================================
15
+ # Extraindo o k-path usado no plot da Estrutura de Bandas ===
16
+ #============================================================
17
+ kpoints_file = []
18
+ kpath = []
19
+ #---------
20
+ if os.path.isdir('output/Bandas'): dir_kpath = 'bands'
21
+ if os.path.isdir('output/Bandas_SO'): dir_kpath = 'bands.SO'
22
+ #-----------------------------------------------------------------------------
23
+ if os.path.isfile(dir_kpath + '/' + 'KPOINTS'): kpoints_file.append('KPOINTS')
24
+ #--------------------------------------------------------------------------------------
25
+ nkpoints = len([file for file in os.listdir(dir_kpath) if file.startswith("KPOINTS.")])
26
+ for i in range(nkpoints):
27
+ file = 'KPOINTS.' + str(i+1)
28
+ if os.path.isfile(dir_kpath + '/' + file): kpoints_file.append(file)
29
+ #---------------------------------
30
+ for i in range(len(kpoints_file)):
31
+ #-----------------------------
32
+ with open(dir_kpath + '/' + kpoints_file[i], 'r') as file: lines = file.readlines()
33
+ #----------------------------------------------------------------------------------
34
+ if (len(kpoints_file) == 1):
35
+ for j in range(len(lines)):
36
+ if (j > 3 and len(lines[j]) > 1):
37
+ line = lines[j].split()
38
+ line[3] = line[3].replace('!', '').replace('#1', 'Gamma').replace('#', '')
39
+ if (line[3] == 'Gamma' or line[3] == 'gamma' or line[3] == 'G' or line[3] == 'g'): line[3] = '${\\Gamma}$'
40
+ kpath.append([float(line[0]), float(line[1]), float(line[2]), str(line[3])])
41
+ #-------------------------------------------------------------------------------------
42
+ if (len(kpoints_file) > 1):
43
+ for j in range(len(lines)):
44
+ if (i == 0 and j > 3 and len(lines[j]) > 1):
45
+ line = lines[j].split()
46
+ line[3] = line[3].replace('!', '').replace('#1', 'Gamma').replace('#', '')
47
+ kpath.append([float(line[0]), float(line[1]), float(line[2]), str(line[3])])
48
+ if (i > 0 and j > 4 and len(lines[j]) > 1):
49
+ line = lines[j].split()
50
+ line[3] = line[3].replace('!', '').replace('#1', 'Gamma').replace('#', '')
51
+ kpath.append([float(line[0]), float(line[1]), float(line[2]), str(line[3])])
52
+ #-----------------------------------------------------------------------------------------
53
+ # Removendo elementos adjacentes e repetidos da lista kpath
54
+ #----------------------------------------------------------
55
+ i = 0
56
+ while i < (len(kpath) -1):
57
+ if kpath[i] == kpath[i +1]: del kpath[i +1]
58
+ else: i += 1 # Avança para o próximo par de elementos
59
+ #---------------------------------------------------------
60
+ kpath_set = []
61
+ for sublista in kpath:
62
+ if sublista not in kpath_set:
63
+ kpath_set.append(sublista)
64
+ #---------------------------------
65
+
66
+
67
+
68
+ #============================================================
69
+ # Extraindo informações sobre as redes Direta e Recíproca ===
70
+ #============================================================
71
+ contcar = open(dir_kpath + '/CONTCAR', "r")
72
+ VTemp = contcar.readline().split()
73
+ n_materials = len(VTemp[1].replace('+', ' ').split())
74
+ t_label = VTemp[-1].replace('_', ' ').split(); label = t_label[0]
75
+ VTemp = contcar.readline(); a = float(VTemp)
76
+ VTemp = contcar.readline().split(); A1x = float(VTemp[0])*a; A1y = float(VTemp[1])*a; A1z = float(VTemp[2])*a
77
+ VTemp = contcar.readline().split(); A2x = float(VTemp[0])*a; A2y = float(VTemp[1])*a; A2z = float(VTemp[2])*a
78
+ VTemp = contcar.readline().split(); A3x = float(VTemp[0])*a; A3y = float(VTemp[1])*a; A3z = float(VTemp[2])*a
79
+ contcar.close()
80
+ #--------------------------------
81
+ ss1 = A1x*((A2y*A3z) - (A2z*A3y))
82
+ ss2 = A1y*((A2z*A3x) - (A2x*A3z))
83
+ ss3 = A1z*((A2x*A3y) - (A2y*A3x))
84
+ ss = ss1 + ss2 + ss3
85
+ #-------------------------------
86
+ B1x = ((A2y*A3z) - (A2z*A3y))/ss
87
+ B1y = ((A2z*A3x) - (A2x*A3z))/ss
88
+ B1z = ((A2x*A3y) - (A2y*A3x))/ss
89
+ B2x = ((A3y*A1z) - (A3z*A1y))/ss
90
+ B2y = ((A3z*A1x) - (A3x*A1z))/ss
91
+ B2z = ((A3x*A1y) - (A3y*A1x))/ss
92
+ B3x = ((A1y*A2z) - (A1z*A2y))/ss
93
+ B3y = ((A1z*A2x) - (A1x*A2z))/ss
94
+ B3z = ((A1x*A2y) - (A1y*A2x))/ss
95
+ #-------------------------------
96
+ ft = 6.2831853071795860
97
+ B1 = [B1x*ft, B1y*ft]
98
+ B2 = [B2x*ft, B2y*ft]
99
+ #--------------------
100
+
101
+
102
+
103
+ #============================================================
104
+ # Plot 2D da 1º Zona de Brillouin ===========================
105
+ #============================================================
106
+ fig, ax = plt.subplots()
107
+ #-----------------------
108
+
109
+ #-------------------------------------------------------------
110
+ # Construindo a BZ 2D usando Voronoi (Supercélula S) ---------
111
+ #-------------------------------------------------------------
112
+ nx, ny = 6, 6 # Número de pontos na grade
113
+ points = np.dot(np.mgrid[-nx:nx+1, -ny:ny+1].reshape(2, -1).T, np.array([B1, B2]))
114
+ vor = Voronoi(points)
115
+ #--------------------------------
116
+ # Plotando a zona de Brillouin 2D
117
+ #--------------------------------
118
+ for simplex in vor.ridge_vertices:
119
+ simplex = np.asarray(simplex)
120
+ if np.all(simplex >= 0): ax.plot(vor.vertices[simplex, 0], vor.vertices[simplex, 1], color = 'black', linewidth = 0.25, alpha = 0.5, zorder=4)
121
+ #-------------------------------------------------------------------------------------------------------------------------------------------------
122
+ plt.quiver(0, 0, B1[0], B1[1], angles='xy', scale_units='xy', scale=1.0, color='blue', alpha = 0.5, zorder=0)
123
+ plt.quiver(0, 0, B2[0], B2[1], angles='xy', scale_units='xy', scale=1.0, color='blue', alpha = 0.5, zorder=0)
124
+ plt.text(B1[0]*1.0, B1[1]*1.0, "B$_1$", fontsize=10, alpha = 1.0, color="black", zorder=1)
125
+ plt.text(B2[0]*1.0, B2[1]*1.0, "B$_2$", fontsize=10, alpha = 1.0, color="black", zorder=1)
126
+ #-----------------------------------------------------------------------------------------
127
+ for i in range(len(kpath) -1):
128
+ coord_x_1 = (kpath[i][0]*B1[0]) + (kpath[i][1]*B2[0]); coord_x_1 = float(coord_x_1)
129
+ coord_y_1 = (kpath[i][0]*B1[1]) + (kpath[i][1]*B2[1]); coord_y_1 = float(coord_y_1)
130
+ coord_x_2 = (kpath[i+1][0]*B1[0]) + (kpath[i+1][1]*B2[0]); coord_x_2 = float(coord_x_2) -coord_x_1
131
+ coord_y_2 = (kpath[i+1][0]*B1[1]) + (kpath[i+1][1]*B2[1]); coord_y_2 = float(coord_y_2) -coord_y_1
132
+ plt.quiver(coord_x_1, coord_y_1, coord_x_2, coord_y_2, angles='xy', scale_units='xy', scale=1.0, color='red', alpha = 0.5, zorder=2)
133
+ #---------------------------------------------------------------------------------------------------------------------------------------
134
+ initial_colors = ['black', 'red', 'blue', 'green', 'yellow', 'cyan', 'magenta']
135
+ all_colors = list(matplotlib.colors.CSS4_COLORS.keys())
136
+ remaining_colors = [color for color in all_colors if color not in initial_colors]
137
+ color_list = (initial_colors + remaining_colors)[:len(kpath_set)]
138
+ #----------------------------------------------------------------
139
+ for i in range(len(kpath_set)):
140
+ coord_x = (kpath_set[i][0]*B1[0]) + (kpath_set[i][1]*B2[0])
141
+ coord_y = (kpath_set[i][0]*B1[1]) + (kpath_set[i][1]*B2[1])
142
+ plt.scatter(coord_x, coord_y, c=color_list[i], marker='o', s=30, edgecolor='black', linewidth=0.5, label = str(kpath_set[i][3]), zorder=3)
143
+ #---------------------------------------------------------------------------------------------------------------------------------------------
144
+ plt.title('1º Brillouin Zone (' + label + ')')
145
+ plt.xlabel('kx (' + '${\AA}^{-1}$' + ' )')
146
+ plt.ylabel('ky (' + '${\AA}^{-1}$' + ' )')
147
+ #-----------------------------------------
148
+ x_range = [B1[0], -B1[0], B2[0], -B2[0]]
149
+ y_range = [B1[1], -B1[1], B2[1], -B2[1]]
150
+ x_min = min(x_range) - abs(min(x_range))*0.1
151
+ x_max = max(x_range) + abs(max(x_range))*0.1
152
+ y_min = min(y_range) - abs(min(y_range))*0.1
153
+ y_max = max(y_range) + abs(max(y_range))*0.1
154
+ #--------------------------------------------
155
+ plt.xlim((x_min, x_max))
156
+ plt.ylim((y_min, y_max))
157
+ #----------------------------------------------------
158
+ ax.legend(loc = "lower left", title = "", fontsize=8)
159
+ ax.set_box_aspect(abs((y_max - y_min) / (x_max - x_min)))
160
+ #------------------------------------------------------------------------------------------------------------------------
161
+ if os.path.isdir('output/Bandas'): plt.savefig('output/Brillouin_Zone.png', dpi = 600, bbox_inches='tight', pad_inches=0)
162
+ if os.path.isdir('output/Bandas_SO'): plt.savefig('output/Brillouin_Zone.png', dpi = 600, bbox_inches='tight', pad_inches=0)
163
+ #---------------------------------------------------------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  SYSTEM = "VASP"
2
2
  NELMIN = 4
3
- NELM = 60
3
+ NELM = 120
4
4
  EDIFF = 1E-6
5
5
  EDIFFG = -1E-3
6
6
  # replace_ispin
@@ -1,6 +1,6 @@
1
1
  SYSTEM = "VASP"
2
2
  NELMIN = 4
3
- NELM = 60
3
+ NELM = 120
4
4
  EDIFF = 1E-6
5
5
  EDIFFG = -1E-3
6
6
  # replace_ispin
@@ -1,6 +1,6 @@
1
1
  SYSTEM = "VASP"
2
2
  NELMIN = 4
3
- NELM = 60
3
+ NELM = 120
4
4
  EDIFF = 1E-6
5
5
  EDIFFG = -1E-3
6
6
  # replace_ispin
@@ -33,18 +33,19 @@ if os.path.isfile('output/info_bands_SO.txt'): l_file_SO = 'info_bands_SO.txt'
33
33
  if (l_file == 'null' and l_file_SO == 'null'): sys.exit(0)
34
34
 
35
35
 
36
- # =========================================================
36
+ #==========================================================
37
37
  # Extraindo o k-path para o plot da Estrutura de Bandas ===
38
- # =========================================================
38
+ #==========================================================
39
39
  kpoints_file = []
40
40
  kpath = []
41
41
  #---------
42
42
  if os.path.isdir('output/Bandas'): dir_kpath = 'bands'
43
43
  if os.path.isdir('output/Bandas.SO'): dir_kpath = 'bands.SO'
44
- #-----------------------------------------------------------
44
+ #-----------------------------------------------------------------------------
45
45
  if os.path.isfile(dir_kpath + '/' + 'KPOINTS'): kpoints_file.append('KPOINTS')
46
- #-------------------
47
- for i in range(100):
46
+ #--------------------------------------------------------------------------------------
47
+ nkpoints = len([file for file in os.listdir(dir_kpath) if file.startswith("KPOINTS.")])
48
+ for i in range(nkpoints):
48
49
  file = 'KPOINTS.' + str(i+1)
49
50
  if os.path.isfile(dir_kpath + '/' + file): kpoints_file.append(file)
50
51
  #---------------------------------
@@ -227,7 +228,7 @@ coord_ions = []
227
228
  for i in range(len(type_ions)):
228
229
  for j in range(int(type_ions_n[i])):
229
230
  VTemp = poscar.readline().split()
230
- coord_ions.append([ str(type_ions[i]), float(VTemp[0]), float(VTemp[1]), float(VTemp[2]) ])
231
+ coord_ions.append([ float(VTemp[0]), float(VTemp[1]), float(VTemp[2]), str(type_ions[i]) ])
231
232
  poscar.close()
232
233
 
233
234
 
@@ -708,7 +709,11 @@ for n in range(2):
708
709
  "supercell_matrix": supercell_matrix if n_materials > 1 else None,
709
710
  "deformation_matrix": deformation_matrix if n_materials > 1 else None,
710
711
  "strain_matrix": strain_matrix if n_materials > 1 else None,
712
+ # "structural_optimization": 'DFT', # 'none', 'DFT', 'ML', 'ML/DFT'
711
713
  "shift_plane": shift_plane if n_materials > 1 else None,
714
+ "z_separation": z_separation if n_materials > 1 else None,
715
+ "thickness": thickness,
716
+ "total_thickness": total_thickness,
712
717
  # ---------------------------------------------------------------------
713
718
  "lattice_type": lattice_type,
714
719
  "point_group": point_group,
@@ -721,9 +726,6 @@ for n in range(2):
721
726
  "vdW": vdW,
722
727
  "non_collinear": non_collinear,
723
728
  "spin_orbit": spin_orbit,
724
- "z_separation": z_separation if n_materials > 1 else None,
725
- "thickness": thickness,
726
- "total_thickness": total_thickness,
727
729
  # "param_a": param,
728
730
  "a1": a1,
729
731
  "a2": a2,
@@ -45,6 +45,10 @@ job = open(dir_out + '/job0.sh', "w")
45
45
  #====================================
46
46
  job.write(f'#!/bin/bash \n')
47
47
  job.write(f' \n')
48
+ job.write(f'cd $dir0 \n'
49
+ job.write(f'mv python_virtual python_virtual_delete \n'
50
+ job.write(f'rm -r python_virtual_delete \n'
51
+ job.write(f' \n')
48
52
  job.write(f'#------------------------------- \n')
49
53
  job.write(f'dir_virtual="{dir_virtual_python}" \n')
50
54
  job.write(f'# cp -r $dir_virtual $dir0/python_virtual \n')
@@ -78,8 +78,8 @@ for i in range(len(folders)): shutil.rmtree('folders[i]')
78
78
  poscar = open('POSCAR', "r")
79
79
  #---------------------------------
80
80
  line_0 = poscar.readline().split()
81
- if (line_0[-5] == 'Shift_plane'): shift = str(line_0[-5])
82
- if (line_0[-5] != 'Shift_plane'): shift = '0.0_0.0'
81
+ if (line_0[-7] == 'Shift_plane'): shift = str(line_0[-5])
82
+ if (line_0[-7] != 'Shift_plane'): shift = '0.0_0.0'
83
83
  #-----------------------------------------------
84
84
  VTemp = poscar.readline(); param = float(VTemp)
85
85
  VTemp = poscar.readline().split(); A1x = float(VTemp[0]); A1y = float(VTemp[1]); A1z = float(VTemp[2])
@@ -23,6 +23,7 @@ from matplotlib import pyplot as plt
23
23
  import matplotlib.ticker as ticker
24
24
  from mpl_toolkits.mplot3d.axes3d import Axes3D
25
25
  from matplotlib.ticker import LinearLocator, FormatStrFormatter
26
+ import matplotlib.patheffects as path_effects
26
27
  import matplotlib.colors as mcolors
27
28
  #----------------------------------
28
29
 
@@ -69,14 +70,10 @@ delta = date_shift[line]
69
70
  delta_min = delta.replace('_', ' ').split()
70
71
  a1_min = float(delta_min[0])
71
72
  a2_min = float(delta_min[1])
72
- x_min = (a1_min*A1x) + (a2_min*A2x)
73
- y_min = (a1_min*A1y) + (a2_min*A2y)
74
- #----------------------------------
73
+ #--------------------------------
75
74
  if (a1_min == -0.0): a1_min = 0.0
76
75
  if (a2_min == -0.0): a2_min = 0.0
77
- if (x_min == -0.0): x_min = 0.0
78
- if (y_min == -0.0): y_min = 0.0
79
- #-------------------------------
76
+ #--------------------------------
80
77
 
81
78
 
82
79
  #===============================================
@@ -102,7 +99,7 @@ for i in range(len(date_shift)):
102
99
  t_shift_A1 = shift_A1 -a1_min +shift[j]
103
100
  t_shift_A2 = shift_A2 -a2_min +shift[k]
104
101
  if (t_shift_A1 >= -0.2 and t_shift_A1 <= 1.2):
105
- if (t_shift_A2 >= -0.2 and t_shift_A2 <= 1.2):
102
+ if (t_shift_A2 >= -0.2 and t_shift_A2 <= 1.2):
106
103
  file.write(f'{t_shift_A1}_{t_shift_A2} {(date_E[i]*1000)/Area} \n')
107
104
  #-----------
108
105
  file.close()
@@ -126,7 +123,7 @@ file = open('xy-scan_direct.dat', "w")
126
123
  for i in range(len(date_shift)):
127
124
  VTemp = str(date_shift[i])
128
125
  VTemp = VTemp.replace('_', ' ')
129
- file.write(f'{VTemp} {(date_E[i]*1000)/Area} \n')
126
+ file.write(f'{VTemp} {date_E[i]} \n')
130
127
  #-----------
131
128
  file.close()
132
129
  #-----------
@@ -140,7 +137,7 @@ for i in range(len(date_shift)):
140
137
  VTemp = VTemp.replace('_', ' ').split()
141
138
  Coord_X = ((float(VTemp[0])*A1x) + (float(VTemp[1])*A2x))
142
139
  Coord_Y = ((float(VTemp[0])*A1y) + (float(VTemp[1])*A2y))
143
- file.write(f'{Coord_X} {Coord_Y} {(date_E[i]*1000)/Area} \n')
140
+ file.write(f'{Coord_X} {Coord_Y} {date_E[i]} \n')
144
141
  #-----------
145
142
  file.close()
146
143
  #-----------
@@ -225,14 +222,14 @@ cmap_gray = (mpl.colors.ListedColormap(['darkgray', 'darkgray']))
225
222
  #-----------------------
226
223
  fig, ax = plt.subplots()
227
224
  cp = plt.contourf(x_grid, y_grid, (e2_grid -E_min), levels = n_contour, cmap = 'jet', alpha = 1.0, antialiased = True)
228
- plt.quiver(0, 0, A1x, A1y, angles='xy', scale_units='xy', scale=1, color='black', label='A$_1$')
229
- plt.quiver(0, 0, A2x, A2y, angles='xy', scale_units='xy', scale=1, color='black', label='A$_2$')
225
+ plt.quiver(0, 0, A1x, A1y, angles='xy', scale_units='xy', scale=1, color='red', label='A$_1$', linewidth=0.1, edgecolor='black')
226
+ plt.quiver(0, 0, A2x, A2y, angles='xy', scale_units='xy', scale=1, color='red', label='A$_2$', linewidth=0.1, edgecolor='black')
230
227
  plt.plot([A1x, (A1x+A2x)], [A1y, (A1y+A2y)], color = 'black', linewidth = 1.0, zorder=3)
231
228
  plt.plot([A2x, (A1x+A2x)], [A2y, (A1y+A2y)], color = 'black', linewidth = 1.0, zorder=3)
232
- plt.text((A1x/2), (A1y/2), "A$_1$", fontsize=10, color="black")
233
- plt.text((A2x/2), (A2y/2), "A$_2$", fontsize=10, color="black")
234
- # plt.scatter(delta_X, delta_Y, c='black', marker='o', s=2)
235
- # plt.scatter(x_min, y_min, c='black', marker='o', s=2)
229
+ text1 = plt.text((A1x/2), (A1y/2), "A$_1$", fontsize=10, color="red")
230
+ text2 = plt.text((A2x/2), (A2y/2), "A$_2$", fontsize=10, color="red")
231
+ text1.set_path_effects([path_effects.Stroke(linewidth=0.2, foreground='black'), path_effects.Normal()])
232
+ text2.set_path_effects([path_effects.Stroke(linewidth=0.2, foreground='black'), path_effects.Normal()])
236
233
  cbar = fig.colorbar(cp, orientation = 'vertical', shrink = 1.0)
237
234
  #-------------------
238
235
  plt.title('xy-scan')
@@ -255,16 +252,31 @@ shutil.copyfile(str(delta) + '/CONTCAR', 'CONTCAR')
255
252
  #--------------------------------------------------
256
253
 
257
254
 
255
+ #-----------------------------
256
+ contcar = open('CONTCAR', "r")
257
+ #----------------------------------
258
+ line_0 = contcar.readline().split()
259
+ if (line_0[-7] == 'Shift_plane'):
260
+ shift_0 = str(line_0[-5])
261
+ shift_0 = shift_0.replace('_', ' ').split()
262
+ #------------------------------------------
263
+ shift_A1 = float(shift_0[0])
264
+ shift_A2 = float(shift_0[1])
265
+ shift_X = (shift_A1*A1x) + (shift_A2*A2x)
266
+ shift_Y = (shift_A1*A1y) + (shift_A2*A2y)
267
+ #----------------------------------------
268
+ contcar.close()
269
+ #--------------
270
+
271
+
258
272
  #=====================================================
259
273
  info = open('info_xy-scan.dat', "w", encoding='utf-8')
260
274
  info.write(f'====================================================== \n')
261
275
  info.write(f'Displacement carried out over the 2nd material lattice \n')
262
276
  #------------------------------------------------------------------
263
- info.write(f'Displacement_XY = ({x_min}, {y_min}) in Å \n')
264
- info.write(f'Displacement_XY = ({a1_min}*A1, {a2_min}*A2) \n')
277
+ info.write(f'Displacement_XY = ({shift_X}, {shift_Y}) in Å \n')
278
+ info.write(f'Displacement_XY = ({shift_A1}*A1, {shift_A2}*A2) \n')
265
279
  #----------------------------------------------------------------
266
- # info.write(f'Displacement_XY = ({delta_X}, {delta_Y}) in Å \n')
267
- # info.write(f'Displacement_XY = ({delta_A1}*A1, {delta_A2}*A2) \n')
268
280
  info.write(f'------------------------------------------------------ \n')
269
281
  info.write(f'ΔE = {Delta_E_meV:.12f} meV/Å^2 or {Delta_E_J:.12f} J/m^2 \n')
270
282
  info.write(f'====================================================== \n')
@@ -6,7 +6,7 @@ import json
6
6
 
7
7
  setup(
8
8
  name = "SAMBA_ilum",
9
- version = "1.0.0.416",
9
+ version = "1.0.0.418",
10
10
  entry_points={'console_scripts': ['samba_ilum = samba_ilum:main']},
11
11
  description = "...",
12
12
  author = "Augusto de Lelis Araujo",
File without changes
File without changes