aiida_vasp.parsers.content_parsers.kpoints#

The KPOINTS parser interface.

Module Contents#

Classes#

KpointsParser

The parser interface that enables parsing of KPOINTS content.

Functions#

parsevasp_to_aiida

parsevasp to AiiDA conversion.

API#

class aiida_vasp.parsers.content_parsers.kpoints.KpointsParser(*, handler=None, data=None, settings=None, options=None)[source]#

Bases: aiida_vasp.parsers.content_parsers.base.BaseFileParser

The parser interface that enables parsing of KPOINTS content.

The parser is triggered by using the kpoints-kpoints quantity key. The quantity key kpoints will on the other hand parse the k-points using the XML parser.

Initialization

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

Initialize using a file like handler.

handlerobject

A file like object that provides the necessary content to be parsed.

_init_from_data(data)[source]#

Initialize using AiiDA KpointsData.

property kpoints#

Return kpoints that is ready to be consumed by the the AiiDA KpointsData.

AiiDA does not support the line mode used in VASP, so we give a warning that parsing this is not supported.

aiida_kpointsdict

A dict that contain keys comment, divisions, shifts, points, tetra, tetra_volume, mode centering, num_kpoints, weights and cartesian which are compatible with consumption of the initialization of the AiiDA KpointsData.

_content_data_to_content_parser()[source]#

Convert an AiiDA KpointsData to a content parser instance of Kpoints from parsevasp.

content_parserobject

An instance of Kpoints from parsevasp.

_get_kpointsdict_explicit(kpoints_data)[source]#

Turn Aiida KpointData into a k-points dictionary with explicit generation of points.

kpoints_dataobject

An AiiDA KpointsData object containing explicit k-point sets.

kpoints_dictdict

A dictionary that can be used to initialize a parsevasp Kpoints instance.

static _get_kpointsdict_automatic(kpointsdata)[source]#

Turn Aiida KpointData into a k-point dictionary with automatic generation of points.

kpoints_dataobject

An AiiDA KpointsData object containing meshed k-point sets.

kpoints_dictdict

A dictionary that can be used to initialize a parsevasp Kpoints instance.

aiida_vasp.parsers.content_parsers.kpoints.parsevasp_to_aiida(kpoints, logger)[source]#

parsevasp to AiiDA conversion.

Generate an AiiDA data structure that can be consumed by KpointsData on initialization from the parsevasp instance of the Kpoints class.

kpointsobject

An instance of the Kpoints class in parsevasp.

kpoints_dictdict

A dictionary representation which are ready to be used when creating an AiiDA KpointsData instance.