Skip to main content

LMDB-based storage for ASE.

Project description

asebytes

Efficient serialization and storage for ASE Atoms objects using LMDB.

API

  • encode(atoms) - Encode an ASE Atoms object to a dict of bytes
  • decode(data) - Decode bytes back into an ASE Atoms object
  • BytesIO(file, prefix) - LMDB-backed list-like storage for bytes dictionaries
  • ASEIO(file, prefix) - LMDB-backed list-like storage for ASE Atoms objects

Examples

from asebytes import ASEIO, BytesIO, encode, decode
import molify

# Generate conformers from SMILES
ethanol = molify.smiles2conformers("CCO", numConfs=100)

# Serialize/deserialize single molecule
data = encode(ethanol[0])
atoms_restored = decode(data)

# High-level: Store Atoms objects directly
db = ASEIO("conformers.lmdb")
db.extend(ethanol)  # Add all conformers
mol = db[0]         # Returns ase.Atoms

# Low-level: BytesIO stores serialized data
bytes_db = BytesIO("conformers.lmdb")
bytes_db.append(encode(ethanol[0]))      # Manual serialization
data = bytes_db[0]                       # Returns dict[bytes, bytes]
mol = decode(data)                       # Manual deserialization

# ASEIO = BytesIO + automatic encode/decode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asebytes-0.1.7.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asebytes-0.1.7-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file asebytes-0.1.7.tar.gz.

File metadata

  • Download URL: asebytes-0.1.7.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asebytes-0.1.7.tar.gz
Algorithm Hash digest
SHA256 30e45db919011f95d0205d646cf8b46cce9fb5dbe0d5bcb1f0429eea8fba0bf7
MD5 a0ef86fdb9d313f48a28e7ef4aa386f8
BLAKE2b-256 02c3d2aaf6bf544beee076d3de8719ca6e8073ba2ae4c51b9c429da397848ead

See more details on using hashes here.

File details

Details for the file asebytes-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: asebytes-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asebytes-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bb44551be0fd4f431c303aa33b3b69a9d402acaaa3a3ab870f508fbf3269e1e9
MD5 dc44e5c5239675178c54ec64819a1e18
BLAKE2b-256 6ec9ecb3d765b7e4d1f3420f6d38f4fa7ac75b9ceec3f1d1828bba954334ead1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page