The density of states of Ag
This page is a continuation of Ag-bandstructure.
The input
The density of states (DOS) is a grounstate property and therefore is requested by adding the <dos> element to the <properties> element just like the bandstructure element.
<properties> <dos/> </properties>
In this case the dos element is empty (<dos/>) and all the attributes are taken from the default values. The attributes and default values are described in the input reference
Visualization
This is an example of how to get a graph from the dos.xml with ipython (interactive console for matplotlib and numpy behaves like matlab).
Run:
ipython -pylab
then in the ipython shell:
import libxml2 from libxml2 import xmlAttr doc = libxml2.parseFile("dos.xml") ctxt = doc.xpathNewContext() x= map(float,map(xmlAttr.getContent,ctxt.xpathEval("//totaldos/diagram/point/@distance"))) y= map(float,map(xmlAttr.getContent,ctxt.xpathEval("//totaldos/diagram/point/@totaldensity"))) plot(x,y) title('Ag') ylabel('DOS') xlabel('Energy [a.u.]') fill_between(x, 0, y) axis([-0.50, 0.5, 0, 200])