Skip to main content

Documentation

STOMS

STOMS (Storage Tool Of Minor Significance) has two parts:

  • A structure viewer in your browser for atomistic data: STOMS ledgers, extxyz and other structure files, and vibrational modes and phonons from phonopy. It runs on your own computer, with nothing to set up but uv.
  • An immutable, provenance-first ledger (stoms.atomsledger): a Python library that stores ASE structures and their numerical evaluations (energies, forces, …) with required provenance, in SQLite or PostgreSQL.

View structures

Start the viewer with uvx, which runs STOMS in its own environment:

# a STOMS ledger
uvx stoms --ledger data.ledger serve --open

# an extxyz file (each frame with its energies and forces)
uvx stoms --file frames.extxyz serve --open

# vibrational modes and phonons from phonopy
uvx --from "stoms[phonopy]" stoms --file phonopy_params.yaml serve --open

The terminal prints the viewer's address with its access token, for example http://127.0.0.1:8765/?token=…, and --open opens it in your browser. Where no browser opens (for example under WSL), copy that whole address into a browser window yourself.

  • Ledgers: aggregations with property histograms and member tables; export as extxyz, VASP POSCAR or CIF.
  • Structures: rotate, zoom and repeat the cell; bonds and coordination polyhedra; slicing and Miller planes; distances, angles and dihedrals; atoms coloured by element, height, forces or any per-atom property; ring analysis of networks; step through a series, compare two structures side by side, or play them as a movie.
  • Vibrations and phonons: animate modes from phonopy v_sim files or a phonopy calculation, at any q, with the band structure, DOS and LO-TO splitting; record a video.
  • Your own files: add extxyz, POSCAR, CIF, OUTCAR, … files in the browser to view and compare them next to a ledger.

The viewer only reads: the ledger file is never changed. See Viewing a ledger for the full guide, including its Security section.

Store structures and evaluations

Add STOMS to a project:

uv add stoms
# or
pip install stoms

Optional extras: stoms[vasp] (a vasprun.xml parser), stoms[postgres] (the PostgreSQL backend) and stoms[phonopy] (phonopy input for the viewer).

import numpy as np
from ase import Atoms
from stoms.atomsledger import AtomsLedger, MethodSpec, Provenance, StructureSourceSpec

ledger = AtomsLedger("study.ledger")
structure_id = ledger.add_structure(
    Atoms("H2", positions=[(0, 0, 0), (0, 0, 0.74)]),
    StructureSourceSpec(kind="direct", name="manual-build"),
    Provenance(created_by="researcher", purpose="reference structure"),
)
ledger.add_evaluation(
    structure_id,
    method=MethodSpec(method_identifier="vasp-r2scan", family="DFT", name="VASP-r2SCAN"),
    properties={"energy": -1.0, "forces": np.zeros((2, 3))},
    provenance=Provenance(created_by="researcher", purpose="reference label"),
)

Structures and evaluations are immutable records; tags added later are append-only annotations. One structure can carry evaluations from several methods. Queries select training sets with exactly one evaluation per structure, aggregations freeze them in a fixed order, and extxyz exports keep the structure and evaluation IDs. SQLite is the portable archive format; PostgreSQL 16 or newer is an operational backend for shared projects.

Documentation

Development

To work on STOMS itself:

uv sync --dev
uv run pytest

Optional parts have their own extras and groups:

uv sync --dev --extra vasp --extra phonopy   # VASP parser, phonopy input
uv sync --group docs                         # documentation
uv run --group docs mkdocs serve

The structure viewer's browser tests are skipped unless Playwright and Chromium are installed:

uv sync --dev --group browser
uv run playwright install chromium
uv run pytest tests/test_viewer_browser.py

The PostgreSQL tests read STOMS_POSTGRES_TEST_DSN, which must name a disposable database (each test creates and drops its own schema). Start the local PostgreSQL 16 test service with Docker (Engine and the Compose plugin):

uv sync --dev --extra postgres
docker compose up -d postgres
export STOMS_POSTGRES_TEST_DSN='postgresql://stoms:stoms@localhost:54329/stoms_test'
uv run pytest tests/postgres

If that fails with a permission error on the Docker socket, add yourself to the docker group (sudo usermod -aG docker $USER, then log out and in again), or run sudo docker compose up -d postgres. The Compose database keeps its data in memory and uses test-only credentials; stop it with docker compose down.

License

Copyright 2026 Ralf Wanzenböck.

STOMS is licensed under the Apache License 2.0; see LICENSE.

The structure viewer of stoms serve uses the Jmol element colours and the covalent radii of B. Cordero et al., "Covalent radii revisited", Dalton Trans. (2008) 2832–2838, doi:10.1039/B801115J.

Metadata

Release files for stoms 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stoms 0.9.0
File Size Uploaded Provenance Actions
stoms-0.9.0.tar.gz 560.9 kB Without provenance Details for stoms-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stoms 0.9.0
File Interpreter ABI Platform Actions
stoms-0.9.0-py3-none-any.whl Python 3 none any Details for stoms-0.9.0-py3-none-any.whl

Total release size: 795.8 kB

Release files / stoms-0.9.0.tar.gz

Download URL stoms-0.9.0.tar.gz
Size 560.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3c633a0defe2646c14c0943838f5ad77fd120477f13618dabdfcae68dd076261
BLAKE2b-256 checksum
How to use checksums
970ce87fe958d582089b9bb31b25507e243e492d95d023a7ff040ff5cc717f0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / stoms-0.9.0-py3-none-any.whl

Download URL stoms-0.9.0-py3-none-any.whl
Size 234.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a73b8382f2100911bd1917d57eccec3640ae4411c04a48b44753e27da1d716d7
BLAKE2b-256 checksum
How to use checksums
53ba65551056305dbab0f0249b33cb49274f23c49f9010144d050a40dda2ca38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for stoms 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page