Author Topic: 'Too many values to unpack'  (Read 4783 times)

0 Members and 1 Guest are viewing this topic.

Offline BandTheory

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Reputation: 0
    • View Profile
'Too many values to unpack'
« on: April 1, 2010, 07:08 »
Hi

I get the following error 'Too many values to unpack' from the line in my script where I specify the Brillouin zone integration parameters in the arguments for calculating density of states.
 
I looked up this to see if it was a Python error and I found that you get it if you do something like the following.
a,b,c = [1,2,3,4]

Now I have specified the the Brillouin zone integration parameters like normal, and I would think if there was some issue with how I was specifying them the error would first appear when I plug them into the electrode parameters.

Any idea what might be causing this?  Thanks a lot.

Offline BandTheory

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Reputation: 0
    • View Profile
Re: 'Too many values to unpack'
« Reply #1 on: April 2, 2010, 21:10 »
I figured it out. For calculateDensityOfStates(), Brillouin Zone Integration parameters requires only two arguments instead of three.  This fixes my Python 'Too many values to unpack' error. 

My new question is why does Brillouin zone integration parameters require only two arguments in calculateDensityOfStates() and three arguments in ElectrodeParameters ?  I am just curious.

Thanks.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5577
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: 'Too many values to unpack'
« Reply #2 on: April 2, 2010, 22:22 »
The reason is simple, but it's a good point to highlight, because it really goes to the heart of what transport calculations with ATK is all about.

In a two-probe system, there is no periodicity in the transport direction. Therefore, there is no concept of k-point sampling. The electrode, however, is described as a periodic bulk system in all directions for the purpose of establishing the proper boundary condition for the edge of the central region, where it is assumed that the influence of the scattering sources in it has been screened by the surface layers enough that the density and potential are bulk-like.

Thus the electrode is 3D bulk, while for transport - and hence transmission and surface DOS - we only have a 2D periodic system, in the transverse plane.

Also note that, therefore, the Z k-points for the electrode are only used in the electrode calculations. This is why it's not so expensive to use many Z k-points, because the electrode is always smaller than the two-probe. At the same time, we need to have quite many k-points in order to match the nature of the semi-infinite electrode in the two-probe setup. You can read more about this here: http://quantumwise.com/forum/index.php?topic=101.0
« Last Edit: April 2, 2010, 22:24 by Anders Blom »