Download KNIT user guide - Inac

Transcript
The method makeHole uses functions defined by KNIT for the system: indice and
move_site . Function indice returns the index of the system site providing its coordinates
[n1,n2,..] (in our 2D model – [x,y]). Function move_site([v1,v2,…], hoppings, onsite_energy,
[n1,n2,…], ind) does the following: finds the system site with the index ind; moves it to the
new position with coordinates [n1,n2,..] (in our 2D model – [x,y]); associates the this site
with the new neighbors [v1,v2,..] and assigns new hopping and onsite energy matrices to
this site. These and other KNIT functions are specified in more formal way in the next
section of this document.
Now, when we have finished with the system geometry, let’s have a look at the system
properties.
Introducing disorder
Until now, all the sites of the system had the same value of the on-site energy V=0. Now we
introduce the disorder to our system by changing the on-site energy in a certain part of the
system. To do so, we specify a method myDisorder as follows:
def myDisorder(W):
import random
random.seed(666)
for ix in range(2*MYSIZE):
for iy in range(2*MYSIZE):
i=MyABCwithLeads.indice([ix+2*MYSIZE,iy+3*MYSIZE])
MyABCwithLeads.put_Hdiag(i,knit.scalarM(W*(random.random()-0.5)))
This method changes the value of V for the sites in a certain square area within the system.
To change the value of V for the sites, we use the method put_Hdiag: its first parameter is
the index of a target site and the second parameter is a new value of V. This is equivalent to
introducing the impurities into the system.
We can also visualize the resulting distribution of potential on the system as follows:
def potential(i):
return MyABCwithLeads.get_Hdiag(i)(0,0).real
myDisorder(6.)
print system.colorplot2D(MyABCwithLeads,s+".pot",potential)
36