IndexError: list index out of range

51 views
Skip to first unread message

Hexige Wuliji

unread,
Apr 22, 2021, 9:34:51 AM4/22/21
to PyCDT forum
Dear developers,
I am just using your pycdt code to compute defect calculations for my Ph.D. topic. The system is a little large that has 48 atoms in a primitive cell. I have trouble when I compute corrections after parsing the DFT output files. There occurs an index error which writes "list index out of range". I will attach my screenshot at the end. 
This confuses me a lot and I will appreciate any help you can give. 

best wishes.

Wuliji Hexige

ERROR - root - ERROR in running PyCDT:
PyCDT is a script that generates vasp input files, parses vasp output files, and computes the formation energy of charged defects.

This script works based on several sub-commands with their own options. To see the options for sub-commands, type: pycdt -h
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.8/site-packages/pycdt-2.0.5-py3.8.egg/EGG-INFO/scripts/pycdt", line 545, in main
    args.func(args)
  File "/opt/anaconda3/lib/python3.8/site-packages/pycdt-2.0.5-py3.8.egg/EGG-INFO/scripts/pycdt", line 231, in compute_corrections
    formula = defects[0].bulk_structure.composition.reduced_formula
IndexError: list index out of range


Hexige Wuliji

unread,
Apr 22, 2021, 11:35:20 PM4/22/21
to PyCDT forum
Hello,
I found it was not the compute-calculation-step error. It was because all my DFT calculations of defect structures didn't converge in 99 ionic relaxation steps.
So, my first question is if the defect structure relaxation doesn't converge, pycdt won't take the results of the last step as the total energy of the defect structure?
Second, because of the large number of atoms in my primitive cell, I won't want to calculate all the possible defect structures, could I randomly select some of them generated from pycdt-generate-input step and remove the others for time and cost reason?
The last question is about corrections. In your article, you tell us "For users who desire additional corrections related to improving corrections with semilocal functional approaches, the development branch of PyCDT also includes the ability to include band edge level alignment with respect to the average electrostatic potential, shallow level corrections based on the values for band edge alignment, and Moss–Burstein band filling corrections ". However, you also tell us "Parts of these corrections require some subjective judgment calls to be made by the user, so they are not included in the automation procedure by default." My question is how I could consider these additional corrections in my study? Please teach me somewhat.

Thanks.
Best, 
Wuliji

Bharat Medasani

unread,
Jun 5, 2021, 7:49:26 AM6/5/21
to PyCDT forum
First of all, hope this is not too late for you

On Thursday, April 22, 2021 at 11:35:20 PM UTC-4 wlj...@gmail.com wrote:
Hello,
I found it was not the compute-calculation-step error. It was because all my DFT calculations of defect structures didn't converge in 99 ionic relaxation steps.
So, my first question is if the defect structure relaxation doesn't converge, pycdt won't take the results of the last step as the total energy of the defect structure?'
Yes, pycdt purposefully rejects non-converged results to prevent generating incorrect results. You can specify higher tolerances to get convergence if that is what you want.
 
Second, because of the large number of atoms in my primitive cell, I won't want to calculate all the possible defect structures, could I randomly select some of them generated from pycdt-generate-input step and remove the others for time and cost reason?
 
Yes, you can do this without any issue.
 
The last question is about corrections. In your article, you tell us "For users who desire additional corrections related to improving corrections with semilocal functional approaches, the development branch of PyCDT also includes the ability to include band edge level alignment with respect to the average electrostatic potential, shallow level corrections based on the values for band edge alignment, and Moss–Burstein band filling corrections ". However, you also tell us "Parts of these corrections require some subjective judgment calls to be made by the user, so they are not included in the automation procedure by default." My question is how I could consider these additional corrections in my study? Please teach me somewhat.
 
Modeling of defects is a big subject and it is not possible to anticipate users' needs and the materials they are studying. It would be beyond our scope. My suggestion would be to study some overview papers published within the last decade and pick the methods that are suitable for your research. At the end of the day, you may have to write your own scripts or modify pycdt code to get what you want. Many others have done so.
Reply all
Reply to author
Forward
0 new messages