Gaussian Cube file reader
User interface of the Gaussian Cube file reader, which appears as part of a pipeline’s file source.
This file format is used by the Gaussian simulation package and other ab initio simulation codes. It stores the simulation cell geometry, the atomic structure, and volumetric grid data.
Specifications of the format can be found here and here, for example.
If the imported file uses Bohr units, OVITO converts atomic coordinates and cell dimensions to Angstroms automatically.
Volumetric grid type
The user interface of the file reader provides an option that controls how the volumetric data should be interpreted by OVITO. The field values may either be attributed to the grid line intersections (the default) or the cell centers:
The selected grid type affects operations subsequently performed in OVITO, e.g. constructing an iso-surface from the volumetric data. In all cases, the file reader assumes 3d periodic boundary conditions for the volumetric grid and the atomic simulation cell.
The option Convert density values from Bohr units to Angstroms controls whether the field values loaded from the file are assumed to represent a density given in \(\text{bohr}^{-3}\) units and require conversion to \(\text{Å}^{-3}\) (OVITO’s internal units) to account for the volume change. This option is enabled by default. You can disable it if you know that the field values in your file are already given in \(\text{Å}^{-3}\) units or do not represent a density at all.
See also
Create isosurface modifier
Python parameters
The file reader accepts the following optional keyword parameters in a call to the import_file() or load() Python functions.
- import_file(location, grid_type=VoxelGrid.GridType.PointData, convert_field_bohr_to_angstrom=True, generate_bonds='off')
- Parameters:
grid_type – Selects how OVITO should interpret the volumetric data loaded from the Cube file. See
VoxelGrid.grid_typefor further information.convert_field_bohr_to_angstrom (bool) – Controls whether field values in the file are assumed to be density values given in \(\text{bohr}^{-3}\) and require conversion to \(\text{Å}^{-3}\) (OVITO’s internal units). You can disable it if you know that the field values in your file are already given in \(\text{Å}^{-3}\) units or do not represent a density at all.
generate_bonds (str) – Controls the generation of interatomic bonds during the file import process. The bond criterion can be based on the van der Waals radii of the chemical elements (
'vdw'), on their covalent radii and maximum coordination numbers ('covalent'), or on the built-in table of element-pair bond distances adopted from the VESTA program ('vesta').'off'disables bond generation. These criteria correspond to the modes of theCreateBondsModifier, which you can alternatively apply to the system after import for more control over the generation of bonds.
Changed in version 3.17.0: The generate_bonds parameter now selects the bond criterion. True is still accepted as an alias for 'vdw'.