aiida_vasp.parsers.content_parsers.kpoints#
The KPOINTS parser interface.
Contains the parsing interfaces to parsevasp used to parse KPOINTS content.
Module Contents#
Classes#
The parser interface that enables parsing of |
Functions#
|
API#
- class aiida_vasp.parsers.content_parsers.kpoints.KpointsParser(*, 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.BaseFileParserThe parser interface that enables parsing of
KPOINTScontent.The parser is triggered by using the
kpoints-kpointsquantity key. The quantity keykpointswill on the other hand parse the k-points using the XML parser.Initialization
- DEFAULT_SETTINGS = None#
- PARSABLE_QUANTITIES = None#
- _init_from_handler(handler: TextIO) None[source]#
Initialize using a file like handler.
- Parameters:
handler (file-like object) – A file like object that provides the necessary content to be parsed.
- property kpoints: dict[str, Any] | None#
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.
- Returns:
A dict that contain keys
comment,divisions,shifts,points,tetra,tetra_volume,modecentering,num_kpoints,weightsandcartesianwhich are compatible with consumption of the initialization of the AiiDA KpointsData.- Return type:
- _content_data_to_content_parser() Any[source]#
Convert an AiiDA
KpointsDatato a content parser instance ofKpointsfromparsevasp.- Returns:
An instance of
Kpointsfromparsevasp.- Return type:
- _get_kpointsdict_explicit(kpoints_data: aiida.orm.KpointsData) dict[str, Any][source]#
Turn Aiida
KpointDatainto a k-points dictionary with explicit generation of points.
- aiida_vasp.parsers.content_parsers.kpoints.parsevasp_to_aiida(kpoints: parsevasp.kpoints.Kpoints, logger: Any) dict[str, Any] | None[source]#
parsevaspto AiiDA conversion.Generate an AiiDA data structure that can be consumed by
KpointsDataon initialization from theparsevaspinstance of theKpointsclass.