-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanual_installation.py
107 lines (91 loc) · 4.8 KB
/
manual_installation.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
96
97
98
99
100
101
102
103
104
105
106
107
import os
import sys
import site
import shutil
import subprocess
#---------------------------------------------------
# Instalation directory ----------------------------
#---------------------------------------------------
version = 'vasprocar'
dir_inst = site.USER_SITE + '/vasprocar'
#----------------------------------------------------------------------
# Copying VASProcar folder to the main directory ----------------------
#----------------------------------------------------------------------
if os.path.isdir(dir_inst):
shutil.rmtree(dir_inst)
else:
0 == 0
shutil.copytree(version, dir_inst)
print("")
print("###################################################################")
print("##################### Installation started: #####################")
print("###################################################################")
print("")
print("===================================================================")
print("Instructions to execute: ")
print(" ")
print(">> Go to a directory containing the DFT outpout files ")
print(" ")
print(">> Type the following comand: ")
print(" ")
print(" python -m vasprocar ")
print(" or ")
print(" python3 -m vasprocar ")
print(" or ")
print(" python3.x -m vasprocar ")
print(" ")
print("*** RUN IT WITH YOUR PYTHON VERSION OR WITH *** ")
print("*** THE VERSION OF YOUR INSTALLATION DIRECTORY *** ")
print("-------------------------------------------------- ")
print(f'Installation Directory: {dir_inst} ')
print("-------------------------------------------------- ")
print("END ! ")
print("===================================================================")
print("")
print("##########################################################")
print("# Manual software installation is recommended: #")
print("# ====================================================== #")
print("# VESTA: http://jp-minerals.org/vesta/en/download.html #")
print("# ------------------------------------------------------ #")
print("# 3D Visualization of the Crystalline lattice (CONTCAR), #")
print("# charge density (PARCHG) and Potential (LOCPOT) #")
print("# ====================================================== #")
print("# Grace: https://plasma-gate.weizmann.ac.il/Grace/ #")
print("# or https://www.onworks.net/software/app-qtgrace #")
print("# ------------------------------------------------------ #")
print("# Plot, Edit and View 2D Graphs #")
print("##########################################################")
print(" ")
print("===================================================================")
print(" Installation / Updating the necessary modules --------------------")
print("===================================================================")
print(" Would you like to update and install all necessary dependencies? ")
print(" modules: numpy|scipy|matplotlib|plotly|moviepy|kaleido ")
print(" ----------------------------------------------------------------- ")
print(" [0] NO ")
print(" [1] YES ")
print("===================================================================")
modulos = input(" "); modulos = int(modulos)
print(" ")
if (modulos == 1):
# ---------------------------------------------------------
# package_list_to_instal ----------------------------------
# ---------------------------------------------------------
packages = [
'pip',
'numpy',
'scipy',
'matplotlib',
'moviepy',
'plotly',
'kaleido'
]
for i in range(len(packages)):
subprocess.run(["pip", "install", "--upgrade", packages[i]])
print("[OK] " + packages[i])
print(" ")
print("##########################################################")
print("########### VASProcar installation is complete ###########")
print("##########################################################")
print(" ")
stop = input( )