aiida_vasp.parsers.content_parsers.poscar#
The POSCAR/CONTCAR parser interface.
Contains the parsing interfaces to parsevasp used to parse POSCAR/CONTCAR content.
Module Contents#
Classes#
The parser interface that enables parsing of |
Functions#
|
API#
- class aiida_vasp.parsers.content_parsers.poscar.PoscarParser(*, precision=12, **kwargs)[source]#
Bases:
aiida_vasp.parsers.content_parsers.base.BaseFileParserThe parser interface that enables parsing of
POSCAR/CONTCARcontent.The parser is triggered by using the
poscar-structurequantity key. The quantity keystructurewill on the other hand parse the structure using the XML parser.- Parameters:
precision (int, optional) – An integer specifying the number of digits for floating point numbers that will be written to
POSCAR/CONTCAR. Defaults to 12.
Initialization
Initialize an instance of this class.
- 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
POSCAR/CONTCARcontent to be parsed.
- _init_from_data(data: aiida.orm.StructureData) None[source]#
Initialize using AiiDA
StructureDatainstance.- Parameters:
data (object) – A valid AiiDA
StructureDataobject.
- property structure: dict[str, Any]#
Return structure from POSCAR.
- Returns:
A dict that contain keys
comment,unitcellandsites, which are compatible with consumption of the initialization of the AiiDAStructureData.- Return type:
- _content_data_to_content_parser() aiida_vasp.parsers.content_parsers.poscar.PoscarParser[source]#
Convert an AiiDA
StructureDatato a content parser instance ofPoscarfromparsevasp.- Returns:
An instance of
Poscarfromparsevasp.- Return type: