QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: BandTheory 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
-
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
-
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.
-
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() :)