Atomic Simulation Environment¶
ASE calculator implementation
for the xtb program.
This module provides the basic single point calculator implementation
to integrate the xtb API into existing ASE workflows.
Supported properties by this calculator are:
- energy (free_energy)
- forces
- stress (GFN0-xTB only)
- dipole
- charges
Example
>>> from ase.build import molecule
>>> from xtb.ase.calculator import XTB
>>> atoms = molecule('H2O')
>>> atoms.calc = XTB(method="GFN2-xTB")
>>> atoms.get_potential_energy()
-137.9677758730299
>>> atoms.get_forces()
[[ 1.30837706e-16 1.07043680e-15 -7.49514699e-01]
[-1.05862195e-16 -1.53501989e-01 3.74757349e-01]
[-2.49755108e-17 1.53501989e-01 3.74757349e-01]]
Supported keywords are
| Keyword | Default | Description |
|---|---|---|
| method | “GFN2-xTB” | Underlying method for energy and forces |
| accuracy | 1.0 | Numerical accuracy of the calculation |
| electronic_temperature | 300.0 | Electronic temperatur for TB methods |
| max_iterations | 250 | Iterations for self-consistent evaluation |
| solvent | “none” | GBSA implicit solvent model |
| cache_api | True | Reuse generate API objects (recommended) |