aiida_vasp.parsers.content_parsers.outcar#

The OUTCAR parser interface.

Contains the parsing interfaces to parsevasp used to parse OUTCAR content.

Module Contents#

Classes#

OutcarParser

The parser interface that enables parsing of OUTCAR content.

VtstNebOutcarParser

Parser for processing OUTCAR generated by VASP with VTST

Functions#

_parse_force_block

Parse the block of total forces from the OUTCAR file.

_parse_neb_outputs

Scan for NEB output in the OUTCAR content.

API#

class aiida_vasp.parsers.content_parsers.outcar.OutcarParser(*, 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

The parser interface that enables parsing of OUTCAR content.

The parser is triggered by using the elastic_moduli, magnetization or site-magnetization run_stats or run_status quantity keys.

Initialization

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

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

Parameters:

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

property run_status#

Fetch status of calculations.

Returns:

A dictionary containing the keys finished, which is True if the VASP calculation contain timing information in the end of the OUTCAR. The key ionic_converged is True if the number of ionic steps detected is smaller than the supplied NSW. The key electronic_converged is True if the number of electronic steps is smaller than NELM (defaults to 60 in VASP). It is also possible to check if all the ionic steps did reached NELM and thus did not converged if the key consistent_nelm_breach is True, while contains_nelm_breach is True if one or more ionic steps reached NELM and thus did not converge electronically.

Return type:

dict

property run_stats#

Fetch the run statistics, which included timings and memory consumption.

Returns:

A dictionary containing timing and memory consumption information that are parsed from the end of the OUTCAR file. The key names are mostly preserved, except for the memory which is prefixed with mem_usage_. Units are preserved from OUTCAR and there are some differences between VASP 5 and 6.

Return type:

dict

property symmetries#

Fetch some basic symmetry data.

Returns:

A dictionary containing the number of space group operations in the key num_space_group_operations and the detected supplied cell in original_cell_type. In symmetrized_cell_type the cell on which VASP performs the calculation has been included. Each value in the dictionary is a list, where each entry represent one ionic step.

Return type:

dict

property elastic_moduli#

Fetch the elastic moduli tensor.

Returns:

A dictionary containing ndarrays with the rigid ion elastic moduli, both symmetrized and non-symmetrized for the keys symmetrized and non_symmetrized respectively. The key total contain both the rigid ion and the ionic contributions to the elastic tensor for the symmetrized case.

Return type:

dict

property site_magnetization#

Fetch the site dependent magnetization.

Returns:

A dictionary containing the key sphere which contains the integrated magnetization in units of Bohr magneton. Additional keys under sphere are given for each direction and for non-collinear calculations all of them are used. The site_moment yields the magnetization per site, with a key describing the site number and then the s, p, d etc. the projections of the site magnetization and tot containing the total magnetization for that site. The total_magnetization gives the sum of each magnetization projection and magnetization total for each site. The full_cell key yields the magnetization from the electronic part of the last electronic step in a list.

Return type:

dict

property magnetization#

Fetch the full cell magnetization.

Returns:

A list containing an entry that is the total magnetization in the cell in unit of Bohr magneton. The magnetization returned is the one associated with the electrons for the last electronic step.

Return type:

list

class aiida_vasp.parsers.content_parsers.outcar.VtstNebOutcarParser(*args, **kwargs)[source]#

Bases: aiida_vasp.parsers.content_parsers.outcar.OutcarParser

Parser for processing OUTCAR generated by VASP with VTST

Initialization

Instantiate the parser.

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

Initial from the handler.

property neb_data#

Parsed NEB results

property forces#

Parsed forces

property outcar_positions#

Parsed positions

property outcar_cell#

Parsed cell vectors

property total_energies#

Parsed total energies

aiida_vasp.parsers.content_parsers.outcar._parse_force_block(lines: List[str]) Tuple[List[List[float]], List[List[float]]][source]#

Parse the block of total forces from the OUTCAR file.

Parameters:

lines (list) – A list of lines containing lines including the TOTAL-FORCE block

Returns:

A tuple of position and forces

Return type:

tuple

aiida_vasp.parsers.content_parsers.outcar._parse_neb_outputs(path: Union[str, pathlib.Path, Any], inputs: Optional[Dict[str, Any]] = None) Dict[str, Any][source]#

Scan for NEB output in the OUTCAR content.

Parameters:
  • path (str or Path or file-like object) – Input path or fileobj

  • inputs (dict, optional) – Dictionary where the parsed data should be placed

Returns:

A dictionary of the parsed data

Return type:

dict