|
9 | 9 | "import sisl\n", |
10 | 10 | "import numpy as np\n", |
11 | 11 | "import matplotlib.pyplot as plt\n", |
| 12 | + "\n", |
12 | 13 | "%matplotlib inline" |
13 | 14 | ] |
14 | 15 | }, |
|
38 | 39 | "outputs": [], |
39 | 40 | "source": [ |
40 | 41 | "graphene = sisl.geom.graphene(1.44)\n", |
41 | | - "graphene.write('STRUCT.fdf')\n", |
42 | | - "graphene.write('STRUCT.xyz')" |
| 42 | + "graphene.write(\"STRUCT.fdf\")\n", |
| 43 | + "graphene.write(\"STRUCT.xyz\")" |
43 | 44 | ] |
44 | 45 | }, |
45 | 46 | { |
|
55 | 56 | "metadata": {}, |
56 | 57 | "outputs": [], |
57 | 58 | "source": [ |
58 | | - "open('PDOS.fdf', 'w').write(\"\"\"\n", |
| 59 | + "open(\"PDOS.fdf\", \"w\").write(\n", |
| 60 | + " \"\"\"\n", |
59 | 61 | "# K-point sampling\n", |
60 | 62 | "%block PDOS.kgrid.MonkhorstPack\n", |
61 | 63 | " 63 0 0\n", |
|
70 | 72 | "%block Projected.DensityOfStates\n", |
71 | 73 | "-20.00 15.00 0.200 3500 eV\n", |
72 | 74 | "%endblock\n", |
73 | | - "\"\"\");" |
| 75 | + "\"\"\"\n", |
| 76 | + ")" |
74 | 77 | ] |
75 | 78 | }, |
76 | 79 | { |
|
99 | 102 | "metadata": {}, |
100 | 103 | "outputs": [], |
101 | 104 | "source": [ |
102 | | - "geometry, E, PDOS = sisl.get_sile('siesta.PDOS.xml').read_data()" |
| 105 | + "geometry, E, PDOS = sisl.get_sile(\"siesta.PDOS.xml\").read_data()" |
103 | 106 | ] |
104 | 107 | }, |
105 | 108 | { |
|
108 | 111 | "metadata": {}, |
109 | 112 | "outputs": [], |
110 | 113 | "source": [ |
111 | | - "# Examine output by printing shapes and geometry\n" |
| 114 | + "# Examine output by printing shapes and geometry" |
112 | 115 | ] |
113 | 116 | }, |
114 | 117 | { |
|
123 | 126 | "3. Figure out which orbital contributes to the Dirac cone by plotting the PDOS for all orbitals\n", |
124 | 127 | "4. Read in the Hamiltonian (as done in [S 1](../S_01/run.ipynb)) and create a Monkhorst-Pack grid as the one in Siesta input. Use this snippet to calculate the PDOS using `sisl`\n", |
125 | 128 | "\n", |
126 | | - " mp = sisl.MonkhorstPack(H, [nx, ny, 1])\n", |
127 | | - " def wrap_multiple(eigenstate):\n", |
128 | | - " DOS = eigenstate.DOS(E)\n" |
129 | | - " PDOS = eigenstate.PDOS(E)\n" |
130 | | - " return sisl.oplist([DOS, PDOS])\n", |
131 | | - " DOS, PDOS = mp.apply.average.eigenstate(wrap=wrap_multiple, eta=True)\n", |
| 129 | + " ```python\n", |
| 130 | + " mp = sisl.MonkhorstPack(H, [nx, ny, 1])\n", |
| 131 | + " def wrap_multiple(eigenstate):\n", |
| 132 | + " DOS = eigenstate.DOS(E)\n", |
| 133 | + " PDOS = eigenstate.PDOS(E)\n", |
| 134 | + " return sisl.oplist([DOS, PDOS])\n", |
| 135 | + " DOS, PDOS = mp.apply.average.eigenstate(wrap=wrap_multiple, eta=True)\n", |
| 136 | + " \n", |
| 137 | + " ```\n", |
132 | 138 | "\n", |
133 | 139 | " Search the API documentation for the `MonkhorstPack.apply.average` method and figure out what it does. Note, there are other `MonkhorstPack.apply.*` methods - these are all extremely useful when calculating many quantities of data in a Brillouin-zone object.\n", |
134 | | - "5. Compare the Siesta PDOS with sisl PDOS, why are they different? \n", |
135 | | - " *HINT*: $\\sigma$. Check the API for the `PDOS` method in the Siesta manual (https://siesta-project.org/SIESTA_MATERIAL/Docs/Manuals/siesta-4.1.5.pdf)." |
| 140 | + "5. Ensure that the `DOS` and the summed `PDOS` (use Eq. 2) are equivalent.\n", |
| 141 | + "6. Compare the Siesta PDOS with sisl PDOS, why are they different? \n", |
| 142 | + " *HINT*: $\\sigma$. Check the API for the `PDOS` method in the Siesta manual, provided via this tutorial (`../siesta.pdf`)." |
136 | 143 | ] |
137 | 144 | }, |
138 | 145 | { |
|
141 | 148 | "metadata": {}, |
142 | 149 | "outputs": [], |
143 | 150 | "source": [ |
144 | | - "plt.plot(E, PDOS.sum(0), label='DOS')\n", |
145 | | - "plt.xlabel(r'$E - E_F$ [eV]')\n", |
146 | | - "plt.ylabel(r'DOS [1/eV]')\n", |
| 151 | + "plt.plot(E, PDOS.sum(0), label=\"DOS\")\n", |
| 152 | + "plt.xlabel(r\"$E - E_F$ [eV]\")\n", |
| 153 | + "plt.ylabel(r\"DOS [1/eV]\")\n", |
147 | 154 | "\n", |
148 | 155 | "# Add more plots for individual PDOS\n", |
149 | 156 | "\n", |
|
169 | 176 | "name": "python", |
170 | 177 | "nbconvert_exporter": "python", |
171 | 178 | "pygments_lexer": "ipython3", |
172 | | - "version": "3.11.6" |
| 179 | + "version": "3.11.7" |
173 | 180 | } |
174 | 181 | }, |
175 | 182 | "nbformat": 4, |
|
0 commit comments