spycci.engines.xtb sub-module

XtbInput class

class spycci.engines.xtb.XtbInput(method='gfn2', solvent=None, optionals='', XTBPATH=None)

Interface for running xTB calculations

Parameters:
  • method (str, optional) – level of theory, by default “gfn2”

  • solvent (str, optional) – ALPB solvent, by default no solvent (vacuum)

  • optionals (str, optional) – optional keywords/flags, by default “”

  • XTBPATH (str, optional) – the path to the xtb executable. If set to None (default) the xtb executable will be loaded automatically.

freq(mol, ncores=None, maxcore=None, save_cubes=False, cube_step=0.1, inplace=False, remove_tdir=True)

Frequency analysis.

Parameters:
  • mol (System object) – input system to use in the calculation

  • ncores (int, optional) – number of cores, by default all available cores

  • maxcore (dummy variable) – dummy variable used for compatibility with Orca calculations

  • save_cubes (bool, optional) – if set to True, will save a cube file containing electronic and spin densities, by default False.

  • cube_step (int, optional) – grid spacing for cube files, in Bohrs (default 0.4)

  • inplace (bool, optional) – updates info for the input system instead of outputting a new system object, by default False

  • remove_tdir (bool, optional) – temporary work directory will be removed, by default True

Returns:

newmol – Output system containing the new energies.

Return type:

System object

opt(mol, ncores=None, maxcore=None, save_cubes=False, cube_step=0.1, inplace=False, remove_tdir=True)

Geometry optimization + frequency analysis.

Parameters:
  • mol (System object) – Input system to use in the calculation

  • ncores (int, optional) – number of cores, by default all available cores

  • maxcore (dummy variable) – dummy variable used for compatibility with Orca calculations

  • save_cubes (bool, optional) – if set to True, will save a cube file containing electronic and spin densities, by default False.

  • cube_step (int, optional) – grid spacing for cube files, in Bohrs (default 0.4)

  • inplace (bool, optional) – updates info for the input system instead of outputting a new system object, by default False

  • remove_tdir (bool, optional) – Temporary work directory will be removed, by default True

Returns:

  • newmol (System object) – Output system containing the new geometry and energies.

  • If a dissociation or a cyclization is observed, ignore the calculation and return the

  • original “mol” system.

property output_suffix: str

Suffix used to compose the name of calculation output files

Returns:

The output suffix string

Return type:

str

parse_output(mol)

The function will parse an xTB output file automatically looking for all the relevant numerical properties derived form a calculation. All the properties of the given molecule will be set or updated.

Parameters:

mol (System) – The System to which the properties must be written to.

Raises:

RuntimeError – Exception raised if the given path to the output file is not valid.

Return type:

None

spe(mol, ncores=None, maxcore=None, save_cubes=False, cube_step=0.1, inplace=False, remove_tdir=True)

Single point energy calculation.

Parameters:
  • mol (System object) – Input system to use in the calculation.

  • ncores (int, optional) – number of cores, by default all available cores

  • maxcore (dummy variable) – dummy variable used for compatibility with Orca calculations

  • save_cubes (bool, optional) – if set to True, will save a cube file containing electronic and spin densities, by default False.

  • cube_step (int, optional) – grid spacing for cube files, in Bohrs (default 0.4)

  • inplace (bool, optional) – updates info for the input system instead of outputting a new system object, by default False

  • remove_tdir (bool, optional) – Temporary work directory will be removed, by default True

Returns:

newmol – Output system containing the new energies.

Return type:

System object