stb-cube¶
Grid to Cube Converter · menu code 3.3 · guide: 3.3 Grid to Cube Converter
usage: stb-cube [-h] [-l LABEL] -t
{RHO,DRHO,BADER,TOCH,IOCH,RHOXC,RHOINIT,LDOS,VT,VH,VNA} [-o OUTPUT]
[--spin {total,up,down,diff}] [--potential-unit {eV,Ry,Ha}]
[--dry-run] [--no-intro] [-v]
Convert a SIESTA real-space grid file (<label>.RHO, .VT, .VH, ...) to a Gaussian cube file
(VESTA, VMD, XCrySDen, Multiwfn, Bader codes), with a report on the grid: quantity and units,
mesh and effective cutoff, geometry, spin channels, values (integral vs what it must be,
extremes, isosurface levels), the dipole of a molecule or slab, and a read-back check of the
cube. Lengths are written in Bohr, densities in e/Bohr^3, potentials in --potential-unit.
Grid types (and the fdf flag that makes SIESTA write them):
RHO valence electron density (SaveRho)
DRHO deformation density: valence density minus the sum of free-atom densities (SaveDeltaRho)
BADER valence density plus model core charges (input for a Bader analysis) (SaveBaderCharge)
TOCH total charge: valence density plus the ionic (pseudo-core) charge, ions negative (SaveTotalCharge)
IOCH ionic (pseudo-core) charge, negative in SIESTA's sign convention (SaveIonicCharge)
RHOXC density seen by exchange-correlation (valence + partial core correction) (SaveRhoXC)
RHOINIT initial density: the sum of free-atom densities (SaveInitialChargeDensity)
LDOS local density of states in the LocalDensityOfStates energy window (%block LocalDensityOfStates)
VT total Kohn-Sham potential (Hartree + local pseudopotential + exchange-correlation) (SaveTotalPotential)
VH electrostatic potential (Hartree + local part of the pseudopotentials) (SaveElectrostaticPotential)
VNA neutral-atom potential (sum of the free atoms' electrostatic potentials) (SaveNeutralAtomPotential)
options:
-h, --help show this help message and exit
-l LABEL, --label LABEL
SystemLabel of the run; may include a folder (run/si). Default: the only <label>.<type>
in the current folder.
-t {RHO,DRHO,BADER,TOCH,IOCH,RHOXC,RHOINIT,LDOS,VT,VH,VNA}, --type {RHO,DRHO,BADER,TOCH,IOCH,RHOXC,RHOINIT,LDOS,VT,VH,VNA}
Grid file to convert (see the list above).
-o OUTPUT, --output OUTPUT
Output file. Default: <label>_<type>.cube (<label>_<type>_<spin>.cube for a spin
channel other than total), next to the input.
--spin {total,up,down,diff}
Spin channel of a spin-polarized (collinear) grid: 'total' (default; up + down for a density, their
average for a potential), 'up', 'down' or 'diff' (up - down: the magnetization density, or the
exchange splitting of a potential). Ignored, with a warning, for an unpolarized grid and for a
non-collinear/spin-orbit one. The spin configuration comes from the SIESTA log, else <label>.HSX.
--potential-unit {eV,Ry,Ha}
Unit of a potential (VT, VH, VNA) in the cube: eV (default), Ry (SIESTA's own) or Ha
(atomic units). Densities are always e/Bohr^3.
--dry-run Report only; write no cube.
--no-intro Do not show the introduction
-v, --version show program's version number and exit
Example usage:
stb-cube -t RHO # the only *.RHO in this folder
stb-cube -l si -t RHO # si.RHO -> si_RHO.cube
stb-cube -l run/h2o -t VH --potential-unit Ha -o h2o_vh.cube
stb-cube -l o2 -t RHO --spin diff # magnetization density up - down
stb-cube -l si -t DRHO --dry-run # report only, no cube