Skip to content

Commit

Permalink
Fixing the question number 3 and the lattice parameter of the SC lattice
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannipizzi committed Feb 5, 2024
1 parent b995030 commit d843a6e
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions notebook/band-theory/free_electron.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
" As the free-electron model neglects the effect of the ionic potential on the electrons, material properties which are primarily dependent on the kinetic energy of the conduction electrons are those which shall be best described by the model.\n",
" </details> \n",
" </li>\n",
" <li> Look at the bandstructure plots for different crystal structures by toggling the \"Cell type\" radio buttons. Why is the bandstructure associated with the BCC crystal structure much denser than that of the simple cubic cell (i.e., why is there so many more bands in the energy range considered for BCC compared to SC).\n",
" <li> Consider the simple cubic lattice, and consider the lowest energy band from Γ to the X point, from Γ to the R point, and from Γ to the M point. The curvature of those bands seem to be the same. Is this to be expected? What about the Γ-L, Γ-X, and Γ-K in the FCC case? Or the Γ-H, Γ-N, and Γ-P in the BCC case?\n",
" <details>\n",
" <summary style=\"color: red\">Solution</summary>\n",
" Recalling that the energy eigenvalues are given by $\\large E = \\frac{\\hbar^2(\\vec{k}+\\vec{G})^2}{2m}$, we can see that the origin of the increased density of bands for BCC is due to its Brillouin zone giving rise to a larger number of G-vectors with small magnitudes. This in turn increases the number of low-lying energy bands.\n",
" For a free electron case, the bands are isotropic (i.e., they are the same, independent of the direction in k space), and the effective mass is just the free-electron mass: $m^*=m_0$. Therefore, we expect all curvatures (of the lowest energy band starting from Γ) to be the same.\n",
" </details> \n",
" </li>\n",
"</ol>\n",
Expand All @@ -80,7 +80,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -97,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -121,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -168,12 +168,21 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def get_bands(real_lattice_bohr, reference_distance = 0.025, g_vectors_range = 3):\n",
"\n",
"def get_bands(real_lattice_bohr, reference_distance = 0.025, g_vectors_range = 2):\n",
" \"\"\"Function to return the band structure of a free-electron model.\n",
" \n",
" :param real_lattice_bohr: 3x3 lattice vectors of the crystal, in bohr\n",
" :param reference_distance: distance between consecutive k-points in the band structure.\n",
" :param g_vectors_range: integer indicating how many G vectors should be included\n",
" to compute the band structure. With 2, one gets all correct bands at least up to ~2.5 eV,\n",
" for the default parameters of this notebook. Increase the value if you want to inspect also\n",
" higher band energies (note that the computational time will also increase, though).\n",
" \"\"\"\n",
" \n",
" # Simple way to get automatically the band path:\n",
" # I go back to real space, just put a single atom at the origin,\n",
" # then go back with seekpath.\n",
Expand Down Expand Up @@ -215,7 +224,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -227,19 +236,19 @@
"\n",
"alat_bohr = 7.72\n",
"\n",
"lattices = np.zeros((3, 3, 3));\n",
"lattices = np.zeros((3, 3, 3))\n",
"\n",
"lattices[0] = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) * alat_bohr / 2.0;\n",
"lattices[1] = np.array([[0, 1, 1], [1, 0, 1], [1, 1, 0]]) * alat_bohr / 2.0;\n",
"lattices[2] = np.array([[-1, 1, 1], [1, -1, 1], [1, 1, -1]]) * alat_bohr / 2.0;\n",
"lattices[0] = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) * alat_bohr\n",
"lattices[1] = np.array([[0, 1, 1], [1, 0, 1], [1, 1, 0]]) * alat_bohr / 2.0\n",
"lattices[2] = np.array([[-1, 1, 1], [1, -1, 1], [1, 1, -1]]) * alat_bohr / 2.0\n",
"\n",
"real_lattice_bohr = lattices[0]\n",
"real_lattice_bohr = lattices[0] / 2 # We pick a smaller one just for visualization purposes\n",
"bz = BZVisualizer(real_lattice_bohr, [[0.0, 0.0, 0.0]], [1], True, height='400px')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {
"tags": []
},
Expand All @@ -264,7 +273,7 @@
" plot_bandstructure('bands')\n",
" bz.cell = real_lattice_bohr.tolist()\n",
"\n",
"cell_type.observe(on_celltype_changed, names='value');\n",
"cell_type.observe(on_celltype_changed, names='value')\n",
"\n",
"\n",
"def plot_bandstructure(c):\n",
Expand All @@ -291,7 +300,7 @@
" line, = ax.plot(segment_data['kpoints_x'], energy_band, 'k')\n",
" lbands.append(line)\n",
"\n",
" ax.set_ylim([0, 5])\n",
" ax.set_ylim([0, 2.5])\n",
" ax.yaxis.tick_right()\n",
" ax.yaxis.set_label_position(\"right\")\n",
" ax.set_ylabel('Free-electron energy (eV)')\n",
Expand All @@ -304,7 +313,7 @@
" update_bands_color('bands')\n",
" \n",
"def update_bands_color(c):\n",
" n = 3\n",
" n = 2\n",
" \n",
" shape = (nkpt.value, nkpt.value, nkpt.value)\n",
" kpts = np.dot(monkhorst_pack(shape), G).reshape(shape + (3,))\n",
Expand Down Expand Up @@ -342,13 +351,13 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8ebb0a5baa734ca5bdee2e2f3b9afe42",
"model_id": "658ff55f80314a21a48092122f1611d7",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -404,7 +413,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down

0 comments on commit d843a6e

Please sign in to comment.