Author Topic: Transmission spectrum from bandstructure  (Read 8721 times)

0 Members and 1 Guest are viewing this topic.

Offline wachr

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: de
  • Reputation: 2
    • View Profile
Transmission spectrum from bandstructure
« on: July 5, 2012, 15:59 »
Dear community, as I have seen that the creation of a (zero-bias) transmission spectrum, e.g. for a nanotube, takes much longer than the calculation of the bandstructure, I have written a (simple) function that generates a transmission spectrum out of a given bandstructure. The calculation time of the transmission is in the range of seconds and almost not independent on the resolution given. @ATK-developers / experienced users: What does the implemented ATK-feature do else to generate a transmission spectrum? May this approach used here generate errors for special systems? Best regards!
Code
from NanoLanguange 
from numpy import * # sorry for this dirty import of numpy
from NanoLanguage import *

def create_transmission_atk(band, emin = -4, emax = 4, npoints = 1000):
    # create transmission function, band is an ATK-bandstructure object
    # [emin, emax] define the energy interval
    # npoints gives the resolution of the interval (+1 is added to this value, later on)
    energies = array(band.evaluate()) # all the energy points of the bandstructure in an array    
    return create_transmission(energies, emin = emin, emax = emax, npoints = npoints)

# the next function may be used also with other programs than ATK, no nano languange is needed

def create_transmission(energies, emin = -4, emax = 4, npoints = 1000):
    # create transmission function
    # energies = the energy points of the bandstructure in an array, each band separated
    epoints = linspace(emin, emax, npoints+1)
    transmission = zeros(npoints+1)
    nbands = size(energies[0,:])
    
    for i in range(nbands): # loop over bands
        tmp = energies[:,i] # band number i
        # print tmp
        l = size(tmp)
        nextreme = [0] # minima and maxima of the band
        de2 = 0; de = 0;
        for j in range(1,l-1):
            de2 = de
            de = tmp[j]-tmp[j-1]
            if (de2*de < 0):
                # does the sign of the energy difference change? (local extremum)
                nextreme.append(j-1)
        nextreme.append(l-1)
        
        for k in range(size(nextreme)-1):
            # all the minima and maxima
            istart = int((tmp[nextreme[k]]-emin) / (emax - emin) * npoints)
            iend = int((tmp[nextreme[k+1]]-emin) / (emax - emin) * npoints)
            if (istart < 0):
                istart = 0
            if (iend < 0):
                iend = 0
            if (istart > npoints ):
                istart = npoints 
            if (iend > npoints ):
                iend = npoints 
            if istart > iend:
                istart, iend = iend, istart
            transmission[istart:iend] = transmission[istart:iend] + ones(iend - istart)

    return array([epoints, transmission])
« Last Edit: July 5, 2012, 16:18 by wachr »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5411
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Transmission spectrum from bandstructure
« Reply #1 on: July 5, 2012, 20:56 »
For a perfectly periodic 1D system, at zero bias, your approach is fine. However, it is extremely hard to generalize to 3D, and it also breaks down completely as soon as you introduce scattering by defects. ATK is designed to deal not with perfect systems (which in a sense are uninteresting, because they cannot really be utilized for any device functionality), but rather to see how defects, adsorbed molecules, and other "imperfections" of the nanotube or other systems influence the transmission spectrum. Moreover, at finite bias, the transmission cannot be obtained from just the band structure or even as an interpolation of the zero-bias spectrum.

ATK actually has a built-in function for obtaining the transmission spectrum from the band structure. Well, it uses a different approach actually, but at least for 1D systems the result is the same. See http://quantumwise.com/publications/tutorials/mini-tutorials/167 for details and inspiration! You can also use that to test your implementation.

Offline wachr

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: de
  • Reputation: 2
    • View Profile
Re: Transmission spectrum from bandstructure
« Reply #2 on: July 6, 2012, 12:17 »
Dear Anders,

thank you very much for that detailed answer - it was approximately what I expected (a bit more than that - so I learned sth :) ). So, this approach will possibly not hold for metal-decorated CNTs as there is scattering. And I fully agree, that ideal systems are some kind of "uninteresting". Nevertheless, the following question:

For transport at finite bias voltage, within NEGF, the coupling of the electrodes is neglected (only coupling between contact and central region is taken into account). What should one do, if the coupling still exists and cannot be avoided? (e.g. having an ideal system CNT-CNT-CNT, where the electronic states spread over the whole system.) In this ideal case, would it be simply senseless to apply NEGF, because the results would not change in comparison to zero-bias-transport, as there is no scatterer?

Best regards, Christian

P.S Thanks for pointing out that ATK already has this feature - I just did not find it so far.
« Last Edit: July 6, 2012, 17:32 by wachr »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Transmission spectrum from bandstructure
« Reply #3 on: July 6, 2012, 17:50 »
Dear Christian.

First of all thanks for your valuable contribution.

It has been annoying me for some time that the performance of the TransmissionSpectrum for bulk systems because for some systems is really fast, but others it is really really dead slow. If you care to read it, i will give a more detailed explanation of algorithm ATK currently use for the bulk Transmission spectrum compared to your approach.

  • The structure is repeated to ensure that there is only coupling between neighbours cells
  • A hopping matrix is calculated, and the number of propergating modes are calculated using the Krylov method.
  • The number of modes is the multiplied with the k-point weight and added to total transmission spectrum

The approach you are doing is based on performing a diagonalization of a NxN matrix, which is order nz*N^3 operations (where N is the number of basis functions in the cell and nz is the number of k-points in z-axises). ATK's current approach sets up a (2xN*M)x(2xN*M), (where M is a the number of repetitions required to make cell only coupled to its nearest cell), and the principal we perform a inversion of the this matrix which then if implemented naively is a 8*M^3*N^3 operation.
But then it uses a iterative method such that the solution should only take a fraction of the time at not the full 8*M^3*N^3.

So despite the much larger problem in ATK, still on paper your approach should be slower, but the problem comes when the iterative methods fails, since it has to revert performing the full operation, making your routine faster depending on your choice of k-points in the z-axis. But potential the ATK verison could be very slow if the iterative method fails. However the ATK still has the strength that it has infinite number of k-points in the z-axis.

Having be boxing around with the bulk transmission quite a lot myself, I would really advocate that ATK should support both methods.
« Last Edit: July 6, 2012, 17:57 by Nordland »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Transmission spectrum from bandstructure
« Reply #4 on: July 6, 2012, 17:54 »
Having read my own post through an additional time, I just want to edited it little.

Offline wachr

  • Regular QuantumATK user
  • **
  • Posts: 8
  • Country: de
  • Reputation: 2
    • View Profile
Re: Transmission spectrum from bandstructure
« Reply #5 on: July 9, 2012, 16:44 »
Dear Nordland,

thank you very much for your interesting answer concerning your implementation.

I hope that I got your answer right and the scaling behaviour you are mentioning is based on the evaluation of the bandstructure, which should normally take longer than the calculation of the transmission. (I had to think about your answer to know, where this scaling behaviour of "my method" comes from...)

I also see the comment from Anders, that the implementation of the 3D-case would really a mess with my method (one could calculate the bandstructure with different directions in the kspace, then, the transmission into a single direction in the real space could be obtained.)

So nevertheless, thank you for valuing my contribution!

Best, Christian Wagner