Pawel Wojcik <Pawel.Wojcik <at> fis.agh.edu.pl> writes:

> 
> Hello,
> I have just started working with KWANT but at the beginning I have a
problem with the calculation of the
> energy band in lead. Blow I paste my code in which a define the lead and
try to calculate the energy vs wave
> vector. The definition of the lead comes from the example on the website
> documentation. I assume a lattice with the size dx and then t=h/m/dx/dx.
> 
> The energy from the function kwant.bands is expresed in units of [t] and
in this point a have a problem
> because if I define the lead with W=100 points and dx=0.1 nm and calculate
the E vs k bands, it differs from 
> the E vs k bands calculated for W=50 points and dx=0.2 nm (of course scale
the energy multiplying it by t),
> although the width of the lead W_eff=W*dx is the same for both cases.

Hi,

The reason that you see different band structures is that you have not
re-scaled the "momenta" correctly when calling the `bands` object returned
by `kwant.physics.Bands`. Concretely, when you call `bands(k)`, the "k" value
you give is in units reciprocal to the distance units which you have chosen
(which manifests in the onsite and hopping parameters). This means that
for the "dx = 0.2" case, the momentum units are twice as small as for the
"dx = 0.1" case. If you want to plot the two band structures on the same
curve then you need to rescale the momentum units::

    lead100 = make_lead(W=100,dx=0.1*f_nm2au).finalized()
    lead50 = make_lead(W=50,dx=0.2*f_nm2au).finalized()
    band100 = kwant.physics.Bands(lead100)
    band50 = kwant.physics.Bands(lead50)

    # define this to be in units corresponding to "dx = 0.1"
    momenta = numpy.linspace(-numpy.pi, numpy.pi, 101)
    energies100 = [band100(k) for k in momenta]
    energies50 = [band50(2 * k) for k in momenta]  # rescale momenta
    pyplot.plot(momenta, energies100, 'k', momenta, energies50)

You should now see that for small "k" the two sets of curves match up.

Regards,

Joe


Reply via email to