The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: ValueError
Message: Dataset 'batch' has length 56780 but expected 11356
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 76, in _generate_tables
num_rows = _check_dataset_lengths(h5, self.info.features)
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/hdf5/hdf5.py", line 353, in _check_dataset_lengths
raise ValueError(f"Dataset '{path}' has length {dset.shape[0]} but expected {num_rows}")
ValueError: Dataset 'batch' has length 56780 but expected 11356Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Perov-5
Perov-5 contains 18,928 perovskite structures with 5 atoms per unit cell, as released with CDVAE. The original data comes from Castelli et al. (2012).
This repository holds the complete, unfiltered dataset (18,928 structures) preprocessed to HDF5 with pycrystalgen, one file per split of the original release.
Files
| File | Structures | Atoms per structure |
|---|---|---|
train.hdf5 |
11,356 | 5 |
val.hdf5 |
3,787 | 5 |
test.hdf5 |
3,785 | 5 |
Labels
| Field | Source column | Meaning |
|---|---|---|
formation_energy_per_atom |
heat_ref |
heat of formation, copied unchanged from the source column |
band_gap |
ind_gap |
indirect band gap, copied unchanged from the source column |
Fields with no source in this dataset are filled with NaN: total_energy, energy_above_hull.
Source columns that are not stored: heat_all, dir_gap, formula, material_id. Row i of a split file is row i of the
corresponding source CSV.
Format
Each file stores flat concatenated arrays:
| Dataset | Shape | Type | Content |
|---|---|---|---|
lattice |
(n_struct, 3, 3) | float32 | lattice vectors as rows, in angstrom |
num_atoms |
(n_struct,) | int64 | number of atoms of each structure |
ptr |
(n_struct,) | int64 | index of the first atom of each structure in x and z |
x |
(n_atoms, 3) | float32 | fractional coordinates in [0, 1) |
z |
(n_atoms,) | int64 | atomic numbers |
total_energy, formation_energy_per_atom, energy_above_hull, band_gap |
(n_struct,) | float32 | labels, NaN when unknown |
The lattice is rebuilt from the cell lengths and angles of the source CIF, so it is in the
standard orientation (first vector along x). The batch array is an artefact of the writer
and is not used when reading.
Usage
from pycrystalgen.data import HDF5Dataset
dataset = HDF5Dataset.from_hub("materials-toolkits/perov-5", "train.hdf5")
structures = dataset[:32] # batched Structures
Source and processing
- Source files:
https://github.com/txie-93/cdvae/tree/main/data/perov_5(train.csv,val.csv,test.csv). - Built with pycrystalgen commit
8e39dbb,scripts/build_cdvae.py: CSV to CIF, then CIF to HDF5, with no filter. - Checked against the source: same number of rows, every stored label equal to its source column row by row, and a sample of 300 structures per split compared with pymatgen's parsing of the same CIF (elements, fractional coordinates, lattice).
The data is redistributed from the sources below; refer to them for licence and terms of use.
References
- T. Xie et al., Crystal Diffusion Variational Autoencoder for Periodic Material Generation, ICLR 2022.
- I. E. Castelli et al., New cubic perovskites for one- and two-photon water splitting using the computational materials repository, Energy Environ. Sci. 5, 9034 (2012).
- Downloads last month
- -