# Add the root path of the pygra library import os import sys sys.path.append(os.environ['PYGRAROOT']) from pygra import geometry g = geometry.triangular_lattice() h = g.get_hamiltonian(has_spin=True) h.set_filling(0.05, nk=10) from pygra import magneticexchange J = magneticexchange.NN_exchange(h, nk=100, J=1, mode="spiral", filling=0.5) print("Exchange is", J)
# Add the root path of the pygra library import os import sys sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../../../src") import numpy as np from pygra import geometry, potentials g = geometry.triangular_lattice() # create the geometry of the lattice g = g.supercell(7) # create a supercell of a certain size J = potentials.commensurate_potential(g) # get this potential (C3 symmetry) J = J.normalize() # set the value of the potential between 0 and 1 Delta = 1.0 - J # define the SC order as 1 - the exchange J = J * 0.3 # reduce the strength of the exchange Delta = Delta * 0.3 # reduce the strength of the SC order g.write_profile(J, nrep=2, name="EXCHANGE.OUT") # write the exchange in file g.write_profile(Delta, nrep=2, name="DELTA.OUT") # write the SC in file h = g.get_hamiltonian(has_spin=True) # get the Hamiltonian h.add_zeeman(J) # add exchange coupling h.add_swave(Delta) # add the SC order h.get_bands() # compute the bands
# Add the root path of the pygra library import os ; import sys ; sys.path.append(os.environ['PYGRAROOT']) from pygra import geometry g = geometry.triangular_lattice() #g = geometry.honeycomb_lattice() h = g.get_hamiltonian(has_spin=True) h.shift_fermi(1.5) #h.set_filling(0.1) from pygra import response response.magnetic_response_map(h,nk=60,nq=20) #h.get_bands() #dos.dos(h,nk=100,use_kpm=True)
# Add the root path of the pygra library import os import sys sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../../../src") import numpy as np from pygra import geometry from pygra import meanfield g = geometry.triangular_lattice() # square lattice h = g.get_hamiltonian() # create hamiltonian of the system h.add_zeeman([0., 0., 6.0]) # add exchange to promote triplet h.add_swave(0.0) # activate a BdG Hamiltonian mf = meanfield.guess(h, mode="random") scf = meanfield.Vinteraction(h, nk=20, V1=-2.0, filling=0.2, mf=mf, constrains=["no_normal_term"], mix=0.8, verbose=1) hscf = scf.hamiltonian # SCF Hamiltonian # now extract only the anomalous part h0 = hscf.copy() h0.remove_nambu() # remove SC (and Nambu as side effect) h0.add_swave(0.0) # restore Nambu basis print("SCF symmetry breaking", scf.identify_symmetry_breaking())