Dear everyone, I would like to solve the 3D Schrödinger equation with a 1D potential step. With the material in the mailing list as well as from the tutorial the 2D case works fine. Extending to 3D gives the same when just taking one lattice site in the z direction (H>1). Increasing the hight of the slab (H>1) changes the minimal energy for which transmission is possible thus my code is wrong. Did I define and attach the leads correctly with the wraparound in 3D? The short code is below. Thank you for any hint! Best, B import numpy as np import matplotlib.pyplot as plt import scipy as sp from numpy import * import kwant import sys #calculate the conductance for a sheet (Dim=2) or a Slab (Dim=3) that is translational invariant in y direction a = 1.0 #lattice constant V0 = 0.2 #potential step size L = 2 #Length x-direction the length is a bit useless in this code W = 6 #Width y-direction H = 6 #Hight z-direction t = 1 #hopping parameter Dim=3 #dimension of the system # for H=1, Dim=2 # for H>1, Dim=3 #params for integration and plotting Nky=100 #points in ky space NE=25 #points in energy lat = kwant.lattice.cubic(a) # Define the scattering region # Infinite potential plane/Slab in y direction sys = kwant.Builder(kwant.TranslationalSymmetry(lat.vec((0, W, 0)))) for i in range(L): for j in range(W): for k in range(H): # On-site Hamiltonian sys[lat(i, j, k)] = 2*Dim * t + heaviside(i,0)*V0 #potential step located at the center between the leads sys[lat.neighbors(1)] = -t sys = kwant.wraparound.wraparound(sys) #Left lead leadL = kwant.Builder(kwant.TranslationalSymmetry((-a, 0, 0), lat.vec((0, W, 0)))) #trans inv in transport dir and ky leadL[(lat(0,j,k) for j in range(W) for k in range(H))] = 2*Dim*t #onsite terms in the left lead leadL[lat.neighbors(1)] = -t #Right lead leadR = kwant.Builder(kwant.TranslationalSymmetry(( a, 0, 0), lat.vec((0, W, 0)))) leadR[(lat(0,j,k) for j in range(W) for k in range(H))] = 2*Dim*t+V0 #onsite terms in the right lead leadR[lat.neighbors(1)] = -t leadL = kwant.wraparound.wraparound(leadL, keep=0) #keeping the translational invariance in x direction leadR = kwant.wraparound.wraparound(leadR, keep=0) sys.attach_lead(leadL) sys.attach_lead(leadR) kwant.plot(sys) sys = sys.finalized() # Calculation of the total transmission for a given Energy ky_array = np.linspace(-pi,pi,Nky) dky=ky_array[1]-ky_array[0] energies = np.linspace(0.0, 1.0,NE) Ttot=[] for energy in energies: Tky_array=zeros(Nky) for i in arange(len(ky_array)): ky=ky_array[i] smatrix = kwant.smatrix(sys, energy, [ky]) Tky_array[i]=smatrix.transmission(1, 0) Ttot.append((2*pi)/(W)*(sum(Tky_array)-0.5*Tky_array[0]-0.5*Tky_array[Nky-1])*dky) #cheap trapezodial rule to integrate over ky # Plot transmission plt.plot(energies, Ttot) plt.show()