Skip to content

Commit

Permalink
Update download AiiDA data notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 8, 2025
1 parent 72911d9 commit 184547f
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions download.ipynb
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# AiiDAlab Quantum ESPRESSO App"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%capture\n",
"from aiida import load_profile\n",
"\n",
"# Load AiiDA profile\n",
"load_profile()"
"load_profile();"
]
},
{
Expand All @@ -31,6 +22,15 @@
"load_css(css_path=\"src/aiidalab_qe/app/static/styles\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Download AiiDA data\n",
"\n",
"It is possible to download raw data (i.e. input and output files) and/or the AiiDA archive (ready to be shared or imported into another AiiDA profile)."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -39,8 +39,10 @@
"source": [
"import urllib.parse as urlparse\n",
"\n",
"import ipywidgets as ipw\n",
"\n",
"from aiida.orm import load_node\n",
"from aiidalab_qe.app.result.utils.download_data import DownloadDataWidget\n",
"from aiidalab_qe.app.result.components.summary.download_data import DownloadDataWidget\n",
"\n",
"# Parse the primary key from the Jupyter notebook URL\n",
"url = urlparse.urlsplit(jupyter_notebook_url) # noqa F821\n",
Expand All @@ -50,8 +52,10 @@
"\n",
"node = load_node(pk)\n",
"\n",
"download_button_widget = DownloadDataWidget(workchain_node=node)\n",
"download_button_widget"
"ipw.VBox(\n",
" children=[DownloadDataWidget(workchain_node=node)],\n",
" layout=ipw.Layout(width=\"260px\"),\n",
")"
]
}
],
Expand Down

0 comments on commit 184547f

Please sign in to comment.