Thanks Joe for your suggestion. I am able to calculate the Green's function at any arbitrary position, but I can't figure out the sequence. How can I find the order of site and orbital corresponding to each element of the Green's function matrix? For example, ------------------------------------------------------------ def scater() make system and attach lead, not finalized # mounting a virtual lead #Viacheslav def mount_vlead(sys, vlead_interface, norb): dim = len(vlead_interface)*norb zero_array = np.zeros((dim, dim), dtype=float) def selfenergy_func(energy, args=()): return zero_array vlead = kwant.builder.SelfEnergyLead(selfenergy_func, vlead_interface) sys.leads.append(vlead) # arbitrary virtual lead #Joe def vshape(pos): x, y = pos return 0.5<=x<2.5 and 0.5<=y<=W vlead = kwant.Builder(kwant.TranslationalSymmetry(graphene.vec((1, 0)))) vlead[graphene.shape(vshape, (1.5,0.5))] = 0 vlead[[kwant.builder.HoppingKind(*hopping) for hopping in hoppings]] = 1 gf_sites = vlead.sites() syst = scater() mount_vlead(syst, gf_sites, 1) fsyst = syst.finalized() ------------------------------------------------------------- When I simply print gf_sites it shows all the information as dict_keys(), I can not extract the data from that. I tried to use kwant.plotter.sys_leads_sites(fsyst, num_lead_cells=1) as described in the documentation, but can not make anything there as well. What shall I do? There is another thing I would like to clarify. Since my objective is to find the Green's function at each lattice points, would it be correct to reduce vshape such that it contains only one lattice point? By doing so I may destroy the geometry of the virtual lead, but we are defining the self energy to be a null matrix. So that should not affect the Green's function. Thanks and best regards, Sumit On 12 January 2016 at 19:46, Joseph Weston <joseph.weston08@gmail.com> wrote:
Hi,
Now I am stuck with the vlead_interface part. According to the documentation it is a sequence of Site instances, which as much I understand would be a list of the position and SiteFamily, but I don't know how to define them.
`Site` objects are returned by lattice objects in Kwant. whenever you do:
lat = kwant.lattice.square() site = lat(0, 1)
then `site` is an instance of a `Site` with `lat` as its family and a tag of `(0, 1)`. You need to provide the interface sites so that Kwant knows how you have ordered the degrees of freedom in your self energy matrix. Given that you are creating a virtual lead and want to get the Green's function everywhere in the system, you could do something like:
syst = kwant.Builder() ... # build the system greens_function_sites = syst.sites() mount_vlead(syst, greens_function_sites, 1) fsyst = syst.finalized()
The only caveat is that when you obtain the Green's function at the interface with the virtual lead (i.e. on all the sites) the degrees of freedom will be ordered like the `greens_function_sites` sequence, and *not* in the same way as `fsyst.sites`.
Hope that helps,
Joe
-- Sumit Ghosh Spintronics Theory Group PSE Division KAUST -- ------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.