Skip to content

Commit 2b88ca9

Browse files
committed
last changes for the 2018 tutorial
Signed-off-by: Nick Papior <nickpapior@gmail.com>
1 parent 828c2c0 commit 2b88ca9

11 files changed

Lines changed: 43 additions & 26 deletions

File tree

TB_02/run.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@
285285
"source": [
286286
"## Exercises\n",
287287
"\n",
288-
"- 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",
289288
"- 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",
290-
"- 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?"
289+
"- 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",
290+
"- 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). "
291291
]
292292
},
293293
{

TB_06/run.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151
"metadata": {},
152152
"outputs": [],
153153
"source": [
154-
"device = device.add_vacuum(100, 0).add_vacuum(100, 1)\n",
155-
"device = device.translate( device.center(what='cell') )\n",
154+
"device = device.add_vacuum(70, 0).add_vacuum(20, 1)\n",
155+
"device = device.translate( device.center(what='cell') - device.center(what='xyz') )\n",
156156
"device.write('device.xyz')"
157157
]
158158
},
@@ -363,21 +363,21 @@
363363
],
364364
"metadata": {
365365
"kernelspec": {
366-
"display_name": "Python 2",
366+
"display_name": "Python 3",
367367
"language": "python",
368-
"name": "python2"
368+
"name": "python3"
369369
},
370370
"language_info": {
371371
"codemirror_mode": {
372372
"name": "ipython",
373-
"version": 2
373+
"version": 3
374374
},
375375
"file_extension": ".py",
376376
"mimetype": "text/x-python",
377377
"name": "python",
378378
"nbconvert_exporter": "python",
379-
"pygments_lexer": "ipython2",
380-
"version": "2.7.14"
379+
"pygments_lexer": "ipython3",
380+
"version": "3.7.1"
381381
}
382382
},
383383
"nbformat": 4,

TB_07/run.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
"device = H.geom\n",
117117
"xy = sisl.Hamiltonian(device)\n",
118118
"for ia in device:\n",
119-
" # Get all connecting elements (edges discards connections to it-self)\n",
120-
" edges = H.edges(ia)\n",
119+
" # Get all connecting elements (including it-self)\n",
120+
" edges = H.edges(ia, exclude=[])\n",
121121
" # Calculate the vector between edges and ia:\n",
122122
" # xyz[edges, :] - xyz[ia, :]\n",
123123
" Rij = device.Rij(ia, edges)\n",

TS_02/run.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"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",
9090
"```\n",
9191
"v0 = sisl.Grid.read('TS_0/ElectrostaticPotential.grid.nc')\n",
92-
"vd = (sisl.Grid.read('TS_0.5/ElectrostaticPotential.grid.nc') - v0) * sisl.unit.siesta.unit_convert('Ry', 'eV')\n",
92+
"vd = (sisl.Grid.read('TS_0.5/ElectrostaticPotential.grid.nc') - v0)\n",
9393
"``` \n",
9494
"`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",
9595
"```\n",
@@ -143,7 +143,7 @@
143143
"cell_type": "markdown",
144144
"metadata": {},
145145
"source": [
146-
"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."
146+
"**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."
147147
]
148148
},
149149
{

TS_03/run.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"Create the input required for a full TranSiesta calculation. Here you should create your first system with these settings:\n",
2121
"\n",
2222
"- A pristine bulk Carbon-chain system.\n",
23-
"- The Carbon-chain should have a bond-length of $1.5\\,\\mathrm{Ang}$\n",
23+
"- 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",
2424
"- You should decide in which direction the semi-infinite directions are.\n",
2525
"\n",
2626
"Please use the script `tselecs.sh` to create the relevant input for TranSiesta. \n",

TS_04/run.ipynb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
"outputs": [],
101101
"source": [
102102
"xy = tbt.geometry.xyz[:, :]\n",
103-
"J12 = # fill in the corresponding code here ()\n",
104-
"plt.quiver(xy[:, 0], xy[:, 1], J12[:, 0], J12[:, 1]);"
103+
"J1 = # fill in the corresponding code here ()\n",
104+
"plt.quiver(xy[:, 0], xy[:, 1], J1[:, 0], J1[:, 1]);"
105105
]
106106
},
107107
{
@@ -160,7 +160,15 @@
160160
"outputs": [],
161161
"source": [
162162
"# Read in the two different grids:\n",
163-
"grid0 = sisl.get_sile('siesta.VH').read_grid()\n",
163+
"grid0 = sisl.get_sile('siesta.VH').read_grid()"
164+
]
165+
},
166+
{
167+
"cell_type": "code",
168+
"execution_count": null,
169+
"metadata": {},
170+
"outputs": [],
171+
"source": [
164172
"no_guess = sisl.get_sile('no_guess_0.5.VH').read_grid()\n",
165173
"# Specify the geometry so we can add the atoms to the plot\n",
166174
"no_guess.set_geometry(device)\n",
@@ -240,7 +248,7 @@
240248
"# the sparse matrix may be *VERY* big).\n",
241249
"# small trick to not have the solution array twice.\n",
242250
"del grid.grid\n",
243-
"grid.grid = solve(A, b).reshape(shape[0])\n",
251+
"grid.grid = solve(A, b).reshape(shape.ravel())\n",
244252
"grid.write('V.TSV.nc')"
245253
]
246254
},

presentations/01/options.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ \subsection{fdf input}
2020
TBT.DOS.Gf true
2121
TBT.ElectronicTemperature 25. meV
2222
%block TBT.k
23-
...
23+
...
2424
%endblock
2525
\end{verbatim}
2626

presentations/01/talk.tex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
\item Danish tap water is safe to drink, don't waste money on buying expensive bottled
3232
water
3333

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

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

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

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

4545
\end{itemize}
46+
47+
\uncover<+->{
48+
\begin{center}
49+
\large
50+
sisl is \emph{not} a static code! It evolves due to comments of users, so if you
51+
have a comment/suggestion/correction, please do so!
52+
\end{center}
53+
}
4654

4755
\end{frame}
4856

presentations/03/talk.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{DTU: sisl, TBtrans and TranSiesta workshop};
99
\end{tikzpicture}}
1010

11-
\date{20. November 2018}
12-
\title{TBtrans/TranSiesta for smarties}
11+
\date{21. November 2018}
12+
\title{Introduction to TranSiesta and NEGF}
1313
\author{Nick R. Papior}
1414

1515
\begin{document}

presentations/04/talk.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
\input ../common.tex
2+
\logo{\includegraphics[angle=90,height=3cm]{villum}}
23

3-
\graphicspath{{fig/}}
4+
\graphicspath{{fig/}{../fig/}}
45

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

10-
\date{21/22. November 2018}
11+
\date{22. November 2018}
1112
\title{$N_\idxE>2$ NEGF calculations using TranSiesta}
1213
\author{Nick R. Papior}
1314

0 commit comments

Comments
 (0)