Once, I was making some DOS figures with quantum espresso by using the sumpdos.x program by Andrea Ferretti (included in the QE package), but I felt that I am missing some features. Thereby, I wrote my own script, which does something similar, but it is much more automatized, it is faster to use, and it even produces ready-to-publish graphs automatically.
It is part of the quantum espresso distribution, so if you have the source code of quantum espresso, you have it in the …/*espresso*/PP/tools/sum_states.py. If you don’t have it, or you just want to read the source-code online, you can check for sum_states.py in the quantum espresso repository.
So, if you want to plot the DOS with quantum espresso, here are the steps:
- Calculate the wavefunction (single point, with a small “conv_thr”, 10-8 or so)
- Run projwfc.x with an input like:
- Run the sum_states.py script with something like:
sum_states.py -o out -s "*Fe1*d*" -xr -8.5 5.2
I have run these script with the example of the wustite, and the result is the following one:
Some other interesting features:
- Tries to find the output files by itself
- Finds out whether there is gnuplot or mathplotlib available, if not, dumps raw data so that you can plot it however you want
- Plots the Up and Down spin in opposite directions and slightly different colors
- Adjusts the range of the ordinate axis for the plot
- Finds out wetter there is X11 forwarding (in case it is executed non-locally) and if there is not, it will try use gnuplot “set terminal dumb”, so that we get an idea of the shape of the data. (… yes, this option is very geek 😛 )