{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Band Structures of Bulk Structures\n\nHere, we calculate the band structure of relaxed bulk crystal structures.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nfrom gpaw import GPAW, PW\n\nfrom ase.build import bulk\nfrom ase.dft.dos import DOS" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setting up bulk structures\n\nFor more details regarding the set-up and relaxation of bulk structures,\ncheck out the `bulk` tutorial.\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "atoms = bulk('Ag')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bulk DFT calculation\n\nFor periodic DFT calculations we should generally use a number of\nk-points which properly samples the Brillouin zone.\nMany calculators including GPAW and Aims\naccept the ``kpts`` keyword which can be a tuple such as\n``(4, 4, 4)``. In GPAW, the planewave mode\nis very well suited for smaller periodic systems.\nUsing the planewave mode, we should also set a planewave cutoff (in eV):\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "calc = GPAW(\n mode=PW(350), kpts=[8, 8, 8], txt='gpaw.bulk_Ag.txt', setups={'Ag': '11'}\n)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here we have used the ``setups`` keyword to specify that we want the\n11-electron PAW dataset instead of the default which has 17 electrons,\nmaking the calculation faster.\n\n(In principle, we should be sure to converge both kpoint sampling\nand planewave cutoff -- I.e., write a loop and try different samplings\nso we know both are good enough to accurately describe the quantity\nwe want.)\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "atoms.calc = calc\nprint(\n 'Bulk {0} potential energy = {1:.3f}eV'.format(\n atoms.get_chemical_formula(), atoms.get_potential_energy()\n )\n)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can save the ground-state into a file\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "ground_state_file = 'bulk_Ag_groundstate.gpw'\ncalc.write(ground_state_file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Density of states\n\nHaving saved the ground-state, we can reload it for ASE to extract\nthe density of states:\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "calc = GPAW(ground_state_file)\ndos = DOS(calc, npts=800, width=0)\nenergies = dos.get_energies()\nweights = dos.get_dos()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Calling the DOS class with ``width=0`` means ASE calculates the DOS using\nthe linear tetrahedron interpolation method, which takes time but gives a\nnicer representation. If the width is nonzero (e.g., 0.1 (eV)) ASE uses a\nsimple Gaussian smearing with that width, but we would need more k-points\nto get a plot of the same quality.\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "fig, ax = plt.subplots()\nax.axvline(0.0, linestyle='--', color='black', alpha=0.5)\nax.plot(energies, weights)\nax.set_xlabel('Energy - Fermi Energy (eV)')\nax.set_ylabel('Density of States (1/eV)')\nfig.tight_layout()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Time for analysis: Which parts of the spectrum do you think originate\n(mostly) from s electrons? And which parts (mostly) from d electrons?\n\nAs we probably know, the d-orbitals in a transition metal atom are\nlocalized close to the nucleus while the s-electron is much more\ndelocalized.\n\nIn bulk systems, the s-states overlap a lot and therefore split into a\nvery broad band over a wide energy range. d-states overlap much less\nand therefore also split less: They form a narrow band with a\nvery high DOS. Very high indeed because there are 10 times as\nmany d electrons as there are s electrons.\n\nSo to answer the question, the d-band accounts for most of the states\nforming the big, narrow chunk between -6.2 eV to -2.6 eV. Anything outside\nthat interval is due to the much broader s band.\n\nThe DOS above the Fermi level may not be correct, since the SCF\nconvergence criterion (in this calculation)\nonly tracks the convergenece of occupied states.\nHence, the energies over the Fermi level 0 are probably wrong.\n\n\nWhat characterizes the noble metals Cu, Ag, and Au, is that the d-band\nis fully occupied. I.e.: The whole d-band lies below the Fermi level\n(energy=0).\nIf we had calculated any other transition metal, the Fermi level would\nlie somewhere within the d-band.\n\n
We could calculate the s, p, and d-projected DOS to see more\n conclusively which states have what character.\n In that case we should look up the GPAW documentation, or other\n calculator-specific documentation. So let's not do that now.