{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "# Discussion\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Now, we will finally visualize the absorption spectra we have calculated. The script below is setup for plotting and saving the absorption spectra for BN with 24x24x1 k-points. First we load the x, y, and z components and plot all three curves in different colors.\n" ] }, { "cell_type": "code", "metadata": {}, "source": [ "#Plot the absorption spectrum:\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "plt.figure()\n", "\n", "#Of course you need to input the name you gave the files earlier own yourself and only plot the components you calculated.\n", "#Here is only showed hot to plot the x-component.\n", "\n", "absox = np.loadtxt('???_rpa_x.csv', delimiter=',')\n", "plt.plot(absox[:, 0], absox[:, 4], label='RPA_x CdTe 12x12x4', lw=2, color='b')\n", "\n", "plt.xlabel(r'$\\hbar\\omega\\;[eV]$', size=20)\n", "plt.ylabel(r'$Im(\\epsilon)$', size=20)\n", "plt.xticks(size=16)\n", "plt.yticks(size=16)\n", "plt.tight_layout()\n", "plt.axis([0.0, 10.0, None, None])\n", "plt.legend()\n", "\n", "plt.show()\n" ], "outputs": [], "execution_count": null }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Now open the saved figure and inspect the absorption spectra. Does it look as you expected? Can you guess the band gap from the absorption spectra and which of the band gaps calculated on day 2 does it match?\n", "\n", "Now plot the absorption spectra for the other k-point meshes you calculated and compare. You could for instance modify the script above to plot, in different colors, all spectra in the same plot for comparison. Would you say that the calculation is converged?\n", "\n", "Finally, talk with the other groups and compare your absorption spectra with their absorption spectra. Is the same number of k-points needed to obtain same degree of convergence for the different materials? Is there any difference for the 2D material (Boron-Nitride)?\n", "\n", "For a more realistic description one would have to include excitonic effects (i.e. the electron-hole interaction). As an outlook you might consider reading:\n", "https://wiki.fysik.dtu.dk/gpaw/documentation/bse/bse.html\n" ] } ], "metadata": { "kernelspec": { "display_name": "CAMD2022", "language": "python", "name": "camd2022" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.1" } }, "nbformat": 4, "nbformat_minor": 1 }