vasprocar 1.1.19.141__tar.gz → 1.1.19.143__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.
Potentially problematic release.
This version of vasprocar might be problematic. Click here for more details.
- {vasprocar-1.1.19.141/vasprocar.egg-info → vasprocar-1.1.19.143}/PKG-INFO +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/setup.py +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/__main__.py +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_pdos_ldos.py +1 -1
- vasprocar-1.1.19.143/vasprocar/src/_TESTE_projecao_localizacao_contour_video.py +565 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_settings.py +14 -1
- vasprocar-1.1.19.143/vasprocar/src/etc/codes_append/Gerador_Slab.py +22 -0
- vasprocar-1.1.19.143/vasprocar/src/etc/codes_append/Projection_BZs.py +161 -0
- vasprocar-1.1.19.143/vasprocar/src/etc/codes_append/Projection_kpoints.py +208 -0
- vasprocar-1.1.19.143/vasprocar/src/etc/codes_append/VASProcar_Direto_Cartesiano.py +108 -0
- vasprocar-1.1.19.143/vasprocar/src/plot/_TESTE_plot_projecao_localizacao_contour_video.py +414 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_contour_video.py +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/spin_texture_contour_video.py +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143/vasprocar.egg-info}/PKG-INFO +1 -1
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar.egg-info/SOURCES.txt +6 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/LICENSE.txt +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/README.md +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/setup.cfg +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/__init__.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/_info.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/_info_b.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/_label.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/_nscf.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/_var_kpoints.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/angular_momentum_plot/plot_projecao_angular_momentum.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/angular_momentum_plot/plot_projecao_angular_momentum_grace.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/contribuicao.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_plot/Grace/plot_dos_pdos_ldos.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_plot/Grace/plot_dos_pdos_ldos_[polarizado].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_plot/Grace/plot_dos_pdos_ldos_[polarizado_delta].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_plot/plot_dos_pdos_ldos.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/dos_plot/plot_dos_pdos_ldos_[polarizado].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/kpoints_2D_3D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_QE/projecao_angular_momentum.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/_info.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/_info_b.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/_label.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/_nscf.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/_var_kpoints.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/chgcar.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/contcar_info.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/contribuicao.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/dielectric_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/dos_pdos_ldos.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/dos_pdos_ldos_[polarizado].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/kpoints_2D_3D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/parchg.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/poscar_replace.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/postar_combination.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/potencial.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_VASP/wave_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_dft.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_dft2kp.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_loop.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/_update.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/bandas_2D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/bandas_3D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/bandas_4D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/correction_file.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/etc/BibTeX.dat +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/etc/DOI.png +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/etc/Greek_alphabet.jpg +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/fermi_surface.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.bands +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.chgcar +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.dos +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.fermi_surface +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.location +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.locpot +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.orbitals +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.spin +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/input.vasprocar.spin_video +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/inputs.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/inputs/inputs_files.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/level_countour.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/orbital_texture.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/orbital_texture_vector.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_bandas_2D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_chgcar.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_dielectric_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_dos_pdos_ldos.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_dos_pdos_ldos_[polarizado].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_dos_pdos_ldos_[polarizado_delta].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_parchg.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_potencial.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_projecao_localizacao.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_projecao_orbitais.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_projecao_psi.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_projecao_spin.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/Grace/plot_wave_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/_plot_settings.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_bandas_2D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_bandas_3D_matplotlib.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_bandas_3D_plotly.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_bandas_4D_plotly.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_chgcar.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_dielectric_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_dos_pdos_ldos.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_dos_pdos_ldos_[polarizado].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_fermi_surface.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_level_countour.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_orbital_texture.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_orbital_texture_vector.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_parchg.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_potencial.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_projecao_localizacao.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_projecao_orbitais.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_projecao_psi.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_projecao_spin.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_2D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_3D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_4D.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_4D_[iso].py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_spin_texture_contour.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/plot/plot_wave_function.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/projecao_localizacao.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/projecao_orbitais.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/projecao_psi.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/projecao_spin.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/spin_texture.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar/src/spin_texture_contour.py +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar.egg-info/dependency_links.txt +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar.egg-info/entry_points.txt +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar.egg-info/requires.txt +0 -0
- {vasprocar-1.1.19.141 → vasprocar-1.1.19.143}/vasprocar.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vasprocar
|
|
3
|
-
Version: 1.1.19.
|
|
3
|
+
Version: 1.1.19.143
|
|
4
4
|
Summary: VASProcar is an open-source package written in the Python 3 programming language, which aims to provide an intuitive tool for the post-processing of the output files produced by the DFT VASP/QE codes, through an interactive user interface.
|
|
5
5
|
Home-page: https://doi.org/10.5281/zenodo.6343960
|
|
6
6
|
Download-URL: https://doi.org/10.5281/zenodo.6343960
|
|
@@ -6,7 +6,7 @@ from typing import Optional
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name = "vasprocar",
|
|
9
|
-
version = "1.1.19.
|
|
9
|
+
version = "1.1.19.143",
|
|
10
10
|
entry_points={'console_scripts': ['vasprocar = vasprocar:main']},
|
|
11
11
|
description = "VASProcar is an open-source package written in the Python 3 programming language, which aims to provide an intuitive tool for the post-processing of the output files produced by the DFT VASP/QE codes, through an interactive user interface.",
|
|
12
12
|
author = "Augusto de Lelis Araujo and Renan da Paixao Maciel",
|
|
@@ -14,7 +14,7 @@ dir_vasprocar = os.path.dirname(os.path.realpath(__file__))
|
|
|
14
14
|
print(f'{dir_vasprocar}')
|
|
15
15
|
#------------------------
|
|
16
16
|
|
|
17
|
-
version = '1.1.19.
|
|
17
|
+
version = '1.1.19.143'
|
|
18
18
|
VASProcar_name = 'VASProcar version ' + version
|
|
19
19
|
|
|
20
20
|
url_1 = 'https://pypi.org/project/vasprocar'
|
|
@@ -509,7 +509,7 @@ linha += 1; lines.insert(linha, '\n')
|
|
|
509
509
|
linha += 1; lines.insert(linha, f'n_procar = {n_procar}; nk = {nk}; x_inicial = {x_inicial}; x_final = {x_final}; energ_min = {y_inicial}; energ_max = {y_final}; lorbit = {lorbit}; esc = {esc} \n')
|
|
510
510
|
linha += 1; lines.insert(linha, f'Efermi = {Efermi} # Fermi energy from DFT outpout file \n')
|
|
511
511
|
linha += 1; lines.insert(linha, f'esc_fermi = {esc_fermi} # Would you like to shift the Fermi level? [0] No, use the value obtained from VASP [1] Yes, shift the Fermi level to 0.0 eV \n')
|
|
512
|
-
linha += 1; lines.insert(linha, f'save_png = {save_png};
|
|
512
|
+
linha += 1; lines.insert(linha, f'save_png = {save_png}; save_pdf = {save_pdf}; save_svg = {save_svg}; save_eps = {save_eps} # Plotting output format, onde [0] = NO e [1] = YES \n')
|
|
513
513
|
linha += 1; lines.insert(linha, '\n')
|
|
514
514
|
linha += 1; lines.insert(linha, '#===================================================================== \n')
|
|
515
515
|
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
# VASProcar Copyright (C) 2023
|
|
2
|
+
# GNU GPL-3.0 license
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
|
|
6
|
+
def execute_python_file(filename: str):
|
|
7
|
+
return exec(open(main_dir + str(filename)).read(), globals())
|
|
8
|
+
|
|
9
|
+
#-----------------------------------------------------------------------
|
|
10
|
+
# Check whether the folder 'Spin_Texture' exists -----------------------
|
|
11
|
+
#-----------------------------------------------------------------------
|
|
12
|
+
if os.path.isdir(dir_files + '/output/Spin_Texture'):
|
|
13
|
+
0 == 0
|
|
14
|
+
else:
|
|
15
|
+
os.mkdir(dir_files + '/output/Spin_Texture')
|
|
16
|
+
#----------------------------------------------
|
|
17
|
+
|
|
18
|
+
#-----------------------------------------------------------------------
|
|
19
|
+
# Check whether the folder 'figures' exists ----------------------------
|
|
20
|
+
#-----------------------------------------------------------------------
|
|
21
|
+
if os.path.isdir(dir_files + '/output/Spin_Texture/figures'):
|
|
22
|
+
0 == 0
|
|
23
|
+
else:
|
|
24
|
+
os.mkdir(dir_files + '/output/Spin_Texture/figures')
|
|
25
|
+
#------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
#======================================================================
|
|
28
|
+
# Getting the input parameters ========================================
|
|
29
|
+
#======================================================================
|
|
30
|
+
execute_python_file(filename = DFT + '_info.py')
|
|
31
|
+
|
|
32
|
+
#======================================================================
|
|
33
|
+
# Analyzing the variation of the coordinates of the K-points ==========
|
|
34
|
+
#======================================================================
|
|
35
|
+
execute_python_file(filename = DFT + '_var_kpoints.py')
|
|
36
|
+
|
|
37
|
+
soma_1 = dk[0] + dk[1] + dk[2]
|
|
38
|
+
soma_2 = dk[3] + dk[4] + dk[5]
|
|
39
|
+
|
|
40
|
+
if (soma_1 != 2 and soma_2 != 2):
|
|
41
|
+
print ("============================================================")
|
|
42
|
+
print ("!!! ERROR !!! ")
|
|
43
|
+
print ("============================================================")
|
|
44
|
+
print ("The calculation performed does not correspond to a 2D plan ")
|
|
45
|
+
print ("in the BZ. kikj-plan (i,j = x,y,z or i,j = 1,2,3) ")
|
|
46
|
+
print ("------------------------------------------------------------")
|
|
47
|
+
print ("Please, use the option [665] to get the correct KPOINTS file")
|
|
48
|
+
print ("============================================================")
|
|
49
|
+
confirmacao = input (" ")
|
|
50
|
+
exit()
|
|
51
|
+
|
|
52
|
+
#======================================================================
|
|
53
|
+
# Getting the input parameters ========================================
|
|
54
|
+
#======================================================================
|
|
55
|
+
|
|
56
|
+
if (len(inputs) == 0):
|
|
57
|
+
|
|
58
|
+
print ("##############################################################")
|
|
59
|
+
print ("## Which Spin component or vector should be analyzed? ===== ##")
|
|
60
|
+
print ("##############################################################")
|
|
61
|
+
print ("## [1] Sx [2] Sy [3] Sz =========================== ##")
|
|
62
|
+
print ("## [4] SxSy [5] SxSz [6] SySz ========================= ##")
|
|
63
|
+
print ("##############################################################")
|
|
64
|
+
tipo_spin = input (" "); tipo_spin = int(tipo_spin)
|
|
65
|
+
print (" ")
|
|
66
|
+
|
|
67
|
+
if (escolha == -1 and len(inputs) == 0):
|
|
68
|
+
|
|
69
|
+
print ("##############################################################")
|
|
70
|
+
print ("Regarding the bands, what do you want to analyze? ============")
|
|
71
|
+
print ("[0] Plot all bands on the Fermi Surface ======================")
|
|
72
|
+
print ("[1] Plot a selected range of bands on Sup. from Fermi ========")
|
|
73
|
+
print ("##############################################################")
|
|
74
|
+
esc_band = input (" "); esc_band = int(esc_band)
|
|
75
|
+
print (" ")
|
|
76
|
+
|
|
77
|
+
if (esc_band == 1):
|
|
78
|
+
print ("##############################################################")
|
|
79
|
+
print ("Inform the Band interval to be plotted: ===================== ")
|
|
80
|
+
print ("--------------------------------------------------------------")
|
|
81
|
+
print ("Examples: ")
|
|
82
|
+
print ("Initial_band Final_band: 5:27 ")
|
|
83
|
+
print ("Initial_band Final_band: 13:49 ")
|
|
84
|
+
print ("Initial_band Final_band: 7:7 or 7* ")
|
|
85
|
+
print ("##############################################################")
|
|
86
|
+
bands_range = input ("Initial_band Final_band: ")
|
|
87
|
+
print (" ")
|
|
88
|
+
#------------------------------------------------------------------------------------------
|
|
89
|
+
selected_bands = bands_range.replace(':', ' ').replace('-', ' ').replace('*', ' *').split()
|
|
90
|
+
#------------------------------------------------------------------------------------------
|
|
91
|
+
if (selected_bands[1] == "*"):
|
|
92
|
+
Band_i = int(selected_bands[0])
|
|
93
|
+
Band_f = Band_i
|
|
94
|
+
if (selected_bands[1] != "*"):
|
|
95
|
+
Band_i = int(selected_bands[0])
|
|
96
|
+
Band_f = int(selected_bands[1])
|
|
97
|
+
#---------------------------------
|
|
98
|
+
|
|
99
|
+
print ("#######################################################################")
|
|
100
|
+
print ("Do you want to select over which orbitals the spin components =========")
|
|
101
|
+
print ("(Sx|Sy|Sz) will be projected? =========================================")
|
|
102
|
+
print ("[0] NOT ")
|
|
103
|
+
print ("[1] YES ")
|
|
104
|
+
print ("#######################################################################")
|
|
105
|
+
p_orb_spin = input (" "); p_orb_spin = int(p_orb_spin)
|
|
106
|
+
print (" ")
|
|
107
|
+
|
|
108
|
+
if (p_orb_spin == 1):
|
|
109
|
+
Orb_spin = [0]*16
|
|
110
|
+
print ("##############################################################")
|
|
111
|
+
print ("Ions and orbitals can be added in any order ------------------")
|
|
112
|
+
print ("==============================================================")
|
|
113
|
+
print ("Use the nomenclature below to designate Orbitals: ")
|
|
114
|
+
if (n_orb == 3): print ("s p d")
|
|
115
|
+
if (n_orb == 4): print ("s p d f")
|
|
116
|
+
if (n_orb == 9): print ("s p d px py pz dxy dyz dz2 dxz dx2")
|
|
117
|
+
if (n_orb == 16): print ("s p d f px py pz dxy dyz dz2 dxz dx2 fyx2 fxyz fyz2 fzz2 fxz2 fzx2 fxx2")
|
|
118
|
+
print ("==============================================================")
|
|
119
|
+
print ("Enter the selected orbitals as in the examples below =========")
|
|
120
|
+
print ("------------------------------------------------------------- ")
|
|
121
|
+
print ("Orbitals_Spin s ")
|
|
122
|
+
print ("Orbitals_Spin px py dxy fxyz ")
|
|
123
|
+
print ("Orbitals_Spin s p d f ")
|
|
124
|
+
print ("##############################################################")
|
|
125
|
+
orb_io = input ("Orbitals_Spin ").replace(':', ' ').replace('-', ' ').replace('*', ' *').split( )
|
|
126
|
+
print (" ")
|
|
127
|
+
|
|
128
|
+
if ((escolha == -1 and p_orb_spin == 1) or (len(inputs) != 0 and p_orb_spin == 1)):
|
|
129
|
+
for i in range(len(orb_io)):
|
|
130
|
+
if (orb_io[i] == 's' or orb_io[i] == 'S'): Orb_spin[0] = 1
|
|
131
|
+
if (orb_io[i] == 'p' or orb_io[i] == 'P'): Orb_spin[1] = 1; Orb_spin[2] = 1; Orb_spin[3] = 1
|
|
132
|
+
if (orb_io[i] == 'd' or orb_io[i] == 'D'): Orb_spin[4] = 1; Orb_spin[5] = 1; Orb_spin[6] = 1; Orb_spin[7] = 1; Orb_spin[8] = 1
|
|
133
|
+
if (orb_io[i] == 'f' or orb_io[i] == 'F'): Orb_spin[9] = 1; Orb_spin[10] = 1; Orb_spin[11] = 1; Orb_spin[12] = 1; Orb_spin[13] = 1; Orb_spin[14] = 1; Orb_spin[1] = 1
|
|
134
|
+
#--------------------------------------------------------------------------------
|
|
135
|
+
if (orb_io[i] == 'py' or orb_io[i] == 'Py' or orb_io[i] == 'PY'): Orb_spin[1] = 1
|
|
136
|
+
if (orb_io[i] == 'pz' or orb_io[i] == 'Pz' or orb_io[i] == 'PZ'): Orb_spin[2] = 1
|
|
137
|
+
if (orb_io[i] == 'px' or orb_io[i] == 'Px' or orb_io[i] == 'PX'): Orb_spin[3] = 1
|
|
138
|
+
#-----------------------------------------------------------------------------------
|
|
139
|
+
if (orb_io[i] == 'dxy' or orb_io[i] == 'Dxy' or orb_io[i] == 'DXY'): Orb_spin[4] = 1
|
|
140
|
+
if (orb_io[i] == 'dyz' or orb_io[i] == 'Dyz' or orb_io[i] == 'DYZ'): Orb_spin[5] = 1
|
|
141
|
+
if (orb_io[i] == 'dz2' or orb_io[i] == 'Dz2' or orb_io[i] == 'DZ2'): Orb_spin[6] = 1
|
|
142
|
+
if (orb_io[i] == 'dxz' or orb_io[i] == 'Dxz' or orb_io[i] == 'DXZ'): Orb_spin[7] = 1
|
|
143
|
+
if (orb_io[i] == 'dx2' or orb_io[i] == 'Dx2' or orb_io[i] == 'DX2'): Orb_spin[8] = 1
|
|
144
|
+
#---------------------------------------------------------------------------------------
|
|
145
|
+
if (orb_io[i] == 'fyx2' or orb_io[i] == 'Fyx2' or orb_io[i] == 'FYX2'): Orb_spin[9] = 1
|
|
146
|
+
if (orb_io[i] == 'fxyz' or orb_io[i] == 'Fxyz' or orb_io[i] == 'FXYZ'): Orb_spin[10] = 1
|
|
147
|
+
if (orb_io[i] == 'fyz2' or orb_io[i] == 'Fyz2' or orb_io[i] == 'FYZ2'): Orb_spin[11] = 1
|
|
148
|
+
if (orb_io[i] == 'fzz2' or orb_io[i] == 'Fzz2' or orb_io[i] == 'FZZ2'): Orb_spin[12] = 1
|
|
149
|
+
if (orb_io[i] == 'fxz2' or orb_io[i] == 'Fxz2' or orb_io[i] == 'FXZ2'): Orb_spin[13] = 1
|
|
150
|
+
if (orb_io[i] == 'fzx2' or orb_io[i] == 'Fzx2' or orb_io[i] == 'FZX2'): Orb_spin[14] = 1
|
|
151
|
+
if (orb_io[i] == 'fxx2' or orb_io[i] == 'Fxx2' or orb_io[i] == 'FXX2'): Orb_spin[15] = 1
|
|
152
|
+
|
|
153
|
+
if (escolha == -1 and len(inputs) == 0):
|
|
154
|
+
print ("##############################################################")
|
|
155
|
+
print ("with respect to energy, would you like? ======================")
|
|
156
|
+
print ("[0] Use the default energy value from DFT output =============")
|
|
157
|
+
print ("[1] Shift the Fermi level to 0.0 eV =========================")
|
|
158
|
+
print ("##############################################################")
|
|
159
|
+
esc_fermi = input (" "); esc_fermi = int(esc_fermi)
|
|
160
|
+
print (" ")
|
|
161
|
+
|
|
162
|
+
if (len(inputs) == 0):
|
|
163
|
+
print ("##############################################################")
|
|
164
|
+
print ("What is the number of Level Contours you want to obtain? =====")
|
|
165
|
+
print ("##############################################################")
|
|
166
|
+
n_contour = input (" "); n_contour = int(n_contour)
|
|
167
|
+
print(" ")
|
|
168
|
+
|
|
169
|
+
if (n_contour <= 0):
|
|
170
|
+
n_contour = 1
|
|
171
|
+
|
|
172
|
+
if (len(inputs) == 0):
|
|
173
|
+
print ("##############################################################")
|
|
174
|
+
print ("Regarding the energies of the Level Contours: ================")
|
|
175
|
+
print ("[0] Must be obtained automatically by code ===================")
|
|
176
|
+
print ("[1] Must sweep a certain range of energy =====================")
|
|
177
|
+
print ("[2] I want to specify each energy value manually =============")
|
|
178
|
+
print ("##############################################################")
|
|
179
|
+
tipo_contour = input (" "); tipo_contour = int(tipo_contour)
|
|
180
|
+
print(" ")
|
|
181
|
+
|
|
182
|
+
if (tipo_contour == 1 and len(inputs) == 0):
|
|
183
|
+
print ("##############################################################")
|
|
184
|
+
print ("Choose the Energy range to be analyzed: ===================== ")
|
|
185
|
+
print ("Type as in the examples below =============================== ")
|
|
186
|
+
print ("--------------------------------------------------------------")
|
|
187
|
+
print ("Initial_energ Final_Energ: -4.5 6.9 ")
|
|
188
|
+
print ("Initial_energ Final_Energ: 0.0 5.5 ")
|
|
189
|
+
print ("##############################################################")
|
|
190
|
+
print (" ")
|
|
191
|
+
energ_i, energ_f = input ("Initial_energ Final_Energ: ").split()
|
|
192
|
+
energ_i = float(energ_i)
|
|
193
|
+
energ_f = float(energ_f)
|
|
194
|
+
print (" ")
|
|
195
|
+
|
|
196
|
+
if (tipo_contour == 2 and len(inputs) == 0):
|
|
197
|
+
#-------------------------
|
|
198
|
+
levels_n = [0.0]*n_contour
|
|
199
|
+
#-------------------------
|
|
200
|
+
print ("##############################################################")
|
|
201
|
+
print ("Enter Energy values as in the examples below ================ ")
|
|
202
|
+
print ("--------------------------------------------------------------")
|
|
203
|
+
print ("Energies: -4.5 -2.0 -1.0 0.0 1.0 3.0 5.0 ")
|
|
204
|
+
print ("Energies: 0.2 0.5 0.78 1.23 9.97 ")
|
|
205
|
+
print ("--------------------------------------------------------------")
|
|
206
|
+
print ("!!! important note !!! ====================================== ")
|
|
207
|
+
print ("Always enter energy values in ascending order =============== ")
|
|
208
|
+
print ("##############################################################")
|
|
209
|
+
print (" ")
|
|
210
|
+
levels_n = input ("Energies: ").split()
|
|
211
|
+
for i in range(n_contour):
|
|
212
|
+
levels_n[i] = float(levels_n[i])
|
|
213
|
+
print (" ")
|
|
214
|
+
|
|
215
|
+
#--------------------------------------------------------------------------
|
|
216
|
+
|
|
217
|
+
if (escolha == -1 and len(inputs) == 0):
|
|
218
|
+
print ("##############################################################")
|
|
219
|
+
print ("What do you want to analyze? =================================")
|
|
220
|
+
print ("[0] Analyze all ions in the lattice ==========================")
|
|
221
|
+
print ("[1] Analyze selected Ions ====================================")
|
|
222
|
+
print ("##############################################################")
|
|
223
|
+
esc_ions = input (" "); esc_ions = int(esc_ions)
|
|
224
|
+
print (" ")
|
|
225
|
+
|
|
226
|
+
if (escolha == -1 and len(inputs) == 0):
|
|
227
|
+
#------------------
|
|
228
|
+
if (esc_ions == 1):
|
|
229
|
+
|
|
230
|
+
#-------------------------
|
|
231
|
+
sim_nao = ["nao"]*(ni + 1)
|
|
232
|
+
#-------------------------
|
|
233
|
+
|
|
234
|
+
print ("################################################################")
|
|
235
|
+
print ("Choose the ions_ranges to be analyzed: ======================== ")
|
|
236
|
+
print ("Type as in the examples below ================================= ")
|
|
237
|
+
print ("----------------------------------------------------------------")
|
|
238
|
+
print ("The order in which the ions are added does not change the result")
|
|
239
|
+
print ("----------------------------------------------------------------")
|
|
240
|
+
print ("ions_ranges 1:5 3:9 11* 15:27 ")
|
|
241
|
+
print ("ions_ranges 7:49 50:53 ")
|
|
242
|
+
print ("ions_ranges 1* 3* 6:9 ")
|
|
243
|
+
print ("################################################################")
|
|
244
|
+
ion_range = input ("ions_ranges ")
|
|
245
|
+
print (" ")
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
if ((escolha == -1 and esc_ions == 1) or (len(inputs) != 0 and esc_ions == 1)):
|
|
249
|
+
#----------------------------------------------------------------------------------------
|
|
250
|
+
selected_ions = ion_range.replace(':', ' ').replace('-', ' ').replace('*', ' *').split( )
|
|
251
|
+
loop = int(len(selected_ions)/2)
|
|
252
|
+
#----------------------------------------------------------------------------------------
|
|
253
|
+
|
|
254
|
+
for i in range (1,(loop+1)):
|
|
255
|
+
#------------------------------------------------------
|
|
256
|
+
loop_i = int(selected_ions[(i-1)*2])
|
|
257
|
+
if (selected_ions[((i-1)*2) +1] == "*"):
|
|
258
|
+
selected_ions[((i-1)*2) +1] = selected_ions[(i-1)*2]
|
|
259
|
+
loop_f = int(selected_ions[((i-1)*2) +1])
|
|
260
|
+
#----------------------------------------------------------------------------------------
|
|
261
|
+
if ((loop_i > ni) or (loop_f > ni) or (loop_i < 0) or (loop_f < 0) or (loop_i > loop_f)):
|
|
262
|
+
print (" ")
|
|
263
|
+
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
|
|
264
|
+
print ("ERROR: The informed ion values are incorrect %%%%%%%%%%%%%")
|
|
265
|
+
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
|
|
266
|
+
confirmacao = input (" ")
|
|
267
|
+
exit()
|
|
268
|
+
#----------------------------------------------------------------------
|
|
269
|
+
for j in range(loop_i, (loop_f + 1)):
|
|
270
|
+
sim_nao[j] = "sim"
|
|
271
|
+
|
|
272
|
+
#-----------------------------------------------------------------------------
|
|
273
|
+
|
|
274
|
+
if ((soma_1 == 2 or soma_2 == 2) and len(inputs) == 0):
|
|
275
|
+
#----------------------------------
|
|
276
|
+
if (soma_2 == 2 and escolha == -1):
|
|
277
|
+
print ("##############################################################")
|
|
278
|
+
print ("Would you like to choose k-axis units? ")
|
|
279
|
+
print ("[1] (kx,ky,kz) 2pi/Param. (Param. in Angs.) ==================")
|
|
280
|
+
print ("[2] (kx,ky,kz) 1/Angs. =======================================")
|
|
281
|
+
print ("[3] (kx,ky,kz) 1/nm. =======================================")
|
|
282
|
+
#----------------------------------
|
|
283
|
+
if (soma_1 == 2 and soma_2 == 2 and escolha == -1):
|
|
284
|
+
print ("[4] (k1,k2,k3) Fractional coord: K = k1*B1 + k2*B2 + k3*B3 ===")
|
|
285
|
+
#----------------------------------
|
|
286
|
+
if (soma_2 == 2 and escolha == -1):
|
|
287
|
+
print ("##############################################################")
|
|
288
|
+
Dimensao = input (" "); Dimensao = int(Dimensao)
|
|
289
|
+
print (" ")
|
|
290
|
+
#----------------------------------
|
|
291
|
+
if (soma_2 != 2):
|
|
292
|
+
Dimensao = 4
|
|
293
|
+
#----------------------------------
|
|
294
|
+
if (soma_1 != 2 and escolha == 1):
|
|
295
|
+
Dimensao = 1
|
|
296
|
+
#----------------------------------
|
|
297
|
+
if (soma_1 == 2 and soma_2 == 2 and escolha == 1):
|
|
298
|
+
Dimensao = 4
|
|
299
|
+
#----------------------------------
|
|
300
|
+
|
|
301
|
+
if ((soma_1 == 2 or soma_2 == 2)):
|
|
302
|
+
#-----------------
|
|
303
|
+
if (Dimensao < 4):
|
|
304
|
+
if (dk[3] == 1 and dk[4] == 1): Plano_k = 1 # kxky-plan
|
|
305
|
+
if (dk[3] == 1 and dk[5] == 1): Plano_k = 2 # kxkz-plan
|
|
306
|
+
if (dk[4] == 1 and dk[5] == 1): Plano_k = 3 # kykz-plan
|
|
307
|
+
#-----------------
|
|
308
|
+
if (Dimensao == 4):
|
|
309
|
+
if (dk[0] == 1 and dk[1] == 1): Plano_k = 1 # k1k2-plan
|
|
310
|
+
if (dk[0] == 1 and dk[2] == 1): Plano_k = 2 # k1k3-plan
|
|
311
|
+
if (dk[1] == 1 and dk[2] == 1): Plano_k = 3 # k2k3-plan
|
|
312
|
+
|
|
313
|
+
#-----------------------------------------------------------------------------
|
|
314
|
+
|
|
315
|
+
if (len(inputs) == 0):
|
|
316
|
+
print ("##############################################################")
|
|
317
|
+
print ("How many figures should appear per second (fps) in the video? ")
|
|
318
|
+
print ("tip 1: =======================================================")
|
|
319
|
+
print ("Choose between 1 and 30 figures ==============================")
|
|
320
|
+
print ("tip 2: =======================================================")
|
|
321
|
+
print ("The greater the number of images and the greater the number of")
|
|
322
|
+
print ("images per second (fps), the smoother the video. ")
|
|
323
|
+
print ("##############################################################")
|
|
324
|
+
n_fig = input (" "); n_fig = int(n_fig)
|
|
325
|
+
print (" ")
|
|
326
|
+
#-------------------------
|
|
327
|
+
if (n_fig <= 0): n_fig = 1
|
|
328
|
+
#-------------------------
|
|
329
|
+
save_png = 1
|
|
330
|
+
save_pdf = 0
|
|
331
|
+
save_eps = 0
|
|
332
|
+
save_svg = 0
|
|
333
|
+
|
|
334
|
+
#-----------------------------------------------------------------------------
|
|
335
|
+
|
|
336
|
+
if (escolha == -1 and len(inputs) == 0):
|
|
337
|
+
|
|
338
|
+
print ("##############################################################")
|
|
339
|
+
print ("Choose the K-mesh grid (DxD) to be interpolated: =============")
|
|
340
|
+
print ("Note: The k-mesh grid used in your DFT calculation can be ")
|
|
341
|
+
print (" used as a reference. You are free to increase/decrease ")
|
|
342
|
+
print (" the numberof kpoints to be interpolated. ")
|
|
343
|
+
print ("Hint: use 101 (unless more precision is required). ")
|
|
344
|
+
print ("##############################################################")
|
|
345
|
+
n_d = input (" "); n_d = int(n_d)
|
|
346
|
+
print (" ")
|
|
347
|
+
|
|
348
|
+
print ("##############################################################")
|
|
349
|
+
print ("Enter [0] if you want to keep the density of Spin vectors. ")
|
|
350
|
+
print ("==============================================================")
|
|
351
|
+
print ("If you want to reduce the density, enter an integer > 0, -----")
|
|
352
|
+
print ("corresponding to the number of skipped Spin vectors ----------")
|
|
353
|
+
print ("interspersed along the path of the band contour. -------------")
|
|
354
|
+
print ("##############################################################")
|
|
355
|
+
pulo = input (" "); pulo = int(pulo)
|
|
356
|
+
print (" ")
|
|
357
|
+
if (pulo < 0): pulo = 0
|
|
358
|
+
|
|
359
|
+
print ("##############################################################")
|
|
360
|
+
print ("To keep the length of Spin vectors, Enter 1.0 ")
|
|
361
|
+
print ("To increase the length, Enter a Positive value > 1.0 ")
|
|
362
|
+
print ("To decrease the length, enter a Negative value < -1.0 ")
|
|
363
|
+
print ("==============================================================")
|
|
364
|
+
print ("These values correspond to how many times the length of the ")
|
|
365
|
+
print ("array will be multiplied (increased) or divided (decreased). ")
|
|
366
|
+
print ("##############################################################")
|
|
367
|
+
fator = input (" "); fator = float(fator)
|
|
368
|
+
print (" ")
|
|
369
|
+
|
|
370
|
+
print ("##############################################################")
|
|
371
|
+
print ("Enter the transparency value [0.0 to 1.0] to be applied to the")
|
|
372
|
+
print ("Spin vectors, the lower the value the smoother the colors will")
|
|
373
|
+
print ("be, the higher the more intense they will be. ----------------")
|
|
374
|
+
print ("##############################################################")
|
|
375
|
+
transp = input (" "); transp = float(transp)
|
|
376
|
+
print(" ")
|
|
377
|
+
|
|
378
|
+
if (escolha == 1):
|
|
379
|
+
esc_band = 0
|
|
380
|
+
esc_fermi = 1
|
|
381
|
+
esc_ions = 0
|
|
382
|
+
Orb_spin = [1]*16
|
|
383
|
+
n_d = 101
|
|
384
|
+
pulo = 0
|
|
385
|
+
fator = 1.0
|
|
386
|
+
transp = 1.0
|
|
387
|
+
|
|
388
|
+
if (esc_band == 0):
|
|
389
|
+
Band_i = 1
|
|
390
|
+
Band_f = nb
|
|
391
|
+
|
|
392
|
+
if (Efermi == -1000.0):
|
|
393
|
+
Efermi = 0.0
|
|
394
|
+
esc_fermi = 0
|
|
395
|
+
|
|
396
|
+
if (esc_fermi == 0): dE_fermi = 0.0
|
|
397
|
+
if (esc_fermi == 1): dE_fermi = (Efermi)*(-1)
|
|
398
|
+
#--------------------------------------------
|
|
399
|
+
|
|
400
|
+
bands_range = '1:' + str(nb)
|
|
401
|
+
|
|
402
|
+
#======================================================================
|
|
403
|
+
# Obtaining the results from DFT outpout files ========================
|
|
404
|
+
#======================================================================
|
|
405
|
+
read_orb = 1
|
|
406
|
+
read_reg = 1
|
|
407
|
+
execute_python_file(filename = DFT + '_nscf.py')
|
|
408
|
+
|
|
409
|
+
#======================================================================
|
|
410
|
+
# Saving data to plot the Spin Texture ================================
|
|
411
|
+
#======================================================================
|
|
412
|
+
|
|
413
|
+
bandas = np.loadtxt(dir_files + '/output/Bandas.dat')
|
|
414
|
+
bandas.shape
|
|
415
|
+
|
|
416
|
+
#----------------------------------------------------------------------------
|
|
417
|
+
inform = open(dir_files + '/output/informacoes.txt', "r")
|
|
418
|
+
spin = open(dir_files + '/output/Spin.dat', "r")
|
|
419
|
+
spin_texture = open(dir_files + '/output/Spin_Texture/Spin_Texture.dat', 'w')
|
|
420
|
+
#----------------------------------------------------------------------------
|
|
421
|
+
|
|
422
|
+
palavra = 'k-points |'
|
|
423
|
+
|
|
424
|
+
for line in inform:
|
|
425
|
+
if palavra in line:
|
|
426
|
+
break
|
|
427
|
+
|
|
428
|
+
VTemp = inform.readline()
|
|
429
|
+
VTemp = inform.readline()
|
|
430
|
+
|
|
431
|
+
for i in range (n_procar*nk):
|
|
432
|
+
VTemp = inform.readline().split()
|
|
433
|
+
k1 = float(VTemp[1]); k2 = float(VTemp[2]); k3 = float(VTemp[3])
|
|
434
|
+
kx = float(VTemp[4]); ky = float(VTemp[5]); kz = float(VTemp[6])
|
|
435
|
+
|
|
436
|
+
if (Dimensao != 4): spin_texture .write(f'{kx} {ky} {kz} ')
|
|
437
|
+
if (Dimensao == 4): spin_texture .write(f'{k1} {k2} {k3} ')
|
|
438
|
+
|
|
439
|
+
for j in range (1,(nb+1)):
|
|
440
|
+
#------------------------------
|
|
441
|
+
VTemp = spin.readline().split()
|
|
442
|
+
#------------------------------
|
|
443
|
+
energia = float(VTemp[1])
|
|
444
|
+
Sx = float(VTemp[2]) + float(VTemp[3])
|
|
445
|
+
Sy = float(VTemp[4]) + float(VTemp[5])
|
|
446
|
+
Sz = float(VTemp[6]) + float(VTemp[7])
|
|
447
|
+
#------------------------------------------------
|
|
448
|
+
spin_texture .write(f'{energia} {Sx} {Sy} {Sz} ')
|
|
449
|
+
#------------------------------------------------
|
|
450
|
+
spin_texture .write(f' \n')
|
|
451
|
+
|
|
452
|
+
#-------------------
|
|
453
|
+
inform.close()
|
|
454
|
+
spin.close()
|
|
455
|
+
spin_texture.close()
|
|
456
|
+
#-------------------
|
|
457
|
+
|
|
458
|
+
os.remove(dir_files + '/output/Bandas.dat')
|
|
459
|
+
os.remove(dir_files + '/output/Spin.dat')
|
|
460
|
+
|
|
461
|
+
#======================================================================
|
|
462
|
+
# Copy Spin_Texture_Video.py to the output folder directory ===========
|
|
463
|
+
#======================================================================
|
|
464
|
+
|
|
465
|
+
try: f = open(dir_files + '/output/Spin_Texture/Spin_Texture_Video.py'); f.close(); os.remove(dir_files + '/output/Spin_Texture/Spin_Texture_Video.py')
|
|
466
|
+
except: 0 == 0
|
|
467
|
+
|
|
468
|
+
source = main_dir + '/plot/plot_spin_texture_contour_video.py'
|
|
469
|
+
destination = dir_files + '/output/Spin_Texture/Spin_Texture_Video.py'
|
|
470
|
+
shutil.copyfile(source, destination)
|
|
471
|
+
|
|
472
|
+
#--------------------------------------------------------------------------------------
|
|
473
|
+
#--------------------------------------------------------------------------------------
|
|
474
|
+
# Allowing Bandas.py to be executed separatedly ---------------------------------------
|
|
475
|
+
#--------------------------------------------------------------------------------------
|
|
476
|
+
#--------------------------------------------------------------------------------------
|
|
477
|
+
|
|
478
|
+
file = open(dir_files + '/output/Spin_Texture/Spin_Texture_Video.py', 'r')
|
|
479
|
+
lines = file.readlines()
|
|
480
|
+
file.close()
|
|
481
|
+
|
|
482
|
+
linha = 11
|
|
483
|
+
|
|
484
|
+
lines.insert(linha, '\n')
|
|
485
|
+
linha += 1; lines.insert(linha, '###################################################################### \n')
|
|
486
|
+
linha += 1; lines.insert(linha, f'# {VASProcar_name} Copyright (C) 2023 \n')
|
|
487
|
+
linha += 1; lines.insert(linha, f'# GNU GPL-3.0 license \n')
|
|
488
|
+
linha += 1; lines.insert(linha, f'# {url_1} \n')
|
|
489
|
+
linha += 1; lines.insert(linha, f'# {url_2} \n')
|
|
490
|
+
linha += 1; lines.insert(linha, f'# {url_3} \n')
|
|
491
|
+
linha += 1; lines.insert(linha, '###################################################################### \n')
|
|
492
|
+
linha += 1; lines.insert(linha, '# Authors: \n')
|
|
493
|
+
linha += 1; lines.insert(linha, '# ==================================================================== \n')
|
|
494
|
+
linha += 1; lines.insert(linha, '# Augusto de Lelis Araujo \n')
|
|
495
|
+
linha += 1; lines.insert(linha, '# [2022-2023] CNPEM|Ilum|LNNano (Campinas-SP/Brazil) \n')
|
|
496
|
+
linha += 1; lines.insert(linha, '# [2007-2022] Federal University of Uberlandia (Uberlândia-MG/Brazil) \n')
|
|
497
|
+
linha += 1; lines.insert(linha, '# e-mail: augusto-lelis@outlook.com \n')
|
|
498
|
+
linha += 1; lines.insert(linha, '# ==================================================================== \n')
|
|
499
|
+
linha += 1; lines.insert(linha, '# Renan da Paixao Maciel \n')
|
|
500
|
+
linha += 1; lines.insert(linha, '# Uppsala University (Uppsala/Sweden) \n')
|
|
501
|
+
linha += 1; lines.insert(linha, '# e-mail: renan.maciel@physics.uu.se \n')
|
|
502
|
+
linha += 1; lines.insert(linha, '###################################################################### \n')
|
|
503
|
+
linha += 1; lines.insert(linha, '\n')
|
|
504
|
+
|
|
505
|
+
linha += 1; lines.insert(linha, '#===================================================================== \n')
|
|
506
|
+
linha += 1; lines.insert(linha, '# These are the parameters that allows the code to run separatedly === \n')
|
|
507
|
+
linha += 1; lines.insert(linha, '#===================================================================== \n')
|
|
508
|
+
linha += 1; lines.insert(linha, '\n')
|
|
509
|
+
linha += 1; lines.insert(linha, 'allowed_bands = "all" # "all", "even" or "odd" \n')
|
|
510
|
+
linha += 1; lines.insert(linha, f'nk = {nk} # Total Num. of k-points \n')
|
|
511
|
+
linha += 1; lines.insert(linha, f'Band_i = {Band_i} # Initial band to be plotted \n')
|
|
512
|
+
linha += 1; lines.insert(linha, f'Band_f = {Band_f} # Final band to be plotted \n')
|
|
513
|
+
linha += 1; lines.insert(linha, f'fator = {fator} # Factor by which the length of the spin vectors will be increased or decreased \n')
|
|
514
|
+
linha += 1; lines.insert(linha, f'pulo = {pulo} # Number of spin vectors to be ignored interleaved along the path of the band contour \n')
|
|
515
|
+
linha += 1; lines.insert(linha, f'n_d = {n_d} # Interpolation grid (DxD) \n')
|
|
516
|
+
linha += 1; lines.insert(linha, f'Dimensao = {Dimensao} # [1] (kx,ky,kz) 2pi/Param.; [2] (kx,ky,kz) 1/Angs.; [3] (kx,ky,kz) 1/nm.; [4] (k1,k2,k3) \n')
|
|
517
|
+
linha += 1; lines.insert(linha, f'Plano_k = {Plano_k} # [1] kxky or k1k2; [2] kxkz or k1k3; [3] kykz or k2k3 \n')
|
|
518
|
+
linha += 1; lines.insert(linha, f'transp = {transp} # Transparency applied to the color gradient of the contours 2D plot \n')
|
|
519
|
+
linha += 1; lines.insert(linha, f'tipo_spin = {tipo_spin} # Component or Spin Vector to be analyzed, where: [1] Sx; [2] Sy; [3] Sz; [4] SxSy; [5] SxSz; [6] SySz \n')
|
|
520
|
+
linha += 1; lines.insert(linha, f'tipo_contour = {tipo_contour} # How to obtain the energies of the Level Curves: Where [0] is automatic; [1] energy range and [2] entered manually \n')
|
|
521
|
+
linha += 1; lines.insert(linha, f'n_contour = {n_contour} # Number of Level Contours to be obtained \n')
|
|
522
|
+
linha += 1; lines.insert(linha, f'bands_range = "{bands_range}" \n')
|
|
523
|
+
linha += 1; lines.insert(linha, f'Efermi = {Efermi} # Fermi energy from DFT outpout files \n')
|
|
524
|
+
linha += 1; lines.insert(linha, f'esc_fermi = {esc_fermi} # Would you like to shift the Fermi level? [0] No, use the value obtained from VASP [1] Yes, shift the Fermi level to 0.0 eV \n')
|
|
525
|
+
#--------------------------------
|
|
526
|
+
if (tipo_contour == 1):
|
|
527
|
+
linha += 1; lines.insert(linha, f'energ_i = {energ_i}; energ_f = {energ_f} # Starting and ending energy of the Energy Range in the Level Contours plot \n')
|
|
528
|
+
if (tipo_contour == 2):
|
|
529
|
+
linha += 1; lines.insert(linha, f'levels_n = {levels_n} # Energy values specified manually in the plot of Level Contours \n')
|
|
530
|
+
if (tipo_contour < 2):
|
|
531
|
+
linha += 1; lines.insert(linha, f'levels_n = [0.0, 0.0, 0.0, 0.0, 0.0] # Values of the Level Contours specified manually \n')
|
|
532
|
+
#--------------------------------
|
|
533
|
+
linha += 1; lines.insert(linha, f'n_fig = {n_fig} # Number of figures that appear in the video per second (fps) \n')
|
|
534
|
+
|
|
535
|
+
if (sum_save == 0): save_png = 1
|
|
536
|
+
linha += 1; lines.insert(linha, f'save_png = {save_png}; save_pdf = {save_pdf}; save_svg = {save_svg}; save_eps = {save_eps} # Plotting output format, where [0] = NO and [1] = YES \n')
|
|
537
|
+
linha += 1; lines.insert(linha, '\n')
|
|
538
|
+
linha += 1; lines.insert(linha, '#===================================================================== \n')
|
|
539
|
+
|
|
540
|
+
file = open(dir_files + '/output/Spin_Texture/Spin_Texture_Video.py', 'w')
|
|
541
|
+
file.writelines(lines)
|
|
542
|
+
file.close()
|
|
543
|
+
|
|
544
|
+
#--------------------------------------------------------------------------
|
|
545
|
+
exec(open(dir_files + '/output/Spin_Texture/Spin_Texture_Video.py').read())
|
|
546
|
+
#--------------------------------------------------------------------------
|
|
547
|
+
|
|
548
|
+
#==========================================================================
|
|
549
|
+
|
|
550
|
+
print(" ")
|
|
551
|
+
print("=====================================================================")
|
|
552
|
+
print("= Edit the generated vectors, modifying the value of the variables ==")
|
|
553
|
+
print("= [factor], [thickness] and [length] in the Spin_Texture_Contour.py =")
|
|
554
|
+
print("= file generated in the output/Spin_Texture folder. =================")
|
|
555
|
+
print("=====================================================================")
|
|
556
|
+
|
|
557
|
+
#-----------------------------------------------------------------
|
|
558
|
+
print(" ")
|
|
559
|
+
print("======================= Completed =======================")
|
|
560
|
+
#-----------------------------------------------------------------
|
|
561
|
+
|
|
562
|
+
#=======================================================================
|
|
563
|
+
# User option to perform another calculation or finished the code ======
|
|
564
|
+
#=======================================================================
|
|
565
|
+
execute_python_file(filename = '_loop.py')
|
|
@@ -121,6 +121,10 @@ if (len(inputs) == 0 and DFT == '_VASP/'):
|
|
|
121
121
|
print("## 2D projection of the spatial location of bands (regions) ##")
|
|
122
122
|
print("## [32] Default -- [-32] Custom ##")
|
|
123
123
|
print("## ======================================================== ##")
|
|
124
|
+
print("## !!!!! UNDER TESTS !!!!! ##")
|
|
125
|
+
print("## 2D projection [ki,kj] of the spatial location of bands ##")
|
|
126
|
+
print("## [37] Default -- [-37] Custom ##")
|
|
127
|
+
print("## ======================================================== ##")
|
|
124
128
|
print("## 2D projection of states Character: ##")
|
|
125
129
|
print("## [33] Default -- [-33] Custom ##")
|
|
126
130
|
print("## ======================================================== ##")
|
|
@@ -321,7 +325,16 @@ if (opcao == 31 or opcao == -31):
|
|
|
321
325
|
|
|
322
326
|
if (opcao == 32 or opcao == -32):
|
|
323
327
|
execute_python_file(filename = 'projecao_localizacao.py')
|
|
324
|
-
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
# TESTE ???????????????????????????????????????????????????????
|
|
331
|
+
# ?????????????????????????????????????????????????????????????
|
|
332
|
+
if ((opcao == 37 or opcao == -37) and (DFT == '_VASP/')):
|
|
333
|
+
execute_python_file(filename = 'projecao_localizacao_contour_video')
|
|
334
|
+
# TESTE ???????????????????????????????????????????????????????
|
|
335
|
+
# ?????????????????????????????????????????????????????????????
|
|
336
|
+
|
|
337
|
+
|
|
325
338
|
if (opcao == 33 or opcao == -33):
|
|
326
339
|
execute_python_file(filename = 'projecao_psi.py')
|
|
327
340
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import ase
|
|
2
|
+
from ase.build import surface
|
|
3
|
+
from ase.io import read
|
|
4
|
+
|
|
5
|
+
file_path = 'POSCAR_SiO2_Bulk'
|
|
6
|
+
n_layers = 2
|
|
7
|
+
direction = [-1, 0, -1]
|
|
8
|
+
vacuum = 15
|
|
9
|
+
|
|
10
|
+
def build_nlayer(poscar_file, n_layers, direction, vacuum):
|
|
11
|
+
str_dir = ''
|
|
12
|
+
for i in direction: str_dir += str(i)
|
|
13
|
+
formula = poscar_file.get_chemical_formula()
|
|
14
|
+
### Generate the surfaces
|
|
15
|
+
|
|
16
|
+
surface = ase.build.surface(poscar_file,direction,n_layers,vacuum=vacuum)
|
|
17
|
+
ase.io.vasp.write_vasp(f'POSCAR_{formula}_{str_dir}_{n_layers}layers.vasp',surface,direct=False,sort=True)
|
|
18
|
+
|
|
19
|
+
poscar = read(file_path)
|
|
20
|
+
|
|
21
|
+
build_nlayer(poscar, n_layers, direction, vacuum)
|
|
22
|
+
|