File size: 2,763 Bytes
2bbd13c
 
d72faca
 
 
e6cac5c
5b01054
2bbd13c
aecc8a6
 
2bbd13c
 
3b3aaa9
5b01054
d72faca
7c36d54
3b3aaa9
 
 
 
 
5b01054
e6cac5c
7f5709e
5b01054
2bbd13c
e6cac5c
 
 
2bbd13c
e6cac5c
7c36d54
3b3aaa9
 
 
 
 
5b01054
 
7f5709e
2bbd13c
 
 
 
 
 
 
d72faca
7c36d54
2bbd13c
 
 
9361457
 
 
3b3aaa9
 
af4a473
9361457
91418f9
aecc8a6
91418f9
af4a473
7c36d54
5b01054
 
d72faca
5b01054
 
 
 
7c36d54
 
5b01054
 
 
7c36d54
 
5b01054
 
 
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
from pathlib import Path

import pandas as pd
import streamlit as st

from mlip_arena.models import REGISTRY

DATA_DIR = Path("mlip_arena/tasks/diatomics")

dfs = [pd.read_json(DATA_DIR / REGISTRY[model].get("family") /  "homonuclear-diatomics.json") for model in REGISTRY]
df = pd.concat(dfs, ignore_index=True)


table = pd.DataFrame(columns=[
    "Model",
    "Element Coverage",
    # "No. of reversed forces",
    # "Energy-consistent forces",
    "Prediction",
    "NVT",
    "NPT",
    "Code",
    "Paper",
    "First Release",
    ])

for model in REGISTRY:
    rows = df[df["method"] == model]
    metadata = REGISTRY.get(model, {})
    new_row = {
        "Model": model,
        "Element Coverage": len(rows["name"].unique()),
        # "No. of reversed forces": None,  # Replace with actual logic if available
        # "Energy-consistent forces": None,  # Replace with actual logic if available
        "Prediction": metadata.get("prediction", None),
        "NVT": "✅" if metadata.get("nvt", False) else "❌",
        "NPT": "✅" if metadata.get("npt", False) else "❌",
        "Code": metadata.get("github", None) if metadata else None,
        "Paper": metadata.get("doi", None) if metadata else None,
        "First Release": metadata.get("date", None),
    }
    table = pd.concat([table, pd.DataFrame([new_row])], ignore_index=True)

table.set_index("Model", inplace=True)


s = table.style.background_gradient(
    cmap="PuRd",
    subset=["Element Coverage"],
    vmin=0, vmax=120
)

st.warning("MLIP Arena is currently in **pre-alpha**. The results are not stable. Please interpret them with care.", icon="⚠️")
st.info("Contributions are welcome. For more information, visit https://github.com/atomind-ai/mlip-arena.", icon="🤗")

st.markdown(
"""
<h1 style='text-align: center;'>⚔️ MLIP Arena Leaderboard ⚔️</h1>

MLIP Arena is a platform for benchmarking foundation machine learning interatomic potentials (MLIPs), mainly for disclosing the learned physics and chemistry of the models and their performance on molecular dynamics (MD) simulations.
The benchmarks are designed to evaluate the readiness and reliability of open-source, open-weight models to reproduce the qualitatively or quantitatively correct physics.
""", unsafe_allow_html=True)

# st.header("Summary", divider=True)

st.dataframe(
    s,
    use_container_width=True,
    column_config={
        "Code": st.column_config.LinkColumn(
            # validate="^https://[a-z]+\.streamlit\.app$",
            width="medium",
            display_text="Link",
        ),
        "Paper": st.column_config.LinkColumn(
            # validate="^https://[a-z]+\.streamlit\.app$",
            width="medium",
            display_text="Link",
        ),
    },
)