-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_VASProcar.py
95 lines (79 loc) · 3.91 KB
/
install_VASProcar.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import os
import sys
import site
import shutil
import subprocess
#---------------------------------------------------
# Obtendo o diretorio de instalação do VASProcar ---
#---------------------------------------------------
version = 'VASProcar_v1.1.02'
dir_inst = site.USER_SITE + '/vasprocar'
#----------------------------------------------------------------------
# Copiando a pasta VASProcar_v1.1.02 para o diretório de instalação ---
#----------------------------------------------------------------------
if os.path.isdir(dir_inst):
shutil.rmtree(dir_inst)
else:
0 == 0
shutil.copytree(version, dir_inst)
print("")
print("##################################")
print("###### Instalacao Concluida ######")
print("##################################")
print("")
print("===================================================================")
print("Para executar o codigo, utilize em qualquer diretorio que contenha ")
print("os arquivos de saida do VASP, o seguinte comando: ")
print("------------------------------------------------- ")
print("python -m vasprocar ou python3.? -m vasprocar ")
print(" ")
print("Substitua python3.? pela versao contida no Diretorio de Instalação ")
print(f'------------------------------------------------------------------')
print(f'{dir_inst} ')
print("##########################################################")
print("# Recomenda-se a instalacao manual dos softwares: #")
print("# ====================================================== #")
print("# VESTA: http://jp-minerals.org/vesta/en/download.html #")
print("# ------------------------------------------------------ #")
print("# Visualizacao 3D da Rede Cristalina (CONTCAR), #")
print("# Densidade de carga (PARCHG) e do Potencial (LOCPOT) #")
print("# ====================================================== #")
print("# Grace: https://plasma-gate.weizmann.ac.il/Grace/ #")
print("# or https://www.onworks.net/software/app-qtgrace #")
print("# ------------------------------------------------------ #")
print("# Plot, Edicao e Visualizacao de Graficos 2D #")
print("##########################################################")
print(" ")
#----------------------------------------------------------------------
# Instalação/Atualização de Modulos Python ----------------------------
#----------------------------------------------------------------------
print("===================================================================")
print("Deseja Instalar/Atualizar os modulos Python necessarios a correta ")
print("execucao de todas as funcionalidades do VASProcar ? ")
print("-------------------------------------------------------------------")
print("[0] NAO ")
print("[1] SIM ")
print("===================================================================")
modulos = input(" "); modulos = int(modulos)
print(" ")
if (modulos == 1):
# ---------------------------------------------------------
# package_list_to_instal ----------------------------------
# ---------------------------------------------------------
packages = [
"pip",
"numpy",
"scipy",
"matplotlib",
"plotly",
"moviepy",
"kaleido"
]
for i in range(len(packages)):
subprocess.run(["pip", "install", "--upgrade", packages[i]])
print("[OK] " + packages[i])
print(" ")
print("##########################################################")
print("## Instalacao/Atualizacao dos Modulos Python concluida: ##")
print("##########################################################")
print(" ")