Docs are under construction. Content may be incomplete or change.

Choosing a Method

Page type: Concept
On this page

Every calculation in Tako poses a question to a potential energy surface, and Tako builds that surface two different ways: the GFN2-xTB semi-empirical tight-binding method, and a family of machine-learned interatomic potentials (MLIPs). They are not interchangeable. GFN2 solves an approximate electronic-structure problem and can tell you about charges, orbitals, and spectra; an MLIP regresses a density-functional energy surface from training data and covers dense inorganic solids that would crush a tight-binding SCF in the browser. This page covers the theory behind each family, where each one fails, what they cost to run, and how to decide between them.

If you just want the dialog-level tour of the eight models, read Choose a Calculator first. This page goes underneath that: why the families behave the way they do, and how to select and validate them from Write Your First Tako Script.

Two approximations to the same object

Both method families approximate the Born–Oppenheimer potential energy surface E(R1,,RN;h)E(\mathbf{R}_1,\dots,\mathbf{R}_N;\mathbf{h}), a scalar function of the nuclear positions Ri\mathbf{R}_i and, for crystals, the cell h\mathbf{h}. Everything downstream — optimization, molecular dynamics, phonons, NEB — consumes only this function and its derivatives:

Fi=ERi,σαβ=1VEεαβ,\mathbf{F}_i = -\frac{\partial E}{\partial \mathbf{R}_i}, \qquad \sigma_{\alpha\beta} = \frac{1}{V}\frac{\partial E}{\partial \varepsilon_{\alpha\beta}},

where Fi\mathbf{F}_i is the force on atom ii and σ\sigma is the stress from the strain derivative. In Tako both calculators implement the same engine interface (the ase.rs Calculator trait), so the BFGS/FIRE optimizers, MD integrators, finite-displacement phonons, and NEB are identical across methods. Switching the calculator swaps the physics under the algorithms; the algorithms themselves are unchanged.

GFN2-xTB: semi-empirical tight binding

GFN2-xTB (Bannwarth, Ehlert, Grimme 2019) is a self-consistent extended tight-binding method. It expands the DFT energy around a reference density in fluctuations of atomic charges and multipoles, keeps terms through third order in the monopoles and second order in the multipoles, and evaluates them in a minimal valence basis of atom-centered orbitals:

EGFN2=Erep+EdispD4  (when D4 is enabled)+EEHT+EIES+IXC+EAES+EAXC+GFermi.E_{\mathrm{GFN2}} = E_{\mathrm{rep}} + E_{\mathrm{disp}}^{\mathrm{D4}}\;\text{(when D4 is enabled)} + E_{\mathrm{EHT}} + E_{\mathrm{IES+IXC}} + E_{\mathrm{AES}} + E_{\mathrm{AXC}} + G_{\mathrm{Fermi}}.

ErepE_{\mathrm{rep}} is a pairwise atomic repulsion, EEHTE_{\mathrm{EHT}} the extended-Hückel-type first-order band energy, EAESE_{\mathrm{AES}}/EAXCE_{\mathrm{AXC}} anisotropic electrostatics and exchange–correlation built from cumulative atomic dipole and quadrupole moments, and GFermiG_{\mathrm{Fermi}} the electronic free energy from Fermi smearing of fractional occupations. The isotropic second- and third-order charge terms have the familiar DFTB-like form in shell-resolved charges qlq_l:

