zulissimeta commited on
Commit
4bac676
·
1 Parent(s): 98b9e26

remove incar/poscar, add extxyz

Browse files
Files changed (2) hide show
  1. app.py +7 -4
  2. simulation_scripts.py +1 -2
app.py CHANGED
@@ -12,8 +12,11 @@ from pathlib import Path
12
 
13
  import gradio as gr
14
 
15
- from simulation_scripts import (run_md_simulation, run_relaxation_simulation,
16
- validate_ase_atoms_and_login)
 
 
 
17
 
18
  DEFAULT_MOLECULAR_REPRESENTATIONS = [
19
  {
@@ -47,7 +50,7 @@ DEFAULT_MOLECULAR_SETTINGS = {
47
  def main():
48
  input_structure = gr.File(
49
  label="ASE-compatible structure",
50
- file_types=[".cif", ".pdb", ".xyz", ".traj", "INCAR", "POSCAR"],
51
  height=150,
52
  value="./examples/metal_cplx.pdb",
53
  )
@@ -695,7 +698,7 @@ def main():
695
 
696
  * Note that uploaded structure will be stored by this demo to analyze model usage and identify domains where model accuracy can be improved.
697
  * If you get a redirect error when logging in, please try visiting the direct demo url in a new tab (https://facebook-fairchem-uma-demo.hf.space/) and try again
698
- * Your structure should be in a format supported by ASE 3.25, including .xyz, .cif, .pdb, ASE .traj, INCAR, or POSCAR.
699
  * Your structure should either have periodic boundary conditions (PBC) all True, or all False. Support for mixed PBC may be added in the future.
700
  """
701
  )
 
12
 
13
  import gradio as gr
14
 
15
+ from simulation_scripts import (
16
+ run_md_simulation,
17
+ run_relaxation_simulation,
18
+ validate_ase_atoms_and_login,
19
+ )
20
 
21
  DEFAULT_MOLECULAR_REPRESENTATIONS = [
22
  {
 
50
  def main():
51
  input_structure = gr.File(
52
  label="ASE-compatible structure",
53
+ file_types=[".cif", ".pdb", ".extxyz", ".xyz", ".traj"],
54
  height=150,
55
  value="./examples/metal_cplx.pdb",
56
  )
 
698
 
699
  * Note that uploaded structure will be stored by this demo to analyze model usage and identify domains where model accuracy can be improved.
700
  * If you get a redirect error when logging in, please try visiting the direct demo url in a new tab (https://facebook-fairchem-uma-demo.hf.space/) and try again
701
+ * Your structure should be in a format supported by ASE 3.25, including .xyz, .extxyz, .cif, .pdb, or ASE .traj.
702
  * Your structure should either have periodic boundary conditions (PBC) all True, or all False. Support for mixed PBC may be added in the future.
703
  """
704
  )
simulation_scripts.py CHANGED
@@ -86,8 +86,7 @@ def validate_ase_atoms_and_login(
86
  f"Structure file contains {len(atoms)}, which is more than {MAX_ATOMS} atoms. Please use a smaller structure for this demo, or run this on a local machine!",
87
  )
88
  elif (hash_file(structure_file) not in EXAMPLE_FILE_HASHES) and (
89
- ("Logout" not in login_button_value)
90
- or not validate_uma_access(oauth_token=oauth_token)
91
  ):
92
  return (
93
  gr.Button(interactive=False),
 
86
  f"Structure file contains {len(atoms)}, which is more than {MAX_ATOMS} atoms. Please use a smaller structure for this demo, or run this on a local machine!",
87
  )
88
  elif (hash_file(structure_file) not in EXAMPLE_FILE_HASHES) and (
89
+ (oauth_token is None) or not validate_uma_access(oauth_token=oauth_token)
 
90
  ):
91
  return (
92
  gr.Button(interactive=False),