From b7146f2922bd2ac312435bc1aba13dd120f4bdfe Mon Sep 17 00:00:00 2001 From: Taylor Date: Tue, 10 Oct 2023 11:01:32 +0200 Subject: [PATCH] Minor modifications to text and widget layout. --- notebook/band-theory/density_of_states.ipynb | 48 ++++++++------------ 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/notebook/band-theory/density_of_states.ipynb b/notebook/band-theory/density_of_states.ipynb index a0d6249..da657ed 100644 --- a/notebook/band-theory/density_of_states.ipynb +++ b/notebook/band-theory/density_of_states.ipynb @@ -69,10 +69,10 @@ "
\n", " Solution\n", " In the free electron model, the energy isosurface is a sphere shown in \n", - " the left panel. The kpoints grid must be larger than the energy \n", + " the left panel. The k-points grid must be larger than the energy \n", " isosurface to obtain the correct DOS at the energy level. Here, we \n", - " have a fixed length of the kpoints grid. When the energy is larger than \n", - " about 0.31, the kpoints grid cannot include the whole sphere (check it by \n", + " have a fixed length of the k-points grid. When the energy is larger than \n", + " about 0.31, the k-points grid cannot include the whole sphere (check it by \n", " clicking on the right panel to move the isovalue above and below 0.31). \n", "
\n", " \n", @@ -96,17 +96,9 @@ }, { "cell_type": "code", - "execution_count": 170, + "execution_count": 19, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "DEBUG:matplotlib.pyplot:Loaded backend module://ipympl.backend_nbagg version unknown.\n" - ] - } - ], + "outputs": [], "source": [ "import numpy as np\n", "import seekpath\n", @@ -131,7 +123,7 @@ }, { "cell_type": "code", - "execution_count": 171, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -149,7 +141,7 @@ }, { "cell_type": "code", - "execution_count": 172, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -170,7 +162,7 @@ }, { "cell_type": "code", - "execution_count": 173, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -227,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 174, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -245,7 +237,7 @@ }, { "cell_type": "code", - "execution_count": 175, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -257,7 +249,7 @@ "cell_type = RadioButtons(options=['Simple cubic', 'FCC', 'BCC'], value='Simple cubic', description=\"Cell type:\")\n", "\n", "line1 = Label(\n", - " value=r'Number of kpoints per dimension, $N_k$'\n", + " value=r'Number of k-points per dimension, $N_k$'\n", ")\n", "\n", "line2 = Label(\n", @@ -266,7 +258,7 @@ "nkpt = IntSlider(value=4, min=4, max=15, description=\"\", style={'description_width': 'initial'}, continuous_update=False)\n", "nkpt_box = HBox([VBox([line1, line2]), nkpt])\n", "\n", - "# nkpt = IntSlider(value=4, min=4, max=15,description=\"Number of kpoints per dimension\\n, $N_k$\" , display='flex',\n", + "# nkpt = IntSlider(value=4, min=4, max=15,description=\"Number of kpoik-pointsnts per dimension\\n, $N_k$\" , display='flex',\n", "# flex_flow='row', continuous_update=False)\n", "grange = IntSlider(value=0, min=0, max=3, description=\"G-vector range:\", style=style)\n", "grange_hint =HTML(value=f\"Note that there may be a delay while the DOS is computed for G-vectors > 0.\")\n", @@ -460,7 +452,7 @@ }, { "cell_type": "code", - "execution_count": 176, + "execution_count": 25, "metadata": { "tags": [] }, @@ -478,7 +470,7 @@ ")\n", "nkpt = IntSlider(value=4, min=4, max=15, description=\"\", style={'description_width': 'initial'}, continuous_update=False)\n", "nkpt_box = HBox([VBox([line1, line2]), nkpt])\n", - "nbin = IntSlider(value=30, min=30, max=500, description=\"Number of bins/eV (rounded):\", layout=Layout(width=\"300px\"), style={'description_width': 'initial'})\n", + "nbin = IntSlider(value=30, min=30, max=500, description=\"Number of bins:\", layout=Layout(width=\"400px\"), style={'description_width': 'initial'})\n", "gstd = FloatSlider(value=0.01, min=0.01, max=0.1, step=0.01, description=\"Gaussian $\\sigma$ (eV):\", layout=Layout(width=\"300px\"), style={'description_width': 'initial'})\n", "\n", "#All buttons\n", @@ -728,7 +720,7 @@ }, { "cell_type": "code", - "execution_count": 177, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -764,7 +756,7 @@ "\n", "\n", "def update_kpts_fig(c):\n", - " \"\"\"Update the kpoints plot when tuning the kpoints slider.\n", + " \"\"\"Update the k-points plot when tuning the k-points slider.\n", " \"\"\"\n", " kpts = _compute_total_kpts(G)\n", " \n", @@ -794,13 +786,13 @@ }, { "cell_type": "code", - "execution_count": 178, + "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "28af17027813409fbbffbc57dd9a625c", + "model_id": "8aff3533264641ada75d55a7b3735e85", "version_major": 2, "version_minor": 0 }, @@ -836,13 +828,13 @@ "\n", "## **Interactive figures**\n", "\n", - "The left panel shows the electronic bandstructure of a free electron gas in 3 dimensions while the right panel displays the corresponding density of states. You can choose the number of kpoints used in the computation of the DOS by manipulating the kpoints slider. \n", + "The left panel shows the electronic bandstructure of a free electron gas in 3 dimensions while the right panel displays the corresponding density of states. You can choose the number of k-points used in the computation of the DOS by manipulating the k-points slider. \n", "\n", "## **Controls**\n", "\n", "Three buttons allow one to compute the DOS with the three methods discussed \n", "earlier. The calculated DOS will appear in the figure on the right, superimposed on the analytic curve.\n", - "Computing the DOS with a large number of kpoints may take several seconds.\n", + "Computing the DOS with a large number of k-points may take several seconds.\n", "When using the simple histogramming method, you can adjust the number of bins employed by varying the \"Number of bins\" slider.\n", "For the Gaussian smearing method, you can also tune the standard \n", "deviation, $\\sigma$, of the Gaussian functions by adjusting the \"Gaussian $\\sigma$\" slider."