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.
Calculator matrix
Section titled “Calculator matrix”| Calculator | Install extra | Supported methods | Periodicity | Devices | Analytical derivatives | External weights |
|---|---|---|---|---|---|---|
QC | atomli[dft] | PBE, r2SCAN, r2SCAN-3c, wB97X-V, wB97M-V, SKALA-1.1, PBEsol, revPBE, LDA,VWN, DFT+U | Molecular (0D), 3D PBC | CPU, GPU | Forces, 3D stress, molecular Hessian (PBE/r2SCAN CPU+GPU; hybrids CPU), DFPT force constants | Packaged basis/PP; auto-cached SKALA-1.1 |
CCSD | atomli[dft] | CCSD, CCSD(T) (k-CCSD for 3D PBC) | Molecular (0D), 3D PBC | CPU HF + CPU/GPU CC | Molecular forces & Hessian; periodic forces/stress/Hessian with density_fitting=False | Packaged basis sets |
HF | atomli[dft] | RHF, UHF, ROHF | Molecular (0D) | CPU | Forces & Hessian (RHF/UHF); energy only (ROHF) | Packaged basis sets |
XTB | atomli[tb] | g-xTB, GFN2-xTB (ALPB/GBSA/CPCM solvation) | gfn2: 0D–3D PBC; gxtb: 0D & 3D Gamma bulk | gxtb: CPU, GPU; gfn2: CPU | Forces, stress, molecular Hessian | Built-in parameters |
MLIP | atomli[mlip] | Nequix, NequIP, Equiformer, HyFF (charge & spin) | Molecular (0D), 3D PBC | CPU, GPU (spatial tiling) | Forces, 3D stress | Auto-downloaded SHA-256 cached or local file |
DFTD3 | Core (atomli) | D3 (bj, zero, op, mbj, mzero) for PBE, r2SCAN | Molecular (0D), 3D PBC | CPU, GPU (BJ) | Forces | Built-in parameters |
DFTD4 | atomli[tb] | EEQ-D4(BJ)-ATM for PBE, r2SCAN | Molecular (0D), 3D PBC | CPU, GPU | Forces, 3D stress | Built-in parameters |
LennardJones | Core (atomli) | Shifted/cutoff Lennard–Jones pair potential | 0D, periodic | CPU | Forces | None |
SumCalculator | Core (atomli) | Linear combination of calculators (e.g. QC + DFTD4) | Intersection of components | Per component | Summed energy, forces, stress | Per 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 Atomsfrom 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 stateforces = atoms.get_forces() # eV/Å; reuses converged SCF state- ASE drop-in behavior: Atomli calculators attach directly to both
atomli.Atomsandase.Atoms. ASE calculators assigned toatomli.Atomsare 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)orcalc.implemented_propertiesbefore requesting optional properties. Unsupported combinations raiseNotImplementedErrororValueErrorrather than substituting an unrequested method or silently falling back from GPU to CPU.
Charge and unpaired-electron resolution
Section titled “Charge and unpaired-electron resolution”QC, CCSD, HF, XTB, and MLIP (HyFF runtime) resolve total charge and spin multiplicity identically across both atomli.Atoms and ase.Atoms:
- Explicit calculator constructor arguments (
charge=,unpaired=, ormultiplicity=unpaired + 1) - Explicit
atomli.Atomsconstructor arguments (charge=,unpaired=) atoms.info["charge"]andatoms.info["unpaired"]- Summed
atoms.get_initial_charges()andatoms.get_initial_magnetic_moments() - 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).