3dcs / README.md
EscheWang's picture
Describe the chirality conformer generation in the dataset card
f224dc0 verified
|
Raw History Blame Contribute Delete
12.5 kB
---
license: cc-by-sa-4.0
pretty_name: "3DCS: Datasets for Evaluating Conformational Sensitivity in Molecular Representations"
tags:
- chemistry
- molecules
- 3d
- conformers
- chirality
- benchmark
- molecular-representation
size_categories:
- 1M<n<10M
configs:
- config_name: chirality
data_files:
- split: train
path: data/chirality/*.parquet
- config_name: rotation
data_files:
- split: train
path: data/rotation/*.parquet
- config_name: traj_frames
data_files:
- split: train
path: data/traj_frames/*.parquet
- config_name: traj_energies
data_files:
- split: train
path: data/traj_energies/*.parquet
---
# 3DCS: Datasets and Benchmark for Evaluating Conformational Sensitivity in Molecular Representations
3DCS is a benchmark for **3D conformational sensitivity** in molecular representations (MRs). It tests whether the
representations of different conformers of the same molecule (i) preserve geometric variation, (ii) capture chirality,
and (iii) reflect the energy landscape. This is the Geometry–Chirality–Energy (GCE) evaluation framework from the
ICLR 2026 paper.
This repository holds the benchmark's conformer datasets as four named configs (see [Configs](#configs)).
- **Paper (ICLR 2026):** https://openreview.net/forum?id=JAb0y8lkqL
- **Code (evaluation toolkit, Python module `three_dbench`):** https://github.com/ComDec/3DCS
- **Standalone copies of each config.** The parquet files are byte-identical to the ones here:
[`EscheWang/3dcs-chirality`](https://huggingface.co/datasets/EscheWang/3dcs-chirality),
[`EscheWang/3dcs-rotation`](https://huggingface.co/datasets/EscheWang/3dcs-rotation),
[`EscheWang/3dcs-traj-frames`](https://huggingface.co/datasets/EscheWang/3dcs-traj-frames),
[`EscheWang/3dcs-traj-energies`](https://huggingface.co/datasets/EscheWang/3dcs-traj-energies)
## Configs
Each config has one split, `train`, that holds **all** rows of that config. It is not a training subset.
| Config | GCE axis | Rows | Conformers | Parquet files (size) |
|---|---|---|---|---|
| `chirality` | Chirality | 14,903 (one per stereoisomer of a parent molecule) | 52,391 | 1 (96.0 MB) |
| `rotation` | Geometry | 1,559,779 (one per molecule) | 10,097,643 | 14 (7.53 GB) |
| `traj_frames` | Energy | 999,988 (one per frame) | 999,988 | 1 (345.8 MB) |
| `traj_energies` | Energy | 10 (one per molecule) | 999,988 energies | 1 (1.7 MB) |
All counts in this card were computed from the parquet files in this repository.
Structures are stored as MDL MolBlock strings (V2000) with 3D coordinates.
### `chirality`
This config has 3,903 distinct parent molecules (ChEMBL IDs) and 14,903 stereoisomers. The number of stereoisomers per
parent is 1 (61 parents), 2 (1,148), 3 (121), 4 (682) or 5 (1,891).
| Field | Type | Description |
|---|---|---|
| `key` | string | Stereoisomer identifier `<mol_id>::en<en_id>_<stereo>`. `<stereo>` lists stereocenters as `A<atom index>:<R or S>` (0-based atom index in MolBlock atom order), separated by `;`. Example: `CHEMBL100259::en3_A5:S;A7:S;A10:R;A12:S`. In 7 rows, `<stereo>` is `achiral`. The key is unique per row. |
| `mol_id` | string | ChEMBL ID of the parent molecule. |
| `en_id` | string | Index of the stereoisomer within its parent molecule, from `"0"` to `"4"`. It matches `en<k>` in `key`. |
| `n_conformers` | int64 | Number of conformers of this stereoisomer (1 to 20). It equals `len(mol_blocks)`. |
| `offset` | int64 | Position of this row's first conformer in the flattened conformer order (rows in file order, then `mol_blocks` order). It equals the sum of `n_conformers` over all preceding rows, so a flat embedding array of shape `(52391, d)` is sliced as `[offset : offset + n_conformers]`. |
| `mol_blocks` | list&lt;string&gt; | One MolBlock per conformer, with explicit hydrogens. |
### `rotation`
| Field | Type | Description |
|---|---|---|
| `key` | string | Molecule identifier, unique per row (e.g. `0-R0B0G12_16-R10B3G0_1_23`). |
| `shard` | int32 | Source shard (0–15) of the original generation output. Each of shards 0–14 has 97,487 rows and shard 15 has 97,474. Rows are grouped by shard. The 14 parquet file names (`train-000NN-of-00014`) do **not** correspond to `shard` values. |
| `n_conformers` | int32 | Number of conformers kept for this molecule (1 to 20). It equals `len(mol_blocks)` and `len(torsion_deg)`. |
| `offset` | int64 | Position of this row's first conformer **within its `shard`**. It restarts at 0 for each shard value and equals the sum of `n_conformers` over the preceding rows of the same shard. For a single flat array covering the whole config, use the running sum of `n_conformers` over all rows instead. |
| `mol_blocks` | list&lt;string&gt; | One MolBlock per conformer. Hydrogens are implicit: only 11 of the 10,097,643 MolBlocks contain an explicit H atom. |
| `torsion_deg` | list&lt;float32&gt; | Torsion angle in degrees for each conformer, aligned with `mol_blocks`. Values lie in [-180, 180]. |
This release stores structures and torsion angles only. Per-conformer xTB energies are not included.
### `traj_frames`
| Field | Type | Description |
|---|---|---|
| `mol_type` | string | rMD17 molecule: `rmd17_aspirin`, `rmd17_azobenzene`, `rmd17_benzene`, `rmd17_ethanol`, `rmd17_malonaldehyde`, `rmd17_naphthalene`, `rmd17_paracetamol`, `rmd17_salicylic`, `rmd17_toluene` or `rmd17_uracil`. |
| `frame_idx` | int32 | 0-based index of the structure in the rMD17 file. It runs from 0 to `n_frames - 1`, and the rows for each molecule form one contiguous block in `frame_idx` order. |
| `mol_block` | string | MolBlock of the frame, with explicit hydrogens (coordinates in Å). |
Each molecule has 100,000 frames, except `rmd17_azobenzene`, which has 99,988 (the same count as in rMD17).
### `traj_energies`
| Field | Type | Description |
|---|---|---|
| `mol_type` | string | Same values as in `traj_frames`. |
| `n_frames` | int64 | Number of frames. It equals the number of `traj_frames` rows for this `mol_type`. |
| `energies` | list&lt;float64&gt; | rMD17 total energy per frame in kcal/mol, aligned with `frame_idx`. The values are the original rMD17 float64 energies (see Versions). |
We checked this data against the official rMD17 `.npz` files for **all 10 molecules and every frame**:
`energies` equals the rMD17 `energies` bitwise (float64), and the MolBlock coordinates match rMD17
`coords` to within 5e-5 Å (all frames, all molecules), with atoms in rMD17 `nuclear_charges` order.
## Usage
```python
from datasets import load_dataset
chirality = load_dataset("EscheWang/3dcs", name="chirality", split="train")
traj_frames = load_dataset("EscheWang/3dcs", name="traj_frames", split="train")
traj_energies = load_dataset("EscheWang/3dcs", name="traj_energies", split="train")
rotation = load_dataset("EscheWang/3dcs", name="rotation", split="train") # 7.53 GB of parquet
```
Rebuild RDKit molecules from MolBlocks with the helper from the 3DCS toolkit:
```python
from three_dbench.datasets.serialization import mol_from_block # https://github.com/ComDec/3DCS
row = chirality[0]
mols = [mol_from_block(b) for b in row["mol_blocks"]] # removeHs=False, sanitize=False
```
Without the toolkit, use the equivalent RDKit call: `Chem.MolFromMolBlock(block, removeHs=False, sanitize=False)`.
The `three_dbench` CLI reads datasets saved with `save_to_disk`. The paths below follow the toolkit README and the CLI defaults:
```python
chirality.save_to_disk("data/hf/chirality")
rotation.save_to_disk("data/hf/rotation")
traj_energies.save_to_disk("data/hf/traj/energies")
traj_frames.save_to_disk("data/hf/traj/frames")
```
```bash
python -m three_dbench evaluate chirality \
--dataset-dir data/hf/chirality \
--embeddings your_embeddings.npz \
--embedding-key arr_0 \
--model-name your_model
```
See the [GitHub README](https://github.com/ComDec/3DCS) and `docs/EMBEDDINGS.md` for the trajectory and rotation
evaluators and the expected embedding formats.
## Provenance
How each dataset was built:
- **`chirality`** is derived from **ChEMBL** (Gaulton et al., 2012), using drug-like molecules with annotated
stereocenters. Their stereoisomers were enumerated with RDKit, embedded with ETKDG and geometry-optimized once
with `xtb --opt lax`, giving 15,218 stereoisomers with one optimized geometry each. The 52,391 conformers
released here were derived from those geometries: hydrogens were re-added at RDKit's idealized geometry,
rotatable bonds were rotated by a small random torsion (median about 10-12 degrees per bond), and isotropic
Gaussian noise of sigma about 0.09 A was added to every atom. A conformer was kept only if its heavy-atom RMSD
to every already-accepted conformer of the same stereoisomer exceeded 0.350 A, up to 20 per stereoisomer, so
stereoisomers with no rotatable bond carry exactly one conformer, as do 34% of the 14,903 stereoisomers overall.
Every released conformer reproduces the CIP (R/S) assignment of its source geometry, as re-perceived from 3D
with RDKit.
- **`rotation`** (the geometry dataset) was **generated by the 3DCS authors**. It is a combinatorial library of
bi-aryl/heteroaryl scaffolds decorated with substituents. RDKit was used for fragment connection, sanitization and
ETKDG 3D seeding. Each molecule has an xTB relaxed dihedral scan around the inter-ring single bond in 2.5°
increments. Redundant conformers were then removed per molecule with DBSCAN (eps = 0.5).
- **`traj_frames` / `traj_energies`** are derived from the **revised MD17 dataset (rMD17)** (Christensen & von
Lilienfeld, 2020; https://doi.org/10.6084/m9.figshare.12672038).
## License
The data in this repository are released under **CC BY-SA 4.0**. The upstream sources have these licenses:
- ChEMBL data, used for `chirality`, are licensed under **CC BY-SA 3.0**.
- rMD17, used for `traj_frames` and `traj_energies`, is released under **CC0**.
- The `rotation` data were generated by the authors.
The evaluation code in the GitHub repository is licensed separately (MIT). If you use the `chirality` or trajectory
configs, please also cite ChEMBL or rMD17 (see below).
## Versions
- **Current revision (since 2026-09-18):** `traj_energies.energies` holds the original rMD17 values in float64.
- **Revision `40c6cfa829ae5df84346d07d34c715c2924d9b78` and earlier:** the same energies cast to `float32`
(1,096-3,334 distinct values per molecule, at most 0.0156 kcal/mol from the float64 values). Metrics computed on
these energies can be sensitive to that precision, so use the current revision.
## Baseline embeddings
The embedding files of the baseline models evaluated on these data are published at
[`EscheWang/3dcs-embeddings`](https://huggingface.co/datasets/EscheWang/3dcs-embeddings), together with the
per-molecule metric outputs of the original evaluation runs and a `manifest.csv` listing the key, shape, dtype and
SHA-256 of every file. The evaluation toolkit is at https://github.com/ComDec/3DCS. The per-model scripts that
extract the chirality baseline embeddings, each with its pinned environment and the SHA-256 of the weights it
loads, are in the [`baselines/`](https://github.com/ComDec/3DCS/tree/main/baselines) directory of that
repository.
## Citation
```bibtex
@inproceedings{wang2026threedcs,
title = {3{DCS}: Datasets and Benchmark for Evaluating Conformational Sensitivity in Molecular Representations},
author = {Wang, Xi and Zhang, Yang and Zhang, Yingjia and Cai, Yejia and Wang, Shengjie},
booktitle = {The Fourteenth International Conference on Learning Representations (ICLR)},
year = {2026},
url = {https://openreview.net/forum?id=JAb0y8lkqL}
}
```
Upstream data sources:
```bibtex
@article{gaulton2012chembl,
title = {ChEMBL: a large-scale bioactivity database for drug discovery},
author = {Gaulton, Anna and Bellis, Louisa J and Bento, A Patricia and Chambers, Jon and Davies, Mark and Hersey, Anne and Light, Yvonne and McGlinchey, Shaun and Michalovich, David and Al-Lazikani, Bissan and others},
journal = {Nucleic Acids Research},
volume = {40},
number = {D1},
pages = {D1100--D1107},
year = {2012}
}
@article{christensen2020role,
title = {On the role of gradients for machine learning of molecular energies and forces},
author = {Christensen, Anders S and von Lilienfeld, O Anatole},
journal = {Machine Learning: Science and Technology},
volume = {1},
number = {4},
pages = {045018},
year = {2020}
}
```