ManasSharma07 commited on
Commit
8e469fb
·
verified ·
1 Parent(s): 02968f8

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +8 -1
src/streamlit_app.py CHANGED
@@ -308,7 +308,8 @@ elif input_method == "Paste Content":
308
  except Exception as e:
309
  st.sidebar.error(f"Error parsing content: {str(e)}")
310
 
311
-
 
312
  # Model selection
313
  st.sidebar.markdown("## Model Selection")
314
  model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem"])
@@ -326,6 +327,12 @@ if model_type == "FairChem":
326
  if selected_model == "UMA Small":
327
  st.sidebar.warning("Meta FAIR Acceptable Use Policy. This model was developed by the Fundamental AI Research (FAIR) team at Meta. By using it, you agree to their acceptable use policy, which prohibits using their models to violate the law or others' rights, plan or develop activities that present a risk of death or harm, and deceive or mislead others.")
328
  selected_task_type = st.sidebar.selectbox("Select UMA Model Task Type:", ["omol", "omat", "omc", "odac", "oc20"])
 
 
 
 
 
 
329
  # Check atom count limit
330
  if atoms is not None:
331
  check_atom_limit(atoms, selected_model)
 
308
  except Exception as e:
309
  st.sidebar.error(f"Error parsing content: {str(e)}")
310
 
311
+ atoms.info["charge"] = 0
312
+ atoms.info["spin"] = 0
313
  # Model selection
314
  st.sidebar.markdown("## Model Selection")
315
  model_type = st.sidebar.radio("Select Model Type:", ["MACE", "FairChem"])
 
327
  if selected_model == "UMA Small":
328
  st.sidebar.warning("Meta FAIR Acceptable Use Policy. This model was developed by the Fundamental AI Research (FAIR) team at Meta. By using it, you agree to their acceptable use policy, which prohibits using their models to violate the law or others' rights, plan or develop activities that present a risk of death or harm, and deceive or mislead others.")
329
  selected_task_type = st.sidebar.selectbox("Select UMA Model Task Type:", ["omol", "omat", "omc", "odac", "oc20"])
330
+ if selected_task_type == "omol":
331
+ charge = st.sidebar.number_input("Total Charge", min_value=-10, max_value=10, value=0)
332
+ spin_multiplicity = st.sidebar.number_input("Spin Multiplicity (2S + 1)", min_value=1, max_value=11)
333
+ # Set the total charge and spin multiplicity if using the OMol task
334
+ atoms.info["charge"] = charge
335
+ atoms.info["spin"] = spin_multiplicity
336
  # Check atom count limit
337
  if atoms is not None:
338
  check_atom_limit(atoms, selected_model)