Skip to content

Commit

Permalink
deploy: 1af8153
Browse files Browse the repository at this point in the history
  • Loading branch information
dou-du committed Jun 6, 2024
1 parent 24bd079 commit f22f9c9
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 163 deletions.
30 changes: 8 additions & 22 deletions _sources/widgets/widget_bandsplot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"tags": []
},
Expand All @@ -94,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"tags": []
},
Expand All @@ -112,28 +112,13 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b88eb5973a3f44f1886b173bde431f1d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"BandsPlotWidget(bands=[{'label': '', 'path': [['GAMMA', 'X'], ['X', 'U'], ['K', 'GAMMA'], ['GAMMA', 'L'], ['L'…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"w1 = BandsPlotWidget(\n",
"widget = BandsPlotWidget(\n",
" bands = [si_bands],\n",
" dos = si_dos,\n",
" energy_range = [-8.0, 8.0],\n",
Expand All @@ -142,7 +127,8 @@
" \"showLegend\": True,\n",
" }\n",
")\n",
"display(w1)"
"\n",
"display(widget)"
]
},
{
Expand Down Expand Up @@ -175,7 +161,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.5"
},
"voila": {
"authors": "Dou Du and Giovanni Pizzi"
Expand Down
137 changes: 18 additions & 119 deletions _sources/widgets/widget_periodictable.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -71,24 +71,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c59bf12be17a454c89589d7b154857dc",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"PTableWidget(allElements=['H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', '…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"widget = PTableWidget(states = 3, selected_elements = {\"C\": 0, \"Si\": 1, \"Ge\": 2}, \n",
" selected_colors = ['red', 'green', 'blue'], \n",
Expand All @@ -111,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -128,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -144,20 +129,9 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['La', 'Nd']"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"widget.get_elements_by_state(0)"
]
Expand All @@ -178,24 +152,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f658caea21644cbba8d8c05a099079d5",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(Button(button_style='success', description='Get the currently selected values', layout=Layout(w…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"output = widgets.Output()\n",
"\n",
Expand Down Expand Up @@ -225,24 +184,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1b169901f3fd42b59182d7772e0f0384",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Checkbox(value=False, description='Disable oxygen')"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"toggle_disabled = widgets.Checkbox(\n",
" value=\"O\" in widget.disabled_elements,\n",
Expand Down Expand Up @@ -277,24 +221,9 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fc3d79d12d76454a8250a602de665f81",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Checkbox(value=False, description='Freeze periodic table:')"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"toggle_freeze = widgets.Checkbox(\n",
" value= False,\n",
Expand All @@ -321,24 +250,9 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f29cb7d4e8fc49ed9aefc9e1ae8761d6",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Button(button_style='success', description='Select only Li and H (from python)', layout=Layout(width='300px'),…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"def on_set_from_python(event):\n",
" # NOTE! If you put an element which does not exist, it will stay forever in the list, but it's ignored\n",
Expand All @@ -364,24 +278,9 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b61605d0b08345f19f8344d3761b9677",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Button(button_style='success', description='Make noble gases bold', layout=Layout(width='300px'), style=Button…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"def get_noble_gases_state():\n",
" label_deactivate = \"Make noble gases bold\"\n",
Expand Down Expand Up @@ -444,7 +343,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.11.5"
},
"voila": {
"authors": "Dou Du, Casper Welzel Andersen and Giovanni Pizzi"
Expand Down
2 changes: 1 addition & 1 deletion notebooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ <h2>Code blocks and outputs<a class="headerlink" href="#code-blocks-and-outputs"
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;contextlib.ExitStack at 0x7f35f8fb9610&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;contextlib.ExitStack at 0x7f4e342a9670&gt;
</pre></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tutorial/osscar_widgets.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tutorial/trigonometric_functions.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions widgets/osscar_widgets.html

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions widgets/widget_bandsplot.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions widgets/widget_periodictable.html

Large diffs are not rendered by default.

0 comments on commit f22f9c9

Please sign in to comment.