Xtb

From jinzhezenggroup/computational-chemistry-agent-skills · View interactive version

Xtb is an AI agent skill from the GitHub repository jinzhezenggroup/computational-chemistry-agent-skills. Prepare and explain xTB semiempirical quantum-chemistry workflows for single-point energy, forces, charges, dipole, geometry optimization, and molecular dynamics. Use when the user asks for xTB calculations directly, or wants to use xTB through Python/ASE/dpdata bridges while keeping xTB as the prim

How to use this skill

Skill file

xTB

Use this skill as the top-level xTB orchestration layer.

Scope

This skill should:

This skill should not:

Supported usage patterns

1. Direct xTB-oriented tasks

Use this skill when the user asks for:

2. xTB through the ASE bridge

If the user wants Python scripting, ASE integration, or ASE workflows, use:

from xtb.ase.calculator import XTB

Treat ASE as an integration layer, not the primary identity of the method.

3. xTB through dpdata

If the user wants labeled data or geometry minimization through dpdata, bridge via the ASE driver/minimizer while still presenting xTB as the force/energy method.

Practical installation notes

For one-off Python scripts, prefer uv run instead of uvx because this is a Python package used inside a Python script, not a standalone CLI tool.

Recommended pattern for the ASE bridge:

uv run --no-project --with ase --with xtb --with typing_extensions python your_script.py

Notes:

Method selection guidance

Detailed runnable examples

For copy-paste-ready command and script patterns, see:

Use that reference when the user specifically wants a minimal runnable example for:

ASE bridge example

from ase.build import molecule
from xtb.ase.calculator import XTB

atoms = molecule("H2O")
atoms.calc = XTB(method="GFN2-xTB")
print(atoms.get_potential_energy())
print(atoms.get_forces())
print(atoms.get_charges())

Common calculator arguments:

Property support through the ASE bridge includes:

dpdata driver bridge

If the user wants dpdata labeling:

from dpdata.system import System
from xtb.ase.calculator import XTB

sys = System("input.xyz", fmt="xyz")
ls = sys.predict(driver="ase", calculator=XTB(method="GFN2-xTB"))

This connects naturally to tools/dpdata-driver.

dpdata minimizer bridge

If the user wants dpdata geometry minimization:

from dpdata.driver import Driver
from dpdata.system import System
from xtb.ase.calculator import XTB

sys = System("input.xyz", fmt="xyz")
ase_driver = Driver.get_driver("ase")(calculator=XTB(method="GFN2-xTB"))
ls = sys.minimize(minimizer="ase", driver=ase_driver, fmax=0.05, max_steps=200)

This connects naturally to tools/dpdata-minimizer.

Output expectations

Provide:

  1. the selected xTB usage mode
  2. runnable command or script pattern
  3. method/solvent/accuracy assumptions
  4. unresolved scientific choices
  5. handoff to dpdisp-submit if execution/submission is requested
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.