Skip to content

Installation

Atomli requires CPython 3.10 or later. Install the package and its calculator engines:

Terminal window
python -m pip install "atomli[all]"

Run a water single point on the CPU to check both the package and tight-binding engine:

from atomli.build import molecule
from atomli.calculators import XTB
water = molecule("H2O")
water.calc = XTB(method="gxtb", device="cpu")
print("Energy (eV):", water.get_potential_energy())

Continue to the quick start for optimization, periodic slabs, vibrations, and constrained adsorption with visualizations.

atomli[all] is the easiest starting point. For a smaller installation, choose an extra based on the calculator you will use:

InstallCalculator engines
python -m pip install "atomli[all]"All engines below
python -m pip install "atomli[dft]"QC: DFT and molecular electronic-structure calculations
python -m pip install "atomli[tb]"XTB: g-xTB and GFN2-xTB
python -m pip install "atomli[mlip]"MLIP: machine-learned interatomic potentials
python -m pip install atomliCore runtime, DFTD3, DFTD4, and LennardJones

The quick start uses the tight-binding and DFT engines. See Calculators for method and boundary-condition support.

The examples start on the CPU. To inspect WebGPU adapters (Metal, Vulkan, or DX12) and select a process-wide device:

import atomli
print(atomli.gpu.adapters())
atomli.gpu.set_default_device("gpu") # or "cpu"

An explicit calculator setting such as device="cpu" selects that device for the calculation.

Install ASE if you want to use its calculators or work with ase.Atoms:

Terminal window
python -m pip install ase

See ASE compatibility for examples.

MLIP downloads weights on first use and caches them separately from the Python package. See the model catalog for cache locations and offline setup.