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 501334 but expected 27380
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, 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 129, 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 544, 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 3052, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, 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 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, 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 501334 but expected 27380

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.

MPTS-52

MPTS-52 contains 40,476 experimental structures from the Materials Project with 1 to 52 atoms per unit cell, split by the year of their first publication (the time split of Baird et al.), as released with DiffCSP. Models are trained on older structures and tested on newer ones.

This repository holds the complete, unfiltered dataset (40,476 structures) preprocessed to HDF5 with torchms, one file per split of the original release.

Files

File Structures Atoms per structure Years
train.hdf5 27,380 1–52 1913–1997
val.hdf5 5,000 1–52 1997–2004
test.hdf5 8,096 1–52 2004–2013

Labels

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

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

Source columns that are not stored: material_id, theoretical (false for every row), year. 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).

Usage

from torchms.data import load_dataset

dataset = load_dataset("mpts-52", "train")
structures = dataset[:32]  # batched Structures

Source and processing

  • Source files: https://github.com/jiaor17/DiffCSP/tree/7121d159826efa2ba9500bf299250d96da37f146/data/mpts_52 (train.csv, val.csv, test.csv).
  • Built with torchms, scripts/build_cdvae.py --only mpts_52: 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

  • S. G. Baird, H. M. Sayeed, J. Montoya, T. D. Sparks, matbench-genmetrics: A Python library for benchmarking crystal structure generative models using time-based splits of Materials Project structures, Journal of Open Source Software 9, 5618 (2024).
  • R. Jiao et al., Crystal Structure Prediction by Joint Equivariant Diffusion, NeurIPS 2023.
  • A. Jain et al., Commentary: The Materials Project: A materials genome approach to accelerating materials innovation, APL Materials 1, 011002 (2013).
Downloads last month
89