mirror of
https://github.com/triqs/dft_tools
synced 2024-08-29 07:22:01 +02:00
Moved the main script to function 'main()'
This commit is contained in:
parent
9acdc5a8f8
commit
dc7614b0aa
@ -62,7 +62,7 @@ def generate_and_output_as_text(conf_filename, vasp_dir):
|
||||
pshells, pgroups = generate_plo(pars, el_struct)
|
||||
output_as_text(pars, el_struct, pshells, pgroups)
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
narg = len(sys.argv)
|
||||
if narg < 2:
|
||||
raise SystemExit(" Usage: python main.py <conf-file> [<path-to-vasp-calcultaion>]")
|
||||
@ -77,3 +77,5 @@ if __name__ == '__main__':
|
||||
|
||||
generate_and_output_as_text(filename, vasp_dir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user