Charge Density, Bader Charge, and ELF
This page documents three VQkit post-processing workflows used to inspect electronic redistribution and localization:
Charge-density difference (CDD);
Bader charge analysis;
Electron localization function (ELF).
These tools are available from the Post-processing menus.
This page is a consolidated reference page. Detailed procedural tutorials
for CDD, Bader, and ELF are documented separately under Tutorials.
Charge-density difference
The charge-density difference is commonly defined as:
where the fragment densities must be evaluated consistently with the combined system.
VQkit’s current CDD post-processing workflow assumes that the subtraction has already been completed.
It therefore expects a final CDD cube file such as:
*.cube
*.cub
VQkit does not ask for fragment densities and does not perform the fragment subtraction inside this menu.
Preferred CDD filenames
When several cube files are present, VQkit gives preference to filenames containing terms such as:
cdd
charge_diff
charge-diff
charge_difference
charge-density-difference
difference
delta_rho
deltarho
If only one cube file is present, it is selected automatically.
If several candidates are found, VQkit displays a selection menu.
No cube file found
If no .cube or .cub file is present, VQkit reports that no final CDD
cube was found.
For Quantum ESPRESSO, the user should first generate the final charge-density
difference cube using an appropriate pp.x workflow.
CDD cube parsing
VQkit reads:
cube-grid dimensions;
atomic positions;
voxel vectors;
volumetric scalar data.
The cube file itself is retained unchanged.
Density units
For the current QE-oriented CDD workflow, cube density values are converted from:
e/bohr^3
to:
e/Angstrom^3
using the Bohr-to-Angstrom conversion factor.
CDD color convention
The current VQkit CDD plots use a symmetric positive/negative density scale.
The interpretation is:
Red = charge accumulation
Blue = charge depletion
The zero-density contour is also shown.
Atom positions from the cube file are overlaid when they lie sufficiently close to the selected slice plane.
CDD outputs
Typical outputs are:
VQkit_QE_CDD_XY.png
VQkit_QE_CDD_XY.dat
VQkit_QE_CDD_XZ.png
VQkit_QE_CDD_XZ.dat
VQkit_QE_CDD_YZ.png
VQkit_QE_CDD_YZ.dat
For custom slices:
VQkit_QE_CDD_YZ_CUSTOM.png
VQkit_QE_CDD_YZ_CUSTOM.dat
For planar averaging:
VQkit_QE_CDD_PLANAR_Z.png
VQkit_QE_CDD_PLANAR_Z.dat
Three-dimensional visualization
VQkit does not replace the original cube file.
For full 3D isosurface visualization, use software such as:
VESTA;
VMD;
XCrySDen.
CDD interpretation cautions
CDD results depend critically on how the fragment densities were constructed.
For meaningful subtraction, the fragment calculations should normally use:
the same simulation cell;
the same atomic positions as in the combined geometry;
the same plane-wave settings;
the same pseudopotential family;
the same FFT/grid conventions where required.
A visually attractive CDD plot is not meaningful if the densities being subtracted are inconsistent.
Bader charge analysis
The current Bader workflow is implemented for VASP charge-density files and
uses the external bader executable.
The VQkit menu provides:
BADER CHARGE ANALYSIS
[1] Check Bader executable and required files
[2] Prepare AECCAR0 + AECCAR2 reference density
[3] Run Bader analysis
[4] Analyze an existing ACF.dat
[0] Back
External dependency
VQkit does not implement the Bader partitioning algorithm itself.
The external program:
bader
must be installed and available on PATH.
VQkit can check whether the executable is available.
Bader file-status check
The status workflow checks for:
CHGCAR
AECCAR0
AECCAR2
CHGCAR_sum
POTCAR
ACF.dat
It also reports whether the external Bader executable can be found.
Reference-density preparation
Choose:
[2] Prepare AECCAR0 + AECCAR2 reference density
VQkit constructs:
and writes:
CHGCAR_sum
Before summation, VQkit checks that AECCAR0 and AECCAR2 use:
identical FFT-grid dimensions;
compatible atom counts / structure definitions.
If the grids differ, VQkit stops instead of creating an invalid reference density.
Running Bader analysis
Choose:
[3] Run Bader analysis
VQkit requires:
CHGCAR
and the external:
bader
program.
Reference-density selection
With the default automatic reference behavior:
If both
AECCAR0andAECCAR2exist, VQkit generatesCHGCAR_sum.Else, if
CHGCAR_sumalready exists, VQkit uses it.Otherwise, the Bader run proceeds without a separate reference density.
When a reference is available, the external command is run in the equivalent form:
bader CHGCAR -ref CHGCAR_sum
Without a reference:
bader CHGCAR
After a successful calculation, VQkit expects:
ACF.dat
to exist.
If ACF.dat is not generated, the run is treated as failed.
Analyzing an existing ACF.dat
Choose:
[4] Analyze an existing ACF.dat
This option is useful when the external Bader program was run separately.
VQkit parses atom-resolved information including:
atom index;
x, y, z;
Bader electron count;
minimum distance to basin boundary;
Bader atomic volume.
POTCAR ZVAL and net charge
If POTCAR is available, VQkit extracts the VASP ZVAL value for each
species.
The net charge is then calculated as:
where:
\(ZVAL_i\) is the valence-electron count from POTCAR;
\(N_i^{\mathrm{Bader}}\) is the Bader electron count.
The sign convention is:
positive net charge = electron depletion
negative net charge = electron accumulation
Example
Suppose:
ZVAL = 6.0
Bader electrons = 6.35
then:
which indicates electron accumulation.
Bader output
VQkit writes:
VQkit_BADER_CHARGES.csv
The columns are:
index
element
x
y
z
bader_electrons
zval
net_charge
min_dist
atomic_volume
This file can be used directly in spreadsheet or plotting software.
Additional ACF information
If available, VQkit also reads:
total number of electrons;
vacuum charge;
vacuum volume.
These values are reported from ACF.dat but are not substitutes for
manual charge-conservation checks.
Bader interpretation cautions
Bader charge is a real-space partitioning quantity.
It should not be interpreted as a unique formal oxidation state.
Use Bader charges mainly for:
relative charge transfer;
comparing chemically related sites;
tracking adsorption-induced redistribution;
comparing before/after reaction states.
For robust comparison, use consistent:
pseudopotentials;
charge-density settings;
grids;
computational parameters.
Electron localization function
The electron localization function (ELF) is a dimensionless quantity commonly used to visualize electron localization.
The current VQkit workflow expects a final ELF cube file.
Preferred filenames
If several cube files are present, VQkit gives preference to filenames containing:
elf
localization
If only one cube file exists, it is selected automatically.
ELF range
ELF is plotted in the physical range:
0.0 to 1.0
Numerical values outside this range due to noise are clipped for plotting.
A qualitative interpretation is:
ELF -> 1.0 : strong electron localization
ELF ~ 0.5 : electron-gas-like behavior
Interpretation near zero depends on the local electronic environment and should not be reduced to a single bonding label.
ELF contours
The current ELF plotting routine uses contour levels at approximately:
0.5
0.7
0.8
0.9
These contours help distinguish moderately and strongly localized regions.
Atoms near the slice plane are overlaid and labeled.
QE ELF preparation
If no ELF cube is found and VQkit detects Quantum ESPRESSO, it creates:
VQkit_QE_ELF_pp.in
The generated template uses:
plot_num = 8
A representative template is:
&INPUTPP
prefix = 'CHANGE_ME'
outdir = 'CHANGE_ME'
filplot = 'VQkit_QE_ELF'
plot_num = 8
/
&PLOT
nfile = 1
filepp(1) = 'VQkit_QE_ELF'
weight(1) = 1.0
iflag = 3
output_format = 6
fileout = 'VQkit_QE_ELF.cube'
/
The user must edit:
prefix
outdir
to match the completed QE SCF calculation.
Then run:
pp.x < VQkit_QE_ELF_pp.in > VQkit_QE_ELF_pp.out
After VQkit_QE_ELF.cube has been generated, run the ELF option again.
ELF outputs
Typical outputs include:
VQkit_QE_ELF_XY.png
VQkit_QE_ELF_XY.dat
VQkit_QE_ELF_XZ.png
VQkit_QE_ELF_XZ.dat
VQkit_QE_ELF_YZ.png
VQkit_QE_ELF_YZ.dat
For a custom slice:
VQkit_QE_ELF_YZ_CUSTOM.png
VQkit_QE_ELF_YZ_CUSTOM.dat
The .dat files contain:
two in-plane coordinates;
ELF value;
selected slice index;
physical slice coordinate.
Three-dimensional ELF
The original cube is left unchanged.
For 3D ELF isosurfaces, use a volumetric-data viewer such as:
VESTA;
VMD;
XCrySDen.
Relationship between CDD, Bader, and ELF
These three analyses provide complementary information.
CDD
Shows where charge redistributes when systems interact.
Useful questions include:
Where does charge accumulate?
Where is charge depleted?
How is the interface polarized?
Bader charge
Provides a quantitative real-space partitioning of electron density among atoms.
Useful questions include:
Which atoms gain electron density?
Which atoms lose electron density?
How much relative charge transfer occurs?
ELF
Shows where electrons are localized.
Useful questions include:
Are there localized lone-pair-like regions?
Are electrons localized around bonds or atomic centers?
How does localization change after adsorption or reaction?
Recommended combined workflow
For an adsorption or catalytic system:
Confirm the underlying DFT calculation completed.
Generate a consistent CDD cube.
Plot the relevant CDD slices.
Run Bader analysis on the corresponding charge density.
Export
VQkit_BADER_CHARGES.csv.Generate the ELF cube.
Plot relevant ELF slices.
Compare CDD, Bader, and ELF together.
Use geometric and electronic-structure data to support interpretation.
These methods should be interpreted together rather than treated as mutually interchangeable measures of bonding.
Tutorial links
For step-by-step instructions, see:
Tutorials -> Charge-density difference (CDD)
Tutorials -> Bader charge
Tutorials -> Electron localization function (ELF)
The tutorial pages show the procedural workflow, while this reference page documents the current VQkit behavior, inputs, outputs, and interpretation.