From 4a804aca7a8e8e45498a5228fd13869b925e1830 Mon Sep 17 00:00:00 2001 From: dts Date: Fri, 24 Apr 2026 21:26:05 +0200 Subject: [PATCH 1/2] docs: unify quick-start examples and fix stale strings - README install command now references the correct PyPI name (atompack-db) and notes the package imports as `atompack`. - Remove dead link to a release blog post that has no source doc. - Standardize the three Quick Start snippets (top README, atompack-py/README, __init__.py docstring) on the canonical Molecule.from_arrays(...) + Database(path, overwrite=True) form so examples run cleanly when invoked twice. - docs/source/conf.py release bumped to 0.2.1 to match package version. - Stale "PyO3 0.22" comment in atompack-py/src/lib.rs updated to 0.26. --- README.md | 5 ++--- atompack-py/README.md | 4 ++-- atompack-py/python/atompack/__init__.py | 4 ++-- atompack-py/src/lib.rs | 2 +- docs/source/conf.py | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d54540e..9c1915f 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,10 @@ files or shard directories. ## Installation ```bash -pip install atompack +pip install atompack-db ``` +The package is imported as `atompack` after installation. Hugging Face support ships in the base package. ### Install from source @@ -102,8 +103,6 @@ strong batch-write throughput, and storage efficiency that stays close to compac formats. For the benchmark narrative and current figures, see the -[release blog post](https://entalpic-atompack.readthedocs-hosted.com/en/latest/blog/atompack-release.html) -and [performance docs](https://entalpic-atompack.readthedocs-hosted.com/en/latest/performance.html). ## Documentation diff --git a/atompack-py/README.md b/atompack-py/README.md index 1764ad1..13093ee 100644 --- a/atompack-py/README.md +++ b/atompack-py/README.md @@ -23,11 +23,11 @@ import numpy as np positions = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]], dtype=np.float32) atomic_numbers = np.array([6, 8], dtype=np.uint8) -mol = atompack.Molecule(positions, atomic_numbers) +mol = atompack.Molecule.from_arrays(positions, atomic_numbers) mol.energy = -123.456 mol.forces = np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], dtype=np.float32) -db = atompack.Database("data.atp") +db = atompack.Database("data.atp", overwrite=True) db.add_molecule(mol) db.flush() ``` diff --git a/atompack-py/python/atompack/__init__.py b/atompack-py/python/atompack/__init__.py index 97749b6..34b97bb 100644 --- a/atompack-py/python/atompack/__init__.py +++ b/atompack-py/python/atompack/__init__.py @@ -16,13 +16,13 @@ >>> >>> positions = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]], dtype=np.float32) >>> atomic_numbers = np.array([6, 8], dtype=np.uint8) ->>> mol = atompack.Molecule(positions, atomic_numbers) +>>> mol = atompack.Molecule.from_arrays(positions, atomic_numbers) >>> mol.energy = -123.456 >>> mol.forces = np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], dtype=np.float32) Save to database: ->>> db = atompack.Database("data.atp") +>>> db = atompack.Database("data.atp", overwrite=True) >>> db.add_molecule(mol) >>> db.flush() diff --git a/atompack-py/src/lib.rs b/atompack-py/src/lib.rs index e07932e..dcca0c5 100644 --- a/atompack-py/src/lib.rs +++ b/atompack-py/src/lib.rs @@ -4,7 +4,7 @@ //! This module exposes the atompack library to Python using PyO3. #![allow(clippy::useless_conversion)] -// PyO3 0.22 macro-generated code triggers this lint; safe to suppress until PyO3 upgrade. +// PyO3 0.26 macro-generated code triggers this lint; safe to suppress. #![allow(unsafe_op_in_unsafe_fn)] use atompack::{ diff --git a/docs/source/conf.py b/docs/source/conf.py index a80da38..61a6015 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,7 +11,7 @@ copyright = "2026, Entalpic" author = "Ali Ramlaoui and contributors" # Contributors to the package release = ( - "0.2.0" # Current version of the package, can be retrieved programmatically too. + "0.2.1" # Current version of the package, can be retrieved programmatically too. ) # -- General configuration --------------------------------------------------- From 46a4a462fd6ee681e75e81f7e0a3db35f25d6863 Mon Sep 17 00:00:00 2001 From: dts Date: Sun, 26 Apr 2026 22:02:06 +0200 Subject: [PATCH 2/2] docs: also update __init__.pyi stub examples Independent review caught that the type-stub docstrings still showed the pre-PR forms. Bring them into the same shape as the rest of the Quick Start examples. --- atompack-py/python/atompack/__init__.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atompack-py/python/atompack/__init__.pyi b/atompack-py/python/atompack/__init__.pyi index 880939c..097bfe2 100644 --- a/atompack-py/python/atompack/__init__.pyi +++ b/atompack-py/python/atompack/__init__.pyi @@ -107,7 +107,7 @@ class Molecule: >>> import numpy as np >>> positions = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]], dtype=np.float32) >>> atomic_numbers = np.array([6, 8], dtype=np.uint8) - >>> mol = Molecule(positions, atomic_numbers) + >>> mol = Molecule.from_arrays(positions, atomic_numbers) >>> mol.energy = -100.5 >>> mol.forces = np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]], dtype=np.float32) >>> print(len(mol)) # 2 @@ -433,7 +433,7 @@ class Database: -------- Create and write molecules: - >>> db = Database("molecules.atp") + >>> db = Database("molecules.atp", overwrite=True) >>> db.add_molecule(mol1) >>> db.add_molecule(mol2) >>> db.flush()