Dear Patrik,
> When I replace the 'if continuous' section with the following section > it will complain. > > if continuous: > def lead_shape(site): > (x, y, z) = site.pos > return (x == -0.7 and y == 0.0 and z <= -a) > t00=0.0 > Leadham > ="t00*sigma_0*k_x**2+t00*sigma_0*k_y**2-t0*sigma_0*k_z**2+(2*t0+e1)*sigma_0" > template = kwant.continuum.discretize(Leadham, grid_spacing=a) > dn_lead.fill(template, lead_shape, lat1(0, 0, -1)) > syst.attach_lead(dn_lead) The error message I got when running the code was: > ValueError: Lead to be attached contains no sites. This error seems perfectly clear to me; you have defined your "lead_shape" function incorrectly, such that no sites are added to your "dn_lead" system. Happy Kwanting, Joe
signature.asc
Description: OpenPGP digital signature