aiida_cusp.parsers.parser_base module
The parser base class
- class aiida_cusp.parsers.parser_base.ParserBase(node)
Bases:
ParserThe ParseBase class provides the general methods like the check for missing folders and the setup of the retrieved file lists that may be used by the derived parser classes
- check_retrieved_temp_folder(**kwargs)
As all calculation output files are expected to be retrieved in the retrieved_temporary_folder only checks for the presence of this folder.
- complete_linkname(partial_linkname)
Create the complete linkname by adding the default outputs namespace prefix used to register results generated by the connected parser to the given partial linkname.
- static expected_files()
Define a list of files that are expected by the parser
If a list is defined, this list will be used to complement the list of temporary retrieved files, defined by the calculation.
If the parser does not expect a specific set of files, the return value of this function has to be set to None
- Returns:
A list of files that are expected by the parser or None
- Return type:
list or None
- 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
- parser_settings(node)
Return the possibly available optional parser settings defined by the calling calculation plugin.
- register_output_nodes(output_nodes)
Add the parsed results stored in the output_nodes list as output nodes to the calculation