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.
build_parsing_list()

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

linkname(filepath)

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

normalized_filename(filepath)

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

parse(**kwargs)

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
parse_chgcar(filepath)

Parsing hook triggered for files of type CHGCAR

parse_contcar(filepath)

Parsing hook triggered for files of type CONTCAR

parse_generic(filepath)

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

parse_outcar(filepath)

Parsing hook triggered files of type OUTCAR

parse_vasprun_xml(filepath)

Parsing hook triggered files of type vasprun.xml

parse_wavecar(filepath)

Parsing hook triggered for files of type WAVECAR

parsing_hook(filepath)
verify_and_set_parser_settings()

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