jkitchin / vasp

New ASE compliant Python interface to VASP
122 stars 58 forks source link

"IndexError: list index out of range" when reading potcar #38

Closed certik closed 2 years ago

certik commented 7 years ago

I want to read an already finished calculation in the current directory:

$ cat a.py 
from vasp import Vasp
calc = Vasp('.')
$ python a.py
Unhandled exception in Vasp
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 208, in read_potcar
    [potcar.split() for potcar in potcars]]
IndexError: list index out of range
Unhandled exception in Vasp
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 283, in read
    self.parameters.update(self.read_potcar())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 208, in read_potcar
    [potcar.split() for potcar in potcars]]
IndexError: list index out of range
Unhandled exception in Vasp
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "/home/certik/ext/miniconda2/envs/ase/lib/python2.7/site-packages/ase/calculators/calculator.py", line 260, in __init__
    self.read(restart)  # read parameters, atoms and results
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 283, in read
    self.parameters.update(self.read_potcar())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 208, in read_potcar
    [potcar.split() for potcar in potcars]]
IndexError: list index out of range
Unhandled exception in Vasp
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "/home/certik/ext/miniconda2/envs/ase/lib/python2.7/site-packages/ase/calculators/calculator.py", line 594, in __init__
    atoms, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "/home/certik/ext/miniconda2/envs/ase/lib/python2.7/site-packages/ase/calculators/calculator.py", line 260, in __init__
    self.read(restart)  # read parameters, atoms and results
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 283, in read
    self.parameters.update(self.read_potcar())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
    return self.exception_handler(self, *sys.exc_info())
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
    return func(self, *args, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 208, in read_potcar
    [potcar.split() for potcar in potcars]]
IndexError: list index out of range
Traceback (most recent call last):
  File "a.py", line 2, in <module>
    calc = Vasp('.')
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 45, in inner
  File "build/bdist.linux-x86_64/egg/vasp/vasp_core.py", line 247, in __init__
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
  File "/home/certik/ext/miniconda2/envs/ase/lib/python2.7/site-packages/ase/calculators/calculator.py", line 594, in __init__
    atoms, **kwargs)
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
  File "/home/certik/ext/miniconda2/envs/ase/lib/python2.7/site-packages/ase/calculators/calculator.py", line 260, in __init__
    self.read(restart)  # read parameters, atoms and results
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 283, in read
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 51, in inner
  File "build/bdist.linux-x86_64/egg/vasp/vasp.py", line 48, in inner
  File "build/bdist.linux-x86_64/egg/vasp/readers.py", line 208, in read_potcar
IndexError: list index out of range

I am using Vasp 5.3.5. Unfortunately I can't post the actual output files.

jkitchin commented 7 years ago

Thanks for reporting this. I will be traveling for a couple of weeks, and I hope to resolve this in mid June.

jkitchin commented 7 years ago

There is good news and bad news. The good news is this may be fixed in the python3 branch of vaspy. The bad news is I don't know if that fix is also compatible with python2.