Author Topic: Arrhenius plot  (Read 3745 times)

0 Members and 1 Guest are viewing this topic.

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Arrhenius plot
« 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?

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Arrhenius plot
« Reply #1 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.

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Re: Arrhenius plot
« Reply #2 on: July 22, 2017, 11:55 »
Okay. Good. But does the index follow the gID number? or independent?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Arrhenius plot
« Reply #3 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]