Bader

class Bader(configuration, electron_density, electron_density_reference=None)

Class for performing a Bader charge analysis.

Parameters:
  • configuration (AtomicConfiguration) – The configuration to perform the charge analysis on.
  • electron_density (ElectronDensity) – The electron density of the configuration.
  • electron_density_reference (ElectronDensity) – If electron_density is actually a valance electron density, then the all electron density can optionally be provided.
class BaderMaximum(coordinates, charge, atom, distance)
atom

Alias for field number 2

charge

Alias for field number 1

coordinates

Alias for field number 0

count(value) → integer -- return number of occurrences of value
distance

Alias for field number 3

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

Bader.atomicCharges()

Return the calculated atomic charges.

Returns:The number of valance electrons for each atom.
Return type:numpy.array
Bader.maxima()

Return the calculated bader charge maxima.

Returns:An list of tuples that each contain the coordinates of a charge density maximum as a PhysicalQuantity of type length, the charge contained in the Bader volume as a float, the index of atom that the maxima was mapped to, and the distance to that atom as PhysicalQuantity of type length.
Return type:list of type tuple
Bader.maximaCoordinates()

Return the coordinates of the calculated bader charge maxima.

Returns:The coordinates of each maxima in an array of shape (n, 3) where n is the number of maxima.
Return type:PhysicalQuantity of type length
Bader.metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
Bader.nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
Bader.setMetatext(metatext)

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

Usage Examples

This module should primarily be used though the Bader Analysis plugin on the LabFloor. In order to enable the plugin, select a configuration and an electron density. Optionally, when used to analyze VASP output files, the electron density files named AECCAR0 and AECCAR2 should also be selected. See the notes below for more information.

Notes

This class currently implements the “on-grid” Bader analysis algorithm developed by Henkelman, et al. [HAJonsson06].

Bader charge analysis can only work properly when an all-electron density is available. This is because the analysis assumes that the charge density maxima correspond to the coordinates of the atomic nuclei, however, pseudo-potential methods remove charge near the nuclei. This means that this type of analysis is currently only useful with FHI-AIMS (because it is an all-electron code) and VASP (because it supports writing an all-electron density) calculators in QuantumATK.

If you want to perform a Bader charge analysis using VASP, it is important to be aware that the CHGCAR files only contain the valence electron density. In order to write out the extra information that is needed, you must add LAECHG=.TRUE. to the INCAR file. This will cause the atomic core electron density to be written to the file AECCAR0 and the non-pseudoized valence electron density (i.e. the density that can be added to the core electron density) is written to the file AECCAR2.

Bader calculations should be converged with respect the the electron density grid spacing. This means that, in VASP, you should increase the values of NEGXF, NEGYF, and NEGYZ in order to increase the number of grid points in the CHGCAR and AECCAR files.

[HAJonsson06]G. Henkelman, A. Arnaldsson, and H. Jónsson. A fast and robust algorithm for Bader decomposition of charge density. Comput. Mat. Sci., 36(3):354–360, 2006. doi:10.1016/j.commatsci.2005.04.010.