vaspparser.vasp.output.parse_vasp_output#
- vaspparser.vasp.output.parse_vasp_output(working_directory: str, structure: ~ase.atoms.Atoms | None = None, sorted_indices: ~typing.Sequence[int] | ~numpy.ndarray | None = None, read_atoms_funct: ~typing.Callable = <function read_atoms>, es_class=<class 'vaspparser.dft.waves.electronic.ElectronicStructure'>, bader_class=<class 'vaspparser.dft.bader.Bader'>, output_parser_class=<class 'vaspparser.vasp.output.Output'>) dict[source]#
Parse the VASP output in the working_directory and return it as a hierarchical dictionary.
This is the primary entry point for parsing a finished VASP calculation. The function reads vasprun.xml (preferred) and/or OUTCAR, OSZICAR, LOCPOT, CHGCAR, PROCAR, and CONTCAR/POSCAR files as available. If both vasprun.xml and OUTCAR are present, vasprun.xml is used for energies, forces, positions, and electronic structure, while unique OUTCAR quantities (stresses, elastic constants, Broyden mixing mesh, etc.) supplement the result. Bader charge analysis is performed automatically when AECCAR0 and AECCAR2 are present.
- Parameters:
working_directory (str) – Path to the directory containing the VASP output files
structure (Atoms) – Input atomistic structure. If None, it is read from CONTCAR/POSCAR.
sorted_indices (list/numpy.ndarray) – Permutation indices mapping VASP atom order (grouped by species) to the order in
structure. Computed automatically if None.read_atoms_funct (callable) – Function used to read structure files; defaults to
read_atomswhich parses POSCAR/CONTCAR format.es_class – Class used to store electronic structure data; defaults to
ElectronicStructure.bader_class – Class used for Bader charge analysis; defaults to
Bader.output_parser_class – Class used to aggregate all output; defaults to
Output.
- Returns:
Hierarchical output dictionary as returned by
Output.to_dict().- Return type:
dict
- Raises:
VaspCollectError – If required output files are found but cannot be parsed.
OSError – If no OUTCAR or vasprun.xml is present in working_directory.