QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: ams_nanolab on July 21, 2017, 13:10

Title: Arrhenius plot
Post by: ams_nanolab on July 21, 2017, 13:10
While using the script 'IV-n-log.py' as in http://docs.quantumwise.com/casestudies/ag_si_interface/ag_si_interface.html with version 2016.4, I am getting the following error

Traceback (most recent call last):
  File "2.py", line 34, in <module>
    config = nlread(filename,DeviceConfiguration)[1]
IndexError: list index out of range

What should I do?
Title: Re: Arrhenius plot
Post by: Jess Wellendorff on July 21, 2017, 14:08
This is a Python index error. Easy to Google. You are trying to retrieve the contents of index "1" in the list of DeviceConfigurations, but there is no item with index "1", so the error is raised. Try reading index "0" instead. If that also fails, the list is empty, meaning that there are no DeviceConfiguration objects saved in the data file that you read.
Title: Re: Arrhenius plot
Post by: ams_nanolab on July 22, 2017, 11:55
Okay. Good. But does the index follow the gID number? or independent?
Title: Re: Arrhenius plot
Post by: Anders Blom on July 22, 2017, 19:06
If you want to retrieve a specific ID, use the object_id keyword. But nlread is designed to always return a list, thus you must anyway use [0]

c = nlread("file.nc", BulkConfiguration, object_id="gID005")[0]