6. Cube plots

The cube: section writes Gaussian .cube files (grid in bohr) that any viewer reads (VMD, Avogadro, VESTA, Jmol, ChimeraX). One file <prefix>_<label>.cube is written per quantity.

cube:
  prefix: ch3
  spacing: 0.25        # bohr (default 0.2)
  margin: 4.0          # bohr beyond the outermost nuclei (default 5.0)
  quantities: density, spin_density, elf, mo_alpha:homo, mo_beta:1-4

Quantity

Content

density, density_alpha, density_beta, spin_density

densities; \(\rho_\alpha-\rho_\beta\)

elf

electron localization function (Becke and Edgecombe 1990), spin-polarized form

mo_alpha:<sel>, mo_beta:<sel>

Kohn–Sham orbitals in ascending energy order

sic_alpha:<sel>, sic_beta:<sel>

Fermi–Löwdin (SIC) orbitals, numbered as the FODs

<sel> is an integer (5), a range (3-6), homo, lumo or all.

cube:
  prefix: h2o
  spacing: 0.2
  margin: 6.0
  quantities: density, mo_alpha:homo, mo_alpha:lumo, mo_alpha:1-5

Notes:

  • Use spacing ≲ 0.15 bohr if you integrate all-electron densities; 0.3 to 0.4 bohr is enough for plots.

  • With the Jacobi SIC solver there are no canonical orbitals: mo_* is refused, use sic_*. Cubes cannot be written during fod_optimization: energy; relax first and rerun with the relaxed FODs.

  • Not available for noncollinear runs.

  • The plotting tool of the tutorials (dftsw27plot.py) makes slices, isosurfaces and orbital pictures from cube files, and cubemath forms differences of cubes.

Related tutorials: Cube files: spin density, ELF and density differences (spin density, ELF, density differences), Your first calculation: SCF and cube files.