Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +11 -4
src/streamlit_app.py
CHANGED
@@ -999,7 +999,7 @@ if atoms is not None:
|
|
999 |
|
1000 |
st.sidebar.markdown("## Model Selection")
|
1001 |
if mattersim_available:
|
1002 |
-
model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem", "ORB", "MatterSim"])
|
1003 |
else:
|
1004 |
model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem", "ORB", "SEVEN_NET"])
|
1005 |
|
@@ -1025,8 +1025,8 @@ if model_type == "FairChem":
|
|
1025 |
if model_type == "ORB":
|
1026 |
selected_model = st.sidebar.selectbox("Select ORB Model:", list(ORB_MODELS.keys()))
|
1027 |
model_path = ORB_MODELS[selected_model]
|
1028 |
-
|
1029 |
-
|
1030 |
# selected_default_dtype = st.sidebar.selectbox("Select Precision (default_dtype):", ['float32-high', 'float32-highest', 'float64'])
|
1031 |
selected_default_dtype = 'float64'
|
1032 |
if model_type == "MatterSim":
|
@@ -1034,6 +1034,8 @@ if model_type == "MatterSim":
|
|
1034 |
model_path = MATTERSIM_MODELS[selected_model]
|
1035 |
if model_type == "SEVEN_NET":
|
1036 |
selected_model = st.sidebar.selectbox("Select SEVENNET Model:", list(SEVEN_NET_MODELS.keys()))
|
|
|
|
|
1037 |
model_path = SEVEN_NET_MODELS[selected_model]
|
1038 |
if atoms is not None:
|
1039 |
if not check_atom_limit(atoms, selected_model):
|
@@ -1137,7 +1139,12 @@ if atoms is not None:
|
|
1137 |
calc = MatterSimCalculator(load_path=model_path, device=device)
|
1138 |
elif model_type == "SEVEN_NET":
|
1139 |
# st.write("Setting up SEVENNET calculator...")
|
1140 |
-
|
|
|
|
|
|
|
|
|
|
|
1141 |
calc_atoms.calc = calc
|
1142 |
|
1143 |
if task == "Energy Calculation":
|
|
|
999 |
|
1000 |
st.sidebar.markdown("## Model Selection")
|
1001 |
if mattersim_available:
|
1002 |
+
model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem", "ORB", "SEVEN_NET", "MatterSim"])
|
1003 |
else:
|
1004 |
model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem", "ORB", "SEVEN_NET"])
|
1005 |
|
|
|
1025 |
if model_type == "ORB":
|
1026 |
selected_model = st.sidebar.selectbox("Select ORB Model:", list(ORB_MODELS.keys()))
|
1027 |
model_path = ORB_MODELS[selected_model]
|
1028 |
+
if "omat" in selected_model:
|
1029 |
+
st.sidebar.warning("Using model under Academic Software License (ASL) license, see [https://github.com/gabor1/ASL](https://github.com/gabor1/ASL). To use this model you accept the terms of the license.")
|
1030 |
# selected_default_dtype = st.sidebar.selectbox("Select Precision (default_dtype):", ['float32-high', 'float32-highest', 'float64'])
|
1031 |
selected_default_dtype = 'float64'
|
1032 |
if model_type == "MatterSim":
|
|
|
1034 |
model_path = MATTERSIM_MODELS[selected_model]
|
1035 |
if model_type == "SEVEN_NET":
|
1036 |
selected_model = st.sidebar.selectbox("Select SEVENNET Model:", list(SEVEN_NET_MODELS.keys()))
|
1037 |
+
if selected_model == '7net-mf-ompa':
|
1038 |
+
selected_modal_7net = st.sidebar.selectbox("Select Modal (multi fidelity model):", ['omat', 'mpa'])
|
1039 |
model_path = SEVEN_NET_MODELS[selected_model]
|
1040 |
if atoms is not None:
|
1041 |
if not check_atom_limit(atoms, selected_model):
|
|
|
1139 |
calc = MatterSimCalculator(load_path=model_path, device=device)
|
1140 |
elif model_type == "SEVEN_NET":
|
1141 |
# st.write("Setting up SEVENNET calculator...")
|
1142 |
+
if model_path=='7net-mf-omp':
|
1143 |
+
calc = SevenNetCalculator(model=model_path, modal=selected_modal_7net, device=device)
|
1144 |
+
else:
|
1145 |
+
calc = SevenNetCalculator(model=model_path, device=device)
|
1146 |
+
|
1147 |
+
|
1148 |
calc_atoms.calc = calc
|
1149 |
|
1150 |
if task == "Energy Calculation":
|