wukevin commited on
Commit
2508b3c
1 Parent(s): 5016b27

Do not output df of angles -- this isn't very useful anyway

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -71,12 +71,16 @@ def sample_at_length(l:int, seed:int):
71
  """
72
  torch.manual_seed(seed)
73
  l = int(l)
 
 
74
  s = sampling.sample_simple("wukevin/foldingdiff_cath", n=1, sweep_lengths=(l, l+1))[0]
75
- # Create a PDB file
 
76
  outdir = os.path.join(os.getcwd(), "output")
77
  os.makedirs(outdir, exist_ok=True)
78
  pdb_file = ac.create_new_chain_nerf(os.path.join(outdir, "generated.pdb"), s)
79
- return molecule(pdb_file), pdb_file, s
 
80
 
81
  interface = gr.Interface(
82
  fn=sample_at_length,
@@ -87,7 +91,7 @@ interface = gr.Interface(
87
  outputs=[
88
  gr.HTML(),
89
  gr.File(label="Generated structure in PDB format (cartesian coordinates)"),
90
- gr.Dataframe(label="Generated angles defining structure", max_rows=8),
91
  ],
92
  )
93
  interface.launch()
 
71
  """
72
  torch.manual_seed(seed)
73
  l = int(l)
74
+
75
+ # Sample the angles
76
  s = sampling.sample_simple("wukevin/foldingdiff_cath", n=1, sweep_lengths=(l, l+1))[0]
77
+
78
+ # Create a PDB file after building out the structure in 3D coordinates
79
  outdir = os.path.join(os.getcwd(), "output")
80
  os.makedirs(outdir, exist_ok=True)
81
  pdb_file = ac.create_new_chain_nerf(os.path.join(outdir, "generated.pdb"), s)
82
+
83
+ return molecule(pdb_file), pdb_file
84
 
85
  interface = gr.Interface(
86
  fn=sample_at_length,
 
91
  outputs=[
92
  gr.HTML(),
93
  gr.File(label="Generated structure in PDB format (cartesian coordinates)"),
94
+ # gr.Dataframe(label="Generated angles defining structure", max_rows=8),
95
  ],
96
  )
97
  interface.launch()