Spaces:
Running
Running
Yuan (Cyrus) Chiang
commited on
Add external pages (#54)
Browse files* add mbd
* bump st version
* minor adjust
* restore loadscope to avoid missing ocp models
* clean workflows
* clean workflows
- .github/README.md +2 -6
- .github/workflows/release.yaml +0 -5
- .github/workflows/test.yaml +1 -1
- README.md +1 -1
- mlip_arena/models/registry.yaml +2 -2
- mlip_arena/tasks/registry.yaml +8 -8
- pyproject.toml +2 -2
- requirements.txt +1 -1
- serve/app.py +13 -12
- serve/ranks/homonuclear-diatomics.py +9 -5
.github/README.md
CHANGED
@@ -125,14 +125,10 @@ streamlit run serve/app.py
|
|
125 |
### Add new benchmark tasks (WIP)
|
126 |
|
127 |
> [!NOTE]
|
128 |
-
> Please reuse or
|
129 |
-
> The following are some tasks implemented:
|
130 |
-
> - [Prefect structure optimization (OPT)](../mlip_arena/tasks/optimize.py)
|
131 |
-
> - [Prefect molecular dynamics (MD)](../mlip_arena/tasks/md.py)
|
132 |
-
> - [Prefect equation of states (EOS)](../mlip_arena/tasks/eos.py)
|
133 |
|
134 |
<!-- 1. Follow the task template to implement the task class and upload the script along with metadata to the MLIP Arena [here](../mlip_arena/tasks/README.md).
|
135 |
-
|
136 |
|
137 |
### Add new MLIP models
|
138 |
|
|
|
125 |
### Add new benchmark tasks (WIP)
|
126 |
|
127 |
> [!NOTE]
|
128 |
+
> Please reuse, extend, or chain the general tasks defined [above](#list-of-implemented-tasks)
|
|
|
|
|
|
|
|
|
129 |
|
130 |
<!-- 1. Follow the task template to implement the task class and upload the script along with metadata to the MLIP Arena [here](../mlip_arena/tasks/README.md).
|
131 |
+
1. Code a benchmark script to evaluate the performance of your model on the task. The script should be able to load the model and the dataset, and output the evaluation metrics. -->
|
132 |
|
133 |
### Add new MLIP models
|
134 |
|
.github/workflows/release.yaml
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
name: Publish Release
|
2 |
|
3 |
on:
|
4 |
-
# workflow_run:
|
5 |
-
# workflows: [Python Test]
|
6 |
-
# branches: [main]
|
7 |
-
# types: [completed]
|
8 |
workflow_dispatch:
|
9 |
|
10 |
permissions:
|
@@ -14,7 +10,6 @@ jobs:
|
|
14 |
pypi:
|
15 |
name: Publish to PyPI
|
16 |
runs-on: ubuntu-latest
|
17 |
-
# needs: release # This job runs after the release job
|
18 |
|
19 |
steps:
|
20 |
# Step 1: Checkout the code
|
|
|
1 |
name: Publish Release
|
2 |
|
3 |
on:
|
|
|
|
|
|
|
|
|
4 |
workflow_dispatch:
|
5 |
|
6 |
permissions:
|
|
|
10 |
pypi:
|
11 |
name: Publish to PyPI
|
12 |
runs-on: ubuntu-latest
|
|
|
13 |
|
14 |
steps:
|
15 |
# Step 1: Checkout the code
|
.github/workflows/test.yaml
CHANGED
@@ -61,4 +61,4 @@ jobs:
|
|
61 |
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
|
62 |
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
|
63 |
run: |
|
64 |
-
pytest -vra -n 5 tests
|
|
|
61 |
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
|
62 |
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
|
63 |
run: |
|
64 |
+
pytest -vra -n 5 --dist=loadscope tests
|
README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
title: MLIP Arena
|
3 |
emoji: ⚛
|
4 |
sdk: streamlit
|
5 |
-
sdk_version: 1.
|
6 |
app_file: serve/app.py
|
7 |
---
|
8 |
|
|
|
2 |
title: MLIP Arena
|
3 |
emoji: ⚛
|
4 |
sdk: streamlit
|
5 |
+
sdk_version: 1.43.2 # The latest supported version
|
6 |
app_file: serve/app.py
|
7 |
---
|
8 |
|
mlip_arena/models/registry.yaml
CHANGED
@@ -114,7 +114,7 @@ ORBv2:
|
|
114 |
- combustion
|
115 |
- stability
|
116 |
github: https://github.com/orbital-materials/orb-models
|
117 |
-
doi:
|
118 |
date: 2024-10-15
|
119 |
prediction: EFS
|
120 |
nvt: true
|
@@ -185,7 +185,7 @@ MACE-MPA:
|
|
185 |
- homonuclear-diatomics
|
186 |
- stability
|
187 |
github: https://github.com/ACEsuit/mace
|
188 |
-
doi:
|
189 |
date: 2024-12-09
|
190 |
prediction: EFS
|
191 |
nvt: true
|
|
|
114 |
- combustion
|
115 |
- stability
|
116 |
github: https://github.com/orbital-materials/orb-models
|
117 |
+
doi: https://arxiv.org/abs/2410.22570
|
118 |
date: 2024-10-15
|
119 |
prediction: EFS
|
120 |
nvt: true
|
|
|
185 |
- homonuclear-diatomics
|
186 |
- stability
|
187 |
github: https://github.com/ACEsuit/mace
|
188 |
+
doi: https://arxiv.org/abs/2401.00096
|
189 |
date: 2024-12-09
|
190 |
prediction: EFS
|
191 |
nvt: true
|
mlip_arena/tasks/registry.yaml
CHANGED
@@ -4,18 +4,18 @@ Homonuclear diatomics:
|
|
4 |
task-layout: wide
|
5 |
rank-page: homonuclear-diatomics
|
6 |
last-update: 2024-09-19
|
7 |
-
|
8 |
-
category:
|
9 |
-
task-page:
|
10 |
task-layout: centered
|
11 |
-
rank-page:
|
12 |
High pressure stability:
|
13 |
category: Molecular Dynamics
|
14 |
task-page: stability
|
15 |
task-layout: centered
|
16 |
rank-page:
|
17 |
-
|
18 |
-
category:
|
19 |
-
task-page:
|
20 |
task-layout: centered
|
21 |
-
rank-page:
|
|
|
4 |
task-layout: wide
|
5 |
rank-page: homonuclear-diatomics
|
6 |
last-update: 2024-09-19
|
7 |
+
Combustion:
|
8 |
+
category: Molecular Dynamics
|
9 |
+
task-page: combustion
|
10 |
task-layout: centered
|
11 |
+
rank-page: combustion
|
12 |
High pressure stability:
|
13 |
category: Molecular Dynamics
|
14 |
task-page: stability
|
15 |
task-layout: centered
|
16 |
rank-page:
|
17 |
+
Lattice thermal conductivity:
|
18 |
+
category: Properties and Physical Behaviors
|
19 |
+
task-page: thermal-conductivity
|
20 |
task-layout: centered
|
21 |
+
rank-page: thermal-conductivity
|
pyproject.toml
CHANGED
@@ -42,7 +42,7 @@ dependencies=[
|
|
42 |
|
43 |
[project.optional-dependencies]
|
44 |
app = [
|
45 |
-
"streamlit==1.
|
46 |
"plotly",
|
47 |
]
|
48 |
test = [
|
@@ -64,7 +64,7 @@ test = [
|
|
64 |
"pytest-xdist",
|
65 |
"prefect==3.1.11",
|
66 |
"pymatgen>=2025.1.9",
|
67 |
-
"streamlit==1.
|
68 |
]
|
69 |
mace = [
|
70 |
"mace-torch==0.3.9",
|
|
|
42 |
|
43 |
[project.optional-dependencies]
|
44 |
app = [
|
45 |
+
"streamlit==1.43.2",
|
46 |
"plotly",
|
47 |
]
|
48 |
test = [
|
|
|
64 |
"pytest-xdist",
|
65 |
"prefect==3.1.11",
|
66 |
"pymatgen>=2025.1.9",
|
67 |
+
"streamlit==1.43.2"
|
68 |
]
|
69 |
mace = [
|
70 |
"mace-torch==0.3.9",
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
streamlit>=1.
|
2 |
plotly
|
3 |
numpy
|
4 |
scipy
|
|
|
1 |
+
streamlit>=1.43.0
|
2 |
plotly
|
3 |
numpy
|
4 |
scipy
|
serve/app.py
CHANGED
@@ -39,10 +39,7 @@ for task in TASKS:
|
|
39 |
else:
|
40 |
centered_pages.append(page)
|
41 |
|
42 |
-
|
43 |
-
# nav["Other benchmarks"].append(mbd)
|
44 |
-
|
45 |
-
pg = st.navigation(nav)
|
46 |
|
47 |
if pg in centered_pages:
|
48 |
st.set_page_config(
|
@@ -67,18 +64,22 @@ else:
|
|
67 |
},
|
68 |
)
|
69 |
|
|
|
70 |
st.toast(
|
71 |
"MLIP Arena is currently in **pre-alpha**. The results are not stable. Please interpret them with care. Contributions are welcome. For more information, visit https://github.com/atomind-ai/mlip-arena.",
|
72 |
icon="🍞",
|
73 |
)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
83 |
|
84 |
pg.run()
|
|
|
39 |
else:
|
40 |
centered_pages.append(page)
|
41 |
|
42 |
+
pg = st.navigation(nav, expanded=True)
|
|
|
|
|
|
|
43 |
|
44 |
if pg in centered_pages:
|
45 |
st.set_page_config(
|
|
|
64 |
},
|
65 |
)
|
66 |
|
67 |
+
|
68 |
st.toast(
|
69 |
"MLIP Arena is currently in **pre-alpha**. The results are not stable. Please interpret them with care. Contributions are welcome. For more information, visit https://github.com/atomind-ai/mlip-arena.",
|
70 |
icon="🍞",
|
71 |
)
|
72 |
|
73 |
+
st.sidebar.markdown(
|
74 |
+
"""
|
75 |
+
Complementary Benchmarks
|
76 |
+
"""
|
77 |
+
)
|
78 |
+
st.sidebar.page_link(
|
79 |
+
"https://matbench-discovery.materialsproject.org/", label="Matbench Discovery", icon=":material/link:"
|
80 |
+
)
|
81 |
+
st.sidebar.page_link(
|
82 |
+
"https://openkim.org/", label="OpenKIM", icon=":material/link:"
|
83 |
+
)
|
84 |
|
85 |
pg.run()
|
serve/ranks/homonuclear-diatomics.py
CHANGED
@@ -159,17 +159,21 @@ def render():
|
|
159 |
)
|
160 |
with st.expander("Explanation", icon=":material/info:"):
|
161 |
st.caption(
|
162 |
-
"""
|
163 |
- **Conservation deviation**: The average deviation of force from negative energy gradient along the diatomic curves.
|
164 |
|
165 |
$$
|
166 |
-
|
167 |
$$
|
168 |
|
169 |
-
- **Spearman's coeff. (E: repulsion)**: Spearman's correlation coefficient of energy prediction within equilibrium distance $r
|
170 |
-
- **Spearman's coeff. (F: descending)**: Spearman's correlation coefficient of force prediction
|
171 |
- **Tortuosity**: The ratio between total variation in energy and sum of absolute energy differences between $r_{min}$, $r_o$, and $r_{max}$.
|
172 |
-
- **Energy jump**: The sum of energy discontinuity.
|
|
|
|
|
|
|
|
|
173 |
- **Force flips**: The number of force direction changes.
|
174 |
"""
|
175 |
)
|
|
|
159 |
)
|
160 |
with st.expander("Explanation", icon=":material/info:"):
|
161 |
st.caption(
|
162 |
+
r"""
|
163 |
- **Conservation deviation**: The average deviation of force from negative energy gradient along the diatomic curves.
|
164 |
|
165 |
$$
|
166 |
+
\text{Conservation deviation} = \left\langle\left| \mathbf{F}(\mathbf{r})\cdot\frac{\mathbf{r}}{\|\mathbf{r}\|} + \nabla_rE\right|\right\rangle_{r = \|\mathbf{r}\|}
|
167 |
$$
|
168 |
|
169 |
+
- **Spearman's coeff. (E: repulsion)**: Spearman's correlation coefficient of energy prediction within equilibrium distance $r \in (r_{min}, r_o = \argmin_{r} E(r))$.
|
170 |
+
- **Spearman's coeff. (F: descending)**: Spearman's correlation coefficient of force prediction before maximum attraction $r \in (r_{min}, r_a = \argmin_{r} F(r))$.
|
171 |
- **Tortuosity**: The ratio between total variation in energy and sum of absolute energy differences between $r_{min}$, $r_o$, and $r_{max}$.
|
172 |
+
- **Energy jump**: The sum of energy discontinuity between sampled points.
|
173 |
+
|
174 |
+
$$
|
175 |
+
\text{Energy jump} = \sum_{r_i \in [r_\text{min}, r_\text{max}]} \left| \text{sign}{\left[ E(r_{i+1}) - E(r_i)\right]} - \text{sign}{\left[E(r_i) - E(r_{i-1})\right]}\right| \times \\ \left( \left|E(r_{i+1}) - E(r_i)\right| + \left|E(r_i) - E(r_{i-1})\right|\right)
|
176 |
+
$$
|
177 |
- **Force flips**: The number of force direction changes.
|
178 |
"""
|
179 |
)
|