import numpy as np import geometry import scftypes import operators from scipy.sparse import csc_matrix g = geometry.chain() g = g.supercell(4) h = g.get_hamiltonian() # create hamiltonian of the system h = h.get_multicell() h.remove_spin() mf = np.random.random(h.intra.shape) - .5 mf = np.matrix(mf) mf = mf + mf.H scf = scftypes.selfconsistency(h, nkp=40, filling=0.5, g=3.0, mix=0.9, mf=mf, mode="V") h = scf.hamiltonian # get the Hamiltonian h.get_bands() # calculate band structure import groundstate groundstate.hopping(h)
#exit() #h.add_rashba(0.5) #h.add_zeeman(0.5) #h.shift_fermi(-1.0) h.add_swave(0.0) mf = scftypes.guess(h, mode="swave", fun=lambda r: 0.02) #h.remove_spin() mode = {"U": -2} mode = {"V": -1.} #h.turn_sparse() scf = scftypes.selfconsistency(h, nkp=100, g=-1.0, mix=0.9, mf=mf, mode=mode, energy_cutoff=None) #scf = scftypes.selfconsistency(h,nkp=40,filling=0.5,g=-6.0, # mix=0.9,mf=scf.mf,mode=mode) h = scf.hamiltonian # get the Hamiltonian #print(csc_matrix(np.round(h.intra,3))) #op = operators.get_sz(h) #print(op.shape) #h.add_zeeman([0.,0.,4]) h.get_bands() # calculate band structure #print(scf.magnetization) #h.write() import groundstate
#Us = [2.,4.] #Us = [2.] f = open("EVOLUTION.OUT", "w") # file with the results for U in Us: # loop over Us # import scftypes h = g.get_hamiltonian() # create hamiltonian of the system h = h.get_multicell() h.shift_fermi(0.0) mf = scftypes.guess(h, mode="antiferro") scf = scftypes.selfconsistency(h, nkp=10, filling=0.5, g=U, mix=0.9, mf=mf, mode="U") h = scf.hamiltonian # get the Hamiltonian # h.get_bands() # calculate band structure # import groundstate f.write(str(U) + " " + str(scf.gap) + "\n") # groundstate.swave(h) #groundstate.hopping(h) f.close()
# zigzag ribbon import sys sys.path.append("../../../pygra") # add pygra library import geometry import scftypes import operators g = geometry.honeycomb_zigzag_ribbon(4) # create geometry of a zigzag ribbon h = g.get_hamiltonian() # create hamiltonian of the system mf = scftypes.guess(h, "ferro", fun=lambda r: [0., 0., 1.]) scf = scftypes.selfconsistency(h, nkp=30, filling=0.5, mf=mf, mode="Hubbard collinear") h = scf.hamiltonian # get the Hamiltonian #op = operators.get_sz(h) #print(op.shape) #h.add_zeeman([0.,0.,4]) h.get_bands(operator=operators.get_sz(h)) # calculate band structure #print(scf.magnetization) h.write()