Skip to content

Methods and devices

This page specifies the algorithms, formal asymptotic scaling, and CPU/GPU device selection across Atomli calculators.

AlgorithmCalculators & methodsApproximationFormal scalingMemory profilePeriodicityCPU / GPUAnalytical derivatives
RI-JQC (PBE, r2SCAN, r2SCAN-3c, SKALA-1.1, PBEsol, revPBE)Density-fitted Coulomb (def2-universal-jfit auxiliary metric)O(N2Naux)\mathcal{O}(N^2 N_{\text{aux}}) build, O(N3)\mathcal{O}(N^3) eigensolveResident auxiliary factors; sub-GB host RSS on GPUMolecular (0D)CPU & GPU (PBEsol/revPBE CPU only)Forces; analytical Hessian for PBE and r2SCAN
RI-J + COSXQC (wB97X-V, wB97M-V)Density-fitted Coulomb (def2-universal-jkfit) + semi-numerical chain-of-spheres exact exchange (COSX) + self-consistent VV10O(N3)\mathcal{O}(N^3) / grid-screened O(N2)\mathcal{O}(N^2) exchangeGrid-batched Fock matrices in VRAMMolecular (0D)CPU & GPUForces; analytical Hessian on CPU
Conventional 4-centerQC(..., density_fitting="none"), HF (RHF/UHF/ROHF)Exact 4-center Gaussian electron-repulsion integralsO(N4)\mathcal{O}(N^4)Quartet Schwarz screeningMolecular (0D)CPU onlyForces & Hessian (PBE, r2SCAN, RHF, UHF)
Periodic GPW FFTQC(settings={"periodic": True}) (PBE, r2SCAN, LDA,VWN, SKALA-1.1)Gaussian and plane-wave (GPW) multigrid/FFT Coulomb + GTH pseudopotentialsO(NkNgridlog⁡Ngrid+NkN3)\mathcal{O}(N_k N_{\text{grid}} \log N_{\text{grid}} + N_k N^3)Real-space mesh + AO blocks3D PBCCPU (PBE, r2SCAN, LDA,VWN, SKALA-1.1) & GPU (PBE, r2SCAN, KUKS+U on full k-meshes)Forces, stress, DFPT force constants
DF-CCSD / CCSD(T)CCSD (triples=False|True)Density-fitted factorized MO contractions (molecular default) or periodic FFT integralsO(N6)\mathcal{O}(N^6) CCSD, O(N7)\mathcal{O}(N^7) (T)T2T_2 / auxiliary amplitude buffersMolecular (0D) & 3D PBCCPU HF reference; CPU or GPU CC & responseMolecular forces & Hessian; periodic requires density_fitting=False
Broyden TB SCFXTB (g-xTB, GFN2-xTB)Semi-empirical tight-binding Hamiltonian with Broyden/linear density mixingO(N3)\mathcal{O}(N^3) diagonalizationDense overlap/Fock matricesgfn2: 0D–3D PBC; gxtb: 0D & 3D Gamma bulkCPU & GPU (gfn2 CPU only)Forces, stress, molecular Hessian
Equivariant / Cartesian MPMLIP (Nequix, NequIP, Equiformer, HyFF)Local message passing over O(N)\mathcal{O}(N) cell-list neighbor graph (rcut=4.5–6.0 A˚r_{\text{cut}} = 4.5\text{–}6.0\ \text{Å})O(N)\mathcal{O}(N) per evaluationSpatial domain tiling with halo exchangeMolecular (0D) & 3D PBCCPU & GPU (single/multi-GPU)Forces, 3D stress
D3 / EEQ-D4(BJ)-ATMDFTD3, DFTD4Coordination-number pairwise D3 (s9=0) or EEQ2019 charges + ATM 3-body (DFTD4)O(N2)\mathcal{O}(N^2) pair / cutoff neighbor listsPair and three-body neighbor listsMolecular (0D) & 3D PBCCPU default; GPU via device="gpu"Forces; 3D stress & get_charges() (DFTD4)

Global and per-calculator device selection

Section titled “Global and per-calculator device selection”

Inspect hardware adapters and pin devices with atomli.gpu:

import atomli
from atomli.calculators import QC, MLIP
print(atomli.gpu.adapters()) # hardware GPUs only (emulated adapters excluded)
atomli.gpu.set_default_device("gpu") # inherit GPU across default-enabled calculators
atoms.calc = QC(xc="wB97M-V", basis="def2-TZVP") # uses default GPU
mol.calc = MLIP("nequix-mp-1", device="gpu:pci:0000:61:00.0") # pin specific PCI bus

Resolution follows strict precedence:

  1. Explicit calculator device= / adapter=: Accepts "cpu", "gpu" ("wgpu" alias), "gpu:<index>", "gpu:pci:<bus_id>", "gpu:<name_substr>", or an atomli.gpu.Adapter object. An explicit "gpu" request raises immediately if no compatible GPU or route exists—never silently falling back to CPU.
  2. Process-wide atomli.gpu.set_default_device(...): Inherited when device= is omitted by QC, CCSD, XTB(method="gxtb"), and MLIP. GFN2-xTB, HF, DFTD3, and DFTD4 remain on "cpu" unless device="gpu" is passed explicitly on the constructor (DFTD3/DFTD4).
  3. Automatic hardware readiness probe (when device and process override are omitted): Enabled for MLIP, CCSD, XTB(method="gxtb") (closed-shell / non-root-protected), and fitted molecular QC functionals (PBE, r2SCAN, r2SCAN-3c, wB97X-V, wB97M-V, SKALA-1.1). All other routes default to "cpu".

Software/emulated Vulkan adapters (such as llvmpipe) are excluded from atomli.gpu.adapters() and rejected if passed explicitly. Because the GPU context is initialized once per process, pin one adapter selector across the process.