Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -18,37 +18,93 @@ configs:
|
|
| 18 |
|
| 19 |
This repository contains preprocessed datasets from the LeMat-Bulk dataset prepared for MatterGen-style retraining.
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
-
* **File**: `Dataset_A_MatterGen_Reproduction.parquet`
|
| 27 |
-
* **Description**: Strict MatterGen-compatible reproduction dataset. Primitive standardized structures with `dft_hull <= 0.10` and `nsites <= 20`. Excludes noble gases, `Tc`, `Pm`, and elements with atomic number `> 84`. Keeps lanthanoids except `Pm`.
|
| 28 |
|
| 29 |
-
###
|
| 30 |
-
|
| 31 |
-
* **Description**: Derived from the default Dataset A, but excludes all lanthanoid elements for robustness studies.
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
```python
|
|
|
|
| 44 |
from datasets import load_dataset
|
| 45 |
|
| 46 |
-
#
|
| 47 |
-
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
| 54 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
This repository contains preprocessed datasets from the LeMat-Bulk dataset prepared for MatterGen-style retraining.
|
| 20 |
|
| 21 |
+
---
|
| 22 |
|
| 23 |
+
## 🔒 Accessing Private Datasets
|
| 24 |
|
| 25 |
+
Since this repository is private/gated, you must authenticate your requests using a Hugging Face User Access Token with read permissions.
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
### Step 1: Set the HF_TOKEN environment variable
|
| 28 |
+
Before loading the dataset, make sure to set the `HF_TOKEN` environment variable in your terminal/environment:
|
|
|
|
| 29 |
|
| 30 |
+
**On Linux/macOS:**
|
| 31 |
+
```bash
|
| 32 |
+
export HF_TOKEN="your_huggingface_read_token"
|
| 33 |
+
```
|
| 34 |
|
| 35 |
+
**On Windows (PowerShell):**
|
| 36 |
+
```powershell
|
| 37 |
+
$env:HF_TOKEN="your_huggingface_read_token"
|
| 38 |
+
```
|
| 39 |
|
| 40 |
+
**On Windows (CMD):**
|
| 41 |
+
```cmd
|
| 42 |
+
set HF_TOKEN=your_huggingface_read_token
|
| 43 |
+
```
|
| 44 |
|
| 45 |
+
### Step 2: Load the Dataset in Python
|
| 46 |
+
Once the environment variable is set, you can load the dataset subsets directly. The `datasets` library will automatically pick up the `HF_TOKEN` environment variable.
|
| 47 |
|
| 48 |
```python
|
| 49 |
+
import os
|
| 50 |
from datasets import load_dataset
|
| 51 |
|
| 52 |
+
# The token is read automatically from the HF_TOKEN environment variable
|
| 53 |
+
dataset = load_dataset("youssefsassi/Le-Mat-Bulk_matgen_constrained", name="default")
|
| 54 |
+
```
|
| 55 |
|
| 56 |
+
Alternatively, you can pass the token directly as a parameter:
|
| 57 |
+
```python
|
| 58 |
+
from datasets import load_dataset
|
| 59 |
|
| 60 |
+
dataset = load_dataset(
|
| 61 |
+
"youssefsassi/Le-Mat-Bulk_matgen_constrained",
|
| 62 |
+
name="default",
|
| 63 |
+
token="your_huggingface_read_token"
|
| 64 |
+
)
|
| 65 |
```
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## 🛠️ Generation Procedure and Filter Counts
|
| 70 |
+
|
| 71 |
+
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.
|
| 72 |
+
|
| 73 |
+
### Step-by-Step Preprocessing Flow:
|
| 74 |
+
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`.
|
| 75 |
+
2. **Element Exclusions**: Excludes noble gases, Technetium (`Tc`), Promethium (`Pm`), and elements with atomic numbers greater than 84 (`> Po`).
|
| 76 |
+
3. **DFT Hull Pre-filtering**:
|
| 77 |
+
* Dataset B filter: `dft_hull <= 0.15`
|
| 78 |
+
* Dataset A filter: `dft_hull <= 0.10`
|
| 79 |
+
4. **Primitivization (Symmetry Standardization)**:
|
| 80 |
+
* Performed on the Dataset B candidates. Spglib standardizes the structures and obtains primitive cells.
|
| 81 |
+
5. **Post-primitive Site Filtering**:
|
| 82 |
+
* Applies the site count filter `nsites <= 40` on Dataset B's standardized primitive cells.
|
| 83 |
+
6. **Deduplication**:
|
| 84 |
+
* Removes any duplicate entries to produce the final **Dataset B (Extension)**.
|
| 85 |
+
7. **Derivation of Dataset A (MatterGen Reproduction)**:
|
| 86 |
+
* Applies stricter filters to the deduplicated Dataset B primitive superset: `dft_hull <= 0.10` and `nsites <= 20`.
|
| 87 |
+
8. **Derivation of Dataset A No Lanthanoids**:
|
| 88 |
+
* Derived from the finalized Dataset A by removing all Lanthanoids (`La`, `Ce`, `Pr`, `Nd`, `Sm`, `Eu`, `Gd`, `Tb`, `Dy`, `Ho`, `Er`, `Tm`, `Yb`, `Lu`).
|
| 89 |
+
|
| 90 |
+
### Filter Counts Table:
|
| 91 |
+
|
| 92 |
+
| Dataset / Subset | Preprocessing Step | Row Count | Details |
|
| 93 |
+
| :--- | :--- | :--- | :--- |
|
| 94 |
+
| **All** | Joined Input (Initial) | **5,335,286** | Initial raw join on `immutable_id` |
|
| 95 |
+
| **All** | After Element Exclusions | **4,426,249** | Excluded noble gases, Tc, Pm, and Z > 84 |
|
| 96 |
+
| **Dataset B (Candidate)** | After DFT Hull Filtering | **1,699,744** | Cutoff: `dft_hull <= 0.15` |
|
| 97 |
+
| **Dataset B (Candidate)** | Primitivization Success | **1,699,744** | Standardized primitive cells (0 failures) |
|
| 98 |
+
| **Dataset B (Candidate)** | After Post-primitive `nsites` Filter | **1,664,358** | Cutoff: post-primitive `nsites <= 40` |
|
| 99 |
+
| **Dataset B (Extension)** | **Final Deduplicated Output** | **1,664,351** | Final Dataset B count |
|
| 100 |
+
| **Dataset A** | Primitive Superset Input | **1,664,351** | Input from finalized Dataset B |
|
| 101 |
+
| **Dataset A (MatterGen)** | **Final Derived Output** | **1,181,982** | Stricter filters: `dft_hull <= 0.10` and `nsites <= 20` |
|
| 102 |
+
| **Dataset A (No Lanthanoids)**| **Final Derived Output** | **611,142** | Excluded 14 Lanthanoids from Dataset A |
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## Dataset Subsets Summary
|
| 107 |
+
|
| 108 |
+
* **`default`** (Dataset A - MatterGen Reproduction): 1,181,982 rows.
|
| 109 |
+
* **`no_lanthanoids`** (Dataset A Robustness Subset): 611,142 rows.
|
| 110 |
+
* **`extension`** (Dataset B): 1,664,351 rows.
|