File size: 2,441 Bytes
f6f5e40 | 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 | # Getting Started
## Installation
The Scandium Dataset is distributed as JSON files. No installation required
for basic use. For benchmark evaluation, clone the repository:
```bash
git clone https://github.com/Scandium-Labs/Scandium-Dataset
cd Scandium-Dataset
```
Python 3.9+ is recommended.
## Loading the Dataset
```python
import json
# Load the full dataset
with open("dataset/entries_final_v3.json") as f:
entries = json.load(f)
print(f"Loaded {len(entries):,} entries")
```
## Basic Operations
### Filter by tier
```python
gold = [e for e in entries if e.get("tier") == "gold"]
strict_gold = [e for e in entries
if e.get("strict_gold", {}).get("is_strict_gold")]
validated = [e for e in entries if e.get("tier") == "validated"]
```
### Filter by family
```python
battery_families = {"layered_oxide", "sulfide_sse", "halide_sse",
"polyanion", "nasicon", "garnet", "borohydride"}
battery = [e for e in entries
if set(e.get("families", [])) & battery_families]
```
### Filter by source
```python
mp = [e for e in entries if e.get("source") == "mp"]
oqmd = [e for e in entries if e.get("source") == "oqmd"]
jarvis = [e for e in entries if e.get("source") == "jarvis"]
```
### Access properties
```python
for e in entries[:5]:
print(f"{e['formula']:20s} "
f"FE={e.get('formation_energy_per_atom', 'N/A'):>8.4f} "
f"EaH={e.get('energy_above_hull', 'N/A'):>8.4f} "
f"BG={e.get('band_gap', 'N/A'):>8.4f}")
```
### Check provenance
```python
e = entries[0]
prov = e.get("provenance", {})
print(f"Source: {prov.get('source')} ({prov.get('source_id')})")
print(f"Checksum: {prov.get('checksum')}")
print(f"Repairs: {prov.get('repairs_applied')}")
print(f"Tier: {prov.get('tier_assignment', {}).get('tier')}")
```
## Using Editions
```python
# Battery subset
with open("dataset/battery_candidate_subset_v1.json") as f:
battery = json.load(f)
# Electrolyte subset (strict Gold only)
with open("dataset/solid_electrolyte_candidate_subset_v1.json") as f:
electrolyte = json.load(f)
```
## Using the Benchmark Splits
```python
import json
with open("dataset/splits/random_80_10_10.json") as f:
split = json.load(f)
train_entries = [entries[i] for i in split["train"]]
val_entries = [entries[i] for i in split["val"]]
test_entries = [entries[i] for i in split["test"]]
```
See [examples/](../examples/) for complete scripts.
|