Page 1 of 1

Help with py4vasp

Posted: Fri Apr 14, 2023 9:21 am
by dlopezduran
Dear all,
I'm trying to reproduce the band structure of Si given as example in:
tutorials/latest/bulk/part1/
but I am unable to do that.
I have installed py4vasp correctly in my computer and it works well,
but when I type that of the webpage I obtain the coordinates
(or something like that), but not the figure itself.
The calculation went well, no error obtained, so I guess
that all the files are well.
I am not doing that in Jupyter, but I think that it is not
neccessary.
A bit of help would be appreciated ...
Thank you very much, David.

Re: Help with py4vasp

Posted: Fri Apr 14, 2023 3:05 pm
by ferenc_karsai
Are you sure the previous calculation "3.3 Calculation" in the tutorial finished correctly?
You didn't specify anything but I guess that calculation didn't work properly and the bands were not correctly written to the HDF5 file.

You can't check the HDF5 file, but you can check the stdout and see that it succesfully completed.

Re: Help with py4vasp

Posted: Fri Apr 14, 2023 3:55 pm
by dlopezduran
Dear Ferenc,
Thanks for your help.
Apparently, the calculations finished well. You can see the files OUTCAR and vaspout.h5. I don't know how vaspout.h5 should be, but at least it is not empty. I have also included the reply in python3 to the last command of the webpage, which is mycalc.band.plot() (I have followed the steps
in that webpage to the T).
Best regards, David.
PS: I have had to add/change the extension jpg to OUTCAR and vaspout.h5 in order to be able to upload them in this webpage (it is, once downloaded these two files, please remove the extension to manage them normally).

Re: Help with py4vasp

Posted: Mon Apr 17, 2023 7:42 am
by martin.schlipf
py4vasp uses plotly to produce the figures which in turn requires a browser. If you use the plotting commands inside a Jupyter notebook or IPython this will be done for you automatically. If you use it in a regular python shell you need to add .show() to explicitly open the browser.

Code: Select all

mycalc.dos.plot() -> mycalc.dos.plot().show()