Skip to main content

easyxtb

easyxtb is an unofficial Python API for the xtb and CREST semi-empirical quantum chemistry programs with an emphasis on intuitive and straightforward usage.

xtb is developed by the Grimme group in Bonn and carries out semi-empirical quantum mechanical calculations using the group's extended Tight-Binding methods, referred to as "GFNn-xTB".

These methods provide fast and reasonably accurate calculation of Geometries, Frequencies, and Non-covalent interactions for molecular systems with up to roughly 1000 atoms, with broad coverage of the periodic table up to Z = 86 (radon).

crest (Conformer–Rotamer Ensemble Sampling Tool) adds a variety of sampling procedures for several interesting applications including conformer searches, thermochemistry, and solvation.

easyxtb can be used as an interface to launch calculations and process their results. By taking care of file I/O and command line invocation it aims to make it trivial to run xtb programmatically. The package's design enables both straightforward acquisition of key results and full control over run options.

easyxtb is available to download from PyPI and can be installed with pip or any PyPI-compatible package manager.

The easyxtb package also forms the basis for avo_xtb, a plugin for the 3D chemical visualization software Avogadro 2 that provides an in-app interface to the xtb program for quick and accurate calculations, as well as the CREST program for extended functionality.

Usage

The package strives to make using xtb from Python as simple as possible and calculations can often be run as straightforwardly as:

from pathlib import Path
import easyxtb

input_geom = easyxtb.Geometry.from_file(Path.home() / "calcs/benzoic_acid.xyz")
optimized = easyxtb.calculate.optimize(input_geom, level="normal", solvation="water")

A guide for getting started and details of the API can be found in the documentation.

Requirements

xtb

Only tested for xtb >= 6.7.

The xtb binary is not bundled with the package. Instead, it must be obtained separately.

The location of xtb can be set from Python code simply by setting easyxtb.XTB_BIN to an appropriate pathlib.Path object.

An xtb binary will also be picked up automatically by easyxtb if located in one of the following locations:

  1. The system or user PATH
  2. Within the easyxtb binary directory at <user data>/easyxtb/bin/xtb (see below for more information on where this is on your system)
  3. Within the folder it is distributed in under the easyxtb binary directory, which would thus currently be at <user data>/easyxtb/bin/xtb-dist/bin/xtb
  4. Any other location but with a link to it from <user data>/easyxtb/bin/xtb

CREST

Only tested for crest >= 3.0.

While xtb is cross-platform, crest is currently distributed only for Linux/UNIX systems.

crest can be made visible to the plugin in the same ways as for xtb listed above. If it is not in $PATH, the crest binary, or link to it, should be located at <user data>/easyxtb/bin/crest.

Data location

easyxtb uses a central location to run its calculations, store its configuration, and save its log file. This location is <user data>/easyxtb, where <user data> is OS-dependent:

  • Windows: $USER_HOME\AppData\Local\easyxtb
  • macOS: ~/Library/Application Support/easyxtb
  • Linux: ~/.local/share/easyxtb

Additionally, if the environment variable XDG_DATA_HOME is set its value will be respected and takes precedence over the above paths (on all OSes).

Disclaimer

xtb and crest are distributed by the Grimme group under the LGPL license v3. The authors of easyxtb, avo_xtb, and Avogadro bear no responsibility for xtb or CREST or the contents of the respective repositories. Source code for the programs is available at the repositories linked above.

Cite

General reference to xtb and the implemented GFN methods:

  • C. Bannwarth, E. Caldeweyher, S. Ehlert, A. Hansen, P. Pracht, J. Seibert, S. Spicher, S. Grimme WIREs Comput. Mol. Sci., 2020, 11, e01493. DOI: 10.1002/wcms.1493

For GFN2-xTB (default method):

For CREST:

  • P. Pracht, S. Grimme, C. Bannwarth, F. Bohle, S. Ehlert, G. Feldmann, J. Gorges, M. Müller, T. Neudecker, C. Plett, S. Spicher, P. Steinbach, P. Wesołowski, F. Zeller, J. Chem. Phys., 2024, 160, 114110. DOI: 10.1063/5.0197592
  • P. Pracht, F. Bohle, S. Grimme, Phys. Chem. Chem. Phys., 2020, 22, 7169-7192. DOI: 10.1039/C9CP06869D

See the xtb and CREST GitHub repositories for other citations.

Metadata

Release files for easyxtb 0.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easyxtb 0.10.2
File Size Uploaded
easyxtb-0.10.2.tar.gz 135.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for easyxtb 0.10.2
File Interpreter ABI Platform
easyxtb-0.10.2-py3-none-any.whl Python 3 none any Details

Total release size: 161.9 kB

Release files / easyxtb-0.10.2.tar.gz

Download URL easyxtb-0.10.2.tar.gz
Size 135.8 kB
Tags Source
SHA-256 checksum
How to use checksums
23db979730b4aace46fa4dcc0040cedf358c1578fb4c3aa193fff377fd72ace0
BLAKE2b-256 checksum
How to use checksums
62c54470abf88b1842c0dc29087ab024e27b0dc346133a99100ee0174f4a6d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"openSUSE Tumbleweed","version":"20260220","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / easyxtb-0.10.2-py3-none-any.whl

Download URL easyxtb-0.10.2-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9627d979c1d1845be0ac45e99dc074adb40c6fb93ddd43562042b1b9e79e22e4
BLAKE2b-256 checksum
How to use checksums
1b13c86adfea41d4d3e54856874df09d40b08e9a70f56c982f1fe404083be607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"openSUSE Tumbleweed","version":"20260220","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page