Hello dear VASP users !
I used p4v (py for vasp) to plot density of states and projected density of states.
Now, is there a way to add the fermi level in the DOS plot ? (as vertical line, I mean)
I would need it especially in the projected DOS... so, if it is possible to do it with the p4v, that would be the best.
If not, I would like to know how can I do atom projection of density of states manually, so that I can create my own script to work with the DOSCAR, and plot the final result with gnuplot or matplotlib, for instance.
Thanks and best,
Marco
How to add fermi level as vertical line in the density of state plot
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 11
- Joined: Tue Apr 19, 2022 10:50 am
-
- Global Moderator
- Posts: 505
- Joined: Mon Nov 04, 2019 12:41 pm
- Contact:
Re: How to add fermi level as vertical line in the density of state plot
I will assume you are using a code similar to
where 'fig' is an instance of the Graph class from which you can obtain a plotly instance using
Then you can add a vertical line to this plotly figure (see for example: https://stackoverflow.com/questions/658 ... lotly-plot)
If you want to use another plotting library of your choice you can replace the last line with
and then use the data dictionary to build the plot.
Hope this helps
Code: Select all
import py4vasp
calc = py4vasp.Calculation.from_path('.')
fig = calc.band.plot()
Code: Select all
plotly_fig = fig.to_plotly()
If you want to use another plotting library of your choice you can replace the last line with
Code: Select all
data = calc.band.to_dict()
Hope this helps
-
- Newbie
- Posts: 11
- Joined: Tue Apr 19, 2022 10:50 am
Re: How to add fermi level as vertical line in the density of state plot
Hello dear Henrique, thank you.
The point is that I do not have py4vasp as a module...
Is there a way to do the same with the p4v gui ?
Best,
Marco
The point is that I do not have py4vasp as a module...
Is there a way to do the same with the p4v gui ?
Best,
Marco
-
- Global Moderator
- Posts: 505
- Joined: Mon Nov 04, 2019 12:41 pm
- Contact:
Re: How to add fermi level as vertical line in the density of state plot
Ok, I am confused.
You asked about p4v (py for vasp).
I assumed you were asking about py4vasp which is a python package.
That is not to be confused with p4vasp which is an application with a GUI.
If your question was about p4vasp I fear I am not able to help you since it's outside my expertise and not maintained by the VASP team.
You asked about p4v (py for vasp).
I assumed you were asking about py4vasp which is a python package.
That is not to be confused with p4vasp which is an application with a GUI.
If your question was about p4vasp I fear I am not able to help you since it's outside my expertise and not maintained by the VASP team.