Datasets
An easy (and fast) API for popular 3D molecular datasets!
Install / Use
/learn @atomicarchitects/DatasetsREADME
atomic-datasets
This repository provides an easy (but fast!) interface to to popular 3D molecular datasets in pure numpy, with wrappers in PyTorch and JAX!
<p align="center"> <img src="https://github.com/user-attachments/assets/6cd41eac-144d-4213-937e-494e57435195" alt="atomic-datasets" width="100%"> </p>Datasets supported:
- QM9: ~134000 small organic molecules with quantum chemical properties.
- GEOM (Drugs): a subset of the GEOM dataset containing ~300000 drug-like molecules with multiple conformers and properties.
- tmQM: ~86000 transition metal complexes with quantum chemical properties.
- ChEMBL3D: ~1800000 drug-like molecules with low-energy conformers and properties.
- CrossDocked: ~100000 protein-ligand pairs after filtering for high-quality pairs with binding pose RMSD less than 1Å.
Our hope is to standardize processing and splits which have long been inconsistent across different papers, and to provide a common interface across programming frameworks for working with these datasets.
We have preliminary support for the Miniproteins dataset, a collection of protein-binding proteins upto 65 residues in length. We also provide some toy datasets (Platonic Solids, 3D Tetris) for testing.
Installation
Install directly from PyPI with pip or uv:
[uv] pip install atomic-datasets
or, from source:
git clone https://github.com/atomicarchitects/datasets.git
cd datasets
pip install -e .
Example
from atomic_datasets.datasets import QM9, GEOMDrugs
# Initialization will trigger preprocessing which may take some time,
# but once preprocessed, load speeds should be fast!
dataset = QM9(
root_dir="data/",
split="train",
)
# Or, for example:
# dataset = GEOMDrugs(root_dir="data/", split="train")
for graph in dataset:
positions = graph["nodes"]["positions"] # (N, 3) array of 3D coordinates in Angstroms
species = graph["nodes"]["species"] # (N,) array of atomic species indices
atom_types = graph["nodes"]["atom_types"] # (N,) array of element symbols
properties = graph["properties"] # dict of molecular properties
print(f"Molecule: {properties['smiles']}")
print(f" Atoms: {atom_types}")
print(f" HOMO-LUMO gap: {properties['gap']:.4f} Ha")
We also provide some simple utilities. For example, to visualize a graph with py3Dmol in a notebook:
from atomic_datasets.utils import visualizer
visualizer.visualize(graph)
or save a graph as a .xyz file:
from atomic_datasets import utils
utils.save_xyz(graph, "example_graph.xyz")
See examples/viz.ipynb for a simple example.
Data Format
Each sample is a dictionary with the following structure:
{
"nodes": {
"positions": np.ndarray, # (N, 3) atomic coordinates
"species": np.ndarray, # (N,) integer species indices
"atom_types": np.ndarray, # (N,) element symbols (e.g., 'C', 'H', 'O')
},
"edges": ...,
"senders": ...,
"receivers": ...,
"globals": ...,
"n_node": np.ndarray, # number of nodes per graph
"n_edge": ...,
"properties": {...}, # dataset-specific properties
}
Available properties vary by dataset.
Wrappers for PyTorch and JAX
We provide wrappers for both PyTorch via PyTorch Geometric:
from atomic_datasets.datasets import Tetris
from atomic_datasets.wrappers.torch import PyTorchGeometricDataset
from torch_geometric.loader import DataLoader
dataset = QM9(root_dir="data/")
dataset = PyTorchGeometricDataset(dataset)
loader = DataLoader(dataset, batch_size=4, shuffle=True)
batch = next(iter(loader))
print(batch.pos.shape)
print(batch.species.shape)
print(batch.atom_types)
print(batch.smiles)
from atomic_datasets.datasets import QM9
from atomic_datasets.wrappers.jax import JraphDataset
import jraph
dataset = QM9(root_dir="data/")
dataset = JraphDataset(dataset)
# Since we have some strings, we use numpy to batch.
batch = jraph.batch_np([dataset[i] for i in range(4)])
print(batch.nodes["positions"].shape)
print(batch.nodes["species"].shape)
print(batch.nodes["atom_types"])
print(batch.globals["properties"]["smiles"])
print(batch.n_node)
To avoid any version conflicts, this repository does not have hard dependencies on PyTorch, JAX, or their respective graph libraries. You must install them separately if you want to use the wrappers.
See examples/torch.ipynb and examples/jax.ipynb for some simple examples.
License
The code in this repository is released under the MIT License.
Note: The datasets themselves belong to their original authors and are subject to their respective licenses and terms of use. Please refer to the original sources and cite the appropriate papers (see below) when using these datasets in your work.
Citation
If you use this repository, please cite:
@software{atomic_datasets,
title = {{atomic\_datasets}},
author = {Daigavane, Ameya and Kim, Song},
year = 2025,
month = may,
url = {https://github.com/atomicarchitects/datasets},
version = {1.0.0}
}
<details>
<summary><strong>Dataset-specific citations</strong> (click to expand)</summary>
QM9
@article{qm9,
author = {Ramakrishnan, Raghunathan and Dral, Pavlo O. and Rupp, Matthias and von Lilienfeld, O. Anatole},
journal = {Scientific Data},
number = {1},
pages = {140022},
title = {Quantum chemistry structures and properties of 134 kilo molecules},
volume = {1},
year = {2014}
}
GEOM
@article{geom,
author = {Axelrod, Simon and G{\'o}mez-Bombarelli, Rafael},
journal = {Scientific Data},
number = {1},
pages = {185},
title = {GEOM, energy-annotated molecular conformations for property prediction and molecular generation},
volume = {9},
year = {2022}
}
tmQM
@article{tmQM,
author = {Balcells, David and Skjelstad, Bastian Bjerkem},
journal = {Journal of Chemical Information and Modeling},
month = {12},
number = {12},
pages = {6135--6146},
title = {tmQM Dataset---Quantum Geometries and Properties of 86k Transition Metal Complexes},
volume = {60},
year = {2020}
}
ChEMBL3D
@article{nikitin2025scalable,
title={Scalable Low-Energy Molecular Conformer Generation with Quantum Mechanical Accuracy},
author={Nikitin, Filipp and Anstine, Dylan M and Zubatyuk, Roman and Paliwal, Saee Gopal and Isayev, Olexandr},
year={2025}
}
CATH
@article{cath2021,
author = {Sillitoe, Ian and Bordin, Nicola and Dawson, Natalie and Waman, Vaishali P and Ashford, Paul and Scholes, Harry M and Pang, Camilla S M and Woodridge, Laurel and Rauer, Clemens and Sen, Neeladri and Abbasian, Mahnaz and Le Cornu, Sean and Lam, Su Datt and Berka, Karel and Varekova, Ivana Hutařová and Svobodova, Radka and Lees, Jon and Orengo, Christine A},
title = {CATH: increased structural coverage of functional space},
journal = {Nucleic Acids Research},
volume = {49},
number = {D1},
pages = {D266--D273},
year = {2021},
doi = {10.1093/nar/gkaa1079}
}
@article{cath2024,
author = {Waman, Vaishali P and Bordin, Nicola and Alcraft, Rachel and Vickerstaff, Robert and Rauer, Clemens and Chan, Qian and Sillitoe, Ian and Yamamori, Hazuki and Orengo, Christine},
title = {CATH 2024: CATH-AlphaFlow Doubles the Number of Structures in CATH and Reveals Nearly 200 New Folds},
journal = {Journal of Molecular Biology},
volume = {436},
number = {17},
pages = {168551},
year = {2024},
doi = {10.1016/j.jmb.2024.168551}
}
@article{cath1997,
author = {Orengo, C A and Michie, A D and Jones, S and Jones, D T and Swindells, M B and Thornton, J M},
title = {CATH--a hierarchic classification of protein domain structures},
journal = {Structure},
volume = {5},
number = {8},
pages = {1093--1108},
year = {1997},
doi = {10.1016/s0969-2126(97)00260-8}
}
@article{gene3d,
author = {Lewis, Tony E and Sillitoe, Ian and Dawson, Natalie and Lam, Su Datt and Clarke, Tristan and Lee, David and Orengo, Christine and Lees, Jonathan},
title = {Gene3D: Extensive prediction of globular domains in proteins},
journal = {Nucleic Acids Research},
volume = {46},
number = {D1},
pages = {D1282},
year = {2018},
doi = {10.1093/nar/gkx1187}
}
Miniproteins
@article{miniproteins,
author = {Cao, Longxing and Coventry, Brian and Goreshnik, Inna and Huang, Buwei and Sheffler, William and Park, Joon Sung and Jude, Kevin M. and Markovi{\'c}, Iva and Kadam, Rameshwar U. and Verschueren, Koen H. G. and Verstraete, Kenneth and Walsh, Scott Thomas Russell and Bennett, Nathaniel and Phal, Ashish and Yang, Aerin and Kozodoy, Lisa and DeWitt, Michelle and Picton, Lora and Miller, Lauren and Strauch, Eva-Maria and DeBouver, Nicholas D. and Pires, Allison and Bera, Asim K. and Halabiya, Samer and Hammerson
