aiida_cusp.parsers.vasp_file_parser module

Default parser class used with the cusp pluing for parsing the results of AiiDA managed VASP calculations

class aiida_cusp.parsers.vasp_file_parser.VaspFileParser(node)

Bases: aiida_cusp.parsers.parser_base.ParserBase

The VaspFileParser parsing class represents a basic parser class. In order to make it as flexible as possible this default parser only checks for the given files an adds them as SingleArchiveNodes to the calling calculation, giving you the full VASP experience (i.e. files-in –> file-out. In particular, no special parsing actions parsing special values or attributes of the calculation are employed at the parsing level to ensure the default parser class is compatible with all types of VASP calculations.

All discovered files present in the retrieve list defined by the parser settings will be added to the calculation with the filename as linkname with .suffix replaced by _suffix, i.e. the vasprun.xml would be stored under the vasprun_xml linkname) If files are found to be located in a subfolder (this is only the case for instance in NEB calculations) an additional namespace with linkname ‘node_{foldername}’ under which the files will be added.

Accepted options set by the metadata.options.parser_settings:

parse_files (list) – A list of files that will be parsed from the
retrieved folder and added as nodes to the calculation output. Note that wilcards like ‘W*.tmp’ or even ‘*’ are allowed! If not list is defined, by default, only the OUTCAR, CONTCAR and vasprun.xml files are added.

Setup a list of files to be parsed based on the parsing list supplied by the parser’s parse_file option


Generate the output linkname under which the file at the given location will be available


Return a normalized version of the filename, i.e. lower case and .suffix replace with _suffix


Parse the contents of the output files retrieved in the FolderData.

This method should be implemented in the sub class. Outputs can be registered through the out method. After the parse call finishes, the runner will automatically link them up to the underlying CalcJobNode.

Parameters:kwargs – output nodes attached to the CalcJobNode of the parser instance.
Returns:an instance of ExitCode or None

Parsing hook triggered for files of type CHGCAR


Parsing hook triggered for files of type CONTCAR


Generic parsing hook trigger for all files not featuring a specific parsing hook


Parsing hook triggered files of type OUTCAR


Parsing hook triggered files of type vasprun.xml


Parsing hook triggered for files of type WAVECAR


Fail the parsing process if the parsin list if empty meaning no files will be parsed from the retrieved folder