Skip to content

Commit

Permalink
bug: fixed TB_01
Browse files Browse the repository at this point in the history
  • Loading branch information
zerothi committed Apr 28, 2021
1 parent 6433df4 commit 3d3cbb6
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions TB_01/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,23 @@
"We find 8 non-zero elements, as there should be. Remark, even though we set the on-site terms to $0$, they are interpreted as non-zero elements due to explicitly setting them."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"After having setup the Hamilton, we may easily calculate the eigenvalues at any $\\mathbf k$ (in reduced coordinates $\\mathbf k\\in]-0.5:0.5]$)."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Gamma:\", H.eigh())\n",
"print(\"K:\", H.eigh(k=[2./3,1./3,0]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -204,7 +221,7 @@
"metadata": {},
"outputs": [],
"source": [
"for ia, io in H:\n",
"for ia, io in H.geometry.iter_orbitals(local=False):\n",
" # This loops over all atoms and the orbitals\n",
" # corresponding to the atom.\n",
" # In this case the geometry has one orbital per atom, hence\n",
Expand All @@ -217,7 +234,7 @@
" # Hamiltonian (H.geom)\n",
" # and use a function called `close` which returns ALL \n",
" # atomic indices within certain ranges of a given point or atom\n",
" idx = H.geom.close(ia, R = [0.1, 1.43])\n",
" idx = H.geometry.close(ia, R = [0.1, 1.43])\n",
" # the argument R has two entries:\n",
" # 0.1 and 1.43\n",
" # Each value represents a radii of a sphere.\n",
Expand Down Expand Up @@ -295,7 +312,7 @@
"band = sisl.BandStructure(H, [[0., 0.], [2./3, 1./3],\n",
" [1./2, 1./2], [1., 1.]], 301,\n",
" [r'$\\Gamma$', 'K', 'M', r'$\\Gamma$'])\n",
"eigs = band.eigh()"
"eigs = band.apply.array.eigh()"
]
},
{
Expand Down

0 comments on commit 3d3cbb6

Please sign in to comment.