18.11.2012 Views

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />

7.22.6 Bader Analysis<br />

Henkelman et. al have implemented a fast and robust algorithm for calculating the electronic charges on individual<br />

atoms in molecules or crystals, based on the Bader partitioning scheme [Bader]. In that method, the<br />

analysis is based purely on the electron density. The partitioning of the density is determined according to its<br />

zero-flux surfaces. Details of their implementation can be found in [Tang]. The program is freely available at<br />

http://theory.cm.utexas.edu/henkelman/research/bader/ where you will also find a description of the method.<br />

The algorithm is very well suited for large solid state physical systems, as well as large biomolecular systems.<br />

The computational time depends only on the size of the 3D grid used to represent the electron density, and scales<br />

linearly with the total number of grid points. As the accuracy of the method depends on the grid spacing, it is<br />

recommended to check for convergnce in this parameter (which should usually by smaller than the default value).<br />

The program takes cube input files. It does not support units, and assumes atomic units for the density (Bohr^-3).<br />

All ase dft calculators have a get_pseudo_density method, which can be used to get the density. A simple<br />

python script for making a cube file, ready for the Bader program, could be:<br />

>>> from ase import *<br />

>>> density = calc.get_pseudo_density() * Bohr**3<br />

>>> write(’filename.cube’, atoms, data=density)<br />

Some calculators (e.g. gpaw) also have a method called get_all_electron_density, in which case this is<br />

preferable to get_pseudo_density.<br />

Note that it is strongly recommended to use version 0.26b or higher of the program, and the examples below refer<br />

to this version.<br />

Example: The water molecule<br />

The following example shows how to do Bader analysis for a water molecule.<br />

First do a ground state calculation, and save the density as a cube file:<br />

from ase import *<br />

from gpaw import *<br />

atoms = molecule(’H2O’, cell=[7.5, 9, 9], calculator=GPAW(h=.17, xc=’PBE’))<br />

atoms.center()<br />

atoms.get_potential_energy()<br />

rho = atoms.calc.get_all_electron_density(gridrefinement=4) * Bohr**3<br />

write(’water_density.cube’, atoms, data=rho)<br />

Then analyse the density cube file by running (use bader -h for a description of the possible options):<br />

$ bader -p all_atom -p atom_index water_density.cube<br />

This will produce a number of files. The ACF.dat file, contains a summary of the Bader analysis:<br />

| # X Y Z CHARGE MIN DIST<br />

| -----------------------------------------------------------------<br />

| 1 7.0865 8.5038 9.0672 9.1121 1.3250<br />

| 2 7.0865 9.9461 7.9403 0.4440 0.2834<br />

| 3 7.0865 7.0615 7.9403 0.4440 0.2834<br />

| -----------------------------------------------------------------<br />

| NUMBER OF ELECTRONS: 9.99999<br />

Revealing that 0.56 electrons have been transfered from each Hydrogen atom to the Oxygen atom.<br />

The BvAtxxxx.dat files, are cube files for each Bader volume, describing the density within that volume. (I.e. it is<br />

just the original cube file, truncated to zero outside the domain of the specific Bader volume).<br />

AtIndex.dat is a cube file with an integer value at each grid point, describing which Bader volume it belongs to.<br />

164 Chapter 7. Documentation for modules in <strong>ASE</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!