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.
One state, several observables
Section titled “One state, several observables”from atomli.analysis import Analysisfrom atomli.build import moleculefrom atomli.calculators import QCfrom 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.
Density fields in a notebook
Section titled “Density fields in a notebook”One canonical field name or a sequence selects grid fields:
from atomli.calculators import XTBfrom 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.
Available analysis families
Section titled “Available analysis families”| Question | Public entry points | Worked guide |
|---|---|---|
| Which atoms carry the populations and bond order? | charges, mulliken, lowdin, npa, mayer_bond_orders, orbital_composition | Electronic analysis |
| Where are localized bonds and lone pairs? | localize_orbitals, LocalizedOrbitalsResult.classify_bonds, evaluate_orbital_grid | Localized orbitals |
| How is electrostatic potential distributed? | fields, surface_esp, chelpg, resp | Fields and topology |
| How does the density partition in space? | mbis, bader, hirshfeld_analysis with reference densities | Fields and grid convergence |
| Which conformers contribute? | generate_conformers, run_conformer_ensemble, cluster_conformers, symmetry_rmsd | Conformer search |
| What connects two minima? | interpolate_reaction_path, analyze_reaction_path | NEB and reaction paths |
| Which lattice modes occur at Γ? | Phonons, get_energies, get_modes, from_force_constants | Silicon phonons |
| What are the thermal corrections? | qrrho_thermochemistry, HarmonicThermo, IdealGasThermo | Thermochemistry |
| What changes along a trajectory? | GeometryAnalysis, TrajectoryAnalysis | Trajectory analysis |
| Which excitations or orbitals contribute? | excitations, nto, orbital_composition | Spectroscopy |
| Where does a charge-state change redistribute density? | conceptual_dft_analysis / Analysis.conceptual_dft | Reactivity 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.
Reproducible studies
Section titled “Reproducible studies”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.