# Changelog

This changelog is generated automatically from [GitHub Releases](https://github.com/avcopan/autostorage/releases).


# v0.0.23

*2026-11-19* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.23)


### Added

- **`GeometryRow.hash`**: a unique, indexed SHA-256 digest of a geometry's symbols, coordinates, charge, and spin, set on insert and update by [geometry_hash()](reference/geometry_hash.html#autostorage.geometry_hash) (exported from `autostorage`). Storing an equal geometry twice raises an `IntegrityError`. **Breaking:** the new column changes the schema, so databases created by earlier versions must be regenerated.
- **[validate_stationary_order_before_flush](reference/events.validate_stationary_order_before_flush.html#autostorage.events.validate_stationary_order_before_flush)**: an event that sets `StationaryPointRow.is_validated` when every Hessian of the point's geometry has `order` negative eigenvalues, from autogeom's vibrational analysis (`vibrational_analysis` and `stationary_point_order`). On a mismatch, or a Hessian that is not finite, `is_validated` is reset to `False` and a new [StationaryOrderWarning](reference/StationaryOrderWarning.html#autostorage.StationaryOrderWarning) is issued. The check runs again when the point, or a Hessian of its geometry, is added, changed, or deleted. Pseudo stationary points are skipped.


### Changed

- autostorage requires autogeom 0.0.3 or newer, which added vibrational analysis, and pydantic 2.10.1 or newer, since autogeom 0.0.3 allows pydantic 2.10.0, which breaks `default_factory` fields in SQLModel table rows.
- Removed parent from [hill_formula](reference/hill_formula.html#autostorage.hill_formula) because it is general and applies to any stationary point of any order.
- Restrict orders through a set of `orders` rather than a boolean, so that second-order saddle-points aren't given invalid identities. Formula identities and duplicate identities will have `orders = None` because they apply to any order.


# v0.0.22

*2026-11-15* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.22)


### Added

- **[rdkit_inchi_conn](reference/rdkit_inchi_conn.html#autostorage.rdkit_inchi_conn)**: A built-in identity algorithm of kind `isomer`: the connectivity InChI, without stereo layers, from `autogeom.inchi(geo, stereo=False)`. Stereoisomers share one identity (e.g. cis- and trans-1,2-difluoroethene), which [rdkit_inchi](reference/rdkit_inchi.html#autostorage.rdkit_inchi) (kind `stereoisomer`) tells apart. Every new stationary point now gets four identities instead of three.
- **[IdentityStationaryLink.identity_cache](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink.identity_cache)**: a dict stored as zlib-compressed JSON ([CompressedJSONTypeDecorator](reference/types.CompressedJSONTypeDecorator.html#autostorage.types.CompressedJSONTypeDecorator)), for data that makes generating identities cheaper (e.g. graph isomorphisms). Setting a top-level key in place is saved. The cache is discarded when the stationary point's geometry changes, since its identities are regenerated.
- [IdentityStationaryLink.stationary](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink.stationary) and [IdentityStationaryLink.identity](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink.identity) relationships.


### Changed

- autostorage requires autogeom 0.0.2 or newer, which added the `stereo` option to `autogeom.inchi`.
- **Breaking:** [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow) is keyed by its [name](reference/PropertyKindRow.html#autostorage.PropertyKindRow.name), like [PropertyKindRow](reference/PropertyKindRow.html#autostorage.PropertyKindRow), instead of an integer [id](reference/StepRow.html#autostorage.StepRow.id). `IdentityAlgorithmRow.parent_algorithm_id` is now `parent_algorithm_name`, and `IdentityRow.algorithm_id` is now `algorithm_name` (e.g. `IdentityRow(algorithm_name="rdkit_inchi", value=...)`). The schema changed, so databases created by earlier versions must be regenerated.
- **Breaking:** every row's [id](reference/StepRow.html#autostorage.StepRow.id), and every foreign key to one, is a `uuid.UUID` assigned when the row is created, as [GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow) and [PropertyValueRow](reference/PropertyValueRow.html#autostorage.PropertyValueRow) already were. Ids no longer follow creation order. Databases created by earlier versions must be regenerated.
- **Breaking:** `StationaryPointRow.identities` and `IdentityRow.stationary_points` are replaced by the link rows `StationaryPointRow.identity_links` and `IdentityRow.stationary_links`, which give access to each link's [identity_cache](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink.identity_cache). Use `[link.identity for link in stp.identity_links]` for the identities; to attach one, append `IdentityStationaryLink(identity=...)`. Removing a link from either list deletes it. The new column changes the schema, so databases created by earlier versions must be regenerated.


# v0.0.21

*2026-11-11* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.21)


### Changed

- **Breaking:** autostorage depends on [autogeom](https://github.com/avcopan/autogeom) instead of automol. autogeom is automol's `Geometry` code under a new name, which no longer clashes with the `automol` module of the older AutoMech codes. [GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow) extends `autogeom.Geometry`, and its functions are imported from the package root (`autogeom.center_of_mass(geo)` instead of `automol.geom.center_of_mass(geo)`). See autogeom's [changelog](https://github.com/avcopan/autogeom/blob/main/CHANGELOG.md).

- **Breaking:** the identity framework moves from automol into autostorage (`autostorage.identity`), in a simpler form that matches [PropertyKindRegistry](reference/PropertyKindRegistry.html#autostorage.PropertyKindRegistry):

  | before | now |
  |----|----|
  | `automol.Algorithm` | [autostorage.IdentityAlgorithm](reference/IdentityAlgorithm.html#autostorage.IdentityAlgorithm) (frozen) |
  | `automol.AlgorithmRegistry` | [autostorage.IdentityAlgorithmRegistry](reference/IdentityAlgorithmRegistry.html#autostorage.IdentityAlgorithmRegistry) |
  | `automol.IdentityKind` | [autostorage.IdentityKind](reference/IdentityKind.html#autostorage.IdentityKind) |
  | `automol.rdkit_inchi`, [rdkit_smiles](reference/rdkit_smiles.html#autostorage.rdkit_smiles), [hill_formula](reference/hill_formula.html#autostorage.hill_formula) | [autostorage.rdkit_inchi](reference/rdkit_inchi.html#autostorage.rdkit_inchi), [rdkit_smiles](reference/rdkit_smiles.html#autostorage.rdkit_smiles), [hill_formula](reference/hill_formula.html#autostorage.hill_formula) |
  | `register(..., parent_algorithm=...)`, `algorithm.parent_algorithm` | `register(..., parent=...)`, `algorithm.parent` |
  | `algorithm.geometry_fn(value)` | removed; use `autogeom.from_smiles(value)` or `autogeom.from_inchi(value)` |
  | `AlgorithmAlreadyRegisteredError` on a duplicate name | `ValueError` |

  Identity functions keep the signature `(geo, other_geos=None) -> str`, but it is no longer checked at registration. The database schema and the algorithm names are unchanged, so existing databases keep working.


### Added

- `IdentityAlgorithmRegistry.get(name)`, which returns a registered algorithm by name.
- A user guide page on identities, including how to register a custom algorithm.


# v0.0.20

*2026-11-09* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.20)


### Changed

- **Breaking:** autostorage requires Python 3.13 or later, following [SPEC 0](https://scientific-python.org/specs/spec-0000/).
- automol is required as `>=0.0.31` (was `==0.0.27`). It brings automol's new geometry functions (e.g. `geom.select_atoms`, `geom.join`, `geom.twist`, multi-frame xyz I/O) and its fix for importing automol in conda environments without xyzrender. See automol's [changelog](https://github.com/avcopan/automol/blob/main/CHANGELOG.md).
- The conda package is published to the [`avcopan/automech`](https://prefix.dev/channels/avcopan/automech) channel on prefix.dev, which also has automol, instead of the `avcopan` channel on anaconda.org. Install it with `pixi workspace channel add https://repo.prefix.dev/avcopan/automech` and `pixi add autostorage`.
- The documentation site is built with Great Docs, with a user guide (quickstart, data models, database) whose examples are tested.
- The project follows the [copier-pixi-python](https://github.com/avcopan/copier-pixi-python) template, which also adds the README, license, and repository and documentation links to the PyPI page.


### Removed

- The out-of-date schema diagrams (`schema/`).


# v0.0.19

*2026-10-09* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.19)


# v0.0.18

*2026-10-02* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.18)

> **Breaking (no migrations):** databases created by earlier versions are not compatible -- the `energy`/`gradient`/`hessian`/`identity_extras` tables were replaced, [property_kind](reference/PropertyValueRow.html#autostorage.PropertyValueRow.property_kind) is keyed by name, and `identity_algorithm.deterministic` was dropped. Identity values generated by automol 0.0.26 may also differ from earlier ones for the same geometry (strict Hill order, e.g. `NH3` → `H3N`; new Lewis-structure perception for radicals and charged species).


### Added

- **[PropertyKindRow](reference/PropertyKindRow.html#autostorage.PropertyKindRow) / [PropertyValueRow](reference/PropertyValueRow.html#autostorage.PropertyValueRow)**: Generic property storage replacing `EnergyRow`, `GradientRow`, and `HessianRow`. Values are attached with [property_kind_name](reference/PropertyValueRow.html#autostorage.PropertyValueRow.property_kind_name) (e.g. `"energy"`) or [property_kind](reference/PropertyValueRow.html#autostorage.PropertyValueRow.property_kind), validated against the kind's expected shape on flush, and stored as float64 (Hessians as float32).
- **[PropertyKind](reference/PropertyKind.html#autostorage.PropertyKind) / [PropertyKindRegistry](reference/PropertyKindRegistry.html#autostorage.PropertyKindRegistry)** (`property.py`): In-memory registry of property kinds (name, validation function, storage dtype), with default [energy_property_kind](reference/energy_property_kind.html#autostorage.energy_property_kind), [gradient_property_kind](reference/gradient_property_kind.html#autostorage.gradient_property_kind), and [hessian_property_kind](reference/hessian_property_kind.html#autostorage.hessian_property_kind). Its entries are mirrored by name into [property_kind](reference/PropertyValueRow.html#autostorage.PropertyValueRow.property_kind) when a [Database](reference/Database.html#autostorage.Database) is opened.
- **`query` module**: `query.stationary_point_by_identity(algorithm, value, include_pseudo=False)` selects stationary points by identity, accepting an `automol.Algorithm` (e.g. `automol.rdkit_inchi`), an [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow), or an algorithm name.
- **[AutostorageSession](reference/AutostorageSession.html#autostorage.AutostorageSession)**: `sqlmodel.Session` subclass returned by [Database.session()](reference/Database.html#autostorage.Database.session). All session-level listeners are bound to it rather than to every SQLAlchemy `Session` in the process.
- **[IdentityGenerationWarning](reference/IdentityGenerationWarning.html#autostorage.IdentityGenerationWarning)**: Issued when an identity algorithm fails for a geometry (e.g. metals, no valid Lewis structure, failed InChI) or returns an empty value; that identity is skipped instead of aborting the flush.
- **[Database](reference/Database.html#autostorage.Database) context manager** (`with Database(path) as db: ...` closes it on exit).
- **`TrajectoryRow.geometries_along(axis, at)` / `TrajectoryRow.view(axis, at)`**: Slice a (multi-dimensional) trajectory along one dimension, holding the other indices fixed at `at` (default: the lowest index of each), and animate the slice with py3Dmol.
- Top-level exports for [PropertyKindRow](reference/PropertyKindRow.html#autostorage.PropertyKindRow), [PropertyValueRow](reference/PropertyValueRow.html#autostorage.PropertyValueRow), [PropertyKind](reference/PropertyKind.html#autostorage.PropertyKind), [AutostorageSession](reference/AutostorageSession.html#autostorage.AutostorageSession), and [IdentityGenerationWarning](reference/IdentityGenerationWarning.html#autostorage.IdentityGenerationWarning).


### Changed

- **Bump** `automol` to v0.0.26.
- **[GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow)** now gets automol 0.0.26's validation: symbols are checked and canonicalized (`"cl"` → `"Cl"`), spin must be consistent with the electron count, and `pint.Quantity` coordinates are converted to Angstrom (via automol's `CoordinatesField`).
- **[GeometryRow.relabel_atoms()](reference/GeometryRow.html#autostorage.GeometryRow.relabel_atoms)** returns a new, unsaved row with a fresh [id](reference/StepRow.html#autostorage.StepRow.id), so the result can be persisted.
- **Every identity now lives in [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow)**: [add_registry_identities_before_flush](reference/events.add_registry_identities_before_flush.html#autostorage.events.add_registry_identities_before_flush) attaches identities for all registered algorithms to `StationaryPointRow.identities` via [IdentityStationaryLink](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink), instead of routing some to a child `IdentityExtraRow`. Identities are also regenerated when a stationary point's geometry is reassigned, and stationary points added in the same flush share sibling identities (e.g. SMILES).
- **`IdentityAlgorithmRow.name`** is unique, and [create_identity_algorithms()](reference/events.create_identity_algorithms.html#autostorage.events.create_identity_algorithms) updates the [kind](reference/TrajectoryAxisRow.html#autostorage.TrajectoryAxisRow.kind)/parent of existing rows to match the registry.
- **[Database.session()](reference/Database.html#autostorage.Database.session)** returns a `sqlmodel.Session` ([AutostorageSession](reference/AutostorageSession.html#autostorage.AutostorageSession)), so `session.exec(...)` is available. The engine URL is built with `sqlalchemy.URL.create`, so paths containing `?` or `#` work.
- **Trajectory ndim check** is now a session-level `before_flush` listener ([verify_trajectory_geometry_ndim](reference/events.verify_trajectory_geometry_ndim.html#autostorage.events.verify_trajectory_geometry_ndim)), so an inferred `TrajectoryRow.ndim` is persisted.
- Decompression of stored arrays is capped at [types.MAX_DECOMPRESSED_BYTES](reference/types.MAX_DECOMPRESSED_BYTES.html#autostorage.types.MAX_DECOMPRESSED_BYTES), and truncated compressed streams are rejected with a `ValueError`.
- **Dict JSON columns** (`ModelRow.keywords`, `CalculationRow.input_provenance`/`output_provenance`, `ValidationRow.extras`) now use `MutableDict`, so in-place edits (e.g. `calc.input_provenance["x"] = 1`) are persisted on commit.
- **[Database.__init__](reference/Database.html#autostorage.Database.__init__)** disposes its engine if schema creation or registry seeding fails. The `PRAGMA foreign_keys=ON` hook is a module-level listener, and the no-op `from .models import *` was removed.
- **Schema**: dropped the redundant `ix_step_stage_id1` index ([stage_id1](reference/StepRow.html#autostorage.StepRow.stage_id1) is the leading column of the `step` unique indexes).
- Internal cleanup: all cascading foreign keys are declared with `models._fk_field()` (moved from `types.py`), and the `events` listeners use typed helpers instead of `Any`.


### Fixed

- Opening an existing database from a new process no longer inserts duplicate [property_kind](reference/PropertyValueRow.html#autostorage.PropertyValueRow.property_kind) rows.
- Property kinds loaded from the database (rather than the in-process registry objects) no longer fail validation with a `TypeError`.
- Energies and gradients are stored at float64 precision again (were float32); integer energies and `(N, 3)` gradients are accepted.
- [verify_valid_stationary_has_hessian](reference/events.verify_valid_stationary_has_hessian.html#autostorage.events.verify_valid_stationary_has_hessian) is enforced again (it was disabled and referenced the removed `GeometryRow.hessians`).
- `tests/scratch*.py` files are no longer imported by `pytest --doctest-modules`.


### Removed

- **`IdentityExtraRow`**: Non-deterministic identifiers (e.g. SMILES, Hill formula) are no longer stored in a separate `identity_extras` table.
- **`EnergyRow`, `GradientRow`, `HessianRow`**: Replaced by [PropertyValueRow](reference/PropertyValueRow.html#autostorage.PropertyValueRow).
- **`IdentityAlgorithmRow.deterministic`**: Removed along with `automol.Algorithm.deterministic` in automol 0.0.26.
- Unused `algorithm_cache` columns on [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow) and [IdentityStationaryLink](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink).
- `stereomolgraph` and `irmsd` dev dependencies (no longer used by automol).
- **[types.CompressedJSONTypeDecorator](reference/types.CompressedJSONTypeDecorator.html#autostorage.types.CompressedJSONTypeDecorator)**: Unused by any model.


# v0.0.17

*2026-09-20* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.17)


### Added

- **[IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow)**: New table storing chemical identifier algorithms from `automol.ident.AlgorithmRegistry`, with fields for [name](reference/PropertyKindRow.html#autostorage.PropertyKindRow.name), [kind](reference/TrajectoryAxisRow.html#autostorage.TrajectoryAxisRow.kind) ([IdentityKind](reference/IdentityKind.html#autostorage.IdentityKind)), `deterministic` flag, and optional `parent_algorithm_id` for algorithms that depend on a parent (e.g., conformer identities derived from InChI). Each algorithm row links to its [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow) and `IdentityExtraRow` instances.
- **[create_identity_algorithms()](reference/events.create_identity_algorithms.html#autostorage.events.create_identity_algorithms)**: Populates all identity algorithms from `automol.ident.AlgorithmRegistry` into the database, building the parent→child hierarchy recursively.
- **Top-level exports**: Added [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow), [IdentityStationaryLink](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink), [StageStationaryLink](reference/StageStationaryLink.html#autostorage.StageStationaryLink), and [StepValidationLink](reference/StepValidationLink.html#autostorage.StepValidationLink) to `autostorage.__all__`.


### Changed

- **[IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow)**: Now references [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow) via `algorithm_id` foreign key instead of storing [kind](reference/TrajectoryAxisRow.html#autostorage.TrajectoryAxisRow.kind)/`algorithm` as direct columns. The unique constraint changed from `(kind, algorithm, value)` to `(algorithm_id, value)`. Relationships to [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow) added via `algorithm` field.
- **`IdentityExtraRow`**: Now references [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow) via `algorithm_id` foreign key; the `attribute` column was removed in favor of the algorithm relationship.
- **Identity event listeners** (`events.py`): Complete refactor to work with [IdentityAlgorithmRow](reference/IdentityAlgorithmRow.html#autostorage.IdentityAlgorithmRow)-based approach:
  - `_find_or_create_identity()` replaced with `_get_or_create_identity()` that uses `(algorithm_id, value)` keys and maintains a per-flush cache (`_IdentityCache`, `_IdentityExtraCache`) to avoid duplicate lookups.
  - New `_IdentityFlushContext` dataclass manages per-flush state (session, caches).
  - `_resolve_parent_identity()` resolves parent identities and sibling geometries for non-deterministic algorithms.
  - `_attach_algorithm_identity()` creates and attaches identities based on whether the algorithm is deterministic or requires a parent.
  - Sibling geometry resolution now queries via [IdentityStationaryLink](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink) joins instead of walking in-memory relationships.


# v0.0.16

*2026-09-11* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.16)


### Changed

- **`GeometryRow.id`**: Changed from an auto-incrementing `int` to a `uuid.UUID` (`default_factory=uuid.uuid4`). All dependent [geometry_id](reference/PropertyValueRow.html#autostorage.PropertyValueRow.geometry_id) foreign keys ([CalculationGeometryLink](reference/CalculationGeometryLink.html#autostorage.CalculationGeometryLink), [GeometryTrajectoryLink](reference/GeometryTrajectoryLink.html#autostorage.GeometryTrajectoryLink), `EnergyRow`, `GradientRow`, `HessianRow`, [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow)) updated from `int | None` to `uuid.UUID | None` accordingly.
- **`_find_or_create_identity`**: Compares and stores `identity.algorithm` directly instead of `str(identity.algorithm)`.
- **Bump** `automol` to v0.0.24.


### Fixed

- **Identity auto-population event listener** ([add_registry_identities_before_flush](reference/events.add_registry_identities_before_flush.html#autostorage.events.add_registry_identities_before_flush), renamed from `add_inchi_identities_before_flush`): Now generates an identity for every algorithm in `automol.ident.AlgorithmRegistry` (previously only InChI), excluding SMILES and Hill formula, which continue to be attached separately as `IdentityExtraRow`s. Non-InChI algorithms are passed the InChI identity's sibling geometries (`other_geos`); when an algorithm's value matches a sibling's geometry, that sibling's existing identity row is reused instead of creating a duplicate.


# v0.0.15

*2026-09-03* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.15)


### Fixed

- **Identity auto-population event listeners** (`add_inchi_identities_before_flush`, `add_smiles_extras_before_flush`, `add_hill_extras_before_flush`): Now correctly handle [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow) objects created with relationship objects (`geometry=geo_row`) in addition to foreign key IDs (`geometry_id=geom.id`). Previously, the listeners only checked [geometry_id](reference/PropertyValueRow.html#autostorage.PropertyValueRow.geometry_id) and used `session.get()` to load the geometry, which failed when objects were created with relationships and added together without intermediate flushes (as in batch workflow patterns). The fix tries the relationship first, then falls back to FK-based loading, supporting both creation patterns.


# v0.0.14

*2026-09-02* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.14)


### Changed

- **Bump** `automol` to v0.0.23 to resolve dependency installations


# v0.0.13

*2026-09-01* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.13)


### Added

- **`.claude/CLAUDE.md`**: Project-level guidance for Claude Code, documenting module architecture, layering rules, Pixi task commands, and autostorage-specific conventions.
- **`docs/source/models.md`**: Dedicated documentation page for the row models and their relationships.
- **Schema diagrams** (`schema/`): Added Pintora source files and rendered SVG/PNG diagrams for both simplified and full database schemas.
- **`examples/stationary.py`**: Example demonstrating stationary points, stages, and steps with H2O geometries.
- **`examples/scan.py`**: Example showing PES scan workflow with trajectory data.
- **`examples/transition.py`**: Example illustrating transition state and reaction pathway modeling.
- **`tests/test_events.py`**: Comprehensive test suite for SQLAlchemy ORM event listeners.
- **Top-level exports**: Added [CalculationTrajectoryLink](reference/CalculationTrajectoryLink.html#autostorage.CalculationTrajectoryLink), [GeometryTrajectoryLink](reference/GeometryTrajectoryLink.html#autostorage.GeometryTrajectoryLink), and `events` module to `autostorage.__all__`.


### Changed

- **Module consolidation**: Collapsed `src/autostorage/models/` directory (with separate `calc.py`, `data.py`, `geom.py`, `link.py`, `rxn.py`, `traj.py` files) into a single `src/autostorage/models.py` file -- all row models, link tables, and helpers now live in one module, eliminating circular import complexity while maintaining logical organization via internal sections (link tables, existential data, stationary points, reaction network, identities).
- **Documentation reorganization**: Streamlined Sphinx docs -- consolidated data model, development, and events pages into focused `models.md` and updated `database.md`; refreshed `index.md` and `quickstart.md` to reflect current architecture.
- **Examples refactor**: Replaced single `stationary_point.py` example with three focused examples (`stationary.py`, `scan.py`, `transition.py`), each demonstrating a distinct workflow pattern.
- **Test simplification**: Removed `tests/conftest.py` and test data files (`tests/data/*.xyz`, `*.gz`) -- tests now use inline synthetic data instead of external fixtures.


### Removed

- **Alembic migrations** (`migrations/`, `alembic.ini`, `tests/test_migrations.py`, `pixi run migrate`): Removed for now; `alembic` remains a dev dependency for when migrations are reintroduced. Schema for fresh/in-memory [Database](reference/Database.html#autostorage.Database) instances is unaffected, still built via `create_all()`.
- **`src/autostorage/exc.py`**: Custom exception classes (`DataIntegrityError`, `ResultShapeError`) removed -- validation errors now use standard Python exceptions or SQLAlchemy's built-in constraint violations.
- **`CalcType` and `CalcStatus` enums**: Removed from `types.py` and top-level exports -- calculation type/status classification deferred to workflow layer or removed entirely.
- **Documentation files**: Deleted `docs/source/data-model.md`, `docs/source/development.md`, and `docs/source/events.md` (content consolidated into `models.md` and other updated docs).
- **`examples/stationary_point.py`**: Superseded by the three new focused examples.


# v0.0.12

*2026-07-24* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.12)


### Added

- **`GeometryRow.geometry_hash`, `.find_or_create`**: A `sha256` hash of `symbols`/`coordinates`/`charge`/`spin`, backed by a unique constraint, plus a `find_or_create` classmethod (same `commit`-flag pattern as `ModelRow.find_or_create`) that reuses a matching row instead of inserting a duplicate. Only catches bit-identical content -- a rotated/translated/jittered near-duplicate conformer still gets its own row.
- **Migration** for the new `geometry.geometry_hash` column: backfills existing rows before tightening to `NOT NULL` + unique, since SQLite can't add a populated column straight to that state.


### Changed

- **`Database.merge_from`**: [GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow) is now deduplicated against the target's existing content (via `GeometryRow.find_or_create`), alongside [ModelRow](reference/ModelRow.html#autostorage.ModelRow) and non-auto-managed [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow)s.


### Fixed

- **Stationary/Hessian order-consensus revalidation**: Moved from per-instance `before_insert`/`before_update` mapper events (`validate_geometry_orders`) to a session-level `before_flush` listener (`revalidate_geometry_orders_on_insert_update`). The mapper event fired too late in the flush cycle to persist mutations to already-clean sibling [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow)s, so SQLAlchemy silently dropped those updates instead of writing them.
- **`_recompute_geometry_stationary_validity`**: Skips a `HessianRow` whose `.order` can't be computed yet (still pending its own shape validation later in the same flush) instead of raising the raw `ValueError`.


# v0.0.11

*2026-07-23* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.11)


### Added

- **`ModelRow.find_or_create`, `IdentityRow.find_or_create`**: Look up a matching row by content before creating one, with a `commit` flag (default `True`; pass `False` to only flush, leaving the caller's transaction open for staging several dedup lookups that must succeed or fail together). `unique_model`/`unique_identity` don't catch duplicates when a nullable column (`program_version`, `basis`) is `NULL`, since SQL treats `NULL` as distinct from itself in unique constraints -- callers constructing and saving a fresh row each time (without every field set) were silently accumulating duplicate rows for the same logical model/identity, which broke downstream lookups keyed on `model_id`/[identity_id](reference/IdentityStationaryLink.html#autostorage.IdentityStationaryLink.identity_id).
- **`StageRow.find_or_create`, `StepRow.find_or_create`**: Same pattern as `ModelRow.find_or_create`, for stages and steps.
- **`BaseLink.create(*rows, **attrs)`**: Construct a link row by matching each positional row to its relationship by type (e.g. `CalculationGeometryLink.create(calc, geo, role=Role.INPUT)`), replacing the removed per-row `*_link()` wrapper methods below. Raises if a row's type matches more than one unfilled relationship (e.g. a link table with two relationships to the same row model), rather than silently picking one by declaration order.
- **`Database.merge_from(source_db, *, commit=True)`** (`autostorage.merge`, new module -- `merge_databases()`, `MergeReport`): Copy another database's contents into this one, remapping ids/foreign keys and deduplicating content-unique rows ([ModelRow](reference/ModelRow.html#autostorage.ModelRow), non-auto-managed [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow)s) against this database's existing data. InChI/conformer identities are deliberately left for `add_inchi_identities`/`assign_conformer_ids` (see `events.py`) to regenerate on insert, so matching conformers collapse onto one shared identity across the merged databases. Nothing commits until every table copies without error. Returns a `MergeReport` of rows copied/reused per table.
- **`GeometryRow.symmetry_number`**: Cached property (`functools.cached_property`) computing the molecular symmetry number from stereo-preserving graph automorphisms, via `stereomolgraph`. Safe to cache indefinitely since `symbols`/`coordinates` are immutable after insert (`verify_geometry_immutable_fields`).
- **`autostorage.utils.export_mess_input()`**: Render a sequence of [StepRow](reference/StepRow.html#autostorage.StepRow)s as MESS `Well`/`Bimolecular`/`Barrier` input blocks, with energies (electronic + harmonic ZPE, relative to a reference stationary point) and symmetry numbers (`GeometryRow.symmetry_number`) resolved from the database. A barrierless step's TS block has no geometry to compute a symmetry number from and gets a flagged `TODO(autostorage)` placeholder instead. Does not emit `Model`/`EnergyRelaxation`/`CollisionFrequency` blocks; the caller must prepend those.
- **`autostorage.utils.plot_pes()`, `PESPlot`**: Render the same step sequence as a potential energy surface diagram (a Matplotlib figure of level/connector segments along an unlabeled ordinal x-axis), with `PESPlot.save()` and Jupyter rich display (`_repr_png_`) support. A species/TS with no `EnergyRow` at the given model is drawn flagged (dashed, muted gray) rather than omitted.
- **`examples/stationary_point.py`**: Runnable end-to-end example building a synthetic water optimization + frequency workflow, touching every row model except [StageRow](reference/StageRow.html#autostorage.StageRow)/[StepRow](reference/StepRow.html#autostorage.StepRow) and their reaction-specific link tables.
- **`TimestampMixin`**: Adds server-managed `created_at`/`updated_at` columns to every `BaseRow` subclass.
- **`CalcStatus`**: Lifecycle status enum (`PENDING`/`RUNNING`/`SUCCEEDED`/`FAILED`) for a new `CalculationRow.status` column (default `PENDING`), paired with a new `CalculationRow.error_message` column.
- **[CompressedArrayTypeDecorator](reference/types.CompressedArrayTypeDecorator.html#autostorage.types.CompressedArrayTypeDecorator)**: Stores NumPy arrays as zlib-compressed `.npy` binary data, preserving shape and dtype for arrays of any dimensionality. Replaces `FloatArrayTypeDecorator`/`Float32BytesTypeDecorator` on `GeometryRow.coordinates`, `GradientRow.value`, and `HessianRow.value` -- the latter previously stored a flattened, shapeless raw float32 buffer.
- **`StationaryPointRow.identity(kind=..., algorithm=...)`**: Return the first already-loaded identity matching kind and/or algorithm.
- **`CalculationRow.input_geometries`, `.output_geometries`, `.input_trajectories`, `.output_trajectories`**: Properties filtering linked geometries/trajectories by [Role](reference/Role.html#autostorage.Role).
- **`Database.add_all()`**: Bulk counterpart to `add()`.
- **`Database.get_or_none()`**: Like [get()](reference/PropertyKindRegistry.html#autostorage.PropertyKindRegistry.get), but returns `None` on a miss instead of raising.
- **`Database.exists()`**: Check whether any row matches a statement via a single `EXISTS` subquery, without materializing a match.
- **[Database.__enter__](reference/Database.html#autostorage.Database.__enter__)/[__exit__](reference/Database.html#autostorage.Database.__exit__)**: Support `with Database(...) as db:`; rolls back the session on an exception before closing.
- **`IdentityRow.unique_identity`**: Unique constraint on `(kind, algorithm, value)`.
- **Reverse-lookup and FK indexes**: Added to the trailing column of every composite-PK link table, to [ModelRow](reference/ModelRow.html#autostorage.ModelRow)/[StepRow](reference/StepRow.html#autostorage.StepRow) (null-safe unique indexes, since their existing unique constraints don't catch duplicates where a nullable column differs only by `NULL`), and to previously-unindexed foreign keys (`CalculationRow.model_id`, and [geometry_id](reference/PropertyValueRow.html#autostorage.PropertyValueRow.geometry_id)/[calculation_id](reference/PropertyValueRow.html#autostorage.PropertyValueRow.calculation_id) on `EnergyRow`, `GradientRow`, `HessianRow`, [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow), [ValidationRow](reference/ValidationRow.html#autostorage.ValidationRow)).
- **Event listeners**: `verify_geometry_immutable_fields` (rejects changes to `GeometryRow.symbols`/`.coordinates` after insert), `verify_stage_ts_consistency` (validates a [StepRow](reference/StepRow.html#autostorage.StepRow)'s stages agree with it on transition-state status), `revalidate_geometry_orders_on_hessian_delete` (keeps `StationaryPointRow.is_valid` correct when the Hessian establishing order consensus is deleted).
- **Alembic migrations** (`migrations/`, `alembic.ini`, `pixi run migrate`): Evolve an existing on-disk database's schema in place, targeted via `AUTOSTORAGE_DATABASE_URL`; fresh/in-memory [Database](reference/Database.html#autostorage.Database) instances (including tests) are unaffected, still built via `create_all()`.


### Changed

- **[Database](reference/Database.html#autostorage.Database) engine**: JSON columns now serialize with sorted keys, so equality filters on JSON columns (e.g. `CalculationRow.input_provenance == prov`) match regardless of the dict's key insertion order.
- **`Database.exec_all()`**: Now returns a `list` instead of a lazy iterator.
- **`Database.flush()`**: Also expires all session objects, so an already-loaded object whose row was removed by a DB-level `ondelete="CASCADE"` during the flush reloads (or raises) on next access instead of reading back stale.
- **[Role](reference/Role.html#autostorage.Role) enum columns** ([CalculationGeometryLink.role](reference/CalculationGeometryLink.html#autostorage.CalculationGeometryLink.role), [CalculationTrajectoryLink.role](reference/CalculationTrajectoryLink.html#autostorage.CalculationTrajectoryLink.role)): Store the enum's `.value` instead of its member name.
- **`ValidationRow.calculation_id`**: Now `NOT NULL` and indexed.
- **`HessianRow.harmonic_frequencies`**: Now a `functools.cached_property` instead of a plain `property`, since vibrational analysis re-diagonalizes the Hessian on every call and `.order` (used to recompute `StationaryPointRow.is_valid` for every sibling Hessian of a geometry, on every relevant flush) depends on it. Invalidated automatically on `.value` update by the new `invalidate_hessian_frequency_cache` event listener.
- **`matplotlib`, `stereomolgraph`**: Now required (not optional/dev-only) dependencies, for `plot_pes()`/`export_mess_input()` and `GeometryRow.symmetry_number` respectively.


### Fixed

- **[Database](reference/Database.html#autostorage.Database)**: `PRAGMA foreign_mode=DELETE` (not a valid SQLite pragma) corrected to `PRAGMA journal_mode=DELETE`, the intended WAL-mode fallback.
- **`GradientRow`/`HessianRow` shape validation, [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow)/`HessianRow` order validation, [StepRow](reference/StepRow.html#autostorage.StepRow) stage-consistency validation, `add_inchi_identities`, `assign_conformer_ids`**: Now resolve the target's geometry/relationship via the session when only the FK id was set (not the relationship itself), so validation and automatic identity attachment are no longer silently skipped in that case.
- **[ValidationRow](reference/ValidationRow.html#autostorage.ValidationRow)**: Removed a duplicate explicit [id](reference/StepRow.html#autostorage.StepRow.id) field that shadowed the one already provided by `BaseRow`.


### Removed

- **`BaseRow.save()` and `BaseLink.save()`**: Duplicated `Database.add()`/`Database.merge()` with a non-obvious "always commits" side effect. Use `db.add(row)` / `db.merge(row)` directly.
- **`GeometryRow.calculation_link()`, `.trajectory_link()`, `.stationary_point()`, `.energy()`, `.gradient()`, `.hessian()`**: Unused one-line wrappers around link/result-row constructors. Construct the row directly instead (e.g. `HessianRow(calculation=..., geometry=..., value=...)`).
- **`TrajectoryRow.geometry_link()`, `.calculation_link()`**: Unused one-line wrappers; construct the link row directly.
- **`CalculationRow.geometry_link()`, `.trajectory_link()`**: Unused one-line wrappers; construct the link row directly.


# v0.0.10

*2026-07-17* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.10)


### Added

- **`events.py`**: House custom `sqlalchemy` events.
  - **`assign_conformer_ids`**: Auto-tag duplicate conformers sharing an InChI with a shared `conformer`-kind [IdentityRow](reference/IdentityRow.html#autostorage.IdentityRow).
- **`exc.py`**: Custom `Exception` classes.
- **`types.py`**: Custom typing.
  - **`CalcType`**: Normalize `CalculationRow.calc_type`.
- **`Database(wal=...)`**: Enable SQLite WAL journal mode.
- **`irmsd` dependency**: Conformer RMSD comparisons.


### Changed

- **Module refactor**:
  - `models/` -\> `models.py` to consolidate logic and address circular import concerns.
- **`BaseRow`**: Provide a `.save()` method for standard auto-incremented ID tables.
- **`BaseHashedRow`**: Provide a `.resolve()` method for hashed tables, searching the database for matching hashes.
- **`BaseResultRow`**: Provide a `.query()` method for result tables (`EnergyRow`, `GradientRow`, `HessianRow`), searching the database for existing results.
- **`BaseLink`**: Provide a `.save()` method for non-incremented ID tables (e.g., links).
- **Table models**: Adjust fields and relationships on several models.
- **Dependency version**:
  - **`automol`**: Bump to `0.0.19`.
  - **`ty`**: Bump to `>=0.0.59,<0.0.60`.
- **`autostorage` layering**: Updated to `utils -> database -> events -> models -> types | exc`.
- **Supported platforms**: Restrict to `linux-64`; pin `python` to `>=3.12,<3.14`.


### Fixed

- **`tests`**: Reflect changes.


### Removed

- **`calculate` module** in favor of direct calls to `automol`.
- **`query.py` and `select.py`** in favor of class methods on table models.
- **`PartialMixIn`** due to type safety concerns.
- **`ComparisonMixIn`**.
- **`automatics` dependency** (discontinued package).
- **`qcdata` dependency** (no longer used).
- **`examples` directory**.


# v0.0.9

*2026-06-18* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.9)


### Added

- `calculate` module for calculating properties of database rows.
- `GradientRow` and `HessianRow` for storing respective values.
- Event listeners for validating shape of gradient and Hessian values.
- [ValidationRow](reference/ValidationRow.html#autostorage.ValidationRow) for assocating validation calculations (such as `Intrinsic Reaction Coordinate`) with elementary steps.
- `ModelRow.hash` (from `automatics`) as a unique constraint.
- `query` module combining `select` statements and `db.exec` methods for convenience.
- `xyzrender` as a dev / optional dependency.


### Changed

- Bump `automatics` to v0.0.6,
- Bump `automol` to v0.0.16.


### Fixed

- Tests to reflect changes.


### Removed

- `read` module in favor of class methods.


# v0.0.8

*2026-06-12* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.8)


### Added

- **`BaseRow` model**: Manage universal attributes and mixin methods across all row models.
- **`ComparisonMixin`**: Define equivalency behavior between database rows without including row IDs.
- **`IdentityExtraRow`**: Tag identities with non-queryable attributes (e.g., SMILES strings).
- **`select` module**: Convenience methods for generating `SelectOfScalar` objects.
- **`database.get()`**: Retrieve a row from the database by ID.
- **`database.exec` methods**: Return first, all, or one match to a `SelectOfScalar` query.
- **`read` module**: Read common file types (e.g., '.xyz') into database instances.
- **`automatics` dependency**: Maintain a single source of truth for core `autosuite` objects.
- **[ModelRow](reference/ModelRow.html#autostorage.ModelRow)**: Store pertinent information about a calculation model.
- **[TrajectoryRow](reference/TrajectoryRow.html#autostorage.TrajectoryRow), [StageRow](reference/StageRow.html#autostorage.StageRow), [StepRow](reference/StepRow.html#autostorage.StepRow)**: Define input/output relationships between [GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow), [StationaryPointRow](reference/StationaryPointRow.html#autostorage.StationaryPointRow), and [CalculationRow](reference/CalculationRow.html#autostorage.CalculationRow).


### Changed

- **Module refactor**:
  - `Calculation` and related modules exported to `automatics` as `Model`.
- **CalculationRow**: Store provenance and IDs of input/output [GeometryRow](reference/GeometryRow.html#autostorage.GeometryRow) and [TrajectoryRow](reference/TrajectoryRow.html#autostorage.TrajectoryRow) entries.
- **Dependency version**:
  - **`automol`**: Bump to `0.0.14`.
- **`autostorage` layering**.
- **Model organization**:
  - **`geom` module**: Models related to molecular geometries.
  - **[calculation](reference/PropertyValueRow.html#autostorage.PropertyValueRow.calculation)**: Models related to calculation inputs and outputs.


### Removed

- **`db.find()` and `db.find_or_add()`**.


### Fixed

- **[Database.session()](reference/Database.html#autostorage.Database.session)**: Yield a persistent session.
- References to `AutoStore`.


# v0.0.7

*2026-04-30* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.7)

- Renames library to "AutoStorage" to avoid PyPI name conflicts
- Exposed lower-level types and utilities to the top-level import


# v0.0.6

*2026-04-27* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.6)

- Explicitly set the Pixi Ty version to match the current marketplace extension.

- Added database convenience methods:

  - row_to_dict() for serializing rows to dictionaries (optionally including default fields)
  - verify_single_iteration() to ensure Database.find() returns exactly one RowModel

- Updated Database behavior:

  - All methods (except delete()) now return full SQLModel objects instead of RowIDs
  - Added eager_load parameter to add() and find() to include relationships on returned objects
  - Introduced find_or_add() as a convenience wrapper (find() → add() if no match)
  - Replaced query() entirely with find(), which accepts partially or fully populated models

- Introduced partial model support:

  - RowModel.partial(\*\*attrs) allows constructing models with missing required fields for querying
  - Implemented via autostore.models.optional using a PartialMixin

- Refactored model structure:

  - Split autostore/models.py into autostore/models/\* for improved organization
  - Separated provenance data into a new ProvenanceRow
  - Shortened some lengthy model attribute names.
  - Standardized model attributes to snake_case

- Refined domain models and logic:

  - CalculationRow.calc_type changed from str → str \| None to reduce redundancy (handled at lower levels)
  - Updated calcn.core.project to avoid mutating original Calculation instances
  - Updated calcn.core.hash_full to reflect CalculationRow refactor

- Simplified module structure:

  - Removed standalone autostore/qc
  - Moved relevant functionality onto row models (CalculationRow, ProvenanceRow, GeometryRow)

- StationaryPointRow now cascade-deletes when linked GeometryRow or CalculationRow is deleted

- Reworked test suite to improve modular testing and debugging


# v0.0.5

*2026-04-09* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.5)


### Added

- Added superprogram fields to CalculationRow.
- Updated qc interfaces to reflect update from qcio -\> qcdata
- Database row models moved from models/\* to models.py
- Added Database methods for adding, getting, and querying rows from database
- CalculationGeometryLink table to associate Calculation with input/output Geometries
  - Calculation Geometries can be accessed by CalculationRow.geometries
  - Geometry Calculations can be accessed by GeometryRow.calculations
- Placeholder MetricRow for storing identifying properties


# v0.0.4

*2026-04-01* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.4)


# v0.0.3

*2026-01-29* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.3)


### Added

- Geometry hash field populated by event listener
- Calculation object with hash registry
- Calculation hash table populated by event listener
- Interconversion of Calculation and QCIO ProgramInput objects
- Read energy from database


### Fixed

- Specify Calculation-Energy and Geometry-Energy as many-to-one relationships
- Uniqueness constraint in CalculationHashRow


# v0.0.2

*2026-01-28* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.2)


### Added

- `qc` submodule for interconversion with `QCIO` objects


### Fixed

- Fix coordinate units (Angstrom) in geometry table


# v0.0.1

*2026-01-28* · [GitHub](https://github.com/avcopan/autostorage/releases/tag/v0.0.1)


### Added

- Write energy to database
