Metadata-Version: 2.4
Name: atompack-db
Version: 0.2.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: h5py>=3.10
Requires-Dist: huggingface-hub>=0.24
Requires-Dist: numpy>=1.20
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-benchmark ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: Fast, compressed storage for atomic structures with properties.
Keywords: molecular-dynamics,machine-learning,computational-chemistry,materials-science
Author-email: Ali Ramlaoui <ali.ramlaoui@entalpic.ai>, Victor Schmidt <victor.schmidt@entalpic.ai>
License: Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Datasets, https://huggingface.co/datasets/LeMaterial/Atompack
Project-URL: Documentation, https://entalpic-atompack.readthedocs-hosted.com/en/latest/
Project-URL: Homepage, https://lematerial.org
Project-URL: Issues, https://github.com/LeMaterial/atompack/issues
Project-URL: Repository, https://github.com/LeMaterial/atompack

# Atompack

Fast, compressed storage for atomic structures with properties.

Atompack is part of the open-source [LeMaterial](https://lematerial.org) effort for
large-scale materials and molecular ML datasets.

## Install

```bash
uv pip install atompack-db
```

Import the package as `atompack` after installation.

The Hugging Face Hub upload/download helpers are included in the main package.

## Quick start

```python
import atompack
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.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.add_molecule(mol)
db.flush()
```

Reopen with mmap for read-only access, or disable mmap when you want to append:

```python
db = atompack.Database.open("data.atp")             # read-only, mmap=True by default
db = atompack.Database.open("data.atp", mmap=False)  # writable append mode
```

## Hugging Face Hub

```python
import atompack

db = atompack.hub.open("LeMaterial/Atompack", "omat/train")
print(db[0].energy)
db.close()
```

Remote datasets such as `omat/train` and `omol/train` can be opened directly from
[`LeMaterial/Atompack`](https://huggingface.co/datasets/LeMaterial/Atompack).

## More

Full documentation and benchmark notes live at
`https://entalpic-atompack.readthedocs-hosted.com/en/latest/`.

If you are working on the Rust crate directly, the maintained Rust entrypoints are:

- `cargo run -p atompack --example basic_usage`
- `cargo run -p atompack --release --bin atompack-bench -- --help`

## License

Apache-2.0