EIES+IXC12A,BlAlBqlγAB,llql+13AΓAqA3.E_{\mathrm{IES+IXC}} \approx \frac{1}{2}\sum_{A,B}\sum_{l\in A}\sum_{l'\in B} q_l\,\gamma_{AB,ll'}\,q_{l'} + \frac{1}{3}\sum_{A}\Gamma_A\,q_A^{3}.

Because a self-consistent charge distribution is actually solved for, GFN2 responds to the things an electronic-structure method should respond to: net charge, spin state, electronegativity differences, polarization by neighboring fragments, and implicit solvent. Tako exposes wavefunction-derived observables including Mulliken-type partial charges, DOS/PDOS, density cubes for NCI analysis, WFN files, and sTDA excitation spectra. sTDA also accepts g-xTB as an explicit faster ground-state route, but the frozen experimental band panel favors GFN2 as the accuracy-first default. The calculator capability profile contains a dipole capability used by spectroscopy paths, but tako.singlePoint does not publish a dipole result field. Parameters are element-specific rather than element-pair-specific, which is how the published parameterization spans Z86Z \le 86.

The acronym is a caveat in itself: GFN targets Geometries, Frequencies, and Non-covalent interactions. Reaction energies and barrier heights are secondary fitting targets, so treat GFN2 energetics as screening-level unless validated for your chemistry. The published GFN2 method includes a charge-dependent D4-type dispersion term. Tako selects gfn2 as the level and exposes dispersion separately; Default resolves to D4. Record both fields and validate them for the interaction studied. GFN2 in Tako accepts periodic cells, but SCF cost and convergence behavior limit it in practice to small cells.

Machine-learned interatomic potentials

An MLIP makes no reference to electrons at all. It assumes the energy decomposes into atomic contributions that depend only on each atom’s local environment inside a cutoff radius rcr_c:

Eθ({Zi,Ri})=i=1Nεθ(Ni),Ni={(Zj,  rij):rijrc},E_\theta(\{Z_i,\mathbf{R}_i\}) = \sum_{i=1}^{N}\varepsilon_\theta\big(\mathcal{N}_i\big), \qquad \mathcal{N}_i = \{(Z_j,\;\mathbf{r}_{ij}) : r_{ij}\le r_c\},

with the environment function εθ\varepsilon_\theta realized as an E(3)-equivariant message-passing network (NequIP-style tensor features, Batzner et al. 2022) or an equivariant attention transformer (Equiformer, Liao and Smidt 2023). The parameters θ\theta are fitted by minimizing a loss over a database of DFT reference calculations {(R(k),E(k),F(k),σ(k))}\{(\mathbf{R}^{(k)}, E^{(k)}, \mathbf{F}^{(k)}, \sigma^{(k)})\}:

L(θ)=k[wE(Eθ(k)E(k))2+wFiFθ,i(k)Fi(k)2+wσσθ(k)σ(k)2].\mathcal{L}(\theta) = \sum_k \Big[ w_E\big(E_\theta^{(k)}-E^{(k)}\big)^2 + w_F\sum_i \big\lVert \mathbf{F}_{\theta,i}^{(k)}-\mathbf{F}_i^{(k)} \big\rVert^2 + w_\sigma\big\lVert \sigma_\theta^{(k)}-\sigma^{(k)} \big\rVert^2 \Big].

The models available to Tako are trained to approximate reference energies and forces from large atomistic datasets at lower evaluation cost. “Universal” describes breadth of intended coverage, not guaranteed reproduction for a target system; matched benchmarks are still required.

What they miss is everything electronic. The input is element identities and coordinates only: there is no charge channel, spin state, orbital structure, dipole, DOS, or excited state. An MLIP inherits its reference method’s errors and can fail silently outside its training distribution. Aggregate benchmarks do not certify a target chemistry: inspect provenance and training domain, then compare representative configurations with a matched DFT protocol appropriate to the target system.

One architectural distinction matters for practice. A gradient (conservative) model computes forces by differentiating the energy, Fi=RiEθ\mathbf{F}_i = -\nabla_{\mathbf{R}_i}E_\theta, so the forces are exactly consistent with the energy. A direct model predicts forces with a separate output head, Fi=fθ(Ni)\mathbf{F}_i = \mathbf{f}_\theta(\mathcal{N}_i), which is faster but generally non-conservative: FdR0\oint \mathbf{F}\cdot d\mathbf{R} \neq 0 around closed loops, so energies drift in MD and the energy and force channels can disagree during optimization. That is why Tako ships Equiformer in both flavors and labels the direct one for screening and energy ranking rather than dynamics.

The essential contrast

GFN2-xTB (gfn2, separate dispersion)MLIP (nequix, nequip-*, equiformer*)
PhysicsApproximate self-consistent electronic structureLearned regression of a DFT energy surface
Electronic observablesCharges, DOS/PDOS, density and NCI cubes, WFN, sTDA UV-VisNone — energy, forces, stress only
Net charge / spinYes (charge, unpaired, spinPolarized)No (structure-only input)
Implicit solvationALPB/GBSA/C-PCM variantsNone
CoverageParameterized Z86Z \le 86; strongest for light main-group and organic chemistryTraining-set defined; strongest for dense periodic inorganics
Failure modeNoisy — SCF stalls or refusesSilent — plausible numbers off-manifold
Cost scalingSCF loop, roughly cubic diagonalization per cycleSingle inference, roughly linear in atoms
PeriodicitySupported, practical for small cellsDesigned for periodic crystals, slabs, alloys

Exact identifiers and construction

Exact identifiers, capabilities, and asset requirements: Calculator Reference.

Which calculator object a script should construct follows directly from the physics above, but construction syntax, defaults, validation calls, and executable examples belong to Calculator Construction and Validation. The separation keeps this chapter concerned with physical models, applicability, and evidence.

Cost in the browser

The cost structures differ in kind, not just in constant factor. A GFN2 energy requires an SCF loop — each cycle builds and diagonalizes the tight-binding Hamiltonian, roughly cubic in the number of valence orbitals — and every optimizer or MD step repeats the whole loop. Cost therefore grows steeply with electron count and with SCF difficulty (small gaps, charged species, metals). An MLIP energy is a single network inference, roughly linear in atom count for fixed cutoff, with no convergence failure mode; per-step cost is nearly constant across a trajectory.

The other axis is download and memory footprint, which varies sharply across models. In practice, the nequix models are small and fast. Larger NequIP and Equiformer variants trade download size and runtime for capacity, not guaranteed accuracy. Choose among them only after comparing representative target structures and properties. For GFN2, the practical browser ceiling is a few hundred light atoms for single points and less for long optimizations or MD; phonon supercells multiply the atom count.

Choosing in practice

Choose by chemistry, not by task name. The decision is mostly one question — organic or inorganic, light or dense — with a narrower set of exceptions underneath:

@startuml method-choice-decision title Calculator family selection and validation skinparam backgroundColor White skinparam shadowing false skinparam defaultFontName "Helvetica" skinparam ArrowColor #24292f skinparam rectangle { BorderColor #24292f BackgroundColor #f6f8fa } rectangle "Identify the chemistry" as Chemistry #fff8c5 rectangle "Light-element molecule,\nion, or radical" as Molecular rectangle "Dense periodic inorganic:\noxide, alloy, surface, battery phase" as Inorganic rectangle "Hybrid organic-inorganic" as Hybrid rectangle "GFN2-xTB\nKeep Default D4 when dispersion matters\nSet charge and unpaired explicitly" as GFN2 rectangle "MLIP\nStart with nequix\nBenchmark unusual bonding" as MLIP rectangle "Prefer GFN2 for a small, covered cell;\notherwise benchmark the MLIP carefully" as Mixed rectangle "Validate capabilities" as Validate #ddf4ff rectangle "Run; require convergence;\napply a physical sanity check" as Evidence #dafbe1 Chemistry --> Molecular Chemistry --> Inorganic Chemistry --> Hybrid Molecular --> GFN2 Inorganic --> MLIP Hybrid --> Mixed GFN2 --> Validate MLIP --> Validate Mixed --> Validate Validate --> Evidence @enduml
  • Dense periodic inorganics — consider an MLIP. Select among models using provenance and matched DFT checks on representative structures; larger models are not an automatic escalation path.
  • Light-element molecules — GFN2. Organics, molecular ions and radicals (set charge/unpaired), proton transfer, hydrogen-bonded clusters, conformers, and anything needing electronic output: charges, DOS/PDOS, NCI, UV-Vis. Use dispersion: 'd4' whenever weak interactions matter.
  • Hybrid organic–inorganic structures — prefer GFN2 if the elements are covered and the cell is small; universal MLIPs trained on inorganic crystals are least reliable exactly where the organic component lives.
  • Small periodic cells with light elements — either can work; GFN2 buys you charges and a physically-motivated Hamiltonian, the MLIP buys you speed. If you use both, never mix their energies: each model has its own reference, so only differences within one model mean anything (see Calculation Overview).
  • Transition states and reaction paths — GFN2 for molecular reactions (Nudged Elastic Band Method); MLIPs for diffusion-like paths in crystals, with the caution that mid-path geometries are the most likely place to leave the training manifold.

Physical sanity checks are system-specific. Compare composition, geometry, sign convention, normalization, and magnitude with matched experimental or higher-level references for the target chemistry. Broad “typical ranges” are useful prompts for investigation, not universal acceptance gates.

Method comparison as a validation experiment

A comparison between methods is meaningful only after its observable and reference convention are defined. Evaluate identical geometries when isolating model disagreement; relax each structure separately when comparing complete method protocols. Never subtract a GFN2 total energy from an MLIP total energy as a reaction or binding energy. Instead, construct the balanced difference independently within each method and compare those differences.

The executable two-calculator pattern is given in Calculator Construction and Validation. Application chapters should cite that contract and report the structures, model identifiers, convergence evidence, and matched reference data used for their own validation.

Practical guidance

Findings below are from real Tako runs, not theory:

  • Always check result.converged after tako.optimize and tako.reactionPath. An unconverged result is a failed step, not a noisy answer. tako.analysis.energyEv deliberately throws on converged: false rather than returning a diverged energy.
  • Sketched geometries can fail under GFN2. Element-dependent short contacts in a poor starting geometry can cause SCF or force divergence. Inspect bonding and distances for the actual elements; no universal distance cutoff applies.
  • MLIP failures are silent. validate() catches capability errors but does not establish that a structure is in-domain. For consequential results, compare representative configurations against consistently computed, method-matched DFT references and record model/version hashes.
  • SCF won’t converge? Raise the electronic temperature or enable temperature annealing in the advanced SCF settings, loosen thresholds, or increase max cycles — the knobs are documented in Choose a Calculator. Open-shell and charge-separated species are the usual offenders; confirm charge/unpaired are physically right before fighting the mixer.
  • For ranking we use equiformer (direct); for moving atoms, equiformer-gradient. Non-conservative forces are fine for single-point screening but undermine energy-consistent optimization and drift in MD.
  • Consider nequix-phono as a phonon starting candidate. Its fine-tuning targets lattice dynamics, but matched force and phonon benchmarks for the material must establish suitability; the default supercell is not validation.

References

  1. C. Bannwarth, S. Ehlert, S. Grimme, GFN2-xTB — An Accurate and Broadly Parametrized Self-Consistent Tight-Binding Quantum Chemical Method with Multipole Electrostatics and Density-Dependent Dispersion Contributions, J. Chem. Theory Comput. 15, 1652–1671 (2019).
  2. S. Grimme, C. Bannwarth, P. Shushkov, A Robust and Accurate Tight-Binding Quantum Chemical Method for Structures, Vibrational Frequencies, and Noncovalent Interactions of Large Molecular Systems Parametrized for All spd-Block Elements (Z = 1–86), J. Chem. Theory Comput. 13, 1989–2009 (2017).
  3. E. Caldeweyher, S. Ehlert, A. Hansen, H. Neugebauer, S. Spicher, C. Bannwarth, S. Grimme, A Generally Applicable Atomic-Charge Dependent London Dispersion Correction, J. Chem. Phys. 150, 154122 (2019).
  4. S. Ehlert, M. Stahn, S. Spicher, S. Grimme, Robust and Efficient Implicit Solvation Model for Fast Semiempirical Methods, J. Chem. Theory Comput. 17, 4250–4261 (2021).
  5. J. Behler, M. Parrinello, Generalized Neural-Network Representation of High-Dimensional Potential-Energy Surfaces, Phys. Rev. Lett. 98, 146401 (2007).
  6. S. Batzner, A. Musaelian, L. Sun, M. Geiger, J. P. Mailoa, M. Kornbluth, N. Molinari, T. E. Smidt, B. Kozinsky, E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials, Nat. Commun. 13, 2453 (2022).
  7. Y.-L. Liao, T. Smidt, Equiformer: Equivariant Graph Attention Transformer for 3D Atomistic Graphs, ICLR (2023).
  8. B. Deng, P. Zhong, K. Jun, J. Riebesell, K. Han, C. J. Bartel, G. Ceder, CHGNet as a Pretrained Universal Neural Network Potential for Charge-Informed Atomistic Modelling, Nat. Mach. Intell. 5, 1031–1041 (2023).
  9. L. Barroso-Luque, M. Shuaibi, X. Fu, B. M. Wood, M. Dzamba, M. Gao, A. Rizvi, C. L. Zitnick, Z. W. Ulissi, Open Materials 2024 (OMat24) Inorganic Materials Dataset and Models, arXiv:2410.12771 (2024).
  10. J. Riebesell, R. E. A. Goodall, P. Benner, Y. Chiang, B. Deng, A. A. Lee, A. Jain, K. A. Persson, Matbench Discovery — A Framework to Evaluate Machine Learning Crystal Stability Predictions, arXiv:2308.14920 (2023).