Extracting data from each lattice (spin up and down)
I'm trying to reproduce the data from PRB 74, 205307 (2006) with Kwant. I'm having trouble extracting data from the spin up and spin down lattices.
This is how I do it:
Define two square lattices with names "up" and "down". Here's the code for the local energies:
lat_up = kwant.lattice.square(1, name="up") lat_dw = kwant.lattice.square(1, name="dw")
delta=1.1*Ny;
sys[(lat_up(x, y) for x in range(Nx) for y in range(Ny))] = 4*t sys[(lat_dw(x, y+delta) for x in range(Nx) for y in range(Ny))] = 4*t
I'm using this "delta" so that the kwant.plot(sys) show then separately.
Define separate leads for the spin up and down lattices. So I can investigate the injection of each kind of spin.
To reproduce Fig.1, panels (b) and (c), of the paper above I run
rho0=np.abs(wf(0).sum(axis=0))**2
This gives me the spin up and down projections of the wavefunction injected via lead 0 (up lead). But the spin up projection is on one lattice, while the spin down is on the other lattice.
When I plot using kwant's map plot (command below), I do see exactly Fig.1(b) and (c), one in each lattice.
kwant.plotter.map(sys, rho0);
But I don't know how to extract from rho0 (or from kwant's wavefunction command) the data from a given lattice.
When I try to implement a spinorbit Hamiltonian using matrices instead of separate lattices, it is easy to split the spin up and down data using something like ldos[0::2] and ldos[1::2], since the up and down data alternate in the array. But with matrices I have no control over the spin up or down injection. So it seems that I do have to use separate lattices.
So, with separate lattices... how do I extract the data from each lattice to separate arrays?
Thanks in advance, Best regards, Gerson
For instance, I would like to extract the rho0 data from the spin up lattice as a table with the rows and cols labeling the sites. So I can export a .dat file and use it somewhere else.
Hi Gerson,
Right now the modes that are calculated by Kwant do not take symmetries present in the system into account. You can very straightforwardly modify them to ensure for example that they are written in spin basis. I've done something similar to include the time reversal symmetry in here: http://arxiv.org/src/1408.1563v2/anc/trijunction.py (see TRIInfiniteSystem and the end of make_dot function).
The next step would be to only select some modes that go into the system. This is also possible. Once your modes are written in the spin basis, you can access the scattering wave functions using kwant.wave_function(sys, ...) and you can take linear superpositions of the scattering wave functions originating from modes with different spins to calculate the proper density of states.
Let me know if you have further questions, Anton
On Fri, Jul 31, 2015 at 9:34 PM, Gerson gersonjferreira@gmail.com wrote:
For instance, I would like to extract the rho0 data from the spin up lattice as a table with the rows and cols labeling the sites. So I can export a .dat file and use it somewhere else.
participants (2)

Anton Akhmerov

Gerson