Electron Localization Function
This tutorial explains how to visualize the Electron Localization Function (ELF) with VQkit.
ELF is dimensionless and is conventionally bounded by:
VQkit can detect an existing ELF Gaussian cube file and visualize it directly.
Important
The current VQkit ELF workflow is primarily a visualization and analysis workflow.
VQkit expects the final ELF field in:
*.cube
or:
*.cub
For Quantum ESPRESSO, if an ELF cube is not present, VQkit can prepare a
pp.x input template using:
plot_num = 8
For VASP or other cases, place the final ELF cube in the working directory before running the analysis.
Open the ELF workflow
From the VQkit main menu choose:
[2] Post-processing
Then choose:
[4] Charge, spin and bonding
Then select:
[3] Electron localization function (ELF)
VQkit searches the current directory for:
*.cube
*.cub
Files containing words such as:
elf
localization
are preferred when several cube files are present.
Existing ELF cube
If exactly one suitable ELF cube is found, VQkit selects it automatically.
If several possible cube files are found, VQkit displays them and asks:
Detected multiple possible ELF cube files:
[1] ...
[2] ...
...
Select ELF cube [1]:
Choose the final ELF cube corresponding to the calculation you want to analyze.
No ELF cube found
Quantum ESPRESSO
If VQkit detects a Quantum ESPRESSO calculation but no ELF cube, it creates:
VQkit_QE_ELF_pp.in
The generated 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'
/
Edit:
prefix
outdir
so that they match your completed Quantum ESPRESSO SCF calculation.
Then run:
pp.x < VQkit_QE_ELF_pp.in > VQkit_QE_ELF_pp.out
After pp.x finishes, the working directory should contain:
VQkit_QE_ELF.cube
Run the VQkit ELF option again.
VASP
If VQkit does not detect a QE calculation and no ELF cube is present, it asks you to place the final ELF cube in the working directory.
The current ELF menu does not generate a VASP ELF cube automatically.
Cube information
When VQkit successfully reads the ELF cube, it reports information such as:
Detected ELF cube
Grid
Atoms
ELF plotting range
The plotting range is fixed to:
0.0 to 1.0
Numerical values outside this range due to small numerical noise are clipped for plotting.
1. XY center slice
Choose:
1
VQkit takes the central grid point along z and plots the ELF in the
xy plane.
Typical outputs:
VQkit_QE_ELF_XY.png
VQkit_QE_ELF_XY.dat
2. XZ center slice
Choose:
2
VQkit takes the central grid point along y and plots the xz plane.
Typical outputs:
VQkit_QE_ELF_XZ.png
VQkit_QE_ELF_XZ.dat
3. YZ center slice
Choose:
3
VQkit takes the central grid point along x and plots the yz plane.
Typical outputs:
VQkit_QE_ELF_YZ.png
VQkit_QE_ELF_YZ.dat
4. All center slices
Choose:
4
or simply press Enter at:
Select plot type [4]:
VQkit generates:
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
This is the recommended first inspection.
5. Custom slice position
Choose:
5
VQkit asks:
Plane [YZ]:
Allowed planes are:
XY
XZ
YZ
Then VQkit asks:
Fractional slice position 0-1 [0.5]:
The value defines the position along the axis perpendicular to the selected plane.
Examples:
0.25
0.50
0.75
Example
To inspect an XZ plane at 40% of the cell along y:
Plane [YZ]: XZ
Fractional slice position 0-1 [0.5]: 0.40
VQkit selects the closest grid index.
Typical output:
VQkit_QE_ELF_XZ_CUSTOM.png
VQkit_QE_ELF_XZ_CUSTOM.dat
ELF data files
Each exported .dat file contains:
axis1_A
axis2_A
ELF
The header also records:
selected plane;
slice index;
physical slice coordinate in Angstrom;
the fact that ELF is dimensionless.
Atomic overlays
VQkit reads atomic positions from the cube file.
Atoms close to the selected slice are overlaid on the ELF contour plot.
They are shown as:
circular markers;
element-symbol labels.
This helps relate localized electronic regions to atoms, bonds, lone pairs, or interstitial regions.
Contour levels
VQkit plots ELF on the fixed interval:
and adds contour lines at selected ELF values including approximately:
0.5
0.7
0.8
0.9
These contours help identify regions with stronger localization.
Interpreting ELF
ELF close to 1
Values approaching:
indicate strong electron localization.
Such regions can be associated with features such as:
localized bonding electrons;
lone-pair-like regions;
strongly localized electron pairs.
ELF around 0.5
Values near:
are commonly interpreted as electron-gas-like behavior.
ELF close to 0
Very low ELF values indicate regions with weak localization according to the ELF measure.
Example: bonding analysis
Assume your working directory contains:
VQkit_QE_ELF.cube
Step 1 — Start VQkit
Start VQkit in the directory containing the cube.
Step 2 — Open post-processing
Choose:
2
Step 3 — Open charge, spin and bonding
Choose:
4
Step 4 — Open ELF
Choose:
3
VQkit detects:
VQkit_QE_ELF.cube
Step 5 — Generate all central planes
At:
Select plot type [4]:
press Enter.
VQkit generates the XY, XZ and YZ ELF maps.
Step 6 — Inspect the bonding plane
Open the three PNG files and identify which plane intersects the bond or region of interest.
If none of the center slices intersects it correctly, choose the custom slice option.
Step 7 — Generate a custom plane
For example:
Plane [YZ]: XZ
Fractional slice position 0-1 [0.5]: 0.43
Adjust the fractional position until the relevant atoms are visible on the selected plane.
Example: Quantum ESPRESSO workflow
Assume you have completed a QE SCF calculation but have not generated ELF.
Step 1 — Run VQkit ELF
Navigate to:
Post-processing
Charge, spin and bonding
Electron localization function
Because no cube is present, VQkit creates:
VQkit_QE_ELF_pp.in
Step 2 — Edit the pp.x template
Set:
prefix = 'your_prefix'
outdir = 'your_outdir'
Step 3 — Run pp.x
Run:
pp.x < VQkit_QE_ELF_pp.in > VQkit_QE_ELF_pp.out
Step 4 — Check the cube
Confirm that:
VQkit_QE_ELF.cube
has been generated.
Step 5 — Run VQkit ELF again
VQkit now detects the cube and opens the slice-selection menu.
3D visualization
VQkit generates two-dimensional ELF slices.
For three-dimensional ELF isosurfaces, open the original ELF cube in a visualization package such as:
VESTA;
VMD;
XCrySDen.
The input cube is retained unchanged by VQkit.
Common problems
No ELF cube detected
Check that:
the file extension is
.cubeor.cub;the file is in the current VQkit working directory;
you are running VQkit from the correct calculation folder.
QE template created instead of plot
This means no ELF cube was found.
Edit:
VQkit_QE_ELF_pp.in
then run pp.x to generate the cube.
Wrong cube selected
If several cube files are present, make sure you select the actual ELF field rather than a charge-density or CDD cube.
Custom slice misses the bond
Change the fractional slice position until the selected plane intersects the atoms or bonding region of interest.
Scientific cautions
ELF is not charge density
ELF should not be interpreted as the absolute electron density.
It is a localization descriptor.
Coordinate-plane dependence
A two-dimensional slice may miss important three-dimensional features.
Inspect more than one plane or use a 3D visualization for complex bonding environments.
Comparison between systems
When comparing ELF maps across structures, use comparable computational settings, pseudopotentials, exchange-correlation treatment, and numerical accuracy.
Interpretation
High ELF does not by itself uniquely identify a particular chemical bond type.
ELF should be interpreted together with structural information and, where appropriate, complementary electronic-structure analyses such as:
charge-density difference;
Bader charge;
DOS/PDOS;
bonding analysis.