Author Topic: A sequence of elements  (Read 3106 times)

0 Members and 1 Guest are viewing this topic.

Offline BandTheory

  • Heavy QuantumATK user
  • ***
  • Posts: 26
  • Reputation: 0
    • View Profile
A sequence of elements
« on: April 10, 2009, 20:10 »
Hi again,

Here is my question:

I have a script that is failing in the line that has the 'electrode repetitions' argument for the Two Probe configuration. The error message says that the argument must be a 'sequence of elements.'  As far as I know I have specified it as such, creating Periodic Atom Configurations for my two electrodes that appears to otherwise be valid.

Particular error message:

Traceback (most recent call last):
    File "blahblahblah.py", line 199 in ?
        electrode_repetitions= [(1,1),(5,5)]
NLTypeError: Error in TwoProbeConfiguration setup : The 'elements' must be a sequence of elements.


Not sure what the issue is but I would love your input.

BT




Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
Re: A sequence of elements
« Reply #1 on: April 10, 2009, 21:24 »
If you post your input script we might be able to find the error, apparently it is related to the definition of elements in the geometry setup

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: A sequence of elements
« Reply #2 on: April 11, 2009, 21:06 »
It would be easy to see from the script, so if you could post that the answer can be found quickly.

But, guessing, from the error, I'd say the error is not in the electrodes but the scattering region element list, which somehow is either not a simple list, or it contains something which is not an element like Carbon, Gold, etc.
« Last Edit: April 11, 2009, 21:16 by Anders Blom »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5429
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: A sequence of elements
« Reply #3 on: April 11, 2009, 21:16 »
It's a bit misleading and confusing that the error appears to be related to the electrode repetitions; it's not. The reason is that the statement is broken over several lines, and the error occurs in the function (constructor, really) TwoProbeConfiguration(). However, when you break a long statement like this over several lines, Python prints the last line (ignoring the line with only a closing parenthesis) as the offending one. Hence the many posts on "error in runtime_parameters", which is the last line of the broken statement executeSelfConsistentCalculation() :)