Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
da916ec
1
Parent(s): f7a6a0c
add OC22 examples and new tasks
Browse files- app.py +165 -23
- examples/ruo2_110_O.traj +0 -0
- examples/ruo2_110_Ovac.traj +0 -0
- examples/ruo2_110_slab.traj +0 -0
app.py
CHANGED
|
@@ -88,7 +88,7 @@ def main():
|
|
| 88 |
fmax = gr.Slider(value=0.05, minimum=0.001, maximum=0.5, label="Opt. Fmax [eV/Å]")
|
| 89 |
|
| 90 |
task_name = gr.Radio(
|
| 91 |
-
value="OMol", choices=["OMol", "OMC", "OMat", "OC20", "ODAC"], label="Task Name"
|
| 92 |
)
|
| 93 |
|
| 94 |
gr.Markdown("OMol-specific settings for total charge and spin multiplicity")
|
|
@@ -132,6 +132,7 @@ def main():
|
|
| 132 |
with gr.Column(scale=2):
|
| 133 |
with gr.Column(variant="panel"):
|
| 134 |
gr.Markdown("# Meta's Universal Model for Atoms (UMA) Demo")
|
|
|
|
| 135 |
|
| 136 |
with gr.Tab("1. UMA Intro"):
|
| 137 |
gr.Image(
|
|
@@ -304,6 +305,36 @@ def main():
|
|
| 304 |
1,
|
| 305 |
"This example shows the OC20 model can be applied to small molecules on a catalyst surface, and that OC20 has recently been extended with datasets for multi-adsorbate interactions. Notice some of the adsorbates wrap around the periodic boundary conditions. Some of the adsorbates are weakly bound and desorbing from the surface based on this starting configuration.",
|
| 306 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
[
|
| 308 |
str(
|
| 309 |
Path(__file__).parent
|
|
@@ -370,7 +401,9 @@ def main():
|
|
| 370 |
"Organic molecular crystal",
|
| 371 |
"Inorganic crystal",
|
| 372 |
"High-entropy alloy",
|
| 373 |
-
"Catalyst surface/adsorbate",
|
|
|
|
|
|
|
| 374 |
"Ligated gold nanoparticle crystal",
|
| 375 |
"Neutral ethylene carbonate",
|
| 376 |
"Solvated protein",
|
|
@@ -739,12 +772,82 @@ def main():
|
|
| 739 |
False,
|
| 740 |
"This is a Cu111 slab with an O adsorbed.",
|
| 741 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 742 |
],
|
| 743 |
example_labels=[
|
| 744 |
"Pt(111) slab",
|
| 745 |
"Pt(111)+*O adslab",
|
| 746 |
"Cu(111) slab",
|
| 747 |
"Cu(111)+*O adslab",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 748 |
],
|
| 749 |
inputs=[
|
| 750 |
input_structure,
|
|
@@ -910,14 +1013,15 @@ def main():
|
|
| 910 |
gr.Markdown(
|
| 911 |
"""
|
| 912 |
|
| 913 |
-
|
| 914 |
|
| 915 |
-
|
| 916 |
|
| 917 |
-
|
| 918 |
|
| 919 |
-
|
| 920 |
|
|
|
|
| 921 |
"""
|
| 922 |
)
|
| 923 |
|
|
@@ -925,15 +1029,17 @@ def main():
|
|
| 925 |
gr.Markdown(
|
| 926 |
"""
|
| 927 |
|
| 928 |
-
|
|
|
|
|
|
|
| 929 |
|
| 930 |
-
|
| 931 |
|
| 932 |
-
|
| 933 |
|
| 934 |
-
|
| 935 |
|
| 936 |
-
|
| 937 |
"""
|
| 938 |
)
|
| 939 |
|
|
@@ -941,31 +1047,67 @@ def main():
|
|
| 941 |
gr.Markdown(
|
| 942 |
"""
|
| 943 |
|
| 944 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 945 |
|
| 946 |
-
|
| 947 |
|
| 948 |
-
|
| 949 |
|
| 950 |
-
|
| 951 |
|
| 952 |
-
|
| 953 |
"""
|
| 954 |
)
|
| 955 |
|
| 956 |
-
with gr.TabItem("ODAC", id=
|
| 957 |
gr.Markdown(
|
| 958 |
"""
|
| 959 |
|
| 960 |
-
|
|
|
|
|
|
|
| 961 |
|
| 962 |
-
|
| 963 |
|
| 964 |
-
|
| 965 |
|
| 966 |
-
|
| 967 |
|
| 968 |
-
|
| 969 |
"""
|
| 970 |
)
|
| 971 |
|
|
@@ -1037,7 +1179,7 @@ def main():
|
|
| 1037 |
# Change the tab based on the current task name
|
| 1038 |
task_name.input(
|
| 1039 |
lambda x: gr.Tabs(
|
| 1040 |
-
selected={"OMol": 0, "OMC": 1, "OMat": 2, "OC20": 3, "ODAC":
|
| 1041 |
),
|
| 1042 |
[task_name],
|
| 1043 |
task_name_tabs,
|
|
|
|
| 88 |
fmax = gr.Slider(value=0.05, minimum=0.001, maximum=0.5, label="Opt. Fmax [eV/Å]")
|
| 89 |
|
| 90 |
task_name = gr.Radio(
|
| 91 |
+
value="OMol", choices=["OMol", "OMC", "OMat", "OC20", "OC22", "OC25", "ODAC"], label="Task Name"
|
| 92 |
)
|
| 93 |
|
| 94 |
gr.Markdown("OMol-specific settings for total charge and spin multiplicity")
|
|
|
|
| 132 |
with gr.Column(scale=2):
|
| 133 |
with gr.Column(variant="panel"):
|
| 134 |
gr.Markdown("# Meta's Universal Model for Atoms (UMA) Demo")
|
| 135 |
+
gr.Markdown("**Model version: UMA 1.2** — [see changelog](https://fair-chem.github.io/uma-changelog/)")
|
| 136 |
|
| 137 |
with gr.Tab("1. UMA Intro"):
|
| 138 |
gr.Image(
|
|
|
|
| 305 |
1,
|
| 306 |
"This example shows the OC20 model can be applied to small molecules on a catalyst surface, and that OC20 has recently been extended with datasets for multi-adsorbate interactions. Notice some of the adsorbates wrap around the periodic boundary conditions. Some of the adsorbates are weakly bound and desorbing from the surface based on this starting configuration.",
|
| 307 |
],
|
| 308 |
+
[
|
| 309 |
+
str(
|
| 310 |
+
Path(__file__).parent
|
| 311 |
+
/ "./examples/ruo2_110_O.traj"
|
| 312 |
+
),
|
| 313 |
+
200,
|
| 314 |
+
20,
|
| 315 |
+
1.0,
|
| 316 |
+
300.0,
|
| 317 |
+
"NVE",
|
| 318 |
+
"OC22",
|
| 319 |
+
0,
|
| 320 |
+
1,
|
| 321 |
+
"This is a RuO2(110) surface with an adsorbed oxygen atom, a classic oxide electrocatalyst for the oxygen evolution reaction (OER). This example uses the OC22 task, which was specifically trained on oxide electrocatalyst data from RPBE DFT calculations. RuO2 is one of the most active OER catalysts and a key system in the OC22 dataset.",
|
| 322 |
+
],
|
| 323 |
+
[
|
| 324 |
+
str(
|
| 325 |
+
Path(__file__).parent
|
| 326 |
+
/ "./examples/ruo2_110_Ovac.traj"
|
| 327 |
+
),
|
| 328 |
+
200,
|
| 329 |
+
20,
|
| 330 |
+
1.0,
|
| 331 |
+
300.0,
|
| 332 |
+
"NVE",
|
| 333 |
+
"OC22",
|
| 334 |
+
0,
|
| 335 |
+
1,
|
| 336 |
+
"This is a RuO2(110) surface with an oxygen vacancy — one of the bridging surface oxygens has been removed. Oxygen vacancies on oxide surfaces play a key role in catalytic activity, and understanding their formation energy and dynamics is important for designing better oxide electrocatalysts. This example uses the OC22 task, trained on oxide electrocatalyst data.",
|
| 337 |
+
],
|
| 338 |
[
|
| 339 |
str(
|
| 340 |
Path(__file__).parent
|
|
|
|
| 401 |
"Organic molecular crystal",
|
| 402 |
"Inorganic crystal",
|
| 403 |
"High-entropy alloy",
|
| 404 |
+
"Catalyst surface/adsorbate (OC20)",
|
| 405 |
+
"RuO2(110)+*O oxide catalyst (OC22)",
|
| 406 |
+
"RuO2(110) oxygen vacancy (OC22)",
|
| 407 |
"Ligated gold nanoparticle crystal",
|
| 408 |
"Neutral ethylene carbonate",
|
| 409 |
"Solvated protein",
|
|
|
|
| 772 |
False,
|
| 773 |
"This is a Cu111 slab with an O adsorbed.",
|
| 774 |
],
|
| 775 |
+
[
|
| 776 |
+
str(
|
| 777 |
+
Path(__file__).parent
|
| 778 |
+
/ "./examples/pt111_O.traj"
|
| 779 |
+
),
|
| 780 |
+
300,
|
| 781 |
+
0.05,
|
| 782 |
+
"OC22",
|
| 783 |
+
0,
|
| 784 |
+
1,
|
| 785 |
+
False,
|
| 786 |
+
"This is a Pt111 slab with an O adsorbed, using the OC22 task. OC22 is trained on oxide electrocatalyst data, so try comparing the results with the OC20 task to see how the different levels of theory affect the predicted adsorption energy.",
|
| 787 |
+
],
|
| 788 |
+
[
|
| 789 |
+
str(
|
| 790 |
+
Path(__file__).parent
|
| 791 |
+
/ "./examples/pt111_O.traj"
|
| 792 |
+
),
|
| 793 |
+
300,
|
| 794 |
+
0.05,
|
| 795 |
+
"OC25",
|
| 796 |
+
0,
|
| 797 |
+
1,
|
| 798 |
+
False,
|
| 799 |
+
"This is a Pt111 slab with an O adsorbed, using the OC25 task. Try comparing the results with the OC20 and OC22 tasks to see how the different datasets and levels of theory affect the predicted adsorption energy.",
|
| 800 |
+
],
|
| 801 |
+
[
|
| 802 |
+
str(
|
| 803 |
+
Path(__file__).parent
|
| 804 |
+
/ "./examples/ruo2_110_slab.traj"
|
| 805 |
+
),
|
| 806 |
+
300,
|
| 807 |
+
0.05,
|
| 808 |
+
"OC22",
|
| 809 |
+
0,
|
| 810 |
+
1,
|
| 811 |
+
False,
|
| 812 |
+
"This is a bare RuO2(110) slab — a rutile oxide surface commonly studied for the oxygen evolution reaction (OER). Use this with the OC22 task to compute adsorption energies on oxide surfaces by comparing with the RuO2(110)+*O example.",
|
| 813 |
+
],
|
| 814 |
+
[
|
| 815 |
+
str(
|
| 816 |
+
Path(__file__).parent
|
| 817 |
+
/ "./examples/ruo2_110_O.traj"
|
| 818 |
+
),
|
| 819 |
+
300,
|
| 820 |
+
0.05,
|
| 821 |
+
"OC22",
|
| 822 |
+
0,
|
| 823 |
+
1,
|
| 824 |
+
False,
|
| 825 |
+
"This is a RuO2(110) surface with an adsorbed oxygen atom, relaxed using the OC22 task. Compare the relaxed energy with the bare RuO2(110) slab to estimate the oxygen adsorption energy on this oxide electrocatalyst.",
|
| 826 |
+
],
|
| 827 |
+
[
|
| 828 |
+
str(
|
| 829 |
+
Path(__file__).parent
|
| 830 |
+
/ "./examples/ruo2_110_Ovac.traj"
|
| 831 |
+
),
|
| 832 |
+
300,
|
| 833 |
+
0.05,
|
| 834 |
+
"OC22",
|
| 835 |
+
0,
|
| 836 |
+
1,
|
| 837 |
+
False,
|
| 838 |
+
"This is a RuO2(110) surface with an oxygen vacancy. Relaxing this structure with the OC22 task shows how the surface reconstructs around the vacancy site. Oxygen vacancy formation energies are important descriptors for oxide catalyst activity.",
|
| 839 |
+
],
|
| 840 |
],
|
| 841 |
example_labels=[
|
| 842 |
"Pt(111) slab",
|
| 843 |
"Pt(111)+*O adslab",
|
| 844 |
"Cu(111) slab",
|
| 845 |
"Cu(111)+*O adslab",
|
| 846 |
+
"Pt(111)+*O with OC22",
|
| 847 |
+
"Pt(111)+*O with OC25",
|
| 848 |
+
"RuO2(110) bare slab (OC22)",
|
| 849 |
+
"RuO2(110)+*O adslab (OC22)",
|
| 850 |
+
"RuO2(110) O-vacancy (OC22)",
|
| 851 |
],
|
| 852 |
inputs=[
|
| 853 |
input_structure,
|
|
|
|
| 1013 |
gr.Markdown(
|
| 1014 |
"""
|
| 1015 |
|
| 1016 |
+
[Open Molecular Crystals 2025 (OMC25)](https://arxiv.org/abs/2508.02651) comprises 25M structures of organic molecular crystals with 12 elements and up to 300 atoms, focused on molecular crystal polymorphism and crystal structure prediction.
|
| 1017 |
|
| 1018 |
+
**Relevant applications:** Pharmaceutical packaging, bio-inspired materials, organic electronics, organic LEDs, crystal structure prediction
|
| 1019 |
|
| 1020 |
+
**Level of theory:** PBE+D3 as implemented in VASP.
|
| 1021 |
|
| 1022 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the OMC task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1023 |
|
| 1024 |
+
**Download:** [Hugging Face](https://huggingface.co/datasets/facebook/OMC25)
|
| 1025 |
"""
|
| 1026 |
)
|
| 1027 |
|
|
|
|
| 1029 |
gr.Markdown(
|
| 1030 |
"""
|
| 1031 |
|
| 1032 |
+
[Open Materials 2024 (OMAT24)](https://arxiv.org/abs/2410.12771) comprises 110M+ structures of inorganic bulk materials collected from many open databases like Materials Project and Alexandria, and randomly sampled far from equilibria.
|
| 1033 |
+
|
| 1034 |
+
**Relevant applications:** Inorganic materials discovery, solar photovoltaics, advanced alloys, superconductors, electronic materials, optical materials
|
| 1035 |
|
| 1036 |
+
**Level of theory:** GGA-PBE as implemented in VASP.
|
| 1037 |
|
| 1038 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the OMat task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1039 |
|
| 1040 |
+
**Caveats:** Spin polarization effects are included, but you can't select the magnetic state. Further, OMat24 did not fully sample possible spin states in the training data.
|
| 1041 |
|
| 1042 |
+
**Download:** [Hugging Face](https://huggingface.co/datasets/facebook/omat24)
|
| 1043 |
"""
|
| 1044 |
)
|
| 1045 |
|
|
|
|
| 1047 |
gr.Markdown(
|
| 1048 |
"""
|
| 1049 |
|
| 1050 |
+
[Open Catalyst 2020 (OC20)](https://arxiv.org/abs/2010.09990) comprises 133M+ structures (from 640k relaxations) of 82 renewable-energy-relevant adsorbate molecules on catalyst surfaces across 55 elements.
|
| 1051 |
+
|
| 1052 |
+
**Relevant applications:** Renewable energy catalysis, fuel cells, energy conversion, sustainable fertilizer production, chemical refining, plastics synthesis/upcycling
|
| 1053 |
+
|
| 1054 |
+
**Level of theory:** RPBE (no spin polarization) as implemented in VASP.
|
| 1055 |
+
|
| 1056 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the OC20 task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1057 |
+
|
| 1058 |
+
**Caveats:** No oxides or explicit solvents are included in OC20. The model works surprisingly well for transition state searches given the nature of the training data, but you should be careful. RPBE works well for small molecules, but dispersion will be important for larger molecules on surfaces.
|
| 1059 |
+
|
| 1060 |
+
**Download:** [fair-chem.github.io](https://fair-chem.github.io/catalysts/datasets/oc20.html)
|
| 1061 |
+
"""
|
| 1062 |
+
)
|
| 1063 |
+
|
| 1064 |
+
with gr.TabItem("OC22", id=5):
|
| 1065 |
+
gr.Markdown(
|
| 1066 |
+
"""
|
| 1067 |
+
|
| 1068 |
+
[Open Catalyst 2022 (OC22)](https://arxiv.org/abs/2206.08917) comprises ~10M single-point calculations (62k systems) of oxide electrocatalysts with 51 metals + oxygen and 9 adsorbates (H\\*, O\\*, N\\*, C\\*, OOH\\*, OH\\*, OH₂\\*, O₂\\*, CO\\*).
|
| 1069 |
+
|
| 1070 |
+
**Relevant applications:** Oxide electrocatalysis, oxygen evolution reaction (OER)
|
| 1071 |
+
|
| 1072 |
+
**Level of theory:** PBE+U (with Hubbard U corrections, spin-polarized) as implemented in VASP.
|
| 1073 |
+
|
| 1074 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the OC22 task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1075 |
+
|
| 1076 |
+
**Download:** [fair-chem.github.io](https://fair-chem.github.io/catalysts/datasets/oc22.html)
|
| 1077 |
+
"""
|
| 1078 |
+
)
|
| 1079 |
+
|
| 1080 |
+
with gr.TabItem("OC25", id=6):
|
| 1081 |
+
gr.Markdown(
|
| 1082 |
+
"""
|
| 1083 |
+
|
| 1084 |
+
[Open Catalyst 2025 (OC25)](https://arxiv.org/abs/2509.17862) comprises 73M structures focused on catalysis at solid-liquid interfaces with dispersion corrections.
|
| 1085 |
|
| 1086 |
+
**Relevant applications:** Catalysis at solid-liquid interfaces
|
| 1087 |
|
| 1088 |
+
**Level of theory:** RPBE+D3 as implemented in VASP.
|
| 1089 |
|
| 1090 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the OC25 task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1091 |
|
| 1092 |
+
**Download:** [Hugging Face](https://huggingface.co/facebook/OC25)
|
| 1093 |
"""
|
| 1094 |
)
|
| 1095 |
|
| 1096 |
+
with gr.TabItem("ODAC", id=7):
|
| 1097 |
gr.Markdown(
|
| 1098 |
"""
|
| 1099 |
|
| 1100 |
+
[Open Direct Air Capture 2023 (ODAC23)](https://arxiv.org/abs/2311.00341) comprises 29M structures of CO₂/H₂O molecules adsorbed in Metal Organic Frameworks sampled from various open databases like CoreMOF.
|
| 1101 |
+
|
| 1102 |
+
**Relevant applications:** Direct air capture, carbon capture and storage, CO₂ conversion, catalysis
|
| 1103 |
|
| 1104 |
+
**Level of theory:** PBE+D3 as implemented in VASP.
|
| 1105 |
|
| 1106 |
+
**Additional inputs:** UMA has not seen varying charge or spin multiplicity for the ODAC task, and expects total_charge=0 and spin multiplicity=0 as model inputs.
|
| 1107 |
|
| 1108 |
+
**Caveats:** The ODAC23 dataset only contains CO₂/H₂O absorption, so anything more may be inaccurate (e.g. hydrocarbons in MOFs). Further, there is a limited number of bare-MOF structures in the training data, so you should be careful if you are using a new MOF structure.
|
| 1109 |
|
| 1110 |
+
**Download:** [fair-chem.github.io](https://fair-chem.github.io/dac/datasets/odac23.html)
|
| 1111 |
"""
|
| 1112 |
)
|
| 1113 |
|
|
|
|
| 1179 |
# Change the tab based on the current task name
|
| 1180 |
task_name.input(
|
| 1181 |
lambda x: gr.Tabs(
|
| 1182 |
+
selected={"OMol": 0, "OMC": 1, "OMat": 2, "OC20": 3, "OC22": 5, "OC25": 6, "ODAC": 7}[x]
|
| 1183 |
),
|
| 1184 |
[task_name],
|
| 1185 |
task_name_tabs,
|
examples/ruo2_110_O.traj
ADDED
|
Binary file (4.87 kB). View file
|
|
|
examples/ruo2_110_Ovac.traj
ADDED
|
Binary file (4.75 kB). View file
|
|
|
examples/ruo2_110_slab.traj
ADDED
|
Binary file (4.79 kB). View file
|
|
|