Dear All,
How to calculate the current-voltage characteristics in graphene nanoribbon. 
calculated the conductance with respect to energy.
I have the following code for graphene nanoribbon. how to calculate the current 
with respect to voltage in this example.

import kwant
import numpy as np 
from matplotlib import pyplot
import matplotlib.pyplot as plt
import numpy as np
import numpy.linalg as npl
import scipy.sparse.linalg as sla
pi=np.pi
############################################## structure 
########################
Wnr=10
lnr=30
lat=kwant.lattice.honeycomb(a=2.46,norbs=1)
a,b=lat.sublattices
########### functions for structure build

def rect(pos):
    x,y=pos
    return 0<=x<lnr and 0<=y<Wnr

################################ main structure i.e. rectangle 
####################

model1 = kwant.Builder()
model1[lat.shape(rect,(1,1))] = 0
model1[lat.neighbors()] =2.64
model1.eradicate_dangling()

############### functions for lead structure build 
################################

def lead1_shape(pos):
    x, y = pos
    return 0< y < Wnr-1

def lead2_shape(pos):
    x, y = pos
    return 0< x <Wnr


############first lead codes##########
sym = kwant.TranslationalSymmetry(lat.vec((-1,0))) #from the left
sym.add_site_family(lat.sublattices[0], other_vectors=[(-1, 2)])
sym.add_site_family(lat.sublattices[1], other_vectors=[(-1, 2)])
lead = kwant.Builder(sym)
lead[lat.shape(lead1_shape, (0,1))]=0
lead[lat.neighbors()] = 2.64
model1.attach_lead(lead)
model1.attach_lead(lead.reversed())         #second lead attach in reverse 
manner
model1=model1.finalized()
kwant.plot(model1)

##hamiltonian mat

model1_matrix = model1.hamiltonian_submatrix()
eng = npl.eigvalsh(model1_matrix) 

def plot_conductance(sys, energies):
    # Compute transmission as a function of energy
    data = []
    for energy in energies:
        smatrix = kwant.smatrix(sys, energy)
        data.append(smatrix.transmission(0, 1))
    pyplot.figure()
    pyplot.plot(energies, data)
    pyplot.xlabel("energy [t]")
    pyplot.ylabel("conductance [e^2/h]")
    pyplot.show()
plot_conductance(model1,eng)

Reply via email to