3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-28 16:12:36 +02:00
dft_tools/python/converters/vasp/python/main.py
Oleg E. Peil d794bfa0f5 Added output of a basic header into a ctrl-file
Added function 'ctrl_ouput()' which stores data common for all correlated
shells into a file '<basename>.ctrl'.
At the moment, only a very basic header is output.
The signature of 'plo_output()' is also modified to include an instance
of class 'ElectronicStructre' containing important information on
the lattice structure, Efermi, and k-points.
2015-10-11 13:57:46 +02:00

28 lines
802 B
Python

import sys
import vaspio
from inpconf import ConfigParameters
from elstruct import ElectronicStructure
from plotools import generate_ortho_plos, plo_output
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_ortho_plos(pars, el_struct)
plo_output(pars, el_struct, pshells, pgroups)