parser.add_argument('hkfile', help='PATH to an existing file containing the hamiltonian', type=str) parser.add_argument('Natoms', help='Number of atoms of the hamiltonian / brillouin zone', type=int) parser.add_argument('epsilon', help='Epsilon Parameter of SOC', type=float) args = parser.parse_args() hkfile = args.hkfile epsilon = args.epsilon Na = args.Natoms #setting the epsilon parameter for the SOC print("epsilonSOC = ", epsilon) ### load hamiltonian print("Loading hamiltonian from file: ", hkfile) hk, kpoints = rw.read_hk_wannier(hkfile,spin=False) print("hk.shape", hk.shape) print("kpoints.shape", kpoints.shape) ### get number of k-points Nk=kpoints.shape[0] print("Nk", Nk) ### number of d-orbitals Nd=hk.shape[1] print("Nd", Nd) #Setting atoms and orbitals per atom Ndpa = Nd/Na #Number of d-orbitals per atom Ns = 2 #Number of spins
postfix = args.postfix try: if atom > Natoms: raise RuntimeError( "Number supplied for atom must be smaller than number supplied for Natoms" ) if spin and bandsonly: raise RuntimeError("--bandsonly (-bo) only works without --spin (-s)!") except RuntimeError: raise sys.exit() ### load hamiltonian print("Loading hamiltonian on hk and kpoints on kpoints from file:" + filename) hk, kpoints = rw.read_hk_wannier(filename, spin=spin) print("hk.shape", hk.shape) print("kpoints.shape", kpoints.shape) ### get number of k-points Nk = kpoints.shape[0] print("Number of k points: ", Nk) try: if hk.shape[1] < Natoms * Nbands: raise err.InputError( "Input hkfile does not have spin entries! Please use -s False.") if hk.shape[1] > Natoms * Nbands: raise err.InputError( "Input hkfile does have spin entries! Please use -s True.")