pymatgen.io.exciting package
This package contains classes to parse input files from the exciting code package.
Submodules
pymatgen.io.exciting.inputs module
Classes for reading/manipulating/writing exciting input files.
- class ExcitingInput(structure: Structure, title: str | None = None, lockxyz: ArrayLike | None = None)[source]
Bases:
MSONable
Object for representing the data stored in the structure part of the exciting input.
- Parameters:
structure (Structure) – Structure object.
title (str) – Optional title for exciting input. Defaults to unit cell formula of structure. Defaults to None.
lockxyz (Nx3 array) – bool values for selective dynamics, where N is number of sites. Defaults to None.
- classmethod from_file(filename: PathLike) Self [source]
- Parameters:
filename – Filename.
- Returns:
ExcitingInput
- write_etree(celltype: Literal['unchanged', 'conventional', 'primitive'], cartesian: bool = False, bandstr: bool = False, symprec: float = 0.4, angle_tolerance: float = 5, **kwargs) ET.Element [source]
Convert the exciting input parameters to an XML Element object.
- Parameters:
celltype (str) – Choice of unit cell. Can be either the unit cell from self.structure (“unchanged”), the conventional cell (“conventional”), or the primitive unit cell (“primitive”).
cartesian (bool) – Whether the atomic positions are provided in Cartesian or unit-cell coordinates. Default is False.
bandstr (bool) – Whether the bandstructure path along the HighSymmKpath is included in the input file. Only supported if the celltype is set to “primitive”. Default is False.
symprec (float) – Tolerance for the symmetry finding. Default is 0.4.
angle_tolerance (float) – Angle tolerance for the symmetry finding. Default is 5.
**kwargs – Additional parameters for the input file.
- Returns:
ET.Element containing the input XML structure
- write_file(celltype: Literal['unchanged', 'conventional', 'primitive'], filename: PathLike, cartesian: bool = False, bandstr: bool = False, symprec: float = 0.4, angle_tolerance: float = 5, **kwargs) None [source]
Write exciting input file.
- Parameters:
celltype (str) – Choice of unit cell. Can be either the unit cell from self.structure (“unchanged”), the conventional cell (“conventional”), or the primitive unit cell (“primitive”).
filename (PathLike) – Filename for exciting input.
cartesian (bool) – Whether the atomic positions are provided in Cartesian or unit-cell coordinates. Default is False.
bandstr (bool) – Whether the bandstructure path along the HighSymmKpath is included in the input file. Only supported if the celltype is set to “primitive”. Default is False.
symprec (float) – Tolerance for the symmetry finding. Default is 0.4.
angle_tolerance (float) – Angle tolerance for the symmetry finding. Default is 5.
**kwargs – Additional parameters for the input file.
- write_string(celltype: Literal['unchanged', 'conventional', 'primitive'], cartesian: bool = False, bandstr: bool = False, symprec: float = 0.4, angle_tolerance: float = 5, **kwargs) str [source]
Convert exciting input to a string.
- Parameters:
celltype (str) – Choice of unit cell. Can be either the unit cell from self.structure (“unchanged”), the conventional cell (“conventional”), or the primitive unit cell (“primitive”).
cartesian (bool) – Whether the atomic positions are provided in Cartesian or unit-cell coordinates. Default is False.
bandstr (bool) – Whether the bandstructure path along the HighSymmKpath is included in the input file. Only supported if the celltype is set to “primitive”. Default is False.
symprec (float) – Tolerance for the symmetry finding. Default is 0.4.
angle_tolerance (float) – Angle tolerance for the symmetry finding. Default is 5.
**kwargs – Additional parameters for the input file.
- Returns:
str