Could you please give an example for calculating conductance using wraparound module? I've tried this with the following script to calculate the transmission in z-direction of a 3D cubic lattice, with infinite x-y plane:
#creating the scattering region with symmetries in all directions t = 1 L, W = 4, 4 lat = kwant.lattice.general(np.identity(3)) sym = kwant.TranslationalSymmetry(*lat.prim_vecs) sys = kwant.Builder(sym) sys[lat.shape(lambda p: True, (0, 0, 0))] = -2*t sys[lat.neighbors(1)] = -t
#using wraparound module sys = wraparound(sys)
#build and attach the lead in z-direction lead = kwant.Builder(kwant.TranslationalSymmetry((0, 0, -1))) lead[(lat(i,j,0) for i in range(L) for j in range(W))] = -2*t lead[lat.neighbors(1)] = -t sys.attach_lead(lead) sys.attach_lead(lead.reversed()) sys = sys.finalized()
#is it the right way to specify k_x=k_y=0? smatrix = kwant.smatrix(sys, 0, [0,0]) print(smatrix.transmission(1, 0))
but it returns the error message: "ValueError: Builder does not interrupt the lead, this lead cannot be attached."
If I instead call wraparound after attaching the lead, i.e., ... sys.attach_lead(lead.reversed()) sys = wraparound(sys).finalized()
It returns "ValueError: No output is requested." which might suggest no lead attached at all.
So what is the right way of implementing such calculations? Thank you!
2016-05-17 17:31 GMT+08:00 Christoph Groth firstname.lastname@example.org:
chong wang wrote:
I am trying to calculate transport across infinite planes. Can you show
me an example?
It should be quite easy with the wraparound module: let's say that you want to compute transmission in the z direction while x and y are the transversal directions.
You create a builder with three translational symmetries and use wraparound to turn the two transversal symmetries into k_x and k_y parameters (see the source code of wraparound for how to use it). The builder returned by wraparound can be finalized and used with Kwant as usual, for example to calculate transmission. Whenever using for calculations it you have to provide values for the two additional parameters (k_x and k_y) in addition to any other parameters that you might have used in your value functions.
If you set both of k_x and k_y to 0 that's equivalent to having periodic boundary conditions along the transversal directions. If you want to compute transmission across the plane, you will have to integrate over the Fermi surface.
I haven't ever done this myself, but I believe that you simply have to calculate this:
T_total = ∫ dk_x ∫ dk_y T(E_f, k_x, k_y),
where T() is the transmission as given by Kwant.
To do the integral, you could use something like scipy.integrate.dblquad. It could take a while to evaluate, especially since there's no easy way to parallelize adaptive integration. (But I'm working on this!)