This xsl style-sheet prepares .agr file for xmgrace to plot density-of-state (DOS) graphs.

It parses command line options, then invokes extract_diagram.xsl to extract required data sets from the DOS output of Exciting, and finally writes the data in a nice-looking xmgrace file format.


xsltproc [--stringparam ID "pattern"] xmldos2grace.xsl dos.xml > filename.agr

found in $EXCITINGROOT/xml/visualizationtemplates

Gets the PATTERN as a comma separated list of DOS ids. A DOS id is a string defining type, spin, l and m attributes of a DOS graph. Different fields in the string are separated by '/'. A typical DOS id is like "type/spin/l/m", where

type can be any of values
t: total DOS
i: interstitial DOS
sym.n: nth atom of symbol sym for partial DOS.
spin can be any of values
1: up
2: down
and finally l and m can be
l: a non-negative integer standing for orbital angular momentum quantum number (second quantum number)
m: an integer ranging from -l to l, showing the magnetic quantum number (third quantum number)
  • If no ID is entered, all possible DOS graphs (including total, interstitial, and all partials) are plotted.
  • For non-magnetic cases, the spin can only be 1.
  • If any field is left empty, all possible entries for the field are considered.
  • ':' can be used for a sequence of values in a field.

Example 1: fcc structure of Fe4C1 containing 4 equal Fe atoms at fcc positions and a single C atom at the center of the unit-cell

xsltproc --stringparam ID "Fe.2:3/1/1/-1" xmldos2grace.xsl dos_Fe4C1.xml > graph.agr

(The same graph can also be made using the id "Fe.2/1/1/-1, Fe.3/1/1/-1".)

xsltproc --stringparam ID "C.1/2/1/-1:0" xmldos2grace.xsl dos_Fe4C1.xml > graph.agr

(In this case, since there is only one carbon atom in the system, the same graph can also be made using the id "C/2/1/-1:0".)

Example 2: TiC, a combination of two fcc structures one shifted along (0.5,0.5,0.5) with respect to the other one. There are one Ti atom and one C atom in the unit-cell

xsltproc --stringparam ID "t/1//,i/1//" xmldos2grace.xsl dos_TiC.xml > graph.agr

(Because the calculations are non-magnetic, the same graph can be made using the id "t///, i///".)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License