mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 01:55:56 +01:00
Added preliminary 'main.py'
This commit is contained in:
parent
89ab594253
commit
5d8423a30e
21
python/converters/vasp/python/main.py
Normal file
21
python/converters/vasp/python/main.py
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
import sys
|
||||
import vaspio
|
||||
from inpconf import ConfigParameters
|
||||
|
||||
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)
|
||||
vasp_data = vaspio.VaspData(vasp_dir)
|
Loading…
Reference in New Issue
Block a user