3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-14 18:13:49 +01:00
dft_tools/python/vasp/main.py
Oleg E. Peil 819fc987f0 Reshuffled files after repository merge
The files from the original vasp-interface repository are reshuffled in
accord with the directory structure of dft_tools. Some of the directories,
such as 'test' (unit tests for the interface), 'examples' (simple examples for
the development purposes) are temporarily placed into 'python/vasp' directory
to avoid confusion with integral tests and examples of dft_tools.
2015-10-13 11:27:55 +02:00

28 lines
796 B
Python

import sys
import vaspio
from inpconf import ConfigParameters
from elstruct import ElectronicStructure
from plotools import generate_plo, output_as_text
if __name__ == '__main__':
narg = len(sys.argv)
if narg < 2:
raise SystemExit(" Usage: python main.py <conf-file> [<path-to-vasp-calcultaion>]")
else:
filename = sys.argv[1]
if narg > 2:
vasp_dir = sys.argv[2]
if vasp_dir[-1] != '/':
vasp_dir += '/'
else:
vasp_dir = './'
pars = ConfigParameters(filename, verbosity=0)
pars.parse_input()
vasp_data = vaspio.VaspData(vasp_dir)
el_struct = ElectronicStructure(vasp_data)
pshells, pgroups = generate_plo(pars, el_struct)
output_as_text(pars, el_struct, pshells, pgroups)