vasprun (cusp.vasprun)

Data types of class VaspVasprunData are used to store the data contained in the VASP calculation output files of type vasprun.xml. As those files may grow large a gzip-compressed copy of the file is stored to the AiiDA repository instead of the plain file. In order to simplify the access to the file’s contents several methods are implemented by the class to access the stored file contents are implemented.

Implemented Methods and Attributes


Return a instance initialized from vasprun.xml data stored by the node

Given arguments are directly passed on to pymatgen’s Vasprun constructor. By default, a minimal setup is used to parse the vasprun.xml contents:

kwargs_default = {
    ionic_step_skip: None,
    ionic_step_offset: 0,
    parse_dos: False,
    parse_eigen: False,
    parse_projected_eigen: False,
    occu_tol: 1.0E-8,
    exception_on_bad_xml: True,

However, note that the default parameters may be overridden at any time by passing the desired values when calling this function.

  • ionic_step_skip (int) – read structures and energies only for every ‘ionic_step_skip’th ionic step
  • ionic_step_offset (int) – ignore energies and structures at ionic steps smaller than ‘ionic_step_offset’
  • parse_dos (bool) – parse density of states from the vasprun.xml
  • parse_eigen (bool) – parse eigenvalues from the vasprun.xml
  • parse_projected_eigen (bool) – parse projected eigenvalues from the vasprun.xml
  • occu_tol (float) – minimum occupation tolerances for determining the valence and conduction band minima
  • except_on_bad_xml (bool) – throw an exception if the parsed vasprun.xml is malformed

Vasprun instance initialized from the node’s stored vasprun.xml data

Return type:



Load the node and return either the archive (i.e. compressed) or the file (i.e. the decompressed) contents stored in the node.

Parameters:decompress (bool) – Indicate wether comressed or uncompressed contents are returned
VaspVasprunData.write_file(filepath, decompress=True)

Write the node’s contents to a file

Params filepath:
 path to the output file to which the stored contents will be written
Params decompress:
 write the decompressed or the archive contents to the file

Return the path of the object in the repository.

Basically replicates the procedure in the internal open method without the final call to the open()