Skip to content

Analysis API

atomli.analysis connects a retained electronic state to populations, bonding, localized orbitals, real-space populations, conformer ensembles, and path analysis. AnalysisSession, also exported as Analysis, shares electronic tensors and a density grid across related requests. Distances use Å, energies eV, times fs, charges electron, frequencies cm⁻¹, and entropy eV/K.

from atomli.analysis import Analysis
from atomli.build import molecule
from atomli.calculators import QC
from atomli.optimize import BFGS
atoms = molecule("H2O")
atoms.calc = QC(xc="PBE", basis="def2-svp", device="cpu",
scf={"energy_tolerance": 1e-8})
if not BFGS(atoms).run(fmax=.0001, steps=60):
raise RuntimeError("Geometry did not converge")
analysis = Analysis(atoms, shape=[61, 61, 61], margin=2.5)
frontier = analysis.frontier_orbitals()
charges = analysis.charges("lowdin")
bonds = analysis.mulliken().bond_table(atoms, threshold=.2)
localized = analysis.localize_orbitals(method="pipek-mezey")

The session invalidates cached results when geometry, calculator identity, or the native electronic generation changes. Cached numerical arrays are read-only. Use array.copy() to edit a result. Keep converged electronic tensors, geometry, method settings, and grid registration with exported observables.

One canonical field name or a sequence selects grid fields:

from atomli.calculators import XTB
from atomli.visualize import view_field
atoms.calc = XTB(method="gxtb", device="cpu")
analysis = Analysis(atoms, shape=[41, 41, 41])
fields = analysis.fields("electron_density", charges=False)
view_field(atoms, fields, isovalue=0.06)

view_field accepts the batch with its shared grid metadata. Use kind= to select from a batch with several fields. Use analysis.fields_at_points(points, "electron_density") for coordinates in Å. Point samples do not define a volumetric grid.

QuestionPublic entry pointsWorked guide
Which atoms carry the populations and bond order?charges, mulliken, lowdin, npa, mayer_bond_orders, orbital_compositionElectronic analysis
Where are localized bonds and lone pairs?localize_orbitals, LocalizedOrbitalsResult.classify_bonds, evaluate_orbital_gridLocalized orbitals
How is electrostatic potential distributed?fields, surface_esp, chelpg, respFields and topology
How does the density partition in space?mbis, bader, hirshfeld_analysis with reference densitiesFields and grid convergence
Which conformers contribute?generate_conformers, run_conformer_ensemble, cluster_conformers, symmetry_rmsdConformer search
What connects two minima?interpolate_reaction_path, analyze_reaction_pathNEB and reaction paths
Which lattice modes occur at Γ?Phonons, get_energies, get_modes, from_force_constantsSilicon phonons
What are the thermal corrections?qrrho_thermochemistry, HarmonicThermo, IdealGasThermoThermochemistry
What changes along a trajectory?GeometryAnalysis, TrajectoryAnalysisTrajectory analysis
Which excitations or orbitals contribute?excitations, nto, orbital_compositionSpectroscopy
Where does a charge-state change redistribute density?conceptual_dft_analysis / Analysis.conceptual_dftReactivity descriptors

The table describes the public surface. Backend support depends on the selected method and representation. NTOs require signed transition amplitudes and MO coefficients; Hirshfeld partitioning requires reference-atom densities on the same grid. An unavailable input is not replaced with a guessed observable.

The adsorption study uses PBE/def2-SVP for nine constraint variants, total density, adsorption-energy references, a height scan, and an analytical partial Hessian. The ammonia NEB adds a barrier and transition-state mode. The ethanol search adds native generation, symmetry-aware clustering, PBE refinement, and electronic ensemble averages.

Analysis study source · Analysis figure manifest

All nuclear derivatives in these studies are analytical. Real-space populations use sampled fields and require spatial-grid convergence.