Hi, > a) Regarding the edge disorder, I cannot remove the disorder in the edges > with the leads (I saw your recent previous discussion)
I am not sure what you mean by this. From what I can see from your model there is no disorder in your leads: lead0 = kwant.Builder(sym0) lead0[graphene.shape(lead0_shape, (0, 0))] = -pot lead0[[kwant.builder.HoppingKind(*hopping) for hopping in nn_hoppings]] = -t lead0[[kwant.builder.HoppingKind(*hopping) for hopping in nnn_hoppings_a]] = -nnn_hoppinga lead0[[kwant.builder.HoppingKind(*hopping) for hopping in nnn_hoppings_b]] = -nnn_hoppingb Also, you do not need to manually enumerate all the hopping kinds like this. Lattices have a method 'neighbors' that returns the hopping kinds for neighboring sites in the lattice. You could reduce the above code to: lead0[graphene.shape(lead0_shape, (0, 0))] = -pot lead0[graphene.neighbors()] = -t lead0[(kind.family_a == a for kind in graphene.neighbors(2))] = -nnn_hoppinga lead0[(kind.family_a == b for kind in graphene.neighbors(2))] = -nnn_hoppingb which would allow you to remove the lines where you explicitly enumerate the hoppings: nn_hoppings = (((0, 0), a, b), ((0, 1), a, b), ((-1, 1), a, b)) nnn_hoppings_a = (((-1, 0), a, a), ((0, 1), a, a), ((1, -1), a, a)) nnn_hoppings_b = (((1, 0), b, b), ((0, -1), b, b), ((-1, 1), b, b)) > Is it possible already to compute directly from Kwant the local current > density? If yes, how? This will be available in Kwant version 1.3. I see that at the start of your script that you have the line 'from __future__ import division' which tells me that you are still using Python 2. Since version 1.2 Kwant supports Python 3 only, and the 1.1.x versions will only receive bug fixes, no new features. For this reason I would recommend using Python 3 unless you have a good reason not to. Coming back to your question, while calculating currents will be available in Kwant 1.3, if your model only has 1 orbital per site, it is probably just as easy to calculate the current manually. The current flowing from site 'j' to site 'i' is written: J_ij = 2 Im{(ψ_i)* H_ij ψ_j} where 'ψ_i' is the component of the wave function on site 'i', '*' is complex conjugation, and 'H_ij' is the Hamiltonian matrix element between sites 'i' and 'j'. In Kwant this could be computed like: psi = kwant.wave_function(syst)(0)[0] # scattering state 0 from lead 0 current = np.array([2 * psi[i].conjugate() * syst.hamiltonian(i, j) * psi[j] for i, j in syst.graph]) current = current.imag In Kwant version 1.3 there will also be functionality for plotting such quantities defined on hoppings. Hope that helps, Joe
signature.asc
Description: PGP signature