Hi Chung,
> Is there a way to implement indirect hopping in Kwant? > I have a cubic system and I want to add to the term describing the > direct hopping between site i and j, an indirect hopping term via an > intermediate site k, for all the sites in my system. Kwant does not have a concept for "indirect" hoppings; you will have to implement something yourself, adding two hoppings to the system. You can use similar logic to the existing HoppingKind object; just iterate over all sites "i" of the system, check for the existence of sites "j" and "k" in the system. If they both exist, add the 2 hoppings, if either does not exist, do not add the hoppings. Somthing like the following should work: lat = kwant.lattice.cubic() syst = … delta_j = … # tag offset i → j delta_k = … # tag offset j → k sites = set(syst.sites()) def second_hops(): for i in sites: j = lat(i.tag + delta_j) k = lat(j.tag + delta_k) if j in sites and k in sites: yield (i, j, k) for i, j, k in second_hops(): syst[i, j] = hop1 syst[j, k] = hop2 Happy Kwanting, Joe
signature.asc
Description: OpenPGP digital signature