-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwanpb.x
More file actions
executable file
·26 lines (20 loc) · 836 Bytes
/
wanpb.x
File metadata and controls
executable file
·26 lines (20 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
import argparse
from wanPB.hamiltonian import *
import pybinding as pb
import time
starttime = time.perf_counter()
print("Starting calculation at ", end='')
print(time.strftime("%H:%M:%S on %a %d %b %Y \n"))
# Command line praser
#----------------------------
parser = argparse.ArgumentParser(description="A script to convert Hamiltonian generated by Wannier90 to pybinding's format.")
parser.add_argument("--seedname", action="store", default="wannier90", dest="seedname",
help="Seedname of Wannier90's outputs?. (Default=wannier90)")
prm = parser.parse_args()
lat = gen_lat(seedname=prm.seedname)
pb.save(lat,prm.seedname+".pbz")
endtime = time.perf_counter()
runtime = endtime-starttime
print("\nEnd of calculation. ", end='')
print("Program was running for %.2f seconds." % runtime)