sys.path.append("../../../") sys.path.append("/home/ykent/WIEN_GUTZ/bin/") ## import tbBase from tbASE import * from tbGutz import * if __name__=="__main__": #Example . SquareLattice. ### a normal square lattice. default in gallery sTB=TB.gallery().add_spindegeneracy().supercell(extent=(2,2,1)) kps_size=(11,11,1) kps=kpoints.monkhorst_pack(kps_size) # unit cell ### a Gutz TB model on a square lattice. gTB=tbGutz(sTB.Atoms,sTB.Hr,interaction=["Kanamori",(0.0,)]) gTB.output_CyGutz(kps, num_electrons = 2.4) # WH_HS.INP sigma_list = []; U_list = [] norbitals = sTB.Atoms.nspinorbitals/2 for i in range(1): sig_half = (np.arange(norbitals*norbitals)+1).reshape(norbitals,norbitals) sigma_list.append(block_diag(sig_half, sig_half)) # assuming Sz conservation U_list.append(np.identity(norbitals*2, dtype = complex)) from gl_inp import set_wh_hs, set_gl_inp set_wh_hs(sigma_list, U_list) # GL.INP spin_pol = 'n'
from ase.dft import kpoints ## import tbBase from tbASE import * from tbGutz import * if __name__=="__main__": #Example . SquareLattice. ### a normal square lattice. default in gallery aTB=TB.gallery().add_spindegeneracy() sTB=TB.gallery().add_spindegeneracy().supercell(extent=(2,2,1)) kps_size=(10,10,1) kps=kpoints.monkhorst_pack(kps_size) # unit cell ### a Gutz TB model on a square lattice. if True: gTB=tbGutz(aTB.Atoms,aTB.Hr,interaction=["Kanamori",(4.0,)]) gTB.output_CyGutz(kps) if False: gTB=tbGutz(aTB.Atoms,aTB.Hr,interaction=["Kanamori",(4.0,)]) ### nambu basis from an tbGutz object nTB=gTB.trans_nambubasis() nTB.output_CyGutz(kps) #supercell 2x2 if False: #### unit cell ### a Gutz TB model on a square lattice. gTB=tbGutz(sTB.Atoms,sTB.Hr,interaction=["Kanamori",(4.0,)]) print gTB.Atoms.nspinorbitals