Skip to content

Commit

Permalink
clean up crystaltoolkit_relax_viewer.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Apr 29, 2023
1 parent 54e36c2 commit 60ddfa2
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions examples/crystaltoolkit_relax_viewer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,6 @@
"\n",
"app = JupyterDash(prevent_initial_callbacks=True, assets_folder=SETTINGS.ASSETS_PATH)\n",
"\n",
"if \"struct_layout\" not in vars():\n",
" # don't create layout twice because it causes duplicate\n",
" # ID errors when restarting Dash app in Jupyter notebook\n",
" struct_comp = ctc.StructureMoleculeComponent(\n",
" id=\"structure\", struct_or_mol=structure\n",
" )\n",
" struct_layout = struct_comp.layout()\n",
"\n",
"\n",
"step_size = max(1, len(trajectory) // 20) # ensure slider has max 20 steps\n",
"slider = dcc.Slider(\n",
" id=\"slider\", min=0, max=len(trajectory) - 1, step=step_size, updatemode=\"drag\"\n",
Expand Down Expand Up @@ -389,6 +380,8 @@
" style={\"maxWidth\": \"50%\"},\n",
")\n",
"\n",
"struct_comp = ctc.StructureMoleculeComponent(id=\"structure\", struct_or_mol=structure)\n",
"\n",
"app.layout = html.Div(\n",
" [\n",
" html.H1(\n",
Expand Down

0 comments on commit 60ddfa2

Please sign in to comment.