Spaces:
Running
Running
Yuan (Cyrus) Chiang
commited on
add mac installation script and quickstart MD example (#45)
Browse files* add one click script to uv pip install on mac
* add quickstart example
* update orb model source to aws
- .github/README.md +46 -1
- mlip_arena/models/externals/orb.py +2 -1
- pyproject.toml +1 -1
- scripts/install-macosx.sh +18 -0
.github/README.md
CHANGED
@@ -12,7 +12,9 @@
|
|
12 |
> [!NOTE]
|
13 |
> Contributions of new tasks are very welcome! If you're interested in joining the effort, please reach out to Yuan at [[email protected]](mailto:[email protected]). See [project page](https://github.com/orgs/atomind-ai/projects/1) for some outstanding tasks, or propose new one in [Discussion](https://github.com/atomind-ai/mlip-arena/discussions/new?category=ideas).
|
14 |
|
15 |
-
MLIP Arena is a platform for evaluating foundation machine learning interatomic potentials (MLIPs) beyond conventional
|
|
|
|
|
16 |
|
17 |
## Installation
|
18 |
|
@@ -24,6 +26,8 @@ pip install mlip-arena
|
|
24 |
|
25 |
### From source
|
26 |
|
|
|
|
|
27 |
```bash
|
28 |
git clone https://github.com/atomind-ai/mlip-arena.git
|
29 |
cd mlip-arena
|
@@ -36,6 +40,16 @@ pip install -e .[mace]
|
|
36 |
DP_ENABLE_TENSORFLOW=0 pip install -e .[deepmd]
|
37 |
```
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
## Contribute
|
40 |
|
41 |
MLIP Arena is now in pre-alpha. If you're interested in joining the effort, please reach out to Yuan at [[email protected]](mailto:[email protected]).
|
@@ -46,6 +60,37 @@ MLIP Arena is now in pre-alpha. If you're interested in joining the effort, plea
|
|
46 |
streamlit run serve/app.py
|
47 |
```
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
### Add new benchmark tasks (WIP)
|
50 |
|
51 |
> [!NOTE]
|
|
|
12 |
> [!NOTE]
|
13 |
> Contributions of new tasks are very welcome! If you're interested in joining the effort, please reach out to Yuan at [[email protected]](mailto:[email protected]). See [project page](https://github.com/orgs/atomind-ai/projects/1) for some outstanding tasks, or propose new one in [Discussion](https://github.com/atomind-ai/mlip-arena/discussions/new?category=ideas).
|
14 |
|
15 |
+
MLIP Arena is a unified platform for evaluating foundation machine learning interatomic potentials (MLIPs) beyond conventional error metrics. It focuses on revealing the underlying physics and chemistry learned by these models and assessing their utilitarian performance agnostic to underlying model architecture. The platform's benchmarks are specifically designed to evaluate the readiness and reliability of open-source, open-weight models in accurately reproducing both qualitative and quantitative behaviors of atomic systems.
|
16 |
+
|
17 |
+
MLIP Arena leverages modern pythonic workflow orchestractor [Prefect](https://www.prefect.io/) to enable advanced task/flow chaining and caching.
|
18 |
|
19 |
## Installation
|
20 |
|
|
|
26 |
|
27 |
### From source
|
28 |
|
29 |
+
**Linux**
|
30 |
+
|
31 |
```bash
|
32 |
git clone https://github.com/atomind-ai/mlip-arena.git
|
33 |
cd mlip-arena
|
|
|
40 |
DP_ENABLE_TENSORFLOW=0 pip install -e .[deepmd]
|
41 |
```
|
42 |
|
43 |
+
**Mac**
|
44 |
+
|
45 |
+
```bash
|
46 |
+
# (Optional) Install uv
|
47 |
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
48 |
+
source $HOME/.local/bin/env
|
49 |
+
# One script installation
|
50 |
+
bash scripts/install-macosx.sh
|
51 |
+
```
|
52 |
+
|
53 |
## Contribute
|
54 |
|
55 |
MLIP Arena is now in pre-alpha. If you're interested in joining the effort, please reach out to Yuan at [[email protected]](mailto:[email protected]).
|
|
|
60 |
streamlit run serve/app.py
|
61 |
```
|
62 |
|
63 |
+
## Quickstart
|
64 |
+
|
65 |
+
### Molecular dynamics (MD)
|
66 |
+
|
67 |
+
Run all the compiled MLIPs by looping thorugh `MLIPEnum`:
|
68 |
+
|
69 |
+
```python
|
70 |
+
from mlip_arena.tasks.md import run as MD
|
71 |
+
# from mlip_arena.tasks import MD # convenient loading
|
72 |
+
from mlip_arena.models import MLIPEnum
|
73 |
+
|
74 |
+
from ase.build import bulk
|
75 |
+
|
76 |
+
atoms = bulk("Cu", "fcc", a=3.6)
|
77 |
+
|
78 |
+
results = []
|
79 |
+
|
80 |
+
for model in MLIPEnum:
|
81 |
+
result = MD(
|
82 |
+
atoms=atoms,
|
83 |
+
calculator_name=model,
|
84 |
+
calculator_kwargs={},
|
85 |
+
ensemble="nve",
|
86 |
+
dynamics="velocityverlet",
|
87 |
+
total_time=1e3, # 1 ps = 1e3 fs
|
88 |
+
time_step=2, # fs
|
89 |
+
)
|
90 |
+
results.append(result)
|
91 |
+
|
92 |
+
```
|
93 |
+
|
94 |
### Add new benchmark tasks (WIP)
|
95 |
|
96 |
> [!NOTE]
|
mlip_arena/models/externals/orb.py
CHANGED
@@ -55,7 +55,8 @@ class ORBv2(ORBCalculator):
|
|
55 |
cache_dir.mkdir(parents=True, exist_ok=True)
|
56 |
ckpt_path = cache_dir / checkpoint
|
57 |
|
58 |
-
url = f"https://storage.googleapis.com/orbitalmaterials-public-models/forcefields/{checkpoint}"
|
|
|
59 |
|
60 |
if not ckpt_path.exists():
|
61 |
print(f"Downloading ORB model from {url} to {ckpt_path}...")
|
|
|
55 |
cache_dir.mkdir(parents=True, exist_ok=True)
|
56 |
ckpt_path = cache_dir / checkpoint
|
57 |
|
58 |
+
# url = f"https://storage.googleapis.com/orbitalmaterials-public-models/forcefields/{checkpoint}"
|
59 |
+
url = f"https://orbitalmaterials-public-models.s3.us-west-1.amazonaws.com/forcefields/{checkpoint}"
|
60 |
|
61 |
if not ckpt_path.exists():
|
62 |
print(f"Downloading ORB model from {url} to {ckpt_path}...")
|
pyproject.toml
CHANGED
@@ -51,7 +51,7 @@ test = [
|
|
51 |
"nvidia-ml-py==12.560.30",
|
52 |
"e3nn==0.5.0",
|
53 |
"matgl==1.1.2",
|
54 |
-
"dgl==2.4.0",
|
55 |
"chgnet==0.3.8",
|
56 |
"fairchem-core==1.2.0",
|
57 |
"sevenn==0.9.3.post1",
|
|
|
51 |
"nvidia-ml-py==12.560.30",
|
52 |
"e3nn==0.5.0",
|
53 |
"matgl==1.1.2",
|
54 |
+
# "dgl==2.4.0",
|
55 |
"chgnet==0.3.8",
|
56 |
"fairchem-core==1.2.0",
|
57 |
"sevenn==0.9.3.post1",
|
scripts/install-macosx.sh
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
# (Optional) Install uv
|
4 |
+
# curl -LsSf https://astral.sh/uv/install.sh | sh
|
5 |
+
# source $HOME/.local/bin/env
|
6 |
+
|
7 |
+
TORCH=2.2.0
|
8 |
+
|
9 |
+
uv pip install torch==${TORCH}
|
10 |
+
uv pip install torch-scatter --no-build-isolation
|
11 |
+
uv pip install torch-sparse --no-build-isolation
|
12 |
+
|
13 |
+
uv pip install dgl -f https://data.dgl.ai/wheels/torch-${TORCH}/cpu/repo.html
|
14 |
+
|
15 |
+
uv pip install -e .[test]
|
16 |
+
uv pip install -e .[mace]
|
17 |
+
|
18 |
+
|