File size: 9,048 Bytes
8dc6606
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1189f92
8dc6606
de56942
8dc6606
de56942
8dc6606
 
 
 
de56942
 
8dc6606
de56942
 
8dc6606
de56942
 
8dc6606
1189f92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7b374ac
 
0edd1f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7b374ac
 
 
1189f92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7b374ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1189f92
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
---

configs:
- config_name: default
  data_files:
  - split: train
    path: Dataset_A_MatterGen_Reproduction.parquet
- config_name: no_lanthanoids
  data_files:
  - split: train
    path: Dataset_A_No_Lanthanoids.parquet
- config_name: extension
  data_files:
  - split: train
    path: Dataset_B_Extension.parquet
---


# Le-Mat-Bulk_matgen_constrained

This repository contains preprocessed datasets from the LeMat-Bulk dataset prepared for MatterGen-style retraining.

---

## 🚀 Loading the Dataset

Since this repository is public, you can load the dataset subsets directly without authentication using the Hugging Face `datasets` library:

```python

from datasets import load_dataset



# Load Default (Dataset A)

dataset_a = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="default")



# Load No Lanthanoids

dataset_no_lan = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="no_lanthanoids")



# Load Extension (Dataset B)

dataset_b = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="extension")

```

---

## 🛠️ Generation Procedure and Filter Counts

To save computation time (since `pymatgen` and `spglib` primitive structure standardization are highly expensive CPU operations), the pipeline performs **primitivization only once on the broader Dataset B superset** (which uses looser constraints). The stricter Dataset A and its subsets are then derived directly from the pre-primitivized Dataset B.

### Step-by-Step Preprocessing Flow:
1. **Joined Inputs**: Loads and joins the structures from `LeMaterial/LeMat-Bulk` (config `compatible_pbe`) and DFT hulls from `LeMaterial/LeMat-Bulk-DFT-Hull-All` on `immutable_id`.
2. **Element Exclusions**: Excludes noble gases, Technetium (`Tc`), Promethium (`Pm`), and elements with atomic numbers greater than 84 (`> Po`).
3. **DFT Hull Pre-filtering**:
   * Dataset B filter: `dft_hull <= 0.15`
   * Dataset A filter: `dft_hull <= 0.10`
4. **Primitivization (Symmetry Standardization)**:
   * Performed on the Dataset B candidates. Spglib standardizes the structures and obtains primitive cells.
5. **Post-primitive Site Filtering**:
   * Applies the site count filter `nsites <= 40` on Dataset B's standardized primitive cells.
6. **Deduplication**:
   * Removes any duplicate entries to produce the final **Dataset B (Extension)**.
7. **Derivation of Dataset A (MatterGen Reproduction)**:
   * Applies stricter filters to the deduplicated Dataset B primitive superset: `dft_hull <= 0.10` and `nsites <= 20`.
8. **Derivation of Dataset A No Lanthanoids**:
   * Derived from the finalized Dataset A by removing all Lanthanoids (`La`, `Ce`, `Pr`, `Nd`, `Sm`, `Eu`, `Gd`, `Tb`, `Dy`, `Ho`, `Er`, `Tm`, `Yb`, `Lu`).

---

## 📐 Primitive Structure Standardization Statistics

Symmetry standardization using `spglib` and `pymatgen`'s SpacegroupAnalyzer was run to reduce structures to their standard primitive form. By comparing the site counts (`nsites`) before and after the standardization pass, we find the following ratios of structures that were **already primitive** (i.e., their site counts remained unchanged):

* **Dataset B (Extension)**:
  * Total matched structures: **1,664,351**
  * Already primitive before standardization: **1,639,324**
  * Ratio: **98.50%**
* **Dataset A (MatterGen)**:
  * Total matched structures: **1,181,982**
  * Already primitive before standardization: **1,165,630**
  * Ratio: **98.62%**

This indicates that **~98.5%** of the LeMat-Bulk structures matching our initial constraints were already in their primitive standardized representation, with only **~1.5%** being conventional cells that standard-reduced to a smaller site count.

---

## 📊 Detailed Filtering and Exclusion Statistics

### Step-Wise Preprocessing Pipeline Counts:

| Dataset / Subset | Preprocessing Step | Row Count | Details |
| :--- | :--- | :--- | :--- |
| **All** | Joined Input (Initial) | **5,335,286** | Initial raw join on `immutable_id` |
| **All** | After Element Exclusions | **4,426,249** | Excluded noble gases, Tc, Pm, and Z > 84 |
| **Dataset B (Candidate)** | After DFT Hull Filtering | **1,699,744** | Cutoff: `dft_hull <= 0.15` |
| **Dataset B (Candidate)** | Primitivization Success | **1,699,744** | Standardized primitive cells (0 failures) |
| **Dataset B (Candidate)** | After Post-primitive `nsites` Filter | **1,664,358** | Cutoff: post-primitive `nsites <= 40` |
| **Dataset B (Extension)** | **Final Deduplicated Output** | **1,664,351** | Final Dataset B count |
| **Dataset A** | Primitive Superset Input | **1,664,351** | Input from finalized Dataset B |
| **Dataset A (MatterGen)** | **Final Derived Output** | **1,181,982** | Stricter filters: `dft_hull <= 0.10` and `nsites <= 20` |
| **Dataset A (No Lanthanoids)**| **Final Derived Output** | **611,142** | Excluded 14 Lanthanoids from Dataset A |

---

### Step-Wise Element Exclusions Simulation (Initial Join):
When processing the initial raw joined dataset of **5,335,265** rows:
1. **Exclude Noble Gases** (Ar, He, Kr, Ne, Rn, Xe):
   * Dropped: **280** rows
   * Remaining: **5,334,985** rows
2. **Exclude MatterGen Excluded Elements** (Pm, Tc):
   * Dropped: **368,159** rows
   * Remaining: **4,966,826** rows
3. **Exclude Z > 84 elements**:
   * Dropped: **540,598** rows
   * Remaining: **4,426,228** rows (Total Baseline Excluded dropped: **909,037** rows)

---

### Specific Excluded Element Occurrences in Joined Structures:
The number of structures in the initial joined dataset containing each of the excluded/ablation elements (sorted by occurrence count):

| Element Group | Element | Row Count | % of Joined |
| :--- | :--- | :--- | :--- |
| **Lanthanoids** | La | 282,978 | 5.3039% |
| **MatterGen Excluded** | Pm | 201,275 | 3.7725% |
| **Lanthanoids** | Nd | 199,001 | 3.7299% |
| **Lanthanoids** | Dy | 196,523 | 3.6835% |
| **Lanthanoids** | Pr | 196,414 | 3.6814% |
| **Lanthanoids** | Sm | 196,112 | 3.6758% |
| **Lanthanoids** | Tb | 195,823 | 3.6704% |
| **Lanthanoids** | Ho | 193,884 | 3.6340% |
| **Lanthanoids** | Tm | 189,611 | 3.5539% |
| **Lanthanoids** | Er | 188,347 | 3.5302% |
| **MatterGen Excluded** | Tc | 168,798 | 3.1638% |
| **Z > 84** | Ac | 159,246 | 2.9848% |
| **Lanthanoids** | Ce | 130,640 | 2.4486% |
| **Z > 84** | Th | 121,488 | 2.2771% |
| **Z > 84** | Pu | 109,016 | 2.0433% |
| **Z > 84** | Pa | 95,786 | 1.7953% |
| **Z > 84** | U | 66,848 | 1.2529% |
| **Lanthanoids** | Lu | 61,123 | 1.1456% |
| **Lanthanoids** | Gd | 60,788 | 1.1394% |
| **Z > 84** | Np | 59,124 | 1.1082% |
| **Lanthanoids** | Eu | 33,606 | 0.6299% |
| **Lanthanoids** | Yb | 10,032 | 0.1880% |
| **Noble Gases** | Xe | 215 | 0.0040% |
| **Noble Gases** | Kr | 29 | 0.0050% |
| **Noble Gases** | He | 19 | 0.0004% |
| **Noble Gases** | Ar | 10 | 0.0002% |
| **Noble Gases** | Ne | 7 | 0.0001% |

---

## ⚛️ Atom Type (Element) Frequencies
The overall atom occurrences (by total count across all sites in the joined dataset) for all **89** unique elements present in the structures:

* **O**: 466,021
* **Li**: 325,150
* **Se**: 315,703
* **Cu**: 311,939
* **In**: 309,555
* **Tl**: 306,728
* **Zn**: 306,426
* **Ag**: 303,354
* **Te**: 302,900
* **Mg**: 299,780
* **Au**: 290,434
* **Cd**: 286,238
* **Ni**: 285,705
* **Y**: 284,036
* **La**: 282,978
* **Hg**: 282,741
* **Pd**: 273,467
* **Pt**: 271,824
* **Al**: 269,539
* **S**: 264,889
* **Sc**: 256,428
* **Ga**: 255,553
* **Co**: 252,470
* **P**: 251,653
* **As**: 247,732
* **Pb**: 242,001
* **Si**: 238,068
* **N**: 237,804
* **Sb**: 233,741
* **Rh**: 232,227
* **Ir**: 232,066
* **Sn**: 229,583
* **Cl**: 229,435
* **K**: 229,055
* **Ba**: 221,147
* **Br**: 219,288
* **Ca**: 218,521
* **Sr**: 218,021
* **Fe**: 217,204
* **Ge**: 214,440
* **Na**: 213,838
* **Zr**: 202,165
* **Pm**: 201,275
* **Nd**: 199,001
* **Dy**: 196,523
* **Pr**: 196,414
* **Sm**: 196,112
* **Tb**: 195,823
* **Ho**: 193,884
* **Tm**: 189,611
* **Er**: 188,347
* **Mn**: 187,062
* **Ru**: 182,009
* **Rb**: 179,613
* **H**: 176,728
* **I**: 175,575
* **Bi**: 173,363
* **Os**: 172,771
* **Tc**: 168,798
* **F**: 167,288
* **Ta**: 166,574
* **Mo**: 160,262
* **Be**: 160,154
* **Ac**: 159,246
* **W**: 149,643
* **Re**: 148,063
* **Cr**: 146,883
* **Cs**: 143,895
* **Hf**: 142,792
* **C**: 141,806
* **B**: 137,847
* **Nb**: 131,949
* **Ce**: 130,640
* **Ti**: 126,835
* **Th**: 121,488
* **Pu**: 109,016
* **V**: 108,048
* **Pa**: 95,786
* **U**: 66,848
* **Lu**: 61,123
* **Gd**: 60,788
* **Np**: 59,124
* **Eu**: 33,606
* **Yb**: 10,032
* **Xe**: 215
* **Kr**: 29
* **He**: 19
* **Ar**: 10
* **Ne**: 7

---

## Dataset Subsets Summary

* **`default`** (Dataset A - MatterGen Reproduction): 1,181,982 rows.
* **`no_lanthanoids`** (Dataset A Robustness Subset): 611,142 rows.

* **`extension`** (Dataset B): 1,664,351 rows.