Skip to content

Commit

Permalink
last changes for the 2018 tutorial
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Nov 26, 2018
1 parent 828c2c0 commit 2b88ca9
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 26 deletions.
4 changes: 2 additions & 2 deletions TB_02/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@
"source": [
"## Exercises\n",
"\n",
"- Try and create a big graphene flake with an associated Hamiltonian 100,000 atoms. When doing this it is essential you only construct the minimal graphene flake (otherwise creating such a big Hamiltonian will take several minutes). Then use `tile` or `repeat` to expand to the big system.\n",
"- Go to `In [4]` and change `H.write('ELEC.nc')` to `H.write('ELEC.TSHS')`, then adapt `RUN.fdf` file to let the left electrode read the electronic structure from the `TSHS` file instead. Redo the calculation and check if the output is the same.\n",
"- Try and change the on-site term of _one_ of the device atoms, then redo the calculation. What is the (periodic) effect of changing the on-site for one atom?"
"- Try and change the on-site term of _one_ of the device atoms, then redo the calculation. What is the (periodic) effect of changing the on-site for one atom?\n",
"- Try and create a big graphene flake with an associated Hamiltonian 100,000 atoms. When doing this it is essential you only construct the minimal graphene flake (otherwise creating such a big Hamiltonian will take several minutes). Then use `tile` or `repeat` to expand to the big system. If you try to run transport on this device it will take forever, and may even crash. To handle such big systems you may use the fdf-flag `TBT.Atoms.Device` to limit the calculation region (advice is to *not* do the calculation). "
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions TB_06/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
"metadata": {},
"outputs": [],
"source": [
"device = device.add_vacuum(100, 0).add_vacuum(100, 1)\n",
"device = device.translate( device.center(what='cell') )\n",
"device = device.add_vacuum(70, 0).add_vacuum(20, 1)\n",
"device = device.translate( device.center(what='cell') - device.center(what='xyz') )\n",
"device.write('device.xyz')"
]
},
Expand Down Expand Up @@ -363,21 +363,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.14"
"pygments_lexer": "ipython3",
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions TB_07/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
"device = H.geom\n",
"xy = sisl.Hamiltonian(device)\n",
"for ia in device:\n",
" # Get all connecting elements (edges discards connections to it-self)\n",
" edges = H.edges(ia)\n",
" # Get all connecting elements (including it-self)\n",
" edges = H.edges(ia, exclude=[])\n",
" # Calculate the vector between edges and ia:\n",
" # xyz[edges, :] - xyz[ia, :]\n",
" Rij = device.Rij(ia, edges)\n",
Expand Down
4 changes: 2 additions & 2 deletions TS_02/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"5. An additional analysis (before going to the transport calculations) is to calculate the potential drop in the junction. In sisl this is easy:\n",
"```\n",
"v0 = sisl.Grid.read('TS_0/ElectrostaticPotential.grid.nc')\n",
"vd = (sisl.Grid.read('TS_0.5/ElectrostaticPotential.grid.nc') - v0) * sisl.unit.siesta.unit_convert('Ry', 'eV')\n",
"vd = (sisl.Grid.read('TS_0.5/ElectrostaticPotential.grid.nc') - v0)\n",
"``` \n",
"`vd` then contains the potential profile (in eV). To save it as a linear average bias file (remember transport is along first lattice vector) you can execute the following:\n",
"```\n",
Expand Down Expand Up @@ -143,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Remember to think about why applying a bias to a bulk system is wrong. If you can't immediately figure this out, try and create a longer system by replacing `device = elec.tile(3, axis=0)` with, say: `device = elec.tile(6, axis=0)` and redo the calculation for a given bias."
"**TIME**: A remark on this exercise. Think why applying a bias to a bulk system is wrong. If you can't immediately figure this out, try and create a longer system by replacing `device = elec.tile(3, axis=0)` with, say: `device = elec.tile(6, axis=0)` and redo the calculation for a given bias. Then compare the potential profiles."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion TS_03/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Create the input required for a full TranSiesta calculation. Here you should create your first system with these settings:\n",
"\n",
"- A pristine bulk Carbon-chain system.\n",
"- The Carbon-chain should have a bond-length of $1.5\\,\\mathrm{Ang}$\n",
"- The Carbon-chain should have a bond-length of $1.5\\,\\mathrm{Ang}$ and lots of vacuum in the transverse directions (to make it a chain)\n",
"- You should decide in which direction the semi-infinite directions are.\n",
"\n",
"Please use the script `tselecs.sh` to create the relevant input for TranSiesta. \n",
Expand Down
16 changes: 12 additions & 4 deletions TS_04/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
"outputs": [],
"source": [
"xy = tbt.geometry.xyz[:, :]\n",
"J12 = # fill in the corresponding code here ()\n",
"plt.quiver(xy[:, 0], xy[:, 1], J12[:, 0], J12[:, 1]);"
"J1 = # fill in the corresponding code here ()\n",
"plt.quiver(xy[:, 0], xy[:, 1], J1[:, 0], J1[:, 1]);"
]
},
{
Expand Down Expand Up @@ -160,7 +160,15 @@
"outputs": [],
"source": [
"# Read in the two different grids:\n",
"grid0 = sisl.get_sile('siesta.VH').read_grid()\n",
"grid0 = sisl.get_sile('siesta.VH').read_grid()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"no_guess = sisl.get_sile('no_guess_0.5.VH').read_grid()\n",
"# Specify the geometry so we can add the atoms to the plot\n",
"no_guess.set_geometry(device)\n",
Expand Down Expand Up @@ -240,7 +248,7 @@
"# the sparse matrix may be *VERY* big).\n",
"# small trick to not have the solution array twice.\n",
"del grid.grid\n",
"grid.grid = solve(A, b).reshape(shape[0])\n",
"grid.grid = solve(A, b).reshape(shape.ravel())\n",
"grid.write('V.TSV.nc')"
]
},
Expand Down
2 changes: 1 addition & 1 deletion presentations/01/options.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ \subsection{fdf input}
TBT.DOS.Gf true
TBT.ElectronicTemperature 25. meV
%block TBT.k
...
...
%endblock
\end{verbatim}

Expand Down
12 changes: 10 additions & 2 deletions presentations/01/talk.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
\item Danish tap water is safe to drink, don't waste money on buying expensive bottled
water

\item Start at 9 each day, sandwiches at 12 (not Friday), cake at 14/15
\item Start at 9 each day, sandwiches at 12 (no sandwiche Friday), cake at 14/15

\item Poster session Wednesday at 17:30 in 341/342, dinner at 19:00

Expand All @@ -40,9 +40,17 @@
\item Please ask questions during the workshop, you are here to learn!

\item If there are things not covered in the tutorial, please ask and I will try and
prepare a \emph{mini} tutorial for the last day.
prepare a \emph{mini} tutorial for the last day

\end{itemize}

\uncover<+->{
\begin{center}
\large
sisl is \emph{not} a static code! It evolves due to comments of users, so if you
have a comment/suggestion/correction, please do so!
\end{center}
}

\end{frame}

Expand Down
4 changes: 2 additions & 2 deletions presentations/03/talk.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{DTU: sisl, TBtrans and TranSiesta workshop};
\end{tikzpicture}}

\date{20. November 2018}
\title{TBtrans/TranSiesta for smarties}
\date{21. November 2018}
\title{Introduction to TranSiesta and NEGF}
\author{Nick R. Papior}

\begin{document}
Expand Down
5 changes: 3 additions & 2 deletions presentations/04/talk.tex
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
\input ../common.tex
\logo{\includegraphics[angle=90,height=3cm]{villum}}

\graphicspath{{fig/}}
\graphicspath{{fig/}{../fig/}}

\institute[2018, Nick R. Papior; DTU Nanotech]{\begin{tikzpicture}
\node[shape=rectangle split,rectangle split parts=2,anchor=base] at (0,0)
{DTU: sisl, TBtrans and TranSiesta workshop};
\end{tikzpicture}}

\date{21/22. November 2018}
\date{22. November 2018}
\title{$N_\idxE>2$ NEGF calculations using TranSiesta}
\author{Nick R. Papior}

Expand Down
2 changes: 1 addition & 1 deletion tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
" Create a 3rd nearest neighbour graphene model.\n",
" \n",
"- [Advanced 5](A_05/run.ipynb) \n",
" Create a chain connecting to a C$_{60}$ molecule and perform molecular projections."
" Create a chain connecting to a C$_{60}$ molecule and perform molecular transmission projections."
]
}
],
Expand Down

0 comments on commit 2b88ca9

Please sign in to comment.