Dear Adel Belayadi,
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 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
# lattice type
graphene = kwant.lattice.general([(1, 0), (sin(pi/6), cos(pi/6))],
                                 [(0, 0), (0, 1 / sqrt(3))],
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:
        return x+ux,y+uy
        return x,y

syst = kwant.Builder()
syst[graphene.shape(rectangle, (0, 0))] = 0
#hoppings = (((0, 0), a, b), ((0, 1), a, b), ((-1, 1), a, b))
#syst[[kwant.builder.HoppingKind(*hopping) for hopping in hoppings]] = t

Thanks in advance.

On Fri, Jul 16, 2021 at 2:38 AM Adel Belayadi <> wrote:
Dear Shrushti,
it is straightforward to deal with strained graphene. 
In the region you want to make strain, just set the function which modifies the site position (this mainly depends on the amount and type of the strain). Second, once you have shifted the site position you need to shift the hopping as illustrated in the file provided by Mr. Antonio.
here you find a simple script about how to shift the site position in the case of uniaxial strain (adjusted to you case)
def Triaxial_transform(pos, center, I):
    """ I is a parameter that lets us to control the intensity of the strain"""
    x, y = pos  
    cx, cy = center[0], center[1] # the center of the strain
if r<sigma: ux = 2*I * x*y uy = I * (x**2 - y**2) return x + ux, y + uy else: return x, y
Then use this position to set your hopping as illustrated in a previous discussion [Ref-1].

You have to be careful in case you are using a strain in the z axis since you will not be able to plot the current.  It is somehow tricky in this scenario.


I hop this will help
Best wishes

Le jeu. 15 juil. 2021 à 14:19, <> a écrit :
I want to create the graphene strained superlattice-like structure, having uniaxial strain defined at the specified region. Please, someone can suggest to me how to define the strained region and interface between unstrained and strained graphene regions. 
Thanks in Advance