# Plotting the Density of States

In my previous post (http://blog.levilentz.com/?p=17) I outlined how to generate the DOS/PDOS data. In this post I will outline how to generate nice plots of the data. Once plotted, you can start doing visual interpretation of where the states are and what they mean for your system. Below is a quick youtube video of how I do it. I have not included all of the states, and at the end I have shifted the states around the Fermi Level of the system:

I, at the recommendation of my advisor, use xmgrace to do most of these manipulations. It is a nice graphing environment as it makes moving the data around very easy compared with excel or other graphing programs.

When you first open the program, you will be presented with the following dialog. Feel free to play around, but be warned: it does not have an ‘undo’ button, so I find frequent saving can be your best friend.

To inport data into your file simply go to: Data > Import > ASCII. Make sure you remove the *.dat from the filter otherwise you will not see anything. Once you browse to the location with your pdos files, simply double click all of them you want to import. Normally, you are interested in your most reactive bands, so this is normally the outermost orbital for each atom. However, sometimes the transition metals can behave differently, so always double check that you are displaying the right data.

Once you have inserted all of your bands, you will end up with something like the following:

However, the way QE calculates the states is a bit nonsensical when the Fermi Level is not noted. Generally, I will shift all the data to the Fermi Level to make it directly readable. To do this go to: Data > Transformations > Evaluate Expression. Select all of the data sets in both the left and right columns. In the “Formula” box enter: x = x – *FermiLevel*. Where *FermiLevel* is your level. Click Apply then Close to shift the data.

There are many other things you can do such as add graphs to the plot. I recommend doing this prior to inserting data. Simply go Edit > Arrange Graphs to make as many as you would like. To insert data into a particular graph just make sure that the correct graph is selected before repeating above. With a bit of practice, and luck, you can get the following results: