Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

qcstore

A store for quantum chemistry results. Every run of every calculation is kept as plain JSON you can read with cat and jq, filed under the calculation's key, and nothing is ever overwritten or deleted. Many processes can write to one store at once, on a local disk or NFS, without locks, and a writer killed mid-write leaves nothing a reader trusts.

qcstore depends only on qcdata and the Python standard library.

Install

qcstore is in alpha. Install it with the alpha releases of the rest of the stack:

uv pip install --prerelease=allow "qcdata==0.24.0a2" "qccompute[qccodec]==0.23.0a1" "qcstore==0.1.0a1"

Five minutes

A store files each calculation under its key, qcdata.calculation_key(inp): the input alone. Each run also keeps the numerics identity of every program that produced it, so results of different code stay apart while the key stays the same across releases. The runner sets the identities on every output it returns, execution.identities: it asks each program for a string that changes whenever its results may change, and put stores them with the run. For a Python library that is its name and version ({"tblite": "tblite 0.8.0"}); for an external executable, the sha256 of the file ({"xtb": "sha256:9c1f…"}); for a program with numerics epochs, the epoch. qccompute.Runner().identities(inp) shows them for an input.

from qcdata import ProgramInput, ProgramOutput, SinglePointData, Structure
from qcstore import Store

water = Structure(
    symbols=["O", "H", "H"],
    geometry=[[0.0, 0.0, 0.0], [0.0, 1.43, 1.11], [0.0, -1.43, 1.11]],  # bohr
)
inp = ProgramInput(
    program="tblite", calctype="energy", structure=water, model={"method": "GFN2-xTB"}
)
output = ProgramOutput(
    input_data=inp,
    success=True,
    logs="SCF converged in 9 iterations\n",
    results=SinglePointData(
        provenance={"program": "tblite", "program_version": "0.8.0"}, energy=-5.07
    ),
    execution={"identities": {"tblite": "tblite 0.8.0"}},  # what the runner sets
)

store = Store("./store")
run = store.put(output, tags=["demo"], meta={"by": "readme"})

key = store.key(inp)
tblite = {"tblite": "tblite 0.8.0"}
store.get(key, tblite)             # only a run of tblite 0.8.0
store.get(key, {"tblite": "tblite 0.9.0"})   # None: never run with 0.9.0
store.get(key)                     # the latest run, whatever code made it...
store.get(key).execution.identities  # ...and which code that was
store.blob(key, "logs")            # b"SCF converged in 9 iterations\n"
store.get(key).execution.store_run # "k1:35a1.../20261117T...": read from this store

get(key) without identities returns the latest run (the latest success, else the latest failure) whatever code made it, so two builds of one program can both be behind a key. Ask with identities, get(key, identities), to get a run of that code, or read the returned output's execution.identities to see which code you got.

A new release that gives the same results need not rerun anything: carry the runs to the new identities, with the evidence. The evidence is stored once, however many runs it covers, and asserts that each run's whole output is what the new code would produce.

newer = {"tblite": "tblite 0.9.0"}
store.carry([(key, run)], newer, {"benchmark": "S22", "max_abs_diff": 0.0})
store.get(key, newer)              # the 0.8.0 run, valid for 0.9.0 too

A wrong result is withdrawn, not deleted:

store.withdraw(key, run, "wrong geometry")
store.get(key)                     # None: no other run
for r in store.runs(key):
    print(r.id, r.success, r.identities, r.withdrawn.reason)

Questions across calculations go to an optional SQLite index, kept up to date from the store's journals:

index = store.index()
index.query(tag="demo", program="tblite")
index.query(identities=newer)      # every run valid under tblite 0.9.0
index.sql(
    "SELECT formula, COUNT(DISTINCT key) AS calculations FROM runs GROUP BY formula"
)

With qccompute, a store caches calculations: qccompute.compute(inp, store=store) returns a stored result when one from the same code exists, and stores what it runs. Either way the output names its run, execution.store_run, so a result can be cited exactly and read back later, even after a newer run of the same calculation has become the preferred one:

out = qccompute.compute(inp, store=store)
cited = out.execution.store_run    # "k1:35a1.../20261117T..."
store.get(key, run=cited)          # that run, preferred or not, withdrawn or not

Two processes that miss the same key at once each compute it, and the store keeps both runs: duplicate work, never a wrong result.

On disk

store/
  records/k1/3f/3f9a.../               one directory per calculation, k1:3f9a...
    current.json                       the preferred run, overall and per identity set
    tags/demo                          an empty file per tag
    20261117T101500.123456Z-7c1e9a0b/  one directory per run, never changed
      record.json                      meta and the output, identities included
      blobs/output.logs                logs, files and large arrays, named by JSON path
      carries/9c1f...                  an empty marker per carry of this run
      withdrawn.json                   who withdrew it, when, and why
  carries/9c1f....json                 a carry: "also valid for tblite 0.9.0", the evidence
  journals/<writer>/<batch>.jsonl      what each writer changed, for the index
  index.sqlite                         the optional index, rebuildable at any time

python -m qcstore verify ./store checks every record: keys, blob digests, pointers.

Documentation

qcstore.docs.afh.org: the API, and the design: the layout, how writers agree without locks, and what a crash can and cannot leave behind.

Metadata

Release files for qcstore 0.1.0a4

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

Source distribution (sdist)

Source distribution for qcstore 0.1.0a4
File Size Uploaded Provenance Actions
qcstore-0.1.0a4.tar.gz 163.5 kB With provenance Details for qcstore-0.1.0a4.tar.gz

Built distribution (wheel)

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

Total release size: 191.1 kB

Release files / qcstore-0.1.0a4.tar.gz

Download URL qcstore-0.1.0a4.tar.gz
Size 163.5 kB
Tags Source
SHA-256 checksum
How to use checksums
932e557231783b95ac0a0933c27799169a7163b2a0b4652c9d8d99d35482db65
BLAKE2b-256 checksum
How to use checksums
8707f3241038d207a90bc29761182791068c70479aee678de3c590fa43a93430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / qcstore-0.1.0a4-py3-none-any.whl

Download URL qcstore-0.1.0a4-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e8e661198604500683b66f9ffefe3a3f190c9c237098dc492de0a32eca95a73
BLAKE2b-256 checksum
How to use checksums
d5d855f576932203ba7cccf64423041503474d7575c60be4798e24683469eac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for qcstore 0.1.0a4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qcstore-0.1.0a4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

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