aiida_vasp.parsers.content_parsers.stream#

This module contains the parsing interfaces to parsevasp used to parse standard streams for VASP related notification, warnings, and errors.

Module Contents#

Classes#

StreamParser

Parser used for parsing errors and warnings from VASP.

API#

class aiida_vasp.parsers.content_parsers.stream.StreamParser(*, handler: TextIO | BinaryIO | None = None, data: aiida.orm.Data | None = None, settings: dict[str, Any] | None = None, options: dict[str, Any] | None = None, raise_errors: bool = False)[source]#

Bases: aiida_vasp.parsers.content_parsers.base.BaseFileParser

Parser used for parsing errors and warnings from VASP.

Variables:
  • DEFAULT_SETTINGS – Default settings for quantities to parse.

  • PARSABLE_QUANTITIES – The quantities that can be parsed.

Initialization

DEFAULT_SETTINGS = None#
PARSABLE_QUANTITIES = None#
_init_from_handler(handler: TextIO) None[source]#

Initialize a parsevasp object of Stream using a file like handler.

Parameters:

handler (file-like object) – A file like object that provides the necessary standard stream content to be parsed.

property notifications#

Fetch the notifications that VASP generated.

Returns:

A list of all notifications from VASP. Each entry is a dict with the keys name, kind, message and regex containing the name of the message, what kind it is (ERROR or WARNING), a description of the notification, and the regular expression detected as string values.

Return type:

list

property errors#

Fetch the errors that VASP generated.

Returns:

A list of all errors from VASP. Each entry is a dict with the keys name, kind, message and regex containing the name of the message, what kind it is (ERROR), a description of the error, and the regular expression detected as string values.

Return type:

list

property warnings#

Fetch the warnings that VASP generated.

Returns:

A list of all warnings from VASP. Each entry is a dict with the keys name, kind, message and regex containing the name of the message, what kind it is (WARNING), a description of the warning, and the regular expression detected as string values.

Return type:

list

property has_entries#

Check if there are notifications from VASP present according to the config after parsing.

Returns:

True if notifications were detected, False otherwise.

Return type:

bool

property number_of_entries#

Find the number of unique notifications from VASP.

Returns:

The number of unique notification entries that VASP generated.

Return type:

int