Skip to content

cube

Generate a cube file containing property values on a cuboidal grid. For example the total electron density and alpha spin HOMO for water can be constructed:

dft(
  structure( molecule = water )
  xc = HF
  ao = 'STO-3G'
  ansatz = u
  coulomb_method = direct_4idx
  )
cube(
  density( file = 'water_density.cube' )
  orbital(
    file = 'water_homo.cube'
    orbitals = homo
    )
  )

The cube command accepts a load option to allow a specific dft or emft command to be processed:

methane := dft(
  structure( molecule = methane )
  xc = HF
  ao = 'STO-3G'
  coulomb_method = direct_4idx
  ansatz = u
  )
water := dft(
  structure( molecule = water )
  xc = HF
  ao = 'STO-3G'
  coulomb_method = direct_4idx
  ansatz = u
  )
cube(
  load = methane
  density( file = 'methane_density.cube' )
  )
This command can appear in the global context.

Subcommands

Options

axes

The inline principal axes of rotation for the cuboidal grid. Each column is a vector of one of the principal axis. If no values are specified, the principal axes of rotation for the molecule are used. For example a 30 degree rotation around the x-axis can be achieved with:

dft(
  structure( molecule = water )
  xc = HF
  ao = 'STO-3G'
  coulomb_method = direct_4idx
  ansatz = u
  )
  cube(
    density( file = 'water_density.cube' )
    axes = [
      [1.0, 0.0, 0.0],
      [0.0, 0.8660254, 0.5],
      [0.0, -0.5, 0.8660254]
      ]
  )
  • The type is ((real, real, real), (real, real, real), (real, real, real))
  • There is no default value.
buffer_length

The buffer length between position of the outermost atoms and face of the cuboid in each direction of the axes. The buffer length should typically be larger than the van der Waals radii of the outermost atoms.

  • The type is real
  • The default is 5.0
load

Name of result set from which to load the molecular structure, basis set, and density matrix or molecular orbitals.

This option is mandatory.

  • The type is string
  • The default is previous
molecule_aligned

If true use a grid that is aligned with the molecular principal axes. If false, origin and n_voxels must be specified. In addition, the fixed cartesian axes or user-specified axes will be used as the principal axes for the cuboidal grid.

  • The type is bool
  • The default is true
n_voxels

The number of voxels (grid points) along each side of the cuboid. This overrides the spacings values. If no values are specified, the number of voxels is determined from the spacings values.

  • The type is (int, int, int)
  • There is no default value.
name

Specify the name of a set of results.

This option is deprecated.

  • The type is string
  • There is no default value.
origin

Specify position of the origin (lower-left corner) of the cuboidal grid. If no values are specified, the origin will be determined by position of the outermost atoms and a the buffer_length.

  • The type is (real, real, real)
  • There is no default value.
print_level

Print level.

  • The type is int
  • There is no default value.
  • The value must be one of:
    • -2 - No output
    • -1 - Minimum output
    • 0 - Output that doesn't scale with system size
    • 1 - Output that scales linearly with system size
    • 2 - (Debugging) output that scales quadratically with system size
    • 3 - (Debugging) output that scales cubically with system size
spacings

The voxel lengths (grid point spacing) along each side of the cuboid.

  • The type is (real, real, real)
  • The default is [0.2, 0.2, 0.2]