aiida_vasp.parsers.content_parsers.vasprun#
The vasprun.xml parser interface.
Contains the parsing interfaces to parsevasp used to parse vasprun.xml content.
Module Contents#
Classes#
The parser interface that enables parsing of |
Functions#
Builds a structure according to AiiDA spec. |
|
API#
- class aiida_vasp.parsers.content_parsers.vasprun.VasprunParser(*, 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
vasprun.xmlcontent.The parser is triggered by using the keys listed in
PARSABLE_QUANTITIES.Initialization
- OPEN_MODE = 'rb'#
- DEFAULT_SETTINGS = None#
- PARSABLE_QUANTITIES = None#
- ENERGY_MAPPING = None#
- ENERGY_MAPPING_VASP5 = None#
- property version: str | None#
Fetch the VASP version from
parsevaspand return it as a string object.
- property kpoints: dict[str, Any] | None#
Fetch the kpoints an prepare for consumption by the NodeComposer.
- property structure: dict[str, Any] | None#
Fetch a given structure.
Which structure to fetch is controlled by inputs.
eFL: Need to clean this so that we can set different structures to pull from the outside. Could be usefull not pulling the whole trajectory.
Currently defaults to the last structure.
- property last_structure: dict[str, Any] | None#
Fetch the structure.
After or at the last recorded ionic step.
- property final_structure: dict[str, Any] | None#
Fetch the structure.
After or at the last recorded ionic step. Should in principle be the same as the method above.
- property final_forces: numpy.ndarray | None#
Fetch forces.
After or at the last recorded ionic step.
- property final_stress: numpy.ndarray | None#
Fetch stress.
After or at the last recorded ionic step.
- property stress: numpy.ndarray | None#
Fetch stress.
This container should contain all relevant stress. Currently, it only contains the final stress, which can be obtain by the id final_stress.
- property trajectory: dict[str, Any] | None#
Fetch unitcells, positions, species, forces and stress.
For all calculation steps.
- property total_energies: dict[str, float] | None#
Fetch the total energies after the last ionic run.
- _energies(nosc: bool) dict[str, Any] | None[source]#
Fetch the total energies for all energy types, calculations (ionic steps) and electronic steps.
The returned dict from the parser contains the total energy types as a key (plus the _final, which is the final total energy ejected by VASP after the closure of the electronic steps). The energies can then be found in the flattened ndarray where the key electronic_steps indicate how many electronic steps there is per ionic step. Using the combination, one can rebuild the electronic step energy per ionic step etc.
Because the VASPrun parser returns both the electronic step energies (at the end of each cycles) and the ionic step energies (_final), we apply a mapping to recovery the naming such that the ionic step energies do not have the suffix, but the electronic step energies do.