VASP HDF5 file reader

Added in version 3.16.0.

This file reader imports the HDF5-based output files (vaspout.h5) written by recent versions of the VASP simulation package. The HDF5 format is a more compact and structured alternative to the legacy text-based files (see the VASP POSCAR / XDATCAR / CHGCAR file reader).

OVITO reads the following data from a vaspout.h5 file:

  • The atomic structure: ion positions, chemical element types, and the number of ions of each type.

  • The simulation cell (lattice vectors).

  • The full ion-dynamics trajectory of a molecular-dynamics or relaxation run. Each ionic step is displayed as a separate frame in the animation timeline.

  • Per-atom velocities (Velocity particle property) and forces (Force particle property), when present.

  • The per-frame energies (e.g. free energy, total energy), which are exposed as global attributes with a VASP. name prefix.

Trajectory files

If the file contains an ion-dynamics trajectory (stored under the intermediate/ion_dynamics group), OVITO loads all ionic steps as a sequence of animation frames. The lattice vectors, positions, velocities, forces, and energies are read on a per-frame basis, so variable-cell runs (e.g. ISIF=3 relaxations or NpT molecular dynamics) are handled correctly.

Limitations

  • Electronic charge densities and other volumetric field quantities are not yet imported by this reader. To visualize charge density fields, use the legacy CHGCAR reader.

  • Wavefunctions (vaspwave.h5) and other electronic-structure data are ignored.

Options

Center simulation cell on coordinate origin

If enabled, the simulation cell and atomic coordinates are translated to center the box at the coordinate origin. Otherwise, one corner of the simulation cell remains fixed at the coordinate origin.

Generate bonds

Activates the generation of ad-hoc bonds connecting the atoms loaded from the file. Ad-hoc bond generation is based on the van der Waals radii of the chemical elements. Alternatively, you can apply the CreateBondsModifier to the system after import, which provides more control over the generation of pair-wise bonds.

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, centering=False, generate_bonds=False)
Parameters:
  • centering (bool) – If True, the simulation cell and atomic coordinates are translated to center the box at the coordinate origin. If False, one corner of the simulation cell remains fixed at the coordinate origin.

  • generate_bonds (bool) – Activates the generation of ad-hoc bonds connecting the atoms loaded from the file.