Dacapo-scripts
This is a collection of python scripts I have created during my research with Dacapo to greatly speed up my analysis.  Most of them have been created with assistance from various people at CAMP, and hopefully I have made note of their most significant contributions in the scripts themselves. If not, Zbigniew Lodziana and Asbjorn Christensen in particular have been particularly helpful in contributing script examples through the email list for dacapo.

Basically, all of the scripts operate on a netcdf file, as in:
scriptname ncfile

Generally, the output is directly to stdout unless flags are used in some cases to save to a file. The documentation for the scripts is found in the scripts most of the time, and I have summarized them below.

You will need to download jmath.py and bands.py and place them somewhere on your PYTHONPATH. The scripts themselves should be made executable and put on your executable path, that should be all. If you have the standard Dacapo python installation, they should work. You can get all the files at https://sourceforge.net/projects/dacapo-scripts/.

Feel free to modify these scripts as you see fit, if you do something really cool with it, let me know, I may be interested in it myself, and probably others would too. Of course if you find bugs I would appreciate knowing that also. These are my working copies of the scripts, so if something is wrong with them, then I would like to know!

Disclaimer:
Of course since they are my working copies, you can expect that they will change with time, and as my research changes, some may start being neglected,others may get changed as I learn the right way or a better way to do them. The copies here worked for me with my setup, and should work for you. Of course, you should read through the scripts to see how the calculations are done, and decide if they are suitable for what you want to do and that you agree with the way they are done. These scripts work with python 1.5.2 for sure, I think most of them work for python 2.2.

dband
# This program is designed to calculate the center of the d-band for
# the short cutoff and infinite cutoff. It also calculates the center
# of the filled d-band, that is, up to the Fermi Level. There are 3
# options, -p displays a gnuplot figure of the d-band. -h will save a
# postscript and pdf version of this figure. -s will save the data
# into a text file for analysis elsewhere. It saves three columns, the
# first is the energy, the second is the short cutoff DOS, the third
# is the infinite cutoff DOS, in tab-delimited format. Of course, you
# must have calculated the AtomResolvedDOS for this to work.

dz2
# This program is designed to calculate the center of the d_zz-band for
# the short cutoff and infinite cutoff. It also calculates the center
# of the filled d-band, that is, up to the Fermi Level. There are 3
# options, -p displays a gnuplot figure of the d-band. -h will save a
# postscript and pdf version of this figure. -s will save the data
# into a text file for analysis elsewhere. It saves three columns, the
# first is the energy, the second is the short cutoff DOS, the third
# is the infinite cutoff DOS, in tab-delimited format. Of course, you
# must have calculated the AtomResolvedDOS for this to work.

ncsum
#The purpose of this script is to print a summary of the dacapo output, from the nc file input
# -e gives only the total energy, -d gives only some details, by default it does both.

dos2
#Makes a plot of the dos from an ncfile. Be default, it shows the whole range. with the -c option,
#you can specify the energy range, number of points and smooth factor at the command line.

ados
# This program is designed to calculate the density of states from the AtomResolvedDOS
#for the s,p and d orbitals for
# the short cutoff and infinite cutoff.  -s will save a
# postscript and pdf version of this figure. -d will save the data
# into a text file for analysis elsewhere. It saves three columns, the
# first is the energy, the second is the short cutoff DOS, the third
# is the infinite cutoff DOS, in tab-delimited format.  -a calculates
# the dos for all the atoms in the slab. You will be asked to select the atom numbers from a list if
# you don't use -a. Also gives the center of the occupied dos, integral up to
# the fermi level, and others.

SourceForge Logo
jkitchin