I am new to Kwant, as per our previous discussion, here I am attaching my program, I have defined my strain region and function for uniaxial strain in armchair direction. Now I struggling with how to introduce this function in the program. Please correct me if I have understood it wrongly, Firstly we have to define graphene, by using the position of lattice points we have to apply pos_transform in a specified region, which will use the values of x and y co-ordinate from lattice placement due to lattice structure. The next doubt is like, as I using uniaxial strain in Y direction, it will squeeze lattice in X direction. So, the unstrained lattice point also has to shift accordingly. Right now I am only focusing on position displacement and not hopping.
import numpy as np
import
scipy.io as spio
from numpy import *
import scipy.linalg as la
import matplotlib as mpl
import sympy as sym
import kwant
#%%######################
# parameters
L=20 # Length of device on both sides
W=5 # Width of device
t=-2.7
pot=0.5
c=0.05
angle=pi/2
# lattice type
graphene = kwant.lattice.general([(1, 0), (sin(pi/6), cos(pi/6))],
[(0, 0), (0, 1 / sqrt(3))],
norbs=1)
a, b = graphene.sublattices
# scattering region
def rectangle(pos):
x, y = pos
return 0 <= x <= L and 0<= y <= W
# strain_pos
def pos_transform(pos,c,angle):
x,y= pos
if 5<x<10:
ux=(cos(angle)**2-0.165*sin(angle)**2)*c*x
uy=(sin(angle)**2-0.165*cos(angle)**2)*c*y
return x+ux,y+uy
else:
return x,y
syst = kwant.Builder()
syst[graphene.shape(rectangle, (0, 0))] = 0
syst=pos_transform((5,0),0.05,pi/2)
#hoppings = (((0, 0), a, b), ((0, 1), a, b), ((-1, 1), a, b))
#syst[[kwant.builder.HoppingKind(*hopping) for hopping in hoppings]] = t
kwant.plot(syst);
Thanks in advance.