sumo: sumo-optplot failed to plot optical absorption spectra diagrams of VASP GW+BSE computation.
I try to test sumo-optplot using the calculation results of Dielectric_properties_of_Si_using_BSE, but failed as follows:
(datasci) werner@X10DAi:~/Downloads/GW_BSE/Si_BSE$ sumo-optplot
Traceback (most recent call last):
File "/home/werner/.pyenv/versions/datasci/bin/sumo-optplot", line 33, in <module>
sys.exit(load_entry_point('sumo', 'console_scripts', 'sumo-optplot')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/werner/Public/repo/github.com/SMTG-UCL/sumo.git/sumo/cli/optplot.py", line 455, in main
optplot(
File "/home/werner/Public/repo/github.com/SMTG-UCL/sumo.git/sumo/cli/optplot.py", line 170, in optplot
latexify(vr.final_structure.composition.reduced_formula).replace(
^^^^^^^^^^^^^^^^^^
AttributeError: 'Vasprun' object has no attribute 'final_structure'. Did you mean: 'initial_structure'?
(datasci) werner@X10DAi:~/Downloads/GW_BSE/Si_BSE$ sumo-optplot ./vasprun.xml
usage: sumo-optplot [-h] [-f F [F ...]] [-p P] [-d D] [-c C [C ...]] [-g G] [-b [E ...]]
[-l L [L ...]] [-a] [--height HEIGHT] [--width WIDTH] [--xmin XMIN] [--xmax XMAX]
[--ymin YMIN [YMIN ...]] [--ymax YMAX [YMAX ...]] [--style STYLE [STYLE ...]]
[--no-base-style] [--format FORMAT] [--dpi DPI] [--font FONT] [--units UNITS]
[M ...]
sumo-optplot: error: argument M: invalid choice: './vasprun.xml' (choose from 'eps_real', 'absorption', 'n_real', 'n_imag', 'loss', 'eps_imag')
I attached the vasprun.xml file below.
Regards, Zhao
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (10 by maintainers)
In any case, I have just pushed a fix that makes sure Vasprun.final_structure == Vasprun.initial_structure if there is no relaxation. For getting the chemical formula only, the initial structure (which is always set) is as good as the final structure.
It seems that your conjecture is correct:
Agreed that using
initial_structureis the better way to go, and we should probably update sumo to use that. But thanks for the fix @shyuep.