Released 4.11.2010
Castepdos is distributed in a fortran files, in this directory castepdos.f
To compile castepdos you simply need a vanilla fortran compiler, e.g.
gfortran -o castepdos castepdos.f
I haven't tested it across many compilers, but there's nothing very sophisticated in the code.
/Home/gja/castep/Ti>castepdos
Enter castep seedname
Type in enter the seedname: this enables castepdos to look for the .bands file and (optionally) the .symm file as described later.
castepdos will then prompt for the mp k-point grid (annoyingly, this isn't contained in the .bands file). Enter the three numbers as requested, the same as in your .cell file (or .castep file under MP grid size for SCF calculation
The program will produce a file called seedname.dos. This contains three columns:
the energy in eV, with zero set to the Fermi Energy
the density of states at the energy
the cumulative density of states.
Which you can plot using your favourite graphics package. For magnetic systems spin_polarized : true there is another file called seedname.dos2.
If you are working in the Northern Hemisphere, this is the spin down band, the other being spin up. Researchers in the Southern Hemisphere will find these designations reversed.
Castepdos can also use files created using symmetry, which is a good thing to do because it saves you computing time. Unfortunately, CASTEP doesn't write out the symmetry in any sensible place, so you have to do a bit of work to extract it.
First, you need to run with high verbosity, include in the .param file:
iprint : 2
and in the .cell file...
symmetry_generate
This will produce lots of verbosity in the .castep file (sorry). You now need to create a .symm file for yourself.
First open the seedname.castep file in an editor, then copy the chunk containing the symmetry elements starting with the string ``1 rotation'' into a file called seedname.symm. An example for fcc is attached.
Now run castepdos as above, it should read both the .bands and the .symm files and produce a seedname.dos as before.
This method does not require you to use iprint : 2 , it needs only the .cell and .bands files. You still need to input the k-point grid at runtime.
castepdos does not produce partial densities of states.
castepdos does not work with other DFT codes, although interfaces should be fairly easy to write, there is the usual pronoun problem.
NHIST determines the size of the bins in the histogram used for the DOS plot. The default is 2000 which is fine for a single band. If your calculation includes semi-core electrons you might end up with a very wide energy range, in which case changing NHIST might be a good idea.
EFINE sets the trapezium width for the xy integration (z is done explicitly). If you increase it, you'll get a better DOS but the code will run slower.