Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ValueError
Message:      Dataset 'batch' has length 282847 but expected 27136
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 282847 but expected 27136

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

MP-20

MP-20 contains 45,229 structures from the Materials Project with 1 to 20 atoms per unit cell, as released with CDVAE. The CDVAE paper reports 45,231 structures; the released files hold 45,229.

This repository holds the complete, unfiltered dataset (45,229 structures) preprocessed to HDF5 with pycrystalgen, one file per split of the original release.

Files

File Structures Atoms per structure
train.hdf5 27,136 1–20
val.hdf5 9,047 1–20
test.hdf5 9,046 1–20

Labels

Field Source column Meaning
formation_energy_per_atom formation_energy_per_atom formation energy in eV/atom
energy_above_hull e_above_hull energy above the convex hull in eV/atom
band_gap band_gap band gap in eV

Fields with no source in this dataset are filled with NaN: total_energy.

Source columns that are not stored: spacegroup.number, pretty_formula, elements, 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/mp-20", "train.hdf5")
structures = dataset[:32]  # batched Structures

Source and processing

  • Source files: https://github.com/txie-93/cdvae/tree/main/data/mp_20 (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.
  • A. Jain et al., Commentary: The Materials Project: A materials genome approach to accelerating materials innovation, APL Materials 1, 011002 (2013).
Downloads last month
-