Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WBM (Matbench Discovery test set)
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
WBM (after authors **W**ang, **B**otti & **M**arques) is a set of **256,963 periodic
|
| 5 |
+
inorganic crystals** generated by five successive rounds of chemical-similarity
|
| 6 |
+
**elemental substitution** of Materials Project prototypes, each relaxed with DFT
|
| 7 |
+
(VASP, PBE / PBE+U). It is the prospective **test set of
|
| 8 |
+
[Matbench Discovery](https://matbench-discovery.materialsproject.org/)** (MBD): given the
|
| 9 |
+
*unrelaxed* structure, a model must predict the *relaxed* formation energy and hence the
|
| 10 |
+
energy above the MP convex hull, i.e. thermodynamic **stability**. Chemical space is broad
|
| 11 |
+
and distinct from MP (85 elements incl. lanthanides/actinides, ternary-dominated ≈ 75 %).
|
| 12 |
+
Every material is stored with **two geometries** — the initial (unrelaxed) and the
|
| 13 |
+
DFT-relaxed endpoint (WBM ships no relaxation trajectory). It is a single-file, periodic,
|
| 14 |
+
labelled crystal dataset — **not** a conformer ensemble.
|
| 15 |
+
|
| 16 |
+
## Statistics
|
| 17 |
+
<!-- from wbm_stats.json (atom range + element set are exact; distributions from an 8,000-structure sample) -->
|
| 18 |
+
|
| 19 |
+
| property | value |
|
| 20 |
+
|---|---|
|
| 21 |
+
| structures (test) | 256,963 (215,488 unique prototypes; 42,825 stable) |
|
| 22 |
+
| atoms per structure (min / mean / max) | 2 / 7.76 / 100 |
|
| 23 |
+
| unit-cell edge, Å (sampled min / max) | 2.26 / 30.3 (bounding-box diagonal) |
|
| 24 |
+
| distinct elements | 85 |
|
| 25 |
+
| element set | H, Li, Be, B, C, N, O, F, Na, Mg, Al, Si, P, S, Cl, K, Ca, Sc–Zn, Ga, Ge, As, Se, Br, Rb, Sr, Y, Zr–Cd, In, Sn, Sb, Te, I, Xe, Cs, Ba, La–Lu, Hf–Hg, Tl, Pb, Bi, Ac, Th, Pa, U, Np, Pu |
|
| 26 |
+
| `formation_energy` (`y`, eV/atom) | −4.56 … 4.74 |
|
| 27 |
+
| `e_above_hull` (eV/atom) | −2.73 … 6.48 |
|
| 28 |
+
| `band_gap` (eV) | 0 … 8.07 |
|
| 29 |
+
| `volume` (ų) | 12.5 … 3740 |
|
| 30 |
+
| substitution rounds (`wbm_step` 1–5) | 61,466 / 52,755 / 79,160 / 40,314 / 23,268 |
|
| 31 |
+
|
| 32 |
+
Distributions in the figure are computed from a random sample of 8,000 structures; the
|
| 33 |
+
atom-count range and element set are exact (from the collated tensors).
|
| 34 |
+
|
| 35 |
+
## Usage / loading
|
| 36 |
+
```python
|
| 37 |
+
from StructureCloud.Datasets import WBM
|
| 38 |
+
|
| 39 |
+
ds = WBM() # split='test', mode='relaxed', label='formation_energy'
|
| 40 |
+
d = ds[0] # torch_geometric.data.Data
|
| 41 |
+
# d.pos [N,3] Å, d.frac_pos [N,3], d.cell [1,3,3] Å, d.z [N], d.pbc [1,3] bool,
|
| 42 |
+
# d.id 'wbm-1-1', d.y = formation energy (eV/atom)
|
| 43 |
+
|
| 44 |
+
# attach more labels, restrict to unique prototypes:
|
| 45 |
+
ds = WBM(label='e_above_hull', extra_labels=['band_gap', 'wbm_step'], unique_only=True)
|
| 46 |
+
|
| 47 |
+
# the Matbench Discovery benchmark pairing (predict relaxed target from unrelaxed input):
|
| 48 |
+
from torch_geometric.loader import DataLoader
|
| 49 |
+
ds = WBM(mode='both', label='formation_energy')
|
| 50 |
+
for input_batch, target_batch in DataLoader(ds, batch_size=32):
|
| 51 |
+
... # input_batch = unrelaxed geometry (no label); target_batch = relaxed + y
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
Returned sample keys (single-structure modes `'relaxed'` / `'unrelaxed'`):
|
| 55 |
+
- `pos` — `[N, 3]` float32 (Å); Cartesian, computed as `frac_pos @ cell`
|
| 56 |
+
- `frac_pos` — `[N, 3]` float32; fractional coordinates
|
| 57 |
+
- `cell` — `[1, 3, 3]` float32 (Å); lattice matrix. `pbc` — `[1, 3]` bool (all True)
|
| 58 |
+
- `z` — `[N]` int64; atomic numbers
|
| 59 |
+
- `id` — `str`; material id (e.g. `wbm-3-12345`). `y` — the selected label (omitted if `label=None`)
|
| 60 |
+
|
| 61 |
+
**Modes** (`mode=`): `'relaxed'` (default) → only the relaxed geometry; `'unrelaxed'` → only
|
| 62 |
+
the initial geometry (same key schema, mutually stackable with `'relaxed'`); `'both'` → a
|
| 63 |
+
tuple `(input, target)` — unrelaxed input **without** label, relaxed target **with** labels —
|
| 64 |
+
which a plain PyG `DataLoader` collates into `(input_batch, target_batch)`. Labels are always
|
| 65 |
+
properties of the DFT-relaxed structure regardless of mode. `'both'` returns a tuple, so it is
|
| 66 |
+
**not** compatible with `StackedDataset`. `unique_only=True` restricts to the 215,488
|
| 67 |
+
`unique_prototype` rows. Loading is memory-mapped (`mmap=True` default; `mmap=False` loads into RAM).
|
| 68 |
+
|
| 69 |
+
## Preprocessed (collated) format
|
| 70 |
+
Ships as one memory-mappable `preprocessed/test.pt` holding tensors only:
|
| 71 |
+
- `frac_pos` / `init_frac_pos` `[ΣN, 3]` float32 — relaxed & initial fractional coordinates, one
|
| 72 |
+
atom offset table `ptr` `[M+1]`; `cell` / `init_cell` `[M, 3, 3]` float32 (Å).
|
| 73 |
+
- `z` / `init_z` `[ΣN]` int64 — atomic numbers for each geometry. **Relaxation regroups atoms by
|
| 74 |
+
element**, so the relaxed and initial atom orderings differ (same composition); each geometry is
|
| 75 |
+
stored self-consistently with its own `z`, and there is no atom-index correspondence between them.
|
| 76 |
+
- per-structure label tensors `[M]` (all 18 summary columns) + derived `wbm_step`; packed strings
|
| 77 |
+
`material_id`, `formula`, `protostructure_spglib`, `protostructure_spglib_initial_structure`.
|
| 78 |
+
|
| 79 |
+
## Labels
|
| 80 |
+
All labels are properties of the **DFT-relaxed** structure, per-structure (regression), no NaNs.
|
| 81 |
+
|
| 82 |
+
| loader name | collated column | units |
|
| 83 |
+
|---|---|---|
|
| 84 |
+
| `formation_energy` (default `y`) | `e_form_per_atom_mp2020_corrected` | eV/atom |
|
| 85 |
+
| `e_above_hull` | `e_above_hull_mp2020_corrected_ppd_mp` | eV/atom (stability: stable if ≤ 0) |
|
| 86 |
+
| `band_gap` | `bandgap_pbe` | eV |
|
| 87 |
+
| `e_form_uncorrected`, `e_form_wbm` | `e_form_per_atom_uncorrected`, `e_form_per_atom_wbm` | eV/atom |
|
| 88 |
+
| `e_above_hull_wbm` | `e_above_hull_wbm` | eV/atom |
|
| 89 |
+
| `energy`, `energy_from_cse` | `uncorrected_energy`, `uncorrected_energy_from_cse` | eV (total) |
|
| 90 |
+
| `e_correction`, `e_correction_legacy` | `e_correction_per_atom_mp2020` / `..._mp_legacy` | eV/atom |
|
| 91 |
+
| `volume`, `n_sites`, `wbm_step` | `volume`, `n_sites`, `wbm_step` | ų, count, 1–5 |
|
| 92 |
+
| `unique_prototype` | `unique_prototype` | bool |
|
| 93 |
+
| `relax_displacement` | `site_stats_fingerprint_init_final_norm_diff` | fingerprint distance |
|
| 94 |
+
| `formula`, `id`, `protostructure`, `protostructure_initial` | string fields | — |
|
| 95 |
+
|
| 96 |
+
`e_form_per_atom_mp2020_corrected` applies the **MP2020 compatibility corrections** (anion/GGA+U
|
| 97 |
+
corrections) so WBM energies are on the same scale as the MP convex hull used to score stability.
|
| 98 |
+
|
| 99 |
+
## Splits
|
| 100 |
+
Single split `'test'` — WBM is an evaluation set (MBD holds it out; the MBD training set is MPtrj).
|
| 101 |
+
`unique_only=True` selects the 215,488 unique-prototype subset. `wbm_step` (1–5) records which of
|
| 102 |
+
the five substitution rounds produced each structure.
|
| 103 |
+
|
| 104 |
+
## Preprocessing & cleaning
|
| 105 |
+
- Coordinates are **fractional** in the source (pymatgen `Structure` / `ComputedStructureEntry`);
|
| 106 |
+
stored as `frac_pos` + `cell`, with Cartesian `pos = frac_pos @ cell` (Å) computed on access.
|
| 107 |
+
- **Both** geometries (relaxed + initial) are kept; the intermediate ionic relaxation steps are not
|
| 108 |
+
in the WBM release. Relaxed and initial atom orderings differ (see collated-format note).
|
| 109 |
+
- All 256,963 structures are kept (no filtering); the summary CSV, relaxed CSE JSONL, and initial
|
| 110 |
+
structure JSONL are 1:1 aligned on `material_id`. No unit conversion (labels already eV / eV·atom⁻¹).
|
| 111 |
+
|
| 112 |
+
## Data distribution
|
| 113 |
+

|
| 114 |
+
|
| 115 |
+
## Sources & citation
|
| 116 |
+
- Data (figshare, CC-BY-4.0), via `matbench_discovery.data.DataFiles`:
|
| 117 |
+
`wbm/2023-12-13-wbm-summary.csv.gz`, `wbm/2022-10-19-wbm-computed-structure-entries.jsonl.gz`
|
| 118 |
+
(relaxed), `wbm/2022-10-19-wbm-init-structs.jsonl.gz` (initial).
|
| 119 |
+
- Wang, Botti & Marques, *A high-throughput framework for determining synthesizability*,
|
| 120 |
+
npj Comput. Mater. 7, 12 (2021). DOI 10.1038/s41524-020-00481-6.
|
| 121 |
+
- Riebesell et al., *Matbench Discovery*, Nat. Mach. Intell. (2025). arXiv:2308.14920.
|