mirror of
https://github.com/triqs/dft_tools
synced 2024-06-24 06:02:24 +02:00
207c637be2
'main()' now calls a function 'output_as_text()' responsible for storing both a ctrl- and plo-files ('ctrl_output()' and 'plo_output()', respectively).
28 lines
807 B
Python
28 lines
807 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)
|
|
output_to_ascii(pars, el_struct, pshells, pgroups)
|