Skip to content

Commit

Permalink
final check DOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dou-du committed Apr 29, 2021
1 parent e2271f0 commit cd7828b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions notebook/density_of_states.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@
"<p style=\"text-align: justify;font-size:15px\">\n",
" Finally, the third method we describe here is the\n",
" linear tetrahedron interpolation (LTI). In this method, the volume in \n",
" reciprocal space is splitted into small tetrahedra. The energy at each corner \n",
" is computed similarly to the previous case.\n",
" Typically, a regular grid is chosen also in this case, and each small volume - that typycally has a shape of a cube or, more generally, a parallelepiped - is split into tetrahedra: the image below demonstrates how to split \n",
" a cubic reciprocal space volume into six tetrahedra.\n",
" reciprocal space is split into small tetrahedra. The energy at each corner \n",
" is computed similarly to the previous case. Typically, a regular grid is chosen \n",
" also in this case, and each small volume - that typically has a shape of a cube or, \n",
" more generally, a parallelepiped - is split into tetrahedra: the image below \n",
" demonstrates how to split a cubic reciprocal space volume into six tetrahedra.\n",
"</p>\n",
"\n",
"<div class=\"container\" style=\"text-align: center; width: 500px;\">\n",
Expand All @@ -159,11 +160,12 @@
" \n",
"<p style=\"text-align: justify;font-size:15px\"> \n",
" Then, the method assumes that, within a tetrahedron, the energy behaves linearly; therefore a \n",
" linear interpolation is employed to obtain the value of the energy in any point inside the tetrahedron,\n",
" knowing the values of the energy at its fours corners.\n",
" Thanks to this, it is possible to calculate much more accurately the portion of volume of each tetrahedron that\n",
" is above or below a given energy, making the resulting DOS much more accurate than a simple histogram\n",
" obtained from the value of the energy at its four corners.\n",
" linear interpolation is employed to obtain the value of the energy in any point inside the\n",
" tetrahedron, knowing the values of the energy at its fours corners.\n",
" Thanks to this, it is possible to calculate much more accurately the portion of the \n",
" volume of each tetrahedron that is above or below a given energy, making the resulting \n",
" DOS much more accurate than a simple histogram obtained from the value of the energy at \n",
" its four corners.\n",
"</p>\n",
"\n",
"</details>"
Expand All @@ -177,7 +179,7 @@
"\n",
"<ol style=\"text-align: justify;font-size:15px\">\n",
" <li> \n",
" Investigate the number of the kpoints' influence on the results of the calculated DOS\n",
" Investigate the number of the kpoints' influence on the results of the calculated DOS.\n",
" <details style=\"color: blue\">\n",
" <summary>Hints</summary>\n",
" In the right panel, the blue line is the analytical solution for the DOS. By choosing \n",
Expand Down Expand Up @@ -430,7 +432,7 @@
" kpts = np.dot(monkhorst_pack(shape), G).reshape(shape + (3,))\n",
" eigs = _compute_dos(kpts, G, 0)\n",
" \n",
" gx = np.linspace(0, 5, 500)\n",
" gx = np.linspace(-0.03, 5, 500)\n",
" gy = 0.0*gx\n",
" \n",
" for eig in eigs.ravel():\n",
Expand Down Expand Up @@ -462,8 +464,8 @@
" analy_y = 1.0/(2.0*np.pi**2)*2.0**0.5*analy_x**0.5*(alat_bohr / 2.0)**3.0;\n",
" lanaly, = ax.plot(analy_y, analy_x, 'b', label='Analytical solution')\n",
" \n",
" ax.set_ylim([0, 0.5])\n",
" ax.set_xlim([0, analy_y.max() + 0.1])\n",
" ax.set_ylim([-0.03, 0.5])\n",
" ax.set_xlim([0, analy_y.max() + 3.1])\n",
" ax.legend(loc=1, bbox_to_anchor=(1.3, 1.0))\n",
" ax.yaxis.tick_right()\n",
" ax.yaxis.set_label_position(\"right\")\n",
Expand Down

0 comments on commit cd7828b

Please sign in to comment.