# pymatgen.io.xtb package

This package implements modules for input and output to and from CREST.

## Submodules

## pymatgen.io.xtb.inputs module

Classes for writing XTB input files.

class CRESTInput(molecule: Molecule, working_dir: str = '.', coords_filename: str | None = 'crest_in.xyz', constraints: dict[str, list[int] | float] | None = None)

  Bases: `MSONable`

  An object representing CREST input files. Because CREST is controlled through command line flags and external files, the CRESTInput class mainly consists of methods for containing and writing external files.

  Parameters:

    - molecule (Molecule) – Molecule object

    - working_dir (str) – Directory to write input files to

    - coords_filename (str) – Name of input coordinates file

    - constraints (dict) – Dictionary of common editable parameters for .constrains file. {“atoms”: [List of 1-indexed atoms to fix], “force_constant”: float].

  static constrains_template(molecule, reference_fnm, constraints) → str
    Parameters:

      - molecule (Molecule) – Molecule the constraints will be performed on

      - reference_fnm (str) – Name of file containing reference structure in same directory

      - constraints (dict) – Dictionary of common editable parameters for .constrains file. {“atoms”: [List of 1-indexed atoms to fix], “force_constant”: float].

    Returns:

      for .constrains file

    Return type:

      str

  write_input_files()

    Write input files to working directory.

## pymatgen.io.xtb.outputs module

Parsers for XTB output files and directories.

class CRESTOutput(output_filename, path='.')

  Bases: `MSONable`

  Parse CREST output files.

  Assumes runtype is iMTD-GC [default].

  Parameters:

    - output_filename (str) – Filename to parse

    - path (str) – Path to directory including output_filename and all other xtb output files (crest_best.xyz, etc.)