07/12/12 - Version 0.28a Released
Fixed a sign problem for PWscf cube files.
Richard Bader, from McMaster University, developed an intuitive way of dividing molecules into atoms. His definition of an atom is based purely on the electronic charge density. Bader uses what are called zero flux surfaces to divide atoms. A zero flux surface is a 2-D surface on which the charge density is a minimum perpendicular to the surface. Typically in molecular systems, the charge density reaches a minimum between atoms and this is a natural place to separate atoms from each other.
Besides being an intuitive scheme for visualizing atoms in molecules, Bader's definition is often useful for charge analysis. For example, the charge enclosed within the Bader volume is a good approximation to the total electronic charge of an atom. The charge distribution can be used to determine multipole moments of interacting atoms or molecules. Bader's analysis has also been used to define the hardness of atoms, which can be used to quantify the cost of removing charge from an atom.
We have developed a fast algorithm for doing Bader's analysis on a charge density grid. The program (see below) can read in charge densities in the VASP CHGCAR format, or the Gaussian CUBE format. The program outputs the total charge associated with each atom, and the zero flux surfaces defining the Bader volumes.
Note for VASP users
Information about generating and analyzing charge densities from vasp.
For users using our DOS projection code in Bader volumes, the "-vac" flag is recommended.
Note for CASTEP users
Aaron Hopkinson and Dr Matt Probert from the University of York have provided a den2cube.tar.gz utility to convert from the CASTEP charge density to the cube format so that it can be read in by the Bader analysis program.
Select the appropriate platform to download a binary of the Bader analysis program:
The F90 source code is also available:
Running the Program
The program can be run with the command
bader chargefileIt will automatically determine if the chargefile is a VASP CHGCAR file or a Gaussian CUBE file. The only required input argument is the name of the charge density file.
Command line arguments and output files
The following options can be used when running the Bader analysis program.
bader [ -c bader | voronoi ] [ -n bader | voronoi ] [ -b neargrid | ongrid ] [ -r refine_edge_method ] [ -ref reference_charge ] [ -vac off | auto | vacuum_density ] [ -p all_atom | all_bader ] [ -p sel_atom | sel_bader ] [volume list or range ] [ -p sum_atom | sum_bader ] [ volume list or range ] [ -p atom_index | bader_index ] [ -i cube | chgcar ] [ -h ] [ -v ] chargefile
To get a description of the options, run 'bader -h'.
The following output files are generated: ACF.dat, BCF.dat, AtomVolumes.dat.
ACF.dat contains the coordinates of each atom, the charge associated with it according to Bader partitioning, percentage of the whole according to Bader partitioning and the minimum distance to the surface. This distance should be compared to maximum cut-off radius for the core region if pseudo potentials have been used.
BCF.dat contains the coordinates of each Bader maxima, the charge within that volume, the nearest atom and the distance to that atom.
AtomVolumes.dat contains the number of each volume that has been assigned to each atom. These numbers correspond to the number of the BvAtxxxx.dat files.
The Bader volumes can be written using the print options.
bader [ -p all_atom | all_bader ] chargefile bader [ -p sel_atom | sel_bader ] [ volume list or range ] chargefile bader [ -p sum_atom | sum_bader ] [ volume list or range ] chargefile bader [ -p atom_index | bader_index ] chargefile
-p none The default is to write no charge density files.
-p all_atom Combine all volumes associated with an atom and write to file. This is done for all atoms and written to files named BvAtxxxx.dat. The volumes associated with atoms are those for which the maximum in charge density within the volume is closest to the atom.
-p all_bader Write all Bader volumes (containing charge above threshold of 0.0001) to a file. The charge distribution in each volume is written to a separate file, named Bvolxxxx.dat. It will either be of a CHGCAR format or a CUBE file format, depending on the format of the initial charge density file. These files can be quite large, so this option should be used with caution.
-p sel_atom Write the selected atomic volumes, read from the subsequent list or range of volumes.
-p sel_bader Write the selected Bader volumes, read from the subsequent list or range of volumes.
-p sum_atom Write the sum of selected atomic volumes, read from the subsequent list of volumes.
-p sum_bader Write the sum of selected Bader volumes, read from the subsequent list of volumes.
-p atom_index Write the atomic volume index to a charge density file.
-p bader_index Write the Bader volume index to a charge density file.
Discussion ForumWe have a discussion forum to address issues related to the code and running the program.
Improvements to the original algorithm were developed by Ed Sanville (Loughborough University, UK).
With contributions from: Johannes Voss (DTU), Erik McNellis (FHI), and Matthew Dyer (Liverpool)
Multipole code added by: Sebastien Lebegue, Angyan Janos, and Emmanuel Aubert (Institut Jean Barriol, Nan cy-University)
The code is under development, so please send us any comments or suggestions.