Error in piloting DOS
Posted: Sun Jan 15, 2023 9:06 am
Dear Users and experts
I am new users in vasp and need your help
Please see following I am trying to Use py4vasp to plot the DOS as written in the tutorial part2 and keep getting the following error
Any advisable comments would appreciated
Thank you
1- (base) [sherifyehia@192 e07_CO-partial-dos]$ conda activate py4vasp-env
2- (py4vasp-env) [sherifyehia@192 e07_CO-partial-dos]$ ls
CHG CONTCAR EIGENVAL INCAR OSZICAR PCDAT POTCAR py4vasp vasprun.xml XDATCAR
CHGCAR DOSCAR IBZKPT KPOINTS OUTCAR POSCAR PROCAR REPORT WAVECAR
(py4vasp-env) [sherifyehia@192 e07_CO-partial-dos]$ python
Python 3.8.15 (default, Nov 24 2022, 15:19:38)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import py4vasp
>>> my_calc = py4vasp.Calculation.from_path("./e07_CO-partial-dos")
>>> my_calc.dos.plot()
Traceback (most recent call last):
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/raw/file.py", line 44, in __init__
self._h5f = h5py.File(filename, "r")
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/h5py/_hl/files.py", line 533, in __init__
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/h5py/_hl/files.py", line 226, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 106, in h5py.h5f.open
FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = '/home/sherifyehia/TUTORIALS/molecules-part2/e07_CO-partial-dos/e07_CO-partial-dos', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/data/_base.py", line 121, in wrapper
with instance._data_dict_from_context() as data_dict:
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/data/_base.py", line 95, in _from_file
context = raw.File(file)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/raw/file.py", line 53, in __init__
raise exception.FileAccessError(error_message) from err
py4vasp.exceptions.exceptions. FileAccessError: Error opening /home/sherifyehia/TUTORIALS/molecules-part2/e07_CO-partial-dos/e07_CO-partial-dos to read the data. Please check that you already completed the Vasp calculation and that the file is indeed in the directory. Please also check whether you are running the Python script in the same directory or pass the appropriate filename including the path.
I am new users in vasp and need your help
Please see following I am trying to Use py4vasp to plot the DOS as written in the tutorial part2 and keep getting the following error
Any advisable comments would appreciated
Thank you
1- (base) [sherifyehia@192 e07_CO-partial-dos]$ conda activate py4vasp-env
2- (py4vasp-env) [sherifyehia@192 e07_CO-partial-dos]$ ls
CHG CONTCAR EIGENVAL INCAR OSZICAR PCDAT POTCAR py4vasp vasprun.xml XDATCAR
CHGCAR DOSCAR IBZKPT KPOINTS OUTCAR POSCAR PROCAR REPORT WAVECAR
(py4vasp-env) [sherifyehia@192 e07_CO-partial-dos]$ python
Python 3.8.15 (default, Nov 24 2022, 15:19:38)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import py4vasp
>>> my_calc = py4vasp.Calculation.from_path("./e07_CO-partial-dos")
>>> my_calc.dos.plot()
Traceback (most recent call last):
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/raw/file.py", line 44, in __init__
self._h5f = h5py.File(filename, "r")
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/h5py/_hl/files.py", line 533, in __init__
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/h5py/_hl/files.py", line 226, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 106, in h5py.h5f.open
FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = '/home/sherifyehia/TUTORIALS/molecules-part2/e07_CO-partial-dos/e07_CO-partial-dos', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/data/_base.py", line 121, in wrapper
with instance._data_dict_from_context() as data_dict:
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/data/_base.py", line 95, in _from_file
context = raw.File(file)
File "/home/sherifyehia/anaconda3/envs/py4vasp-env/lib/python3.8/site-packages/py4vasp/raw/file.py", line 53, in __init__
raise exception.FileAccessError(error_message) from err
py4vasp.exceptions.exceptions. FileAccessError: Error opening /home/sherifyehia/TUTORIALS/molecules-part2/e07_CO-partial-dos/e07_CO-partial-dos to read the data. Please check that you already completed the Vasp calculation and that the file is indeed in the directory. Please also check whether you are running the Python script in the same directory or pass the appropriate filename including the path.