Skip to content

Commit 7c0b089

Browse files
committed
Metrics vs model size scatter plots (#241)
* training-sets.yml add OC20, NOMAD, AFLOW, OQMD, MatPES PBE, MatPES r2SCAN * add new /datasets page listing all items in `datasets.yml` in sortable table - rename `training-sets.yml` to `datasets.yml` - make vite.config.ts watch for changes to `dataset-schema.yml` and auto-update `dataset-schema.d.ts` - modify related tests to reflect the changes in dataset structure and naming conventions * big MetricScatter.svelte overhaul to support different x-axes: date ranges or model_params phonons/+page.svelte add MetricScatter x_property="model_params" use SelectToggle on /discovery/+page.svelte lib/metrics.ts simplify CPS calculations * landing page add MetricScatter with selectable y-axis (F1, κ_SRME, RMSD, CPS) and two x-axes: date ranges or model_params - readme.md add title and add fallback model count (20+) in model_count slot for readers on GitHub - update app.d.ts to import Dataset from dataset-schema.d.ts - add dataset-schema.d.ts converted from dataset-schema.yml - refactor RadarChart to use CombinedMetricConfig and improve weight handling * add SelectToggle component for metric selection used by landing page * fix site unit tests: LandingPage.test.ts metrics.test.ts MetricsTable.test.svelte.ts TableControls.test.svelte.ts - add key and label to DEFAULT_CPS_CONFIG in metrics.ts and CombinedMetricConfig in types.ts * add unit tests DatasetsPage.test.ts, ScatterMetric.test.svelte.ts, SelectToggle.test.svelte.ts * MetricScatter.svelte add prop `show_model_labels` for displaying model names on points in the scatter plot - Bump elementari in package.json * MetricScatter.svelte different colors for each model
1 parent 395ad2d commit 7c0b089

36 files changed

+2011
-694
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ repos:
7979
files: ^models/.+/.+\.yml$
8080
args: [--schemafile, tests/model-schema.yml]
8181
- id: check-jsonschema
82-
files: ^data/training-sets\.yml$
83-
args: [--schemafile, tests/training-set-schema.yml]
82+
files: ^data/datasets\.yml$
83+
args: [--schemafile, tests/dataset-schema.yml]
8484
- id: check-github-actions
8585

8686
- repo: https://github.com/RobertCraigie/pyright-python

contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ To submit a new model to this benchmark and add it to our leaderboard, please cr
135135
torch-geometric: 2.0.9
136136
...
137137

138-
training_set: [MPtrj] # list of keys from data/training-sets.yml
138+
training_set: [MPtrj] # list of keys from data/datasets.yml
139139

140140
notes: # notes can have any key, be multiline and support markdown.
141141
description: This is how my model works...

data/training-sets.yml renamed to data/datasets.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ GNoME:
9191
n_materials: 6_000_000
9292
open: false
9393
date_created: 2023-11-29 # https://github.com/google-deepmind/materials_discovery/commit/a701b9529
94+
license: Apache 2.0
9495
params:
9596
method: DFT
9697
code: VASP
@@ -109,6 +110,7 @@ MatterSim:
109110
pressure_range: 0-1000 GPa
110111
open: false
111112
date_created: 2024-05-08
113+
license: Unreleased
112114
params:
113115
method: DFT
114116
code: VASP
@@ -272,3 +274,138 @@ OpenLAM:
272274
This dataset integrates multidisciplinary DFT data sourced from Deep Modeling community (https://deepmodeling.com)
273275
and other open repositories to pre-train large atomic models (LAMs),
274276
while intentionally excluding overlap with WBM benchmark systems (e.g., Alex3D structures).
277+
278+
OC20:
279+
title: Open Catalyst 2020
280+
url: https://opencatalystproject.org/leaderboard.html
281+
download_url: https://fair-chem.github.io/core/datasets/oc20.html#per-adsorbate-trajectories
282+
doi: https://doi.org/10.1021/acscatal.0c04525
283+
n_structures: 133_934_018
284+
open: true
285+
date_created: 2020-10-01
286+
license: CC BY 4.0
287+
params:
288+
method: DFT
289+
code: VASP
290+
functional: PBE+U
291+
pseudopotentials: PBE
292+
created_by:
293+
- name: Open Catalyst Project
294+
url: https://opencatalystproject.org
295+
description: |
296+
A dataset for catalysis research containing DFT relaxations of adsorbates on catalyst surfaces,
297+
specifically designed for training ML models to predict adsorption energies and atomic forces.
298+
299+
NOMAD:
300+
title: NOMAD Repository
301+
url: https://nomad-lab.eu/prod/v1/gui/search/entries/search/entries
302+
doi: https://joss.theoj.org/papers/10.21105/joss.05388
303+
n_structures: 19_111_098 # as of 2025-04-04
304+
n_materials: 4_335_728
305+
open: true
306+
date_created: 2019-06-01
307+
license: CC BY 4.0
308+
params:
309+
method: [DFT, ML]
310+
code: Various
311+
functional: Various
312+
pseudopotentials: Various
313+
created_by:
314+
- name: NOMAD Team
315+
url: https://nomad-lab.eu
316+
description: |
317+
A repository hosting over 19 million calculations across various computational materials science codes,
318+
providing a rich source of DFT and molecular dynamics data for training ML models.
319+
320+
AFLOW:
321+
title: AFLOW Database
322+
url: https://aflow.org
323+
doi: https://doi.org/10.1016/j.commatsci.2012.02.005
324+
n_structures: 3_530_330 # as of 2025-04-04
325+
n_materials: 3_530_330 # unsure how number of materials and structures differ for AFLOW
326+
open: true
327+
date_created: 2012-06-01
328+
license: Open
329+
params:
330+
method: DFT
331+
code: VASP
332+
functional: Various
333+
pseudopotentials: Various
334+
created_by:
335+
- name: AFLOW Team
336+
url: https://aflow.org
337+
description: |
338+
A database of over 3.5 million materials with calculated thermodynamic, electronic, and structural properties,
339+
using standardized high-throughput DFT calculations.
340+
341+
OQMD:
342+
title: Open Quantum Materials Database
343+
url: https://oqmd.org
344+
doi: https://doi.org/10.1007/s11837-013-0755-4
345+
download_url: https://static.oqmd.org/static/downloads/qmdb__v1_6__112023.sql.gz
346+
n_materials: 1_226_781 # as of 2025-04-04
347+
n_structures: 1_226_781
348+
open: true
349+
date_created: 2014-04-03
350+
license: CC BY 4.0
351+
params:
352+
method: DFT
353+
code: VASP
354+
code_version: 5.3.2 # see settings page https://oqmd.org/documentation/vasp
355+
functional: PBE
356+
pseudopotentials: PBE
357+
energy_cutoff: 520 eV
358+
kpoint_density: 8000 KPPRA
359+
created_by:
360+
- name: OQMD Team
361+
affiliation: Northwestern University
362+
url: https://oqmd.org
363+
description: |
364+
A database of DFT-calculated thermodynamic and structural properties for over 1 million inorganic compounds,
365+
focused on providing data for materials discovery and design. Calculations use a four-step relaxation scheme
366+
with progressively increasing precision, with GGA+U for transition metals, lanthanides, and actinides in
367+
compounds with oxygen. Spin-polarization is used for structures containing 3d or actinide elements.
368+
369+
MatPES PBE:
370+
title: MatPES v1.0 PBE
371+
url: https://matpes.ai
372+
download_url: https://s3.us-east-1.amazonaws.com/materialsproject-contribs/MatPES_2025_1/MatPES-PBE-2025.1.json.gz
373+
n_structures: 434_712 # as of 2025-04-04
374+
open: true
375+
date_created: 2025-03-06
376+
doi: https://doi.org/10.48550/arXiv.2503.04070
377+
license: MIT
378+
params:
379+
method: DFT
380+
code: VASP
381+
code_version: 6.4.x
382+
functional: PBE
383+
pseudopotentials: PBE_64
384+
created_by:
385+
- name: MatPES Team
386+
url: https://matpes.ai
387+
description: |
388+
A dataset containing 434,712 structures from ~300K molecular dynamics simulations,
389+
providing potential energy surfaces that are valuable for training ML interatomic potentials.
390+
391+
MatPES r2SCAN:
392+
title: MatPES v1.0 r2SCAN
393+
url: https://matpes.ai
394+
download_url: https://s3.us-east-1.amazonaws.com/materialsproject-contribs/MatPES_2025_1/MatPES-R2SCAN-2025.1.json.gz
395+
n_structures: 387_897 # as of 2025-04-04
396+
open: true
397+
date_created: 2025-03-06
398+
doi: https://doi.org/10.48550/arXiv.2503.04070
399+
license: MIT
400+
params:
401+
method: DFT
402+
code: VASP
403+
code_version: 6.4.x
404+
functional: r2SCAN
405+
pseudopotentials: PBE_64
406+
created_by:
407+
- name: MatPES Team
408+
url: https://matpes.ai
409+
description: |
410+
A dataset containing 387,897 structures from ~300K molecular dynamics simulations,
411+
providing potential energy surfaces that are valuable for training ML interatomic potentials.

readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
<h1 align="center" style="line-height: 0; margin-block: -1em 1em;">
2-
<img src="https://github.com/janosh/matbench-discovery/raw/main/site/static/favicon.svg" alt="Logo" width="60px"><br>
3-
Matbench Discovery
4-
</h1>
1+
<slot name="title">
2+
<h1 align="center">
3+
<img src="https://github.com/janosh/matbench-discovery/raw/main/site/static/favicon.svg" alt="Logo" width="60px"><br>
4+
Matbench Discovery
5+
</h1>
6+
</slot>
57

68
<h4 align="center" class="toc-exclude" style="display: none;">
79

@@ -13,11 +15,9 @@
1315

1416
</h4>
1517

16-
<slot name="metrics_table" />
18+
Matbench Discovery is an [interactive leaderboard](https://janosh.github.io/matbench-discovery/models) and associated [PyPI package](https://pypi.org/project/matbench-discovery) which ranks ML models on multiple tasks designed to simulate high-throughput discovery of new stable inorganic crystals, finding their ground state atomic positions and predicting their thermal conductivity.
1719

18-
Matbench Discovery is an [interactive leaderboard](https://janosh.github.io/matbench-discovery/models) and associated [PyPI package](https://pypi.org/project/matbench-discovery) which rank ML models on a task designed to simulate high-throughput discovery of new stable inorganic crystals as well as predicting some of their properties.
19-
20-
We've tested <slot name="model_count" /> models covering multiple methodologies including graph neural network (GNN) interatomic potentials, GNN one-shot predictors, iterative Bayesian optimizers and random forests with shallow-learning structure fingerprints.
20+
We rank <slot name="model_count">20+</slot> models covering multiple methodologies including graph neural network (GNN) interatomic potentials, GNN one-shot predictors, iterative Bayesian optimizers and random forests with shallow-learning structure fingerprints.
2121

2222
<slot name="best_report" />
2323

scripts/evals/discovery.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
key for key, meta in MODEL_METADATA.items() if not model_is_compliant(meta)
8181
]
8282

83-
with open(f"{DATA_DIR}/training-sets.yml") as file:
84-
TRAINING_SETS = yaml.safe_load(file)
83+
with open(f"{DATA_DIR}/datasets.yml") as file:
84+
DATASETS = yaml.safe_load(file)
8585

8686
# Add model metadata to df_metrics(_10k, _uniq_protos)
8787
models = discovery.df_metrics_uniq_protos.columns
@@ -131,10 +131,10 @@
131131
dataset_urls, dataset_tooltip_lines = {}, []
132132

133133
for train_set in training_sets:
134-
if isinstance(train_set, str) and train_set not in TRAINING_SETS:
134+
if isinstance(train_set, str) and train_set not in DATASETS:
135135
raise ValueError(f"Unknown training set {train_set=} for {model=}")
136136
key = train_set if isinstance(train_set, str) else ""
137-
dataset_info = TRAINING_SETS.get(key, train_set)
137+
dataset_info = DATASETS.get(key, train_set)
138138
n_structs = dataset_info["n_structures"]
139139
n_materials = dataset_info.get("n_materials", n_structs)
140140

site/package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
"@rollup/plugin-yaml": "^4.1.2",
2222
"@stylistic/eslint-plugin": "^4.2.0",
2323
"@sveltejs/adapter-static": "^3.0.8",
24-
"@sveltejs/kit": "^2.20.2",
24+
"@sveltejs/kit": "^2.20.4",
2525
"@sveltejs/vite-plugin-svelte": "^5.0.3",
26+
"@types/js-yaml": "^4.0.9",
27+
"@types/json-schema": "^7.0.15",
28+
"@types/node": "^22.14.0",
2629
"d3-array": "^3.2.4",
2730
"d3-scale": "^4.0.2",
2831
"d3-scale-chromatic": "^3.1.0",
29-
"elementari": "^0.3.0",
30-
"eslint": "^9.23.0",
31-
"eslint-plugin-svelte": "^3.3.3",
32+
"elementari": "^0.3.3",
33+
"eslint": "^9.24.0",
34+
"eslint-plugin-svelte": "^3.5.1",
3235
"hastscript": "^9.0.1",
3336
"iconify-icon": "^2.3.0",
3437
"js-yaml": "^4.1.0",
@@ -44,20 +47,20 @@
4447
"rehype-stringify": "^10.0.1",
4548
"remark-math": "6.0.0",
4649
"remark-parse": "^11.0.0",
47-
"remark-rehype": "^11.1.1",
48-
"svelte": "^5.25.3",
50+
"remark-rehype": "^11.1.2",
51+
"svelte": "^5.25.7",
4952
"svelte-check": "^4.1.5",
5053
"svelte-multiselect": "11.0.0-rc.1",
5154
"svelte-preprocess": "^6.0.3",
5255
"svelte-toc": "^0.5.9",
5356
"svelte-zoo": "^0.4.17",
5457
"svelte2tsx": "^0.7.35",
5558
"tslib": "^2.8.1",
56-
"typescript": "5.8.2",
57-
"typescript-eslint": "^8.28.0",
59+
"typescript": "5.8.3",
60+
"typescript-eslint": "^8.29.0",
5861
"unified": "^11.0.5",
59-
"vite": "^6.2.3",
60-
"vitest": "^3.0.9"
62+
"vite": "^6.2.5",
63+
"vitest": "^3.1.1"
6164
},
6265
"prettier": {
6366
"semi": false,

site/src/app.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ declare module 'models/*.yml' {
1313
export default data
1414
} // model metadata files
1515

16-
declare module 'data/training-sets.yml' {
17-
const data: import('$lib').TrainingSet[]
16+
declare module '*/datasets.yml' {
17+
const data: Record<string, import('$lib/types').Dataset>
1818
export default data
19-
} // training sets
19+
}
2020

2121
declare module '*citation.cff' {
2222
const data: import('$lib').Citation

site/src/lib/HeatmapTable.svelte

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@
264264
.table-container::-webkit-scrollbar {
265265
display: none; /* Safari and Chrome */
266266
}
267-
268267
th,
269268
td {
270269
padding: var(--heatmap-cell-padding, 1pt 3pt);
@@ -274,17 +273,14 @@
274273
overflow: hidden;
275274
text-overflow: ellipsis;
276275
}
277-
278276
th {
279277
background: var(--heatmap-header-bg, var(--night));
280278
position: sticky;
281279
cursor: pointer;
282280
}
283-
284281
th:hover {
285282
background: var(--heatmap-header-hover-bg, var(--night-lighter, #2a2a2a));
286283
}
287-
288284
.sticky-col {
289285
position: sticky;
290286
left: 0;
@@ -294,20 +290,16 @@
294290
tr:nth-child(odd) td.sticky-col {
295291
background: var(--heatmap-row-odd-bg, rgb(15, 14, 14));
296292
}
297-
298293
tbody tr:hover {
299294
filter: var(--heatmap-row-hover-filter, brightness(1.1));
300295
}
301-
302296
td[data-sort-value] {
303297
cursor: default;
304298
}
305-
306299
.group-header th {
307300
border-bottom: 1px solid black;
308301
text-align: center;
309302
}
310-
311303
/* Styles for the table header with sort hint and controls */
312304
.table-header {
313305
display: flex;
@@ -319,19 +311,16 @@
319311
padding: 0.25rem 0;
320312
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
321313
}
322-
323314
.sort-hint {
324315
font-size: 0.85em;
325316
color: var(--text-muted, #aaa);
326317
margin: 0;
327318
}
328-
329319
.controls-container {
330320
display: inline-flex;
331321
align-items: center;
332322
margin-left: auto;
333323
}
334-
335324
.not-sortable {
336325
cursor: default;
337326
}

0 commit comments

Comments
 (0)