Esempio n. 1
0
def get_geometry2d():
    """ Create a 2d honeycomb lattice"""
    n = int(get("cell_size"))  # size of the unit cell
    import specialgeometry
    g = specialgeometry.twisted_bilayer(n)
    #  g = geometry.honeycomb_lattice()
    #  g = g.supercell(n)
    return g
Esempio n. 2
0
# Add the root path of the pygra library
import os ; import sys ; sys.path.append(os.environ['PYGRAROOT'])

from pygra importgeometry
from pygra importhamiltonians
import numpy as np
import klist
import sculpt
import specialgeometry
g = specialgeometry.twisted_bilayer(5)
g.write()
from specialhopping import twisted_matrix
h = g.get_hamiltonian(is_sparse=True,has_spin=False,is_multicell=False,
     mgenerator=twisted_matrix(ti=0.4,lambi=7.0))
#h.turn_spinful()
h.add_haldane(0.05)
h.add_sublattice_imbalance(0.5)
#h.add_kane_mele(0.1)
#h.add_rashba(lambda r:  0.1*np.sign(r[2]))
h.shift_fermi(-0.3)
#h.add_sublattice_imbalance(0.1)
#h.shift_fermi(lambda r: r[2]*0.1)
import density
#h.set_filling(nk=3,extrae=1.) # set to half filling + 2 e
#d = density.density(h,window=0.1,e=0.025)
#h.shift_fermi(-0.4)
#h.turn_sparse()
#h.get_bands(num_bands=20)
#exit()
import topology
#print(h.get_gap())
Esempio n. 3
0
# Add the root path of the pygra library
import os
import sys

sys.path.append(os.environ['PYGRAROOT'])

import numpy as np
import specialgeometry

n = 7  # this is a parameter that controls the size of the moire unit cell
g = specialgeometry.twisted_bilayer(n)  # get the geometry of the system
# g.r is the list with the positions in the unit cell
# g.a1 is the first lattice vector
# g.a2 is the second lattice vector
# This function will create hoppings in the structure
ti = 0.4  # this is the interlayer hopping (in terms of the intralayer)
from specialhopping import twisted_matrix

h = g.get_hamiltonian(is_sparse=True,
                      has_spin=False,
                      is_multicell=True,
                      mgenerator=twisted_matrix(ti=ti))
hk = h.get_hk_gen()  # get Bloch Hamiltonian generator
# hk is a function that given a k point, returns the Bloch Hamiltonian
# The k points are in the interval [0.,1.]
# This method automatically computes the local density of states
h.get_ldos(e=0.0)  # e is the energy
# This method automatically computes the bands
#h.get_bands(num_bands=20)
Esempio n. 4
0
# Add the root path of the pygra library
import os ; import sys ; sys.path.append(os.environ['PYGRAROOT'])

from pygra importgeometry
from pygra importhamiltonians
import numpy as np
import klist
import sculpt
from specialhopping import twisted,twisted_matrix
import specialgeometry
g = specialgeometry.twisted_bilayer(2) # get a small unit cell
import ribbon
g = ribbon.bulk2ribbon(g,n=4) # create a ribbon geometry
h = g.get_hamiltonian(is_sparse=True,has_spin=False,
     mgenerator=twisted_matrix(ti=0.4,lambi=7.0))
g.write() # write structure
import ldos
ldos.ldos(h,mode="arpack",nk=10,delta=0.1,nrep=3) # write the LDOS
h.get_bands(num_bands=20,operator="yposition") # write the bands