Methods and devices
This page specifies the algorithms, formal asymptotic scaling, and CPU/GPU device selection across Atomli calculators.
Algorithms and formal scaling
Section titled “Algorithms and formal scaling”| Algorithm | Calculators & methods | Approximation | Formal scaling | Memory profile | Periodicity | CPU / GPU | Analytical derivatives |
|---|---|---|---|---|---|---|---|
RI-J | QC (PBE, r2SCAN, r2SCAN-3c, SKALA-1.1, PBEsol, revPBE) | Density-fitted Coulomb (def2-universal-jfit auxiliary metric) | build, eigensolve | Resident auxiliary factors; sub-GB host RSS on GPU | Molecular (0D) | CPU & GPU (PBEsol/revPBE CPU only) | Forces; analytical Hessian for PBE and r2SCAN |
RI-J + COSX | QC (wB97X-V, wB97M-V) | Density-fitted Coulomb (def2-universal-jkfit) + semi-numerical chain-of-spheres exact exchange (COSX) + self-consistent VV10 | / grid-screened exchange | Grid-batched Fock matrices in VRAM | Molecular (0D) | CPU & GPU | Forces; analytical Hessian on CPU |
Conventional 4-center | QC(..., density_fitting="none"), HF (RHF/UHF/ROHF) | Exact 4-center Gaussian electron-repulsion integrals | Quartet Schwarz screening | Molecular (0D) | CPU only | Forces & Hessian (PBE, r2SCAN, RHF, UHF) | |
Periodic GPW FFT | QC(settings={"periodic": True}) (PBE, r2SCAN, LDA,VWN, SKALA-1.1) | Gaussian and plane-wave (GPW) multigrid/FFT Coulomb + GTH pseudopotentials | Real-space mesh + AO blocks | 3D PBC | CPU (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 integrals | CCSD, (T) | / auxiliary amplitude buffers | Molecular (0D) & 3D PBC | CPU HF reference; CPU or GPU CC & response | Molecular forces & Hessian; periodic requires density_fitting=False |
Broyden TB SCF | XTB (g-xTB, GFN2-xTB) | Semi-empirical tight-binding Hamiltonian with Broyden/linear density mixing | diagonalization | Dense overlap/Fock matrices | gfn2: 0D–3D PBC; gxtb: 0D & 3D Gamma bulk | CPU & GPU (gfn2 CPU only) | Forces, stress, molecular Hessian |
Equivariant / Cartesian MP | MLIP (Nequix, NequIP, Equiformer, HyFF) | Local message passing over cell-list neighbor graph () | per evaluation | Spatial domain tiling with halo exchange | Molecular (0D) & 3D PBC | CPU & GPU (single/multi-GPU) | Forces, 3D stress |
D3 / EEQ-D4(BJ)-ATM | DFTD3, DFTD4 | Coordination-number pairwise D3 (s9=0) or EEQ2019 charges + ATM 3-body (DFTD4) | pair / cutoff neighbor lists | Pair and three-body neighbor lists | Molecular (0D) & 3D PBC | CPU 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 atomlifrom 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 calculatorsatoms.calc = QC(xc="wB97M-V", basis="def2-TZVP") # uses default GPUmol.calc = MLIP("nequix-mp-1", device="gpu:pci:0000:61:00.0") # pin specific PCI busResolution follows strict precedence:
- Explicit calculator
device=/adapter=: Accepts"cpu","gpu"("wgpu"alias),"gpu:<index>","gpu:pci:<bus_id>","gpu:<name_substr>", or anatomli.gpu.Adapterobject. An explicit"gpu"request raises immediately if no compatible GPU or route exists—never silently falling back to CPU. - Process-wide
atomli.gpu.set_default_device(...): Inherited whendevice=is omitted byQC,CCSD,XTB(method="gxtb"), andMLIP.GFN2-xTB,HF,DFTD3, andDFTD4remain on"cpu"unlessdevice="gpu"is passed explicitly on the constructor (DFTD3/DFTD4). - Automatic hardware readiness probe (when
deviceand process override are omitted): Enabled forMLIP,CCSD,XTB(method="gxtb")(closed-shell / non-root-protected), and fitted molecularQCfunctionals (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.