Data module (AtomicData, Batch, readers/writers)#

Core classes#

AtomicData

Graph-structured container for a single atomic system.

Batch

Graph-aware batch built on MultiLevelStorage.

LevelSchema

Registry mapping attributes to levels, dtypes, and level kinds.

Device helpers#

resolve_device

Return device with a bare cuda indexed by the current CUDA device.

Transforms#

Compose

Compose a sequence of transforms into a single callable.

make_supercell

Return data tiled repeats times along each lattice vector.

nvalchemi.data.transforms.DEFAULT_EXTENSIVE_SYSTEM_KEYS: frozenset[str]#

System-level fields a k-fold supercell carries k times over.

nvalchemi.data.transforms.DEFAULT_INTENSIVE_SYSTEM_KEYS: frozenset[str]#

System-level fields a supercell carries unchanged.

I/O and pipelines#

AtomicDataZarrWriter

Writer for serializing AtomicData into Zarr stores.

AtomicDataZarrReader

Reader for loading AtomicData from Zarr stores.

FieldSchema

Store level, dtype, and row shape of one field an ALCHEMI Zarr store holds.

Dataset

AtomicData-native, map-style dataset that bypasses TensorDict conversion.

InMemoryDataset

Resident dataset that holds the whole dataset in memory as one Batch.

DataLoader

Batch-iterating data loader that yields Batch.

Reader

Abstract base class for data readers.

Dataset composition and sampling#

MultiDataset

Compose multiple batch-loadable datasets behind one global index space.

MultiDatasetSampler

Sample global indices from a MultiDataset at dataset-level rates.

MultiDatasetBatchSampler

Sample full global-index batches from a MultiDataset.

distributed_shard

Return the subset of epoch items assigned to one distributed rank.

Device helpers#

dataset_device

Return the concrete device dataset emits its batches on.

same_device

Return whether tensors on two devices collate without a cross-device copy.

Write configuration#

ZarrArrayConfig

Per-array storage settings for compression, chunking, and sharding.

ZarrWriteConfig

Top-level storage plan handed to AtomicDataZarrWriter.