aiida_vasp.parsers.content_parsers.potcar#
POTCAR parser.
The file parser that handles the parsing of POTCAR files. Also contains methods to find, import, compose and write POTCAR files.
Module Contents#
Classes#
A lightweight interface that provides access to POTCAR metadata parsing. |
|
Deals with VASP input output of POTCAR files. |
|
Handle file i/o for POTCAR files with one or more potentials. |
API#
- class aiida_vasp.parsers.content_parsers.potcar.PotcarParser(*, 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.BaseFileParserA lightweight interface that provides access to POTCAR metadata parsing.
Similar to the other content parser for VASP in structure, but only used directly in the POTCAR handling logic.
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 metadata: parsevasp.potcar.Potcar#
Return the metadata Potcar instance.
- class aiida_vasp.parsers.content_parsers.potcar.PotcarIo(**kwargs: Any)[source]#
Deals with VASP input output of POTCAR files.
Instantiate with one of the following kwargs:
- Parameters:
path – (string) absolute path to the POTCAR file
potcar_node – a PotcarData node
potcar_file_node – a PotcarFileNode
contents – a string with the POTCAR content
Initialization
Init from Potcar object or delegate to kwargs initializers.
- _init_with_path(file_path: str | pathlib.Path) None[source]#
Initialize with a path.
- _init_with_potcar_file_node(node: aiida_vasp.data.potcar.PotcarFileData) None[source]#
Initialize with an existing potential file node.
- _init_with_potcar_node(node: aiida_vasp.data.potcar.PotcarData) None[source]#
Initialize with an existing potential node.
- property file_node: aiida_vasp.data.potcar.PotcarFileData#
- property node: aiida_vasp.data.potcar.PotcarData#
- classmethod from_(potcar: str | pathlib.Path | aiida_vasp.data.potcar.PotcarData | aiida_vasp.data.potcar.PotcarFileData | aiida_vasp.parsers.content_parsers.potcar.PotcarIo) aiida_vasp.parsers.content_parsers.potcar.PotcarIo[source]#
Determine the best guess at how the input represents a POTCAR file and construct a PotcarIo instance based on that.
- __eq__(other: aiida_vasp.parsers.content_parsers.potcar.PotcarIo) bool[source]#
- class aiida_vasp.parsers.content_parsers.potcar.MultiPotcarIo(potcars: list[Any] | None = None)[source]#
Handle file i/o for POTCAR files with one or more potentials.
Initialization
- write(path: str | pathlib.Path) None[source]#
- classmethod read(path: str | pathlib.Path) aiida_vasp.parsers.content_parsers.potcar.MultiPotcarIo[source]#
Read a POTCAR file that may contain one or more potentials into a list of PotcarIo objects.
- property potcars: list[aiida_vasp.parsers.content_parsers.potcar.PotcarIo]#
- classmethod from_structure(structure: aiida.orm.StructureData, potentials_dict: dict[str, Any]) aiida_vasp.parsers.content_parsers.potcar.MultiPotcarIo[source]#
Create a MultiPotcarIo from an AiiDA StructureData object and a dictionary with a potential for each kind in the structure.