Skip to content

Choosing a calculator

Atomli calculators implement ASE’s Atoms.calc attachment protocol while retaining native solver state (wavefunctions, neighbor lists, and device buffers) across property calls, optimizations, and molecular dynamics.

CalculatorInstall extraSupported methodsPeriodicityDevicesAnalytical derivativesExternal weights
QCatomli[dft]PBE, r2SCAN, r2SCAN-3c, wB97X-V, wB97M-V, SKALA-1.1, PBEsol, revPBE, LDA,VWN, DFT+UMolecular (0D), 3D PBCCPU, GPUForces, 3D stress, molecular Hessian (PBE/r2SCAN CPU+GPU; hybrids CPU), DFPT force constantsPackaged basis/PP; auto-cached SKALA-1.1
CCSDatomli[dft]CCSD, CCSD(T) (k-CCSD for 3D PBC)Molecular (0D), 3D PBCCPU HF + CPU/GPU CCMolecular forces & Hessian; periodic forces/stress/Hessian with density_fitting=FalsePackaged basis sets
HFatomli[dft]RHF, UHF, ROHFMolecular (0D)CPUForces & Hessian (RHF/UHF); energy only (ROHF)Packaged basis sets
XTBatomli[tb]g-xTB, GFN2-xTB (ALPB/GBSA/CPCM solvation)gfn2: 0D–3D PBC; gxtb: 0D & 3D Gamma bulkgxtb: CPU, GPU; gfn2: CPUForces, stress, molecular HessianBuilt-in parameters
MLIPatomli[mlip]Nequix, NequIP, Equiformer, HyFF (charge & spin)Molecular (0D), 3D PBCCPU, GPU (spatial tiling)Forces, 3D stressAuto-downloaded SHA-256 cached or local file
DFTD3Core (atomli)D3 (bj, zero, op, mbj, mzero) for PBE, r2SCANMolecular (0D), 3D PBCCPU, GPU (BJ)ForcesBuilt-in parameters
DFTD4atomli[tb]EEQ-D4(BJ)-ATM for PBE, r2SCANMolecular (0D), 3D PBCCPU, GPUForces, 3D stressBuilt-in parameters
LennardJonesCore (atomli)Shifted/cutoff Lennard–Jones pair potential0D, periodicCPUForcesNone
SumCalculatorCore (atomli)Linear combination of calculators (e.g. QC + DFTD4)Intersection of componentsPer componentSummed energy, forces, stressPer component

See Methods and devices for integral approximations (RI-J, COSX, GPW FFT) and device selection rules.

Attachment, state retention, and ASE compatibility

Section titled “Attachment, state retention, and ASE compatibility”
from atomli import Atoms
from atomli.calculators import QC
atoms = Atoms("H2", positions=[[0, 0, 0], [0, 0, 0.74]])
atoms.calc = QC(xc="wB97M-V", basis="def2-TZVP", device="gpu")
energy = atoms.get_potential_energy() # eV; runs SCF and retains converged state
forces = atoms.get_forces() # eV/Å; reuses converged SCF state
  • ASE drop-in behavior: Atomli calculators attach directly to both atomli.Atoms and ase.Atoms. ASE calculators assigned to atomli.Atoms are adapted automatically on assignment.
  • Exact cache invalidation: Retained electronic and neighbor states invalidate automatically whenever atomic numbers, coordinates, cell vectors, PBC flags, total charge, or unpaired electron counts change.
  • Explicit error contract: Inspect calc.get_capabilities(atoms) or calc.implemented_properties before requesting optional properties. Unsupported combinations raise NotImplementedError or ValueError rather than substituting an unrequested method or silently falling back from GPU to CPU.

QC, CCSD, HF, XTB, and MLIP (HyFF runtime) resolve total charge and spin multiplicity identically across both atomli.Atoms and ase.Atoms:

  1. Explicit calculator constructor arguments (charge=, unpaired=, or multiplicity=unpaired + 1)
  2. Explicit atomli.Atoms constructor arguments (charge=, unpaired=)
  3. atoms.info["charge"] and atoms.info["unpaired"]
  4. Summed atoms.get_initial_charges() and atoms.get_initial_magnetic_moments()
  5. Neutral singlet (charge=0, unpaired=0)

If both unpaired and per-site initial_magnetic_moments are provided, their sums must agree or the calculator raises an error. Electron count and unpaired must share parity ((Z_total - charge) % 2 == unpaired % 2).