~nickpapior/siesta/trunk-buds-format0.92

527.1.18 by Nick Papior
Added tbtrans documentation
1
% Manual for the TBtrans program
2
%
3
% To generate the printed version:
4
%
5
% pdflatex tbtrans
6
% pdflatex tbtrans
7
% splitidx tbtrans.idx (optional if you want a split index)
8
% makeindex tbtrans    (optional if you have a current siesta.ind)
9
% pdflatex tbtrans
10
%
11
%
12
13
% Include settings appropriate for tbtrans
14
\input{tex/init.tex}
15
560.1.67 by Nick Papior
Updated the way the date is printed in the manual
16
% Set the date
17
\date{November 29, 2016}
18
527.1.18 by Nick Papior
Added tbtrans documentation
19
\begin{document}
20
527.1.20 by Nick Papior
Enabled size compilation of manual, as well as screen
21
% TITLE PAGE --------------------------------------------------------------
527.1.18 by Nick Papior
Added tbtrans documentation
22
23
\begin{titlepage}
24
25
\begin{center}
26
27
\vspace{1cm}
560.1.77 by Nick Papior
Added developer version of manual
28
\ifdeveloper
29
 {\Huge \textsc{D e v e l o p e r' s \, \, G u i d e}}
30
\else
31
 {\Huge \textsc{U s e r' s \, \, G u i d e}}
32
\fi
527.1.18 by Nick Papior
Added tbtrans documentation
33
34
\vspace{1cm}
35
\hrulefill
36
\vspace{1cm}
37
560.1.66 by Nick Papior
Stepped the manual version for 4.1-b3
38
{\Huge \textbf{T B t r a n s \, \, 4.1-b3}}
527.1.18 by Nick Papior
Added tbtrans documentation
39
40
\vspace{1cm}
41
\hrulefill
42
\vspace{0.5cm}
43
560.1.67 by Nick Papior
Updated the way the date is printed in the manual
44
{\Large \printdate}
527.1.18 by Nick Papior
Added tbtrans documentation
45
46
\vspace{1.5cm}
560.1.77 by Nick Papior
Added developer version of manual
47
{\Large \url{https://launchpad.net/siesta}}
527.1.18 by Nick Papior
Added tbtrans documentation
48
49
\end{center}
50
51
\end{titlepage}
52
53
% END TITLE PAGE --------------------------------------------------------------
54
55
\newpage
56
560.1.7 by Nick Papior
Updated tbtrans manual for the next release
57
\section*{Contributors to \tbtrans}
58
\addcontentsline{toc}{section}{Contributors to \siesta}
59
560.6.9 by Nick Papior
Updated copyright notice in tbtrans documentation
60
\tbtrans\ is Copyright \copyright\ 2016-2016 by Nick R. Papior. The
61
original \tbtrans\ code was implemented by Mads Brandbyge, Jose
560.1.7 by Nick Papior
Updated tbtrans manual for the next release
62
L. Mozos, Jeremy Taylor, Pablo Ordejon and Kurt Stokbro. The current
63
\tbtrans\ is implemented by the following contributors:
64
65
Nick R. Papior.
66
67
527.1.18 by Nick Papior
Added tbtrans documentation
68
\tableofcontents
69
70
\newpage
71
72
\section{Introduction}
73
74
\textit{This Reference Manual contains descriptions of all the input,
560.13.3 by Nick Papior
Updated manual for tbtrans
75
    output and execution features of \tbtrans, but is not a tutorial
76
    introduction to the program.}
527.1.18 by Nick Papior
Added tbtrans documentation
77
78
\tbtrans\ (Tight-Binding transport) is a generic computer program
79
which calculates transport and other physical quantities using the
80
Green function formalism. 
81
%
82
It is a stand-alone program which allows \emph{extreme} scale
83
tight-binding calculations. 
84
\begin{itemize}
85
  
86
  \item%
87
  It uses the basic non-equilibrium Green function formalism and
88
  allows extensive customizability and analysis forms.
89
90
  \item%
91
  \tbtrans\ may be given any type of local-orbital Hamiltonian and
92
  calculate transport properties of arbitrary geometries and/or number
93
  of electrodes. 
94
95
  \item%
96
  The \phtrans\ variant may be compiled to obtain thermal (phonon)
97
  transport using the same Green function formalism and \emph{all} the
98
  same functionalities as those presented in this manual.
99
100
\end{itemize}
101
560.1.19 by Nick Papior
Updated blas.f, lapack.f the documentation and Makefile, fixes 1627041
102
A list of the currently implemented features are:
527.1.18 by Nick Papior
Added tbtrans documentation
103
\begin{itemize}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
104
527.1.18 by Nick Papior
Added tbtrans documentation
105
  \item Density of states (orbital resolved)
106
  \begin{itemize}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
107
    \item Green function DOS
108
    \item Scattering DOS
527.1.18 by Nick Papior
Added tbtrans documentation
109
  \end{itemize}
110
111
  \item Hamiltonian interpolation at different voltages
112
113
  \item Selective wide-band limit of the electrode(s)
114
115
  \item Transmission eigenvalues
116
527.1.21 by Nick Papior
Added projection documentation for tbtrans
117
  \item Bulk electrode density of state and transmission (directly
118
  from the electrode Hamiltonian)
119
120
  \item Projected transmission of eigenstates
527.1.18 by Nick Papior
Added tbtrans documentation
121
122
  \item Orbital resolved ``bond-currents'' which may subsequently be
123
  analyzed to yield actual bond-currents.
124
  
125
\end{itemize}
126
127
128
\vspace{0.5cm}
129
{\large \textbf{References:} }
130
131
\begin{itemize}
132
560.1.7 by Nick Papior
Updated tbtrans manual for the next release
133
  \item%
134
  Description of the \tbtrans\ and \tsiesta\ code in the $N$ terminal
560.1.80 by Nick Papior
Updated citation for latest transiesta article
135
  generic implementation \cite{Papior2017}.
527.1.18 by Nick Papior
Added tbtrans documentation
136
560.13.3 by Nick Papior
Updated manual for tbtrans
137
  \item%
138
  \sisl\ is a data extraction utility for \tbtrans\ which enables easy
139
  access to the data stored in the output NetCDF-4 file \cite{sisl}.
140
527.1.18 by Nick Papior
Added tbtrans documentation
141
\end{itemize}
142
143
144
145
\section{Compilation}
146
147
\tbtrans\ may be compiled in the \shell{Util/TS/TBtrans} directory.
148
149
To compile \tbtrans\ simply go to the directory and type:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
150
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
151
  $ make
527.1.21 by Nick Papior
Added projection documentation for tbtrans
152
\end{shellexample}
153
%$
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
154
This will default to use the \file{arch.make} file in the \shell{Obj}
527.1.18 by Nick Papior
Added tbtrans documentation
155
directory. To use a different directory you may do:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
156
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
157
  $ make OBJDIR=AnotherObjDir
527.1.21 by Nick Papior
Added projection documentation for tbtrans
158
\end{shellexample}
159
%$
527.1.18 by Nick Papior
Added tbtrans documentation
160
161
\tbtrans\ is tightly intertwined with the \siesta\ source to reduce
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
162
code duplication.
163
164
Please see the \siesta\ manual for installing NetCDF easily.
527.1.18 by Nick Papior
Added tbtrans documentation
165
166
\subsection{The \texttt{arch.make}\ file}
167
\label{sec:arch-make}
168
527.1.21 by Nick Papior
Added projection documentation for tbtrans
169
The compilation is done using a \shell{Makefile} that is provided with
170
the code\index{Makefile}. This \shell{Makefile} will generate the
171
executable for any of several architectures, with a minimum of tuning
172
required from the user and encapsulated in a separate file called
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
173
\file{arch.make}.
527.1.18 by Nick Papior
Added tbtrans documentation
174
175
\tbtrans\ relies on the following libraries
176
\begin{description}
177
  \item[BLAS] %
178
  it is recommended to use a high-performance library
179
  (\href{https://github.com/xianyi/OpenBLAS}{OpenBLAS} or the MKL
180
  library from Intel)
181
  
182
  \begin{itemize}
183
    \item If you use your *nix distribution package manager to install
184
    BLAS you are bound to have a poor performance. Please try and use
185
    performance libraries.
186
  \end{itemize}
187
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
188
  To add BLAS to the \file{arch.make} file you need to add the
527.1.18 by Nick Papior
Added tbtrans documentation
189
  required linker flags to the \shell{LIBS} variable in the
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
190
  \file{arch.make} file.
527.1.18 by Nick Papior
Added tbtrans documentation
191
192
  Example variables
527.1.21 by Nick Papior
Added projection documentation for tbtrans
193
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
194
  # OpenBLAS:
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
195
  LIBS += -L/opt/openblas/lib -lopenblas
527.1.18 by Nick Papior
Added tbtrans documentation
196
  # or for MKL
197
  LIBS += -L/opt/intel/.../mkl/lib/intel64 -lmkl_blas95_lp64 ...
527.1.21 by Nick Papior
Added projection documentation for tbtrans
198
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
199
200
  \item[LAPACK]%
201
  it is recommended to use a high-performance library
202
  (\href{https://github.com/xianyi/OpenBLAS}{OpenBLAS}\footnote{OpenBLAS
203
      enables the inclusion of the LAPACK routines. This is advised.}
204
  or the MKL library from Intel)
205
206
  Example variables
527.1.21 by Nick Papior
Added projection documentation for tbtrans
207
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
208
  # OpenBLAS (OpenBLAS will default to build in LAPACK 3.6)
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
209
  LIBS += -L/opt/openblas/lib -lopenblas
527.1.18 by Nick Papior
Added tbtrans documentation
210
  # or for MKL
211
  LIBS += -L/opt/intel/.../mkl/lib/intel64 -lmkl_lapack95_lp64 ...
527.1.21 by Nick Papior
Added projection documentation for tbtrans
212
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
213
214
\end{description}
215
216
The above are the minimally required libraries. 
217
218
Highly encouraged libraries
219
\begin{description}
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
220
  \item[\href{https://www.unidata.ucar.edu/software/netcdf}{NetCDF}] %
527.1.18 by Nick Papior
Added tbtrans documentation
221
  Note that it should a NetCDF4 compliant compiled
222
  library\footnote{Remark that a NetCDF-3 compliant library is not
223
      sufficient for \tbtrans.}. This library is required for a
224
  multitude of advanced analysis methods such as orbital resolved DOS,
560.15.2 by Nick Papior
Updated documentation to specify that the preprocessor is not needed
225
  bond-currents, $\delta \mathbf H$, eigenstate projections, etc.
527.1.18 by Nick Papior
Added tbtrans documentation
226
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
227
  To use this library add these variables to your \file{arch.make}
527.1.18 by Nick Papior
Added tbtrans documentation
228
  file
527.1.21 by Nick Papior
Added projection documentation for tbtrans
229
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
230
  COMP_LIBS += libncdf.a
231
  FPPFLAGS += -DCDF -DNCDF -DNCDF_4
232
  LIBS += -lnetcdff -lnetcdf -lhdf5_fortran -lhdf5 -lz
527.1.21 by Nick Papior
Added projection documentation for tbtrans
233
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
234
235
  If you have compiled NetCDF4 with parallel IO you may benefit from
236
  parallel IO by adding this compilation flag:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
237
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
238
  FPPFLAGS += -DNCDF_PARALLEL
527.1.21 by Nick Papior
Added projection documentation for tbtrans
239
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
240
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
241
  To easily install \program{NetCDF} please see the installation file:
242
  \shell{Docs/install\_netcdf4.bash}.
527.1.18 by Nick Papior
Added tbtrans documentation
243
  
244
\end{description}
245
246
Importantly, \tbtrans\ is compatible with hybrid parallelism using MPI
247
and OpenMP or either of them alone. 
248
249
\paragraph{MPI}
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
250
To compile using MPI add this to your \file{arch.make} file
527.1.21 by Nick Papior
Added projection documentation for tbtrans
251
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
252
 FPPFLAGS += -DMPI
527.1.21 by Nick Papior
Added projection documentation for tbtrans
253
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
254
255
\paragraph{OpenMP}
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
256
To compile using OpenMP add this to your \file{arch.make} file
527.1.21 by Nick Papior
Added projection documentation for tbtrans
257
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
258
 FFLAGS += -fopenmp
259
 LIBS += -fopenmp
527.1.21 by Nick Papior
Added projection documentation for tbtrans
260
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
261
change the corresponding flag according to your compiler.
262
263
\paragraph{Running Hybrid parallel \tbtrans}
264
%
265
Running \tbtrans\ using hybrid parallelism is difficult due to the
266
complexity of controlling the threads and processors.
267
268
To achieve good performance one \emph{must} ensure that the threads
527.1.21 by Nick Papior
Added projection documentation for tbtrans
269
and processors are not oversubscribe and are not overlapping.
270
For instance if using OpenMPI $\ge1.8.4$ one may run \tbtrans\
271
using this command:
272
\begin{shellexample}
560.1.75 by Nick Papior
Fixed tbtrans documentation about hybrid parallel
273
 mpirun -np $((PBS_NP/OMP_NUM_THREADS)) \
527.1.18 by Nick Papior
Added tbtrans documentation
274
   -x OMP_NUM_THREADS \
275
   -x OMP_PROC_BIND=true \
560.1.75 by Nick Papior
Fixed tbtrans documentation about hybrid parallel
276
   --map-by ppr:1:socket:pe=$OMP_NUM_THREADS
527.1.21 by Nick Papior
Added projection documentation for tbtrans
277
\end{shellexample}
560.1.75 by Nick Papior
Fixed tbtrans documentation about hybrid parallel
278
where \shell{PBS\_NP} is the total number of processors,
527.1.18 by Nick Papior
Added tbtrans documentation
279
\shell{OMP\_NUM\_THREADS} is the number of threads per processor. The
560.1.75 by Nick Papior
Fixed tbtrans documentation about hybrid parallel
280
above command assumes using 1 MPI processor per socket with each
527.1.18 by Nick Papior
Added tbtrans documentation
281
socket having \shell{OMP\_NUM\_THREADS} cores.
282
283
\subsubsection{BLAS GEMM3M kernel}
284
527.1.21 by Nick Papior
Added projection documentation for tbtrans
285
Several modern BLAS implementations allow the use of GEMM3M kernels
286
for complex linear algebra. They should provide a performance
527.1.18 by Nick Papior
Added tbtrans documentation
287
enhancement for large matrices. To use these routines add this to your
560.14.1 by Nick Papior
Added scripts for installing netcdf-4 and flook libraries
288
\file{arch.make} file:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
289
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
290
  FPPFLAGS += -DUSE_GEMM3M
527.1.21 by Nick Papior
Added projection documentation for tbtrans
291
\end{shellexample}
560.15.2 by Nick Papior
Updated documentation to specify that the preprocessor is not needed
292
Note that OpenMP threaded BLAS libraries are known to fail with the
293
GEMM3M kernels. 
527.1.21 by Nick Papior
Added projection documentation for tbtrans
294
527.1.18 by Nick Papior
Added tbtrans documentation
295
296
\subsubsection{Intel MKL libraries}
297
298
The MKL libraries are very efficient, but may be difficult to obtain a
299
correct linking. Here is a short tutorial for linking the MKL BLAS and
300
LAPACK libraries correctly.
301
302
In the following assume that \shell{MKL\_ROOT} points to the root of
303
the MKL installation directory, for instance one may install MKL into
304
\shell{/opt/intel/mkl}:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
305
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
306
  MKL_ROOT = /opt/intel/mkl
527.1.21 by Nick Papior
Added projection documentation for tbtrans
307
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
308
where \shell{MKL\_ROOT/lib/intel64} contains the libraries.
309
310
The linking depends on the used compiler:
311
\begin{description}
312
313
  \item[Intel compiler] %
314
  \index{compile!Intel}
315
316
  The MKL libraries are parallelized using threads and you may also
317
  enable threads in \tbtrans:
318
  \begin{description}
319
    \item[No threading] \mbox{}%
320
527.1.21 by Nick Papior
Added projection documentation for tbtrans
321
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
322
  LIBS += -L$(MKL_ROOT)/lib/intel64 -lmkl_lapack95_lp64
323
  -lmkl_blas95_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
527.1.21 by Nick Papior
Added projection documentation for tbtrans
324
\end{shellexample}
325
%$
527.1.18 by Nick Papior
Added tbtrans documentation
326
    \item[OpenMP threading] \mbox{}%
327
    \index{OpenMP!Intel}
328
527.1.21 by Nick Papior
Added projection documentation for tbtrans
329
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
330
  LIBS += -openmp -L$(MKL_ROOT)/lib/intel64 -lmkl_lapack95_lp64
331
  -lmkl_blas95_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread
527.1.21 by Nick Papior
Added projection documentation for tbtrans
332
\end{shellexample}
333
  %$  
527.1.18 by Nick Papior
Added tbtrans documentation
334
  \end{description}
335
336
  \item[GNU compiler] %
337
  \index{compile!GNU}
338
  The MKL libraries are parallelized using threads and you may also
339
  enable threads in \tbtrans:
340
  \begin{description}
341
    \item[No threading] \mbox{}%
342
527.1.21 by Nick Papior
Added projection documentation for tbtrans
343
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
344
  LIBS += -L$(MKL_ROOT)/lib/intel64 -lmkl_lapack95_lp64
345
  -lmkl_blas95_lp64 -lmkl_gf_lp64 -lmkl_core -lmkl_sequential
527.1.21 by Nick Papior
Added projection documentation for tbtrans
346
\end{shellexample}
347
%$
527.1.18 by Nick Papior
Added tbtrans documentation
348
    \item[OpenMP threading] \mbox{}%
349
    \index{OpenMP!GNU}
350
527.1.21 by Nick Papior
Added projection documentation for tbtrans
351
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
352
  LIBS += -fopenmp -L$(MKL_ROOT)/lib/intel64 -lmkl_lapack95_lp64
353
  -lmkl_blas95_lp64 -lmkl_gf_lp64 -lmkl_core -lmkl_gnu_thread
527.1.21 by Nick Papior
Added projection documentation for tbtrans
354
\end{shellexample}
355
  %$  
527.1.18 by Nick Papior
Added tbtrans documentation
356
  \end{description}
357
  
358
\end{description}
359
360
\section{Execution of the Program}
361
362
\tbtrans\ should be called with an input file which defines what
363
\emph{it should do}. This may either be piped or simply added on the
364
input line. The latter method is preferred as one may use flags for
365
the executable.
527.1.21 by Nick Papior
Added projection documentation for tbtrans
366
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
367
  $ tbtrans < RUN.fdf
368
  $ tbtrans RUN.fdf
527.1.21 by Nick Papior
Added projection documentation for tbtrans
369
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
370
Note that if \tbtrans\ is compiled with MPI support one may call it
371
like 
527.1.21 by Nick Papior
Added projection documentation for tbtrans
372
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
373
  $ mpirun -np 4 tbtrans RUN.fdf
527.1.21 by Nick Papior
Added projection documentation for tbtrans
374
\end{shellexample}
375
%$
527.1.18 by Nick Papior
Added tbtrans documentation
376
for $4$ MPI-processors.
377
378
\tbtrans\ has these optional flags:
379
\begin{description}
380
  \item[\fdf*{-h}] print a help instruction
381
382
  \item[\fdf*{-L}] override \fdf{SystemLabel} flag
383
384
  \item[\fdf*{-V}] override \fdf{TBT.Voltage} flag. To denote the
385
  unit do as this example: \fdf*{-V 0.2:eV} which sets the voltage to $0.2\,\mathrm{eV}$.
386
387
  \item[\fdf*{-D}] override \fdf{TBT.Directory} flag, all output
388
  of \tbtrans\ will be put in the corresponding folder (it will be
389
  created if non-existing)
390
391
  \item[\fdf*{-HS}] specify the \fdf{TBT.HS} variable, quickly
392
  override the used Hamiltonian
393
394
  \item[\fdf*{-fdf}] specify any given fdf flag on the command line,
395
  example \fdf*{-fdf TBT.Voltage:0.2:eV}
396
397
\end{description}
398
Note that for all flags one may use ``:'' as a replacement for `` '',
399
although one may use quotation marks when having a space in the argument.
400
401
402
403
\section{fdf-flags}
404
405
406
Although \tbtrans\ is a fully independent Green function transport
407
code, it is hard-wired with the \tsiesta\ \fdflib\ flags and
408
options. If you are familiar with \tsiesta\ and its input flags, then
409
the use of \tbtrans\ should be easy.
410
411
All fdf-flags for \tbtrans\ are defaulted to their equivalent
412
\tsiesta\ flag. Thus if you are using \tsiesta\ as a back-end you
413
should generally not change any flags. For instance \fdf{TBT.Voltage}
414
defaults to \fdf*{TS.Voltage} if not supplied.
415
416
\begin{fdfentry}{SystemLabel}[string]<siesta>
417
418
  The label defining this calculation. All relevant output will be
419
  prefixed with the \fdf*{SystemLabel}.
420
421
  One may start several \tbtrans\ calculations in the same directory
422
  if they have different labels.
423
424
\end{fdfentry}
425
426
\begin{fdfentry}{TBT.Voltage}[energy]<$0\,\mathrm{eV}$>
427
  
428
  Define the applied bias in the scattering region. 
429
430
\end{fdfentry}
431
432
\begin{fdfentry}{TBT.Directory}[directory]<./>
433
434
  Define the output directory of files from \tbtrans. This allow
435
  execution of several \tbtrans\ instances in the same folder and
436
  writing their result to different, say, sub-folders. It is
437
  particularly useful for interpolation of Hamiltonian's and for
438
  testing purposes.
439
  
440
\end{fdfentry}
441
442
\begin{fdfentry}{TBT.Verbosity}[integer]<5>
443
444
  Specify how much information \tbtrans\ will print-out (range 0-10).
445
446
  For smaller numbers, less information will be printed, and for
447
  larger values, more information is printed.
448
  
449
\end{fdfentry}
450
451
\begin{fdfentry}{TBT.Progress}[real]<5.>
452
453
  \tbtrans\ prints out an estimated time of completion (ETA) for the
454
  calculation. By default this is printed out every 5\% of the
455
  total loops ($k$-point $\times$ energy loops). Setting this to 0
456
  will print out after every energy loop.
457
  
458
\end{fdfentry}
459
460
461
462
\subsection{Define electronic structure}
463
464
465
\begin{fdfentry}{TBT.HS}[file]<\fdf*{<SystemLabel>}.TSHS>
466
467
  Define the Hamiltonian file which contains information regarding the
468
  Hamiltonian and geometry.
469
470
\end{fdfentry}
471
472
\begin{fdfentry}{TBT.HS.Files}[block]
473
  
474
  A list of files which each contain the Hamiltonian for the same
475
  geometry at different bias'. 
476
  % 
477
  Each line has three entries, 1) the \fdf{TBT.HS} file, 2) the value
478
  of the bias applied, 3) the unit of the bias.
479
480
  \note if this is existing it will assume that you will perform an
481
  interpolation of the Hamiltonians to the corresponding bias
482
  (\fdf{TBT.Voltage}). 
483
484
\end{fdfentry}
485
486
\begin{fdfentry}{TBT.HS.Interp}[string]<spline|linear>
560.1.61 by Nick Papior
Updated documentation of tbtrans
487
  \fdfdepend{TBT.HS.Files}
527.1.18 by Nick Papior
Added tbtrans documentation
488
489
  Interpolate all files defined in \fdf{TBT.HS.Files} to the
490
  corresponding applied bias.
491
492
  Generally \fdf*{spline} produces the best interpolated values and
493
  its use is encouraged. The linear interpolation scheme is mainly
494
  used for comparison to the \fdf*{spline}. If they are very different
495
  from each other then one may be required to perform additional
496
  self-consistent calculations at the specific bias due to large
497
  changes in the electronic structure.
498
499
\end{fdfentry}
500
501
Say you have calculated the SCF solution of a certain system at 5
502
different applied bias':
503
\begin{fdfexample}
504
  %block TBT.HS.Files
505
    ../V0/siesta.TSHS     0.  eV
506
    ../V-0.5/siesta.TSHS -0.5 eV
507
    ../V0.5/siesta.TSHS   0.5 eV
508
    ../V-1.0/siesta.TSHS -1.0 eV
509
    ../V1.0/siesta.TSHS   1.0 eV
510
  %endblock
511
\end{fdfexample}
512
and you wish to calculate the interpolated transmissions and currents
513
at steps of $0.1\,\mathrm{eV}$, then you may use this simple loop
527.1.21 by Nick Papior
Added projection documentation for tbtrans
514
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
515
  for V in `seq -1.5 0.1 1.5` ; do
516
     tbtrans -V $V:eV -D V$V RUN.fdf
517
  done
527.1.21 by Nick Papior
Added projection documentation for tbtrans
518
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
519
which at each execution of \tbtrans\ interpolates the Hamiltonian to
520
the corresponding applied bias and store all output files in the
521
\shell{V\$V} folder.
522
523
\subsubsection{Changing the electronic structure via
524
    \texorpdfstring{$\delta\mathbf H$}{dH}}
525
526
The electronic structure may be altered by changing the Hamiltonian
527
elements via a simple additive term
528
\begin{equation}
529
  \mathbf H \leftarrow \mathbf H + \delta\mathbf H,
530
\end{equation}
531
which allows easy changes to the electronic structure or adding
532
additional terms such as imaginary self-energies. One may also use it
533
to add magnetic fields etc.
534
535
To use this feature at $k$ points it is important to know that phases
536
in \tbtrans\ are defined using the lattice vectors (and \emph{not}
537
inter-atomic distances)
538
\begin{equation}
539
  \mathbf H_k = \mathbf H \cdot e^{-i k \cdot \mathbf R}.
540
\end{equation}
541
542
\begin{fdfentry}{TBT.dH}[file]
543
544
  Denote a file which contains the $\delta\mathbf H$ information. This
545
  file \emph{must} adhere to these file format notations and is
546
  required to be supplied in a NetCDF4 format
547
527.1.21 by Nick Papior
Added projection documentation for tbtrans
548
  \begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
549
netcdf file.dH {
550
dimensions:
551
	one = 1 ;
552
	n_s = 9 ;
553
	xyz = 3 ;
554
	no_u = 900 ;
555
	spin = 1 ;
556
variables:
557
	int nsc(xyz) ;
558
		nsc:info = "Number of supercells in each unit-cell direction" ;
559
560
group: LEVEL-1 {
561
  dimensions:
562
  	nnzs = 2670 ;
563
  variables:
564
  	int n_col(no_u) ;
565
  		n_col:info = "Number of non-zero elements per row" ;
566
  	int list_col(nnzs) ;
567
  		list_col:info = "Supercell column indices in the sparse format" ;
568
  	int isc_off(n_s, xyz) ;
569
  		isc_off:info = "Index of supercell coordinates" ;
570
  	double RedH(spin, nnzs) ;
571
  		RedH:info = "Real part of dH" ;
572
  		RedH:unit = "Ry" ;
573
  	double ImdH(spin, nnzs) ;
574
  		ImdH:info = "Imaginary part of dH" ;
575
  		ImdH:unit = "Ry" ;
576
  } // group LEVEL-1
577
578
group: LEVEL-2 {
579
  dimensions:
580
  	nkpt = UNLIMITED ;
581
  	nnzs = 2670 ;
582
  variables:
583
  	double kpt(nkpt, xyz) ;
584
  		kpt:info = "k-points for dH values" ;
585
  		kpt:unit = "b**-1" ;
586
  	... n_col list_col isc_off ...
587
  	double dH(nkpt, spin, nnzs) ;
588
  		dH:info = "dH" ;
589
  		dH:unit = "Ry" ;
590
  } // group LEVEL-2
591
592
group: LEVEL-3 {
593
  dimensions:
594
  	ne = UNLIMITED ;
595
  	nnzs = 2670 ;
596
  variables:
597
  	double E(ne) ;
598
  		E:info = "Energy points for dH values" ;
599
  		E:unit = "Ry" ;
600
  	... n_col list_col isc_off ...
601
  	double dH(ne, spin, nnzs) ;
602
  		dH:info = "dH" ;
603
  		dH:unit = "Ry" ;
604
  } // group LEVEL-3
605
606
group: LEVEL-4 {
607
  dimensions:
608
  	nkpt = UNLIMITED ;
609
  	ne = UNLIMITED ;
610
  	nnzs = 2670 ;
611
  variables:
612
  	double kpt(nkpt, xyz) ;
613
  		kpt:info = "k-points for dH values" ;
614
  		kpt:unit = "b**-1" ;
615
  	double E(ne) ;
616
  		E:info = "Energy points for dH values" ;
617
  		E:unit = "Ry" ;
618
  	... n_col list_col isc_off ...
619
  	double dH(nkpt, ne, spin, nnzs) ;
620
  		dH:info = "dH" ;
621
  		dH:unit = "Ry" ;
622
  } // group LEVEL-4
623
}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
624
  \end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
625
626
  This example file shows how the file should be formatted. Note that
627
  one may either define the Hamiltonian as \shell{dH} or as
628
  \shell{RedH} and \shell{ImdH}. The former is defining $\delta\mathbf
629
  H$ as a real quantity while the latter makes it an imaginary
630
  $\delta\mathbf H$.
631
632
  The levels are defined because they have precedence from each other,
633
  if the energy point and $k$ point is found in LEVEL-4 it will use
634
  this, if not, it will check for the energy point in LEVEL-3, and so
635
  on. 
636
637
\end{fdfentry}
638
560.1.61 by Nick Papior
Updated documentation of tbtrans
639
The remaining options are only applicable if \fdf{TBT.dH} has been
640
set. 
641
527.1.18 by Nick Papior
Added tbtrans documentation
642
\begin{fdflogicalT}{TBT.dH!Parallel}
643
644
  Whether the $\delta\mathbf H$ file should be read in parallel. If
645
  your architecture supports parallel IO it is beneficial to do so. 
646
  %
647
  \tbtrans\ performs a basic check whether parallel IO may be
648
  possible, if it cannot assert this it will be turned off.
649
  
650
\end{fdflogicalT}
651
652
\begin{fdfentry}{TBT.dH!Algorithm}[string]<sparse|block>
653
654
  Define the algorithm for inserting the matrix elements in the
655
  Hamiltonian.
656
657
  \begin{fdfoptions}
658
659
    \option[sparse]%
660
    \fdfindex{TBT.dH!Algorithm!sparse}%
661
    The inner loop is across the sparsity pattern of $\delta\mathbf
662
    H$, thus searching in the local matrix block sparsity pattern.  
663
    
664
    This should generally perform better when the matrix blocks to
665
    insert in are relatively small. 
666
667
    \option[block]%
668
    \fdfindex{TBT.dH!Algorithm!block}%
669
    The inner loop is across the local matrix block size, thus
670
    searching in the $\delta\mathbf H$ sparsity pattern.
671
672
    This should generally perform better when the $\delta\mathbf H$
673
    sparsity pattern is nearly the same size as the original
674
    Hamiltonian sparsity pattern.
675
676
  \end{fdfoptions}
677
  
678
\end{fdfentry}
679
680
681
\subsection{Determine calculated physical quantities}
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
682
\label{sec:physical}
527.1.18 by Nick Papior
Added tbtrans documentation
683
684
\tbtrans\ can calculate a large variety of physical
685
quantities. By default it will only calculate the transmission between
686
the electrodes. Calculating as few quantities as possible will
687
increase throughput, while requesting many quantities will result in
688
much longer run-times.
689
690
You are heavily encouraged to compile \tbtrans\ with NetCDF4 support,
691
see Sec.~\ref{sec:arch-make}, as quantities will be orbital resolved. 
692
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
693
If \tbtrans\ has been compiled with NetCDF4 support, one may extract
694
the projected DOS from the \sysfile{TBT.nc} using \sisl\ (or manual
695
scripting). The calculated DOS can \emph{only} be extracted from the
696
atoms in the device region (atoms in block
697
\fdf{TBT.Atoms!Device}). Hence the \fdf{TBT.Atoms!Device} block is
698
\emph{extremely} important when conducting detailed DOS analysis. 
699
For instance if the input file has this:
700
\begin{fdfexample}
701
  %block TBT.Atoms.Device 
702
    atom [20 -- 40]
703
  %endblock
704
\end{fdfexample}
705
one may extract the PDOS on a subset of atoms using this \sisl\
706
command
707
\begin{shellexample}
708
  sdata siesta.TBT.nc --atom 20-30 --dos --ados Left --out dos_20-30.dat
709
  sdata siesta.TBT.nc --atom 20-30[1-3] --dos --ados Left --out dos_20-30_1-3.dat
710
\end{shellexample}
711
where the former is the total PDOS on atoms $20$ through $30$, and the
712
latter is the PDOS on orbitals 1, 2 and 3 on atoms $20$ through
713
$30$. It thus is extremely easy to extract different PDOS once the
714
calculation has completed. 
715
527.1.18 by Nick Papior
Added tbtrans documentation
716
\begin{fdflogicalF}{TBT.T!Bulk}
717
718
  Calculate the bulk (pristine) electrode transmission if
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
719
  \fdftrue.
720
721
  This generates \sysfile{BTRANS\_<>} and \sysfile{AVBTRANS\_<>}.
527.1.18 by Nick Papior
Added tbtrans documentation
722
  
723
  \note implicitly enables \fdf{TBT.DOS!Elecs} if \fdftrue.
724
725
\end{fdflogicalF}
726
727
\begin{fdflogicalF}{TBT.DOS!Elecs}
728
729
  Calculate the bulk (pristine) electrode DOS if
730
  \fdftrue. 
731
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
732
  This generates \sysfile{BDOS\_<>} and \sysfile{AVBDOS\_<>}.
733
527.1.18 by Nick Papior
Added tbtrans documentation
734
  \note implicitly enables \fdf{TBT.T!Bulk} if \fdftrue.
735
736
\end{fdflogicalF}
737
738
739
\begin{fdflogicalF}{TBT.DOS!Gf}
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
740
  \fdfdepend{TBT.Atoms!Device}
527.1.18 by Nick Papior
Added tbtrans documentation
741
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
742
  Calculate the DOS from the Green function on the atoms in the device
743
  region. 
527.1.18 by Nick Papior
Added tbtrans documentation
744
745
  \note this flag should only be used if there are bound states in the
746
  scattering region (or if one wish to uncover whether there are bound
747
  states). Due to internal algorithms the DOS from the Green function
748
  is computationally more demanding than using \fdf{TBT.DOS!A} an
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
749
  \fdf{TBT.DOS!A.All}.
527.1.18 by Nick Papior
Added tbtrans documentation
750
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
751
  This generates \sysfile{DOS} and \sysfile{AVDOS}.
752
560.1.2 by Nick Papior
Fixed documentation and added flook and tbtrans
753
  See \fdf{TBT.Atoms!Device.Connect}.
754
527.1.18 by Nick Papior
Added tbtrans documentation
755
\end{fdflogicalF}
756
757
\begin{fdflogicalF}{TBT.DOS!A}
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
758
  \fdfdepend{TBT.Atoms!Device}
527.1.18 by Nick Papior
Added tbtrans documentation
759
760
  Calculate the DOS from the spectral function. This will not
761
  calculate the DOS from the last electrode (last in the list
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
762
  \fdf{TBT.Elecs}), see \fdf{TBT.DOS!A.All}. 
527.1.18 by Nick Papior
Added tbtrans documentation
763
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
764
  This generates \sysfile{ADOS\_<>} and \sysfile{AVADOS\_<>}.
765
560.1.2 by Nick Papior
Fixed documentation and added flook and tbtrans
766
  See \fdf{TBT.Atoms!Device.Connect}.
767
527.1.18 by Nick Papior
Added tbtrans documentation
768
\end{fdflogicalF}
769
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
770
\begin{fdflogicalF}{TBT.DOS!A.All}
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
771
  \fdfdepend{TBT.Atoms!Device}
527.1.18 by Nick Papior
Added tbtrans documentation
772
773
  Calculate the DOS from the spectral function and do so with
774
  \emph{all} electrodes.
775
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
776
  This additionally generates \sysfile{ADOS\_<>} and
777
  \sysfile{AVADOS\_<>} for the last electrode in \fdf{TBT.Elecs}.
778
527.1.18 by Nick Papior
Added tbtrans documentation
779
  \note if \fdftrue, this implicitly sets \fdf{TBT.DOS!A} to \fdftrue.
780
781
\end{fdflogicalF}
782
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
783
Setting the flags \fdf{TBT.DOS!Gf} and \fdf{TBT.DOS!A.All} to
527.1.18 by Nick Papior
Added tbtrans documentation
784
\fdftrue\ enables the estimation of bound states in the scattering
785
region via this simple expression
786
\begin{equation}
787
  \rho_{\mathrm{bound-states}} = \rho_{\mathbf G} - 
788
  \sum_i \rho_{\mathbf A_i},
789
\end{equation}
790
where the sum is over all electrodes, $\mathbf G$ and $\mathbf A$ are
791
the Green and spectral function, respectively. Note that typically
792
$\rho_{\mathrm{bound-states}}=0$. 
793
794
\begin{fdfentry}{TBT.T!Eig}[integer]<0>
795
796
  Specify how many of the transmission eigenvalues will be
797
  calculated. 
798
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
799
  This generates \sysfile{TEIG\_<1>\_<2>} and
800
  \sysfile{AVTEIG\_<1>\_<2>}, however, only for the non-equivalent
801
  electrode combinations (\tbtrans\ intrinsically assumes
802
  time-reversal symmetry).
803
527.1.18 by Nick Papior
Added tbtrans documentation
804
  \note if you specify a number of eigenvalues above the available
805
  number of eigenvalues, \tbtrans\ will automatically truncate it to a
806
  reasonable number.
807
808
\end{fdfentry}
809
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
810
\begin{fdflogicalF}{TBT.T!All}
527.1.18 by Nick Papior
Added tbtrans documentation
811
812
  By default \tbtrans\ only calculates transmissions in \emph{one}
813
  direction because time-reversal symmetry makes $T_{ij}=T_{ji}$. If
814
  one wishes to assert this, or if time-reversal symmetry does not
815
  apply for your system, one may set this to \fdftrue\ to explicitly
816
  calculate all transmissions.
817
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
818
  This additionally generates \sysfile{TRANS\_<1>\_<2>} and
819
  \sysfile{AVTRANS\_<1>\_<2>} for all electrode combinations (and the
820
  equivalent eigenvalue files if \fdf{TBT.T!Eig} is \fdftrue.
821
527.1.18 by Nick Papior
Added tbtrans documentation
822
\end{fdflogicalF}
823
824
\begin{fdflogicalF}{TBT.T!Out}
825
  
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
826
  The total transmission out of any electrode\footnote{In
827
      $N>2$-electrode calculations one \emph{cannot} use this quantity
828
      to calculate the total current out of an electrode.} may easily
829
  be calculated using only the scattering matrix of the origin
830
  electrode and the scattering region Green function.
527.1.18 by Nick Papior
Added tbtrans documentation
831
  %
832
  This enables the calculation of these equations
833
  \begin{align}
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
834
    i\Tr[(\mathbf G - \mathbf G^\dagger)\boldsymbol \Gamma_j],
835
    \label{eq:G.Gamma}
527.1.18 by Nick Papior
Added tbtrans documentation
836
    \\
527.1.21 by Nick Papior
Added projection documentation for tbtrans
837
    \Tr[\mathbf G \boldsymbol \Gamma_j \mathbf G^\dagger\boldsymbol
838
    \Gamma_j].
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
839
    \label{eq:G.Gamma.G.Gamma}
527.1.18 by Nick Papior
Added tbtrans documentation
840
  \end{align}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
841
  The total transmission out of electrode $j$ may then be calculated
527.1.18 by Nick Papior
Added tbtrans documentation
842
  as
843
  \begin{equation}
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
844
    \label{eq:T-out}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
845
    T_j = i\Tr[(\mathbf G - \mathbf G^\dagger)\boldsymbol \Gamma_j] 
527.1.18 by Nick Papior
Added tbtrans documentation
846
    -
527.1.21 by Nick Papior
Added projection documentation for tbtrans
847
    \Tr[\mathbf G \boldsymbol \Gamma_j \mathbf G^\dagger\boldsymbol \Gamma_j].
527.1.18 by Nick Papior
Added tbtrans documentation
848
  \end{equation}
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
849
850
  This generates two sets of files: \sysfile{CORR\_<>} and
851
  \sysfile{TRANS\_<1>\_<1>} which corresponds to equations
852
  Eqs.~\eqref{eq:G.Gamma} and \eqref{eq:G.Gamma.G.Gamma},
853
  respectively. To calculate $T_j$ subtract the two files
854
  according to Eq.~\eqref{eq:T-out}.
527.1.18 by Nick Papior
Added tbtrans documentation
855
  
856
\end{fdflogicalF}
857
858
\begin{fdflogicalF}{TBT.Current!Orb}
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
859
  \fdfdepend{TBT.Atoms!Device,TBT.DOS!A}
527.1.18 by Nick Papior
Added tbtrans documentation
860
861
  Whether the orbital currents will be calculated and stored.  These
862
  will be stored in a sparse matrix format corresponding to the
863
  \siesta\ sparse format.
864
  %
865
  One may use \sisl\ to analyze this output and change into
866
  bond-currents etc.
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
867
868
  \note this requires \tbtrans\ to be compiled with NetCDF-4 support,
869
  see Sec.~\ref{sec:arch-make}.
527.1.18 by Nick Papior
Added tbtrans documentation
870
  
871
\end{fdflogicalF}
872
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
873
\begin{fdfentry}{TBT.Spin}[integer]<\nonvalue{all}>
527.1.18 by Nick Papior
Added tbtrans documentation
874
875
  If the Hamiltonian is a polarized calculation one my define the
876
  index of the spin to be calculated.
877
878
  This allows one to simultaneously calculate the spin-up and
879
  spin-down transmissions, for instance
527.1.21 by Nick Papior
Added projection documentation for tbtrans
880
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
881
  $ tbtrans -fdf TBT.Spin:1 -D UP RUN.fdf &
882
  $ tbtrans -fdf TBT.Spin:2 -D DOWN RUN.fdf &
527.1.21 by Nick Papior
Added projection documentation for tbtrans
883
\end{shellexample}
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
884
  which will create two folders \program{UP} and \program{DOWN} and
885
  output the relevant physical quantities in the respective folders.
527.1.18 by Nick Papior
Added tbtrans documentation
886
  
887
\end{fdfentry}
888
560.1.32 by Nick Papior
Enabled list setting of the k-point sampling for tbtrans
889
\begin{fdflogicalT}{TBT.Symmetry!TimeReversal}
890
891
  Whether the Hamiltonian and the calculation should use time-reversal
892
  symmetry. 
893
  Currently this only affects $\mathbf k$-point sampling calculations
894
  by not removing any symmetry $\mathbf k$-points.
895
896
  If one has $\mathbf k$-point sampling and wishes to use
897
  \fdf{TBT.Current!Orb} this should be \fdffalse.
898
  
899
\end{fdflogicalT}
900
527.1.18 by Nick Papior
Added tbtrans documentation
901
902
\subsubsection{Device region} 
903
904
The scattering region (and thus device region) is formally consisting
905
of all atoms besides the electrodes. However, when calculating the
906
transmission this choice is very inefficient. Thus to heavily increase
907
throughput one may define a smaller device region consisting of a
908
subset of atoms in the scattering region.
909
910
The choice of atoms \emph{must} separate each electrode from each
911
other. \tbtrans\ will stop if this is not enforced.
912
913
Remark that the physical quantities such as DOS, spectral DOS, orbital
914
currents may only be calculated in the selected device region. 
915
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
916
\begin{fdfentry}{TBT.Atoms!Device}[block/list]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
917
  <\nonvalue{all but electrodes}>
527.1.18 by Nick Papior
Added tbtrans documentation
918
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
919
  This flag may either be a block, or a list.
920
527.1.18 by Nick Papior
Added tbtrans documentation
921
  A block with each line denoting the atoms that consists of the
922
  device region.
923
  %
924
  \begin{fdfexample}
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
925
    %block TBT.Atoms.Device
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
926
       atom [ 10 -- 20 ]
927
       atom [ 30 -- 40 ]
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
928
    % endblock
929
    # Or equivalently as a list   
930
    TBT.Atoms.Device [10 -- 20, 30 -- 40]
527.1.18 by Nick Papior
Added tbtrans documentation
931
  \end{fdfexample}
932
  will limit the device region to atoms [10--20, 30--40].
933
  
934
\end{fdfentry}
935
560.1.2 by Nick Papior
Fixed documentation and added flook and tbtrans
936
\begin{fdflogicalF}{TBT.Atoms!Device.Connect}
937
  
938
  Whether the device region is extended such that the DOS is
939
  calculated correctly on the device defined atoms.
940
941
  \note this parameter should be set to \fdftrue\ in case accurate DOS
942
  calculations are required on the specified device atoms. 
943
944
\end{fdflogicalF}
945
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
946
\begin{fdfentry}{TBT.Atoms!Buffer}[block/list]%
527.1.18 by Nick Papior
Added tbtrans documentation
947
948
  A block with each line denoting the atoms that are disregarded in
560.1.50 by Nick Papior
Fixed tbtrans documentation and the makefile
949
  the Green function calculation.
527.1.18 by Nick Papior
Added tbtrans documentation
950
  % 
951
  For self-consistent calculations it may be required to introduce
952
  buffer atoms which are removed from the SCF cycle. In such cases
953
  these atoms should also be removed from the transport calculation.
954
  %
955
  \begin{fdfexample}
956
    %block TBT.Atoms.Buffer
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
957
       atom [ 1 -- 5 ]
527.1.18 by Nick Papior
Added tbtrans documentation
958
    %endblock
560.1.135 by Nick Papior
Enabled reading TS.Atoms.Buffer using a direct list
959
    # Or equivalently as a list   
960
    TBT.Atoms.Buffer [1 -- 5]
527.1.18 by Nick Papior
Added tbtrans documentation
961
  \end{fdfexample}
962
  will remove atoms [1--5] from the calculation.
963
  
964
\end{fdfentry}
965
966
967
\subsubsection{Brillouin zone}
968
969
\tbtrans\ allows calculating physical quantities via averaging in the
970
Brillouin zone. 
971
560.1.61 by Nick Papior
Updated documentation of tbtrans
972
\begin{fdfentry}{TBT.k}[list/block]<\nonvalue{kgrid\_Monkhorst\_Pack}>
527.1.18 by Nick Papior
Added tbtrans documentation
973
  
974
  Specify how to perform Brillouin zone integrations.
975
560.1.61 by Nick Papior
Updated documentation of tbtrans
976
  This may be given as a list like this:
977
  \begin{fdfexample}
978
    TBT.k [A B C]
979
  \end{fdfexample}
980
  where each integer corresponds to the diagonal elements of the
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
981
  Monkhorst-Pack grid. I.e. 
982
  \begin{fdfexample}
983
    TBT.k [10 10 1]
984
    %block TBT.k
985
      10  0 0 0.
986
       0 10 0 0.
987
       0  0 1 0.
988
    %endblock 
989
  \end{fdfexample}
990
  are equivalent.
991
527.1.18 by Nick Papior
Added tbtrans documentation
992
560.1.61 by Nick Papior
Updated documentation of tbtrans
993
  If you supply this flag as a block the following options are available:
527.1.18 by Nick Papior
Added tbtrans documentation
994
  \begin{fdfoptions}
995
996
    \option[path]%
997
    \fdfindex{TBT.k!path}%
998
    
999
    Define a Brillouin zone path\footnote{Much like \fdf*{BandLines}
1000
        in \siesta.} where the $k$-points are equi-spaced.
1001
    %
1002
    It may be best described using this example:
1003
    \begin{fdfexample}
1004
  path 10
1005
    from 0.  0.  0.
1006
    to   0.5 0.5 0.
1007
  path 20
1008
    from 0.25 0.25 0.
1009
    to   0.0  0.5  0.
1010
    \end{fdfexample}
1011
1012
    This will create $k$-points starting from the $\Gamma$-point and
1013
    move to the Brillouin zone boundary at [$1/2$, $1/2$, $0$] with
1014
    spacing to have 10 points.
1015
1016
    There is no requirement that the \fdf*{path}s are
1017
    connected and one may specify as many paths as wanted.
1018
1019
    \begin{fdfoptions}
1020
1021
      \option[even-path]%
1022
      It is generally advised to add this flag in the blog
1023
      (somewhere) if one wants equi-distance $k$-spacings in the
1024
      Brillouin zone. This flag sums up the total number of $k$-points
1025
      on the total path and then calculates the exact number of
1026
      required points required on each path to have the same $\delta
1027
      k$ in each path.
1028
1029
    \end{fdfoptions}
1030
1031
    \note if any one \fdf*{path} is found in the block the options
1032
    (explained below) are ignored.
1033
1034
1035
    \option[diagonal|diag]%
1036
    \fdfindex{TBT.k!diagonal}%
1037
1038
    Specify the number of $k$ points in each unit-cell direction
1039
1040
    \fdf*{diagonal 3 3 1} will use 3 $k$ points along the first and
1041
    second lattice vectors and only one along the third lattice
1042
    vector.
1043
1044
1045
    \option[displacement|displ]%
1046
    \fdfindex{TBT.k!displacement}%
1047
1048
    Specify the displacement of the Brillouin zone $k$ points along
1049
    each lattice vector. This input is similar to \fdf*{diagonal} but
1050
    requires real input.
1051
1052
    \fdf*{displacement 0.5  0.25 0.} will displace the first and
1053
    second $k$ origin to [$1/2$, $1/4$, $0$].
1054
1055
1056
    \option[size]%
1057
    \fdfindex{TBT.k!size}%
1058
1059
    This reduces the sampled Brillouin zone to only the fractional
1060
    size of each lattice vector direction.
1061
1062
    This may be used to only sample $k$-points in a reduced Brillouin
1063
    zone which for instance is useful if one wishes to sample the
1064
    Dirac point in graphene in an energy range of $-0.5\,\mathrm{eV}$
1065
    -- $0.5\,\mathrm{eV}$. 
1066
1067
    \fdf*{size 0.5 1. 1.} will reduce the sampled $k$ points along the
1068
    first reciprocal lattice to be in the range ]$-1/4$, $1/4$], while
1069
    the other directions are still sampled ]$-1/2$, $1/2$].
1070
1071
    \note expert use only.
1072
1073
    \option[list]%
1074
    \fdfindex{TBT.k!list}%
1075
1076
    Explicitly specify the sampled $k$-points and (optionally) the
1077
    associated weights.
1078
    \begin{fdfexample}
1079
  list 2
1080
    0.  0.  0.  0.5
1081
    0.5 0.5 0.
1082
    \end{fdfexample}
1083
    where the integer on the \fdf*{list} line specifies the number of
1084
    lines that contains $k$ points. Each line \emph{must} be created
1085
    with $3$ reals which define the $k$ point in units of the
1086
    reciprocal lattice vectors (]$-1/2$--$1/2$]). 
1087
1088
    An optional 4th value denote the associated weight which is
1089
    defaulted to $1/N$ where $N$ is the total number of $k$ points.
1090
1091
    \note if this is found it will neglect the other input options
1092
    (except \fdf*{path}).
1093
1094
    \option[method]%
1095
    \fdfindex{TBT.k!method}%
1096
1097
    Define how the $k$-points should be created in the Brillouin zone.
1098
1099
    Currently these options are available (\fdf*{Monkhorst-Pack} being
1100
    the default)
1101
    \begin{fdfoptions}
1102
1103
      \option[Monkhorst-Pack|MP]%
1104
      \fdfindex{TBT.k!method!Monkhorst-Pack}%
1105
1106
      Use the regular Monkhorst-Pack sampling (equi-spaced) with
1107
      simple linear weights.
1108
1109
1110
      \option[Gauss-Legendre]%
1111
      \fdfindex{TBT.k!method!Gauss-Legendre}%
1112
1113
      Use the Gauss-Legendre quadrature and weights for constructing
1114
      the $k$ points and weights. These $k$ points are not
1115
      equi-spaced and puts more weight to the $\Gamma$ point.
1116
1117
1118
      \option[Simpson-mix]%
1119
      \fdfindex{TBT.k!method!Simpson-mix}%
1120
      
1121
      Use the Newton-Cotes method (Simpson, degree 3) which uses equi-spaced
1122
      points but non-uniform weights.
1123
1124
1125
      \option[Boole-mix]%
1126
      \fdfindex{TBT.k!method!Boole-mix}%
1127
1128
      Use the Newton-Cotes method (Boole, degree 5) which uses equi-spaced
1129
      points but non-uniform weights.
1130
1131
    \end{fdfoptions}
1132
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1133
    \option[\fdfvalue{siesta-method}]%
527.1.18 by Nick Papior
Added tbtrans documentation
1134
1135
    One may also use the typical \fdf*{kgrid\_Monkhorst\_Pack} method
1136
    of input as done in \siesta. This is a $3\times3$ block such as:
1137
    \begin{fdfexample}
1138
  10  0  0 0.
1139
   0 15  0 0.
1140
   0  0  1 0.
1141
    \end{fdfexample}
1142
    which uses $10$, $15$ and $1$ $k$-points along the 1st, 2nd and
1143
    3rd reciprocal lattice vectors. And with $0$ displacement.
1144
1145
    \note it is recommended to use the \fdf*{diagonal} option unless
1146
    off-diagonal $k$ points are needed.
1147
1148
  \end{fdfoptions}
1149
  
1150
\end{fdfentry}
1151
1152
1153
\subsubsection{Energy grid}
1154
1155
The Green function is calculated at explicit energies and does not
1156
rely on diagonalization routines to retrieve the eigenspectrum. This
1157
is due to the smearing of states from the coupling with the
1158
semi-infinite electrodes.
1159
1160
It is thus important to define an energy grid for analysis of the DOS
1161
and transmission.
1162
560.1.61 by Nick Papior
Updated documentation of tbtrans
1163
\begin{fdfentry}{TBT.Contours!Eta}[energy]<$0\,\mathrm{eV}$>
527.1.18 by Nick Papior
Added tbtrans documentation
1164
  
1165
  The imaginary ($\eta$) part of the Green function in the device
1166
  region. Note that the electrodes imaginary part may be controlled
1167
  via \fdf{TBT.Elecs!Eta} and \fdf{TBT.Elec.<>!tbt.Eta}.
1168
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
1169
  This value controls the smearing of the DOS on the energy
1170
  axis. Generally will the electrode $\eta$ value contribute to a
1171
  smearing in the device region, while in certain situations an
1172
  imaginary $\eta$ is required in the device region. 
527.1.18 by Nick Papior
Added tbtrans documentation
1173
  
1174
\end{fdfentry}
1175
1176
\begin{fdfentry}{TBT.Contours}[block]
1177
1178
  Each line in this block corresponds to a specific contour.
1179
  Enabling several lines of input allows to create regions of the
1180
  energy grid which has a high density and ranges of energies with
1181
  lower density. Also it allows to bypass energy ranges where the DOS
1182
  is zero in for instance a semi-conductor.  
1183
1184
  See \fdf{TBT.Contour!<>} for details on specifying the energy contour.
1185
  
1186
\end{fdfentry}
1187
1188
\begin{fdfentry}{TBT.Contour!<>}[block]
1189
1190
  Specify a contour named \fdf*{<>} with options within the block.
1191
1192
  The names \fdf*{<>} are taken from the \fdf{TBT.Contours} block.
1193
1194
  The format of this block is made up of at least $3$ lines, in the
1195
  following order of appearance.
1196
1197
  \begin{fdfoptions}
1198
1199
    \option[from \emph{a} to \emph{b}]%
1200
    \fdfindex{TBT.Contour!<>!from}%
1201
1202
    Define the integration range on the energy axis.
1203
    Thus \emph{a} and \emph{b} are energies.
1204
1205
1206
    \option[points/delta]%
1207
    \fdfindex{TBT.Contour!<>!points}%
1208
    \fdfindex{TBT.Contour!<>!delta}%
1209
1210
    Define the number of integration points/energy separation.
1211
    If specifying the number of points an integer should be supplied.
1212
1213
    If specifying the separation between consecutive points an energy
1214
    should be supplied (e.g. \fdf*{0.01 eV}).
1215
1216
    \option[method]%
1217
    \fdfindex{TBT.Contour!<>!method}%
1218
1219
    Specify the numerical method used to conduct the integration. Here
1220
    a number of different numerical integration schemes are accessible
1221
1222
    \begin{fdfoptions}
1223
      \option[mid|mid-rule]%
1224
      Use the mid-rule for integration.
1225
1226
      \option[simpson|simpson-mix]%
1227
      Use the composite Simpson $3/8$ rule (three point Newton-Cotes).
1228
1229
      \option[boole|boole-mix]%
1230
      Use the composite Booles rule (five point Newton-Cotes).
1231
 
1232
      \option[G-legendre]%
1233
      Gauss-Legendre quadrature.
1234
1235
      \option[tanh-sinh]%
1236
      Tanh-Sinh quadrature.
1237
1238
      \note has \fdf*{opt precision <>}.
1239
1240
    \end{fdfoptions}
1241
1242
    \option[opt]%
1243
    \fdfindex{TBT.Contour!<>!opt}%
1244
1245
    Specify additional options for the \fdf*{method}. Only a selected
1246
    subset of the methods have additional options.
1247
1248
  \end{fdfoptions}
1249
1250
\end{fdfentry}
1251
1252
By default the \tbtrans\ energy grid is defined as
1253
\begin{fdfexample}
1254
  %block TBT.Contours
1255
    line
1256
  %endblock TBT.Contours
1257
  %block TBT.Contour.line
1258
     from -2. eV to 2. eV
1259
      delta 0.01 eV
1260
        method mid-rule
1261
  %endblock TBT.Contour.line
1262
\end{fdfexample}
1263
1264
1265
\subsection{Chemical potentials}
1266
1267
1268
For $N$ electrodes there will also be $N_\mu$ chemical
1269
potentials. They are defined via blocks similar to \fdf{TBT.Elecs}.
560.1.43 by Nick Papior
Fixed cell constraints and the manual regarding this
1270
If no bias is applied \tbtrans\ will default to a single chemical
1271
potential with the chemical potential in equilibrium. In this case you
1272
need not specify any chemical potentials.
527.1.18 by Nick Papior
Added tbtrans documentation
1273
560.6.16 by Nick Papior
Updated documentation about defaults in the chemical potentials
1274
By default \tbtrans\ creates a single chemical potential with the
1275
chemical potential equal to the device Fermi-level. Hence, performing
1276
non-bias calculations does not require one to specify these blocks.
1277
527.1.18 by Nick Papior
Added tbtrans documentation
1278
\begin{fdfentry}{TBT.ChemPots}[block]
1279
  
1280
  Each line denotes a new chemical potential which may is further
1281
  defined in the \fdf{TBT.ChemPot!<>} block.
1282
  
1283
\end{fdfentry}
1284
1285
\begin{fdfentry}{TBT.ChemPot!<>}[block]
1286
1287
  Each line defines a setting for the chemical potential named
1288
  \fdf*{<>}.
1289
1290
  \begin{fdfoptions}
1291
    
1292
    \option[chemical-shift|mu]%
1293
    \fdfindex{TBT.ChemPot!<>!chemical-shift}%
1294
    \fdfindex{TBT.ChemPot!<>!mu}%
1295
1296
    Define the chemical shift (an energy) for this chemical
1297
    potential. One may specify the shift in terms of the applied bias
1298
    using \fdf*{V/<integer>} instead of explicitly typing the energy.
1299
1300
    \option[ElectronicTemperature|Temp|kT]%
1301
    \fdfindex{TBT.ChemPot.<>!ElectronicTemperature}%
1302
    \fdfindex{TBT.ChemPot.<>!Temp}%
1303
    \fdfindex{TBT.ChemPot.<>!kT}%
1304
1305
    Specify the electronic temperature (as an energy or in
1306
    Kelvin). This defaults to \fdf*{TS.ElectronicTemperature}.
1307
1308
    One may specify this in units of \fdf*{TS.ElectronicTemperature} by
1309
    using the unit \fdf*{kT}.
1310
1311
  \end{fdfoptions}
1312
1313
  It is important to realize that the parameterization of the voltage
1314
  into the chemical potentials enables one to have a \emph{single}
1315
  input file which is never required to be changed, even when changing
1316
  the applied bias.
1317
1318
\end{fdfentry}
1319
1320
These options complicate the input sequence for regular $2$ electrode
1321
which is unfortunate. 
1322
1323
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
1324
527.1.18 by Nick Papior
Added tbtrans documentation
1325
\subsection{Electrode configuration}
1326
1327
The electrodes are defining the semi-infinite region that is coupled
1328
to the scattering region.
1329
1330
\tbtrans\ is a fully $N$ electrode calculator. Thus the input for such
1331
setups is rather complicated.
1332
1333
\tbtrans\ defaults to read the \tsiesta\ electrodes and as such one
1334
may replace \fdf*{TBT} by \fdf*{TS} and \tbtrans\ will still
560.1.43 by Nick Papior
Fixed cell constraints and the manual regarding this
1335
work. However, the \fdf*{TBT} has precedence. 
527.1.18 by Nick Papior
Added tbtrans documentation
1336
560.6.16 by Nick Papior
Updated documentation about defaults in the chemical potentials
1337
If there is only $1$ chemical potential all electrodes will default
1338
to use this chemical potential, thus for non-bias calculations there
1339
is no need to specify the chemical potential
1340
(\fdf{TBT.Elec.<>!chemical-potential}).  
1341
527.1.18 by Nick Papior
Added tbtrans documentation
1342
\begin{fdfentry}{TBT.Elecs}[block]
1343
1344
  Each line denote an electrode which may be queried in
1345
  \fdf{TBT.Elec.<>} for its setup.
1346
  
1347
\end{fdfentry}
1348
1349
\begin{fdfentry}{TBT.Elec.<>}[block]
1350
1351
  Each line represents a setting for electrode \fdf*{<>}.
1352
  There are a few lines that \emph{must} be present, \fdf*{HS},
560.1.43 by Nick Papior
Fixed cell constraints and the manual regarding this
1353
  \fdf*{semi-inf-dir}, \fdf*{electrode-pos}, \fdf*{chem-pot} (only if
1354
  \fdf{TBT!Voltage} is not $0$).
527.1.18 by Nick Papior
Added tbtrans documentation
1355
1356
  \begin{fdfoptions}
1357
1358
    \option[HS]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1359
    \fdfindex*{TBT!Elec.<>!HS}%
527.1.18 by Nick Papior
Added tbtrans documentation
1360
    The electronic structure information from the initial
1361
    electrode calculation. This file retains the geometrical
1362
    information as well as the Hamiltonian, overlap matrix and the
1363
    Fermi-level of the electrode.
1364
    %
1365
    This is a file-path and the electrode \sysfile{TSHS} need not be
1366
    located in the simulation folder.
1367
1368
    \tbtrans\ also reads NetCDF4 files which contain the electronic
1369
    structure. This may be created using \sisl.
1370
1371
    \option[semi-inf-direction|semi-inf-dir|semi-inf]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1372
    \fdfindex*{TBT.Elec.<>!semi-inf-direction}%
527.1.18 by Nick Papior
Added tbtrans documentation
1373
    The semi-infinite direction of the electrode with respect to the
1374
    electrode unit-cell. 
1375
1376
    \note this has nothing to do with the scattering region unit cell,
1377
    \tsiesta\ will figure out the alignment of the electrode unit-cell
1378
    and the scattering region unit-cell.
1379
1380
    \option[chemical-potential|chem-pot|mu]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1381
    \fdfindex*{TBT.Elec.<>!chemical-potential}%
527.1.18 by Nick Papior
Added tbtrans documentation
1382
    The chemical potential that is associated with this
1383
    electrode. This is a string that should be present in the
560.1.43 by Nick Papior
Fixed cell constraints and the manual regarding this
1384
    \fdf{TBT.ChemPots} block in case there is a bias applied in the
1385
    calculation. 
527.1.18 by Nick Papior
Added tbtrans documentation
1386
1387
    \option[electrode-position|elec-pos]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1388
    \fdfindex*{TBT.Elec.<>!electrode-position}%
527.1.18 by Nick Papior
Added tbtrans documentation
1389
    The index of the electrode in the scattering region.
1390
    This may be given by either \fdf*{elec-pos <idx>}, which refers to
1391
    the first atomic index of the electrode residing at index
1392
    \fdf*{<idx>}. Else the electrode position may be given via
1393
    \fdf*{elec-pos end <idx>} where the last index of the electrode
1394
    will be located at \fdf*{<idx>}.
1395
1396
    \option[used-atoms]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1397
    \fdfindex*{TBT.Elec.<>!used-atoms}%
527.1.18 by Nick Papior
Added tbtrans documentation
1398
    Number of atoms from the electrode calculation that is used in the
1399
    scattering region as electrode. This may be useful when the
1400
    periodicity of the electrodes forces extensive electrodes in the
1401
    semi-infinite direction.
1402
1403
    \note do not set this if you use all atoms in the electrode.
1404
1405
    \option[Bulk]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1406
    \fdfindex*{TBT.Elec.<>!Bulk}%
527.1.18 by Nick Papior
Added tbtrans documentation
1407
    Logical controlling whether the Hamiltonian of the electrode
1408
    region in the scattering region is enforced \emph{bulk} or whether
1409
    the Hamiltonian is taken from the scattering region elements.
1410
1411
    \option[tbt.Gf/Gf]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1412
    \fdfindex*{TBT.Elec.<>!Gf}%
527.1.18 by Nick Papior
Added tbtrans documentation
1413
    String with filename of the surface Green function data. This may
1414
    be used to place a common surface Green function file in a top
1415
    directory which may then be used in all calculations using the
1416
    same electrode and the same contour. 
1417
    %
1418
    If many calculations are performed this will heavily increase
1419
    performance at the cost of disk-space.
1420
1421
    
1422
    \option[tbt.Eta/Eta]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1423
    \fdfindex*{TBT.Elec.<>!tbt.Eta}%
527.1.18 by Nick Papior
Added tbtrans documentation
1424
    Control the imaginary part of the surface Green function for this
1425
    electrode. See \fdf{TBT.Elecs!Eta}.
1426
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1427
    \option[tbt.Accuracy/Accuracy]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1428
    \fdfindex*{TBT.Elec.<>!tbt.Accuracy}%
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1429
    Control the convergence accuracy required for the self-energy
1430
    calculation when using the Lopez-Sanchez, Lopez-Sanchez iterative
1431
    scheme.
1432
    %
1433
    See \fdf{TBT.Elecs!Accuracy}.
1434
1435
    \note advanced use \emph{only}.
1436
527.1.18 by Nick Papior
Added tbtrans documentation
1437
    \option[Bloch]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1438
    \fdfindex*{TBT.Elec.<>!Bloch}%
527.1.18 by Nick Papior
Added tbtrans documentation
1439
    $3$ integers are present on this line which each denote the number
1440
    of times bigger the scattering region electrode is compared to the
1441
    electrode, in each lattice direction. Remark that these expansion
1442
    coefficients are with regard to the electrode unit-cell.
1443
    This is denoted ``Bloch'' because it is an expansion based on
1444
    Bloch waves.
1445
1446
    \option[Bloch-A/a1|B/a2|C/a3]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1447
    \fdfindex*{TBT.Elec.<>!Bloch}%
527.1.18 by Nick Papior
Added tbtrans documentation
1448
    Specific Bloch expansions in each of the electrode unit-cell
1449
    direction. See \fdf*{Bloch} for details.
1450
1451
    \option[pre-expand]%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1452
    \fdfindex*{TBT.Elec.<>!pre-expand}%
527.1.18 by Nick Papior
Added tbtrans documentation
1453
    String denoting how the expansion of the surface Green function
1454
    file will be performed. This only affects the Green function file
1455
    if \fdf*{Bloch} is larger than 1. By default the Green function
1456
    file will contain the fully expanded surface Green function,
1457
    Hamiltonian and overlap matrices (\fdf*{all}). One may reduce the
1458
    file size by setting this to \fdf*{Green} which only expands the
1459
    surface Green function. Finally \fdf*{none} may be passed to
1460
    reduce the file size to the bare minimum. 
1461
    %
1462
    For performance reasons \fdf*{all} is preferred. 
1463
1464
    \option[tbt.out-of-core/out-of-core]%
560.1.61 by Nick Papior
Updated documentation of tbtrans
1465
    \fdfindex*{TBT.Elec.<>!tbt.out-of-core}%
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1466
    If \fdftrue\ the GF files are created which contain the surface
527.1.18 by Nick Papior
Added tbtrans documentation
1467
    Green function. Setting this to \fdftrue\ may be advantageous when
1468
    performing many calculations using the same $k$ and energy grid
1469
    using the same electrode. In those case this will heavily increase
1470
    throughput. 
1471
    % 
527.1.30 by Nick Papior
Added PEXSI reference, changed PEXSI documentation to new style
1472
    If \fdffalse\ (default) the surface Green function will be
527.1.18 by Nick Papior
Added tbtrans documentation
1473
    calculated when needed. 
1474
1475
    \note simultaneous calculations may read the same GF file.
1476
560.1.61 by Nick Papior
Updated documentation of tbtrans
1477
    \option[tbt.Gf-Reuse]%
1478
    \fdfindex*{TBT.Elec.<>!tbt.Gf-Reuse}%
1479
    \fdfdepend{TBT.Elec.<>!tbt.out-of-core}%
1480
    Logical deciding whether the surface Green function file should be
1481
    re-used or deleted.
1482
    %
1483
    If this is \fdffalse\ the surface Green function file is deleted
1484
    and re-created upon start.
1485
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
1486
    \option[tbt.check-kgrid]%
1487
    \fdfindex*{TBT.Elec.<>!tbt.check-kgrid}%
1488
    For $N$ electrode calculations the $\mathbf k$ mesh will sometimes
1489
    not be equivalent for the electrodes and the device region
1490
    calculations. However, \tbtrans\ requires that the device and
1491
    electrode $\mathbf k$ samplings are commensurate. This flag
1492
    controls whether this check is enforced. 
1493
1494
    \note only use if fully aware of the implications (for
1495
    tight-binding calculations this may safely be set to \fdffalse).
1496
527.1.18 by Nick Papior
Added tbtrans documentation
1497
  \end{fdfoptions}
1498
  
1499
\end{fdfentry}
1500
1501
There are several flags which are globally controlling the variables
1502
for the electrodes (with \fdf{TBT.Elec.<>} taking precedence).
1503
1504
\begin{fdflogicalT}{TBT.Elecs!Bulk}
1505
1506
  This globally controls how the Hamiltonian is treated in all
1507
  electrodes. 
1508
  %
1509
  See \fdf{TBT.Elec.<>!Bulk}.
1510
  
1511
\end{fdflogicalT}
1512
1513
\begin{fdfentry}{TBT.Elecs!Eta}[energy]<$10^{-4}\,\mathrm{eV}$>
1514
  
1515
  Globally control the imaginary part used for the surface Green
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
1516
  function calculation. This $\eta$ value is \emph{not} used in the
1517
  device region.
527.1.18 by Nick Papior
Added tbtrans documentation
1518
  %
1519
  See \fdf{TBT.Elec.<>!tbt.Eta}.
1520
  
1521
\end{fdfentry}
1522
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1523
\begin{fdfentry}{TBT.Elecs!Accuracy}[energy]<$10^{-13}\,\mathrm{eV}$>
1524
  
1525
  Globally control the accuracy required for convergence of the self-energy.
1526
  %
1527
  See \fdf{TBT!Elec.<>!tbt.Accuracy}.
1528
  
1529
\end{fdfentry}
1530
1531
\begin{fdflogicalF}{TBT.Elecs!Neglect.Principal}
1532
1533
  If this is \fdffalse\ \tsiesta\ dies if there are connections beyond
1534
  the principal cell.
1535
1536
  \note set this to \fdftrue\ with care, non-physical results may
558 by Nick Papior
Updated transiesta-tbtrans tests with the new settings
1537
  arise. Use at your own risk!
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1538
1539
\end{fdflogicalF}  
1540
527.1.18 by Nick Papior
Added tbtrans documentation
1541
\begin{fdflogicalF}{TBT.Elecs!Out-of-core}
1542
560.1.50 by Nick Papior
Fixed tbtrans documentation and the makefile
1543
  This enables reusing the self-energies by storing them on-disk
1544
  (\fdftrue). The surface Green function files may be large files but
1545
  heavily increases throughput if one performs several transport
1546
  calculations using the same electrodes.
1547
1548
  You are encouraged to set this to \fdftrue\ to reduce computations. 
527.1.18 by Nick Papior
Added tbtrans documentation
1549
  %
560.1.61 by Nick Papior
Updated documentation of tbtrans
1550
  See \fdf{TBT.Elec.<>!tbt.out-of-core}.
560.1.50 by Nick Papior
Fixed tbtrans documentation and the makefile
1551
1552
  Currently this option is not compatible with \fdf{TBT.T.Bulk} and
560.1.61 by Nick Papior
Updated documentation of tbtrans
1553
  \fdf{TBT.DOS.Elecs}, and the bulk transmission and bulk DOS will not
1554
  be calculated if this option is \fdftrue.
527.1.18 by Nick Papior
Added tbtrans documentation
1555
  
1556
\end{fdflogicalF}
1557
560.1.61 by Nick Papior
Updated documentation of tbtrans
1558
\begin{fdflogicalT}{TBT.Elecs!Gf.Reuse}
1559
  \fdfdepend{TBT.Elecs!Out-of-core,TBT.Elec.<>!tbt.out-of-core}
1560
  
1561
  Globally control whether the surface Green function files should
1562
  be re-used (\fdftrue) or re-created (\fdffalse).
1563
  %
1564
  See \fdf{TBT.Elec.<>!tbt.Gf-Reuse}.
1565
  
1566
\end{fdflogicalT}
1567
1568
527.1.18 by Nick Papior
Added tbtrans documentation
1569
\begin{fdfentry}{TBT!Elecs!Coord.EPS}[length]<$10^{-4}\,\mathrm{Bohr}$>
1570
1571
  When using Bloch expansion of the self-energies one may experience
1572
  difficulties in obtaining perfectly aligned electrode coordinates.
1573
1574
  This parameter controls how strict the criteria for equivalent
1575
  atomic coordinates is. If \tsiesta\ crashes due to mismatch between
1576
  the electrode atomic coordinates and the scattering region
1577
  calculation, one may increase this criteria. This should only be
1578
  done if one is sure that the atomic coordinates are almost similar
1579
  and that the difference in electronic structures of the two may be
1580
  negligible.
1581
  
1582
\end{fdfentry}
1583
1584
1585
\subsubsection{Principal layer interactions} %
1586
\index{electrode!principal layer}%
1587
1588
It is \emph{extremely} important that the electrodes only interact
1589
with one neighboring supercell due to the self-energy
1590
calculation. \tbtrans\ will print out a block as this
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1591
\begin{fdfexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1592
 <> principal cell is perfect!
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1593
\end{fdfexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1594
if the electrode is correctly setup and it only interacts with its
1595
neighboring supercell.
1596
%
1597
In case the electrode is erroneously setup, something similar to the
1598
following will be shown in the output file.
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1599
\begin{fdfexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1600
 <> principal cell is extending out with 96 elements:
1601
    Atom 1 connects with atom 3
1602
    Orbital 8 connects with orbital 26
1603
    Hamiltonian value: |H(8,6587)|@R=-2 =  0.651E-13 eV
1604
    Overlap          :  S(8,6587)|@R=-2 =   0.00    
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1605
\end{fdfexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1606
It is imperative that you have a \emph{perfect} electrode as otherwise
1607
nonphysical results will occur.
1608
1609
560.1.19 by Nick Papior
Updated blas.f, lapack.f the documentation and Makefile, fixes 1627041
1610
\subsection{Calculation settings}
1611
1612
The calculation time is currently governed by two things:
1613
\begin{enumerate}
1614
  
1615
  \item%
1616
  the size of the device region, 
1617
1618
  \item%
1619
  and by the partitioning of the block-tri-diagonal matrix.
1620
  
1621
\end{enumerate}
1622
The first may be controlled via \fdf{TBT.Atoms!Device}. If one is only
1623
interested in transmission coefficients this flag is encouraged to
1624
select the minimum number of atoms that will successfully run the
1625
calculation. Please see the flag entry for further details.
1626
1627
Secondly there is, currently, no way to determine the most optimal
1628
block-partitioning of a banded matrix and \tbtrans\ allows several
1629
algorithms to determine an optimal partitioning scheme. The following
1630
flag controls the partitioning for the device region.
1631
1632
560.13.3 by Nick Papior
Updated manual for tbtrans
1633
\begin{fdfentry}{TBT.BTD!Pivot.Device}[string]<atom-\nonvalue{first electrode}>
560.1.19 by Nick Papior
Updated blas.f, lapack.f the documentation and Makefile, fixes 1627041
1634
1635
  Decide on the partitioning for the BTD matrix. One may denote either
1636
  \fdf*{atom+} or \fdf*{orb+} as a prefix which does the analysis on
1637
  the atomic sparsity pattern or the full orbital sparsity pattern,
1638
  respectively. If neither are used it will default to \fdf*{atom+}.
1639
1640
  \begin{fdfoptions}
1641
1642
    \option[<elec-name>]%
1643
    The partitioning will be a connectivity graph starting from the
1644
    electrode denoted by the name. This name \emph{must} be found in
1645
    the \fdf{TBT!Elecs} block. 
1646
560.13.3 by Nick Papior
Updated manual for tbtrans
1647
    \note One may append an optional setting \fdf*{front} or
1648
    \fdf*{fan} which makes the connectivity graph to consider the
1649
    geometric front of the atoms. For extreme scale simulations or
1650
    tight-binding calculations with constrictions this may improve the
1651
    BTD matrix substantially because it splits the unit-cell into
1652
    segments of equal width.
1653
560.1.19 by Nick Papior
Updated blas.f, lapack.f the documentation and Makefile, fixes 1627041
1654
    \option[rev-CM] %
1655
    Use the reverse Cuthill-McKee for pivoting the matrix elements to
1656
    reduce bandwidth. One may omit \fdf*{rev-} to use the standard
1657
    Cuthill-McKee algorithm.
1658
1659
    \option[GPS] %
1660
    Use the Gibbs-Poole-Stockmeyer algorithm for reducing the
1661
    bandwidth.
1662
1663
    \option[GGPS] %
1664
    Use the generalized Gibbs-Poole-Stockmeyer algorithm for reducing
1665
    the bandwidth.
1666
1667
    \option[PCG] %
1668
    Use the perphiral connectivity graph algorithm for reducing the
1669
    bandwidth.
1670
1671
  \end{fdfoptions}
1672
1673
  Examples are
1674
  \begin{fdfexample}
1675
    TBT.BTD.Pivot.Device atom+GGPS
1676
    TBT.BTD.Pivot.Device GGPS
1677
    TBT.BTD.Pivot.Device orb+GGPS
1678
    TBT.BTD.Pivot.Device orb+PCG
1679
  \end{fdfexample}
1680
  where the first two are equivalent. The 3rd and 4th are more heavily
1681
  on analysis and will typically not improve the bandwidth reduction.
1682
1683
\end{fdfentry}
1684
527.1.18 by Nick Papior
Added tbtrans documentation
1685
560.13.3 by Nick Papior
Updated manual for tbtrans
1686
\begin{fdfentry}{TBT.BTD!Pivot.Elec.<>}[string]<atom-\nonvalue{<>}>
1687
  \fdfdepend{TBT.Atoms!Device}
1688
1689
  If \fdf{TBT.Atoms!Device} has been set to a reduced region the
1690
  electrode self-energies must be \emph{down-folded} through the atoms
1691
  not part of the device-region. In this case these down-fold regions
1692
  can also be considered a BTD matrix which may be optimized
1693
  separately from the device region BTD matrix.
1694
1695
  This option have all available options as described in
1696
  \fdf{TBT.BTD!Pivot.Device} but one will generally find the best
1697
  pivoting scheme by using the default (\fdf*{atom-<>}) which is the
1698
  atomic connectivity graph from the electrode it-self.
1699
1700
  It may be advantageous to use \fdf*{atom-<>-front} for very large
1701
  tight-binding calculations where the device region is chosen far
1702
  from this electrode and normal to the electrode-plane. 
1703
1704
\end{fdfentry}
1705
1706
527.1.18 by Nick Papior
Added tbtrans documentation
1707
\subsection{Input/Output}
1708
560.13.3 by Nick Papior
Updated manual for tbtrans
1709
\tbtrans\ IO is mainly relying on the NetCDF4 library and full
527.1.18 by Nick Papior
Added tbtrans documentation
1710
capability is only achieved if compiled with this library.
1711
1712
Several fdf-flags control how \tbtrans\ performs IO.
1713
1714
1715
\begin{fdfentry}{TBT.CDF!Precision}[string]<single|float|double>
1716
1717
  Specify the precision used for storing the quantities in the
1718
  NetCDF4.
1719
1720
  \fdf*{single} takes half the disk-space as \fdf*{double} and will
1721
  generally retain a sufficient precision of the quantities. 
1722
1723
  \fdf*{single} and \fdf*{float} are equivalent.
1724
1725
  \note all calculations are performed using \fdf*{double} so this is
1726
  \emph{only} a storage precision.
1727
  
1728
\end{fdfentry}
1729
1730
\begin{fdfentry}{TBT.CDF!DOS.Precision}[string]<{<\fdf{TBT.CDF!Precision}>}>
1731
1732
  Specify the precision used for storing DOS in NetCDF4.
1733
1734
  See \fdf{TBT.CDF!Precision}.
1735
  
1736
\end{fdfentry}
1737
1738
\begin{fdfentry}{TBT.CDF!T.Precision}[string]<{<\fdf{TBT.CDF!Precision}>}>
1739
1740
  Specify the precision used for storing transmission function in NetCDF4.
1741
1742
  See \fdf{TBT.CDF!Precision}.
1743
  
1744
\end{fdfentry}
1745
1746
\begin{fdfentry}{TBT.CDF!T.Eig.Precision}[string]<{<\fdf{TBT.CDF!Precision}>}>
1747
1748
  Specify the precision used for storing transmission eigenvalues in NetCDF4.
1749
1750
  See \fdf{TBT.CDF!Precision}.
1751
  
1752
\end{fdfentry}
1753
1754
\begin{fdfentry}{TBT.CDF!Current.Precision}[string]<{<\fdf{TBT.CDF!Precision}>}>
1755
1756
  Specify the precision used for storing orbital current in NetCDF4.
1757
1758
  See \fdf{TBT.CDF!Precision}.
1759
1760
  \note This is heavily advised to be in single precision as this may
1761
  easily use large amounts of disk-space if in double precision.
1762
  
1763
\end{fdfentry}
1764
1765
\begin{fdfentry}{TBT.CDF!Compress}[integer]<0>
1766
1767
  Specify whether the NetCDF4 files stored will be compressed. This
1768
  may heavily reduce disk-utilization at the cost of some performance.
1769
1770
  This number must be between 0 (no compression) and 9 (maximum
1771
  compression). A higher compression is more time consuming and a good
1772
  compromise between speed and compression is 3.
1773
1774
  \note one may subsequently to a \tbtrans\ compilation compress a
1775
  NetCDF4 file using:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1776
\begin{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1777
   nccopy -d 3 siesta.TBT.nc newsiesta.TBT.nc
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1778
\end{shellexample}
527.1.18 by Nick Papior
Added tbtrans documentation
1779
  
1780
\end{fdfentry}
1781
1782
\begin{fdflogicalF}{TBT.CDF!MPI}
1783
1784
  Whether the IO is performed in parallel. If using a large amount of
1785
  MPI processors this may increase performance. 
1786
1787
  \note this automatically sets the compression to 0 (one cannot
1788
  compress and perform parallel IO)
1789
1790
\end{fdflogicalF}
1791
1792
\subsubsection{Self-energy}
1793
\label{sec:self-energy}
1794
1795
\tbtrans\ enables the storage of the self-energies from the electrodes
1796
in selected regions. I.e. in a two electrode setup the self-energies
1797
may be ``down-folded'' to a region of interest (say molecule etc.) and
1798
then saved.
1799
1800
This feature enables one to easily use self-energies in Python for
1801
subsequent analysis etc. It is only available if compiled against
1802
NetCDF4. 
1803
1804
\begin{fdflogicalF}{TBT.CDF!SelfEnergy.Save}
1805
1806
  Store the self-energies of the electrodes. The self-energies are
1807
  first down-folded into the device region (see
1808
  \fdf{TBT.Atoms!Device}).
1809
1810
\end{fdflogicalF}
1811
1812
\begin{fdfentry}{TBT.CDF!SelfEnergy.Precision}[string]<{<\fdf{TBT.CDF!Precision}>}>
1813
1814
  Specify the precision used for storing the self-energies in NetCDF4.
1815
1816
  See \fdf{TBT.CDF!Precision}.
1817
1818
\end{fdfentry}
1819
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1820
\begin{fdflogicalF}{TBT.CDF!SelfEnergy.Only}
1821
  
1822
  If \fdftrue\ this will \emph{only} calculate and store the
1823
  down-folded self-energies. No physical quantities will be calculated
1824
  and \tbtrans\ will quit. 
1825
  
1826
\end{fdflogicalF}
1827
527.1.18 by Nick Papior
Added tbtrans documentation
1828
\begin{fdfentry}{TBT.CDF!SelfEnergy.Compress}[integer]%
1829
  <{<\fdf{TBT.CDF!Compress}>}>
1830
  
1831
  Specify the compression of the self-energies in NetCDF4.
1832
  
1833
  See \fdf{TBT.CDF!Compress}.
1834
  
1835
\end{fdfentry}
1836
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1837
1838
\subsubsection{Projected transmissions}
1839
1840
The transmission through a scattering region is determined by the
1841
electrodes band-structure and the energy levels for the scattering
1842
part. In for instance molecular electronics it is often useful to
1843
determine which molecular orbitals are responsible for the
1844
transmission as well as knowing their hybridization with the substrate
560.1.143 by Nick Papior
Added remark of TBT.Projs.T requirement in tbtrans.tex
1845
(electrodes).
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1846
1847
\tbtrans\ implements an advanced projection method which splits the
1848
transmission and DOS into eigenstate projectors.
1849
1850
In the following we concentrate on a $2$ terminal device while it may
1851
be used for $N$ electrode calculations. 
1852
%
1853
One important aspect of projection is that the self-energies that are
1854
to be projected \emph{must} be fully located on the projection
1855
region. \tbtrans\ will die if this is not enforced.
1856
560.1.143 by Nick Papior
Added remark of TBT.Projs.T requirement in tbtrans.tex
1857
These projections should not be confused with local DOS which may be
1858
obtained if compiled with the NetCDF4 library and via the use of
1859
\sisl, see Sec.~\ref{sec:physical}.
1860
1861
\note if the \fdf{TBT.Projs} block is defined, then the
1862
\fdf{TBT.Projs!T} block is required in the input unless
1863
\fdf{TBT.Projs!Init} is \fdftrue.
1864
560.1.65 by Nick Papior
Updated manual for tbtrans and transiesta
1865
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1866
\begin{fdfentry}{TBT.Projs}[block]
1867
1868
  List of molecular projections used:
1869
\begin{fdfexample}
1870
  %block TBT.Projs
1871
    M-L
1872
    M-R
1873
  %endblock
1874
\end{fdfexample}
1875
1876
  This tells \tbtrans\ that two projections will exist. Each
1877
  projection setup will be read in \fdf{TBT.Proj!<>}.
1878
1879
  There is no limit to the number of projection molecules.
1880
  
1881
\end{fdfentry}
1882
1883
\begin{fdfentry}{TBT.Proj!<>}[block]
1884
1885
  Block that designates a molecular projection by the names specified
1886
  in the \fdf{TBT.Projs} block.
1887
1888
  This block determines how each projection is interpreted, it
1889
  consists of several options defined below:
1890
  \begin{fdfoptions}
1891
    
1892
    \option[atom]%
1893
    \fdfindex{TBT.Proj!<>!atom}%
1894
    \fdfindex{TBT.Proj!<>!position}%
1895
    
1896
    There may be several \fdf*{atom} lines. The full set of atomic
1897
    indices will be used as a sub-space for the Hamiltonian. 
1898
    %
1899
    The atoms may be defined via these variants
1900
    \begin{fdfoptions}
1901
      
1902
      \option[{atom \emph{A} [\emph{B} [\emph{C} [\dots]]]}]%
1903
      A sequence of atomic indices which are used for the projection.
1904
1905
      % Generic input (compatible with the <= 4.0)
1906
      \option[{atom from \emph{A} to \emph{B} [step \emph{s}]}]%
1907
      Here atoms \emph{A} up to and including \emph{B} are
1908
      used.
1909
      %
1910
      If \fdf*{step <s>} is given, the range
1911
      \emph{A}:\emph{B} will be taken in steps of \emph{s}.
1912
1913
      \begin{fdfexample}
1914
        atom from 3 to 10 step 2
1915
      \end{fdfexample}
1916
      will add atoms 3, 5, 7 and 9.
1917
1918
      \option[{atom from \emph{A} plus/minus \emph{B} [step
1919
          \emph{s}]}]%
1920
      Atoms \emph{A} up to and including $\emph{A}+\emph{B}-1$
1921
      are added to the projection.
1922
      %
1923
      If \fdf*{step <s>} is given, the range
1924
      \emph{A}:$\emph{A}+\emph{B}-1$ will be taken in steps of
1925
      \emph{s}.
1926
1927
      % Generic input (compatible with the <= 4.0)
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1928
      \option[atom {[<A>, \emph{B} -\mbox{}- \emph{C} [step
1929
          \emph{s}], \emph{D}]}]%
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1930
      Equivalent to \fdf*{from \dots to} specification, however in a
1931
      shorter variant. Note that the list may contain arbitrary number
1932
      of ranges and/or individual indices.
1933
1934
      \begin{fdfexample}
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
1935
        atom [2, 3 -- 10 step 2, 6]
527.1.21 by Nick Papior
Added projection documentation for tbtrans
1936
      \end{fdfexample}
1937
      will add atoms 2, 3, 5, 7, 9 and 6.
1938
1939
    \end{fdfoptions}
1940
1941
1942
    \option[Gamma]%
1943
    \fdfindex{TBT.Proj!<>!Gamma}%
1944
    
1945
    Logical variable which determines whether the projectors are the
1946
    $\Gamma$-point projectors, or the $k$ resolved ones. For
1947
    $\Gamma$-only calculations this has no effect.
1948
    % 
1949
    If the eigenstates are non-dispersive in the Brillouin zone there
1950
    should be no difference between \fdftrue\ or \fdffalse.
1951
1952
    % I do not think this is a problem. |>e^{i\theta} * e^{-i\theta}<|
1953
    % == |><|
1954
    % \beware{Diagonalisation of a $\kk$-point Hamiltonian does not
1955
    % necessarily retain the
1956
    % correct phases, i.e. $\ket{\psi}$ and $\ket{\psi}e^{i\theta}$
1957
    % are both solutions,
1958
    % whereas the Green functions will always be set up in the
1959
    % $\ket{\psi}$ basis. Hence
1960
    % doing $\kk$-point resolved need not be correct. This is not a
1961
    % problem for the $\Gamma$
1962
    % point as we force the basis to be a real basis.}
1963
1964
    \note it is \emph{very} important to know the dispersion and
1965
    possible band-crossings of the eigenstates if this option is
1966
    \fdffalse. For band-crossings one must manually perform the
1967
    projections for the $k$-points in a stringent manner as the order
1968
    of eigenstates are not retained.
1969
1970
1971
    \option[proj <P-name>]
1972
    \fdfindex{TBT.Proj!<>!proj}%
1973
1974
    Allows to define a projection based on the eigenstates for the
1975
    current molecule.
1976
1977
    The \fdf*{<P-name>} designates the name associated with this
1978
    projection.
1979
1980
    It is parsed like this, in the following $0$ is the Fermi level
1981
    (HOMO $=-1$, LUMO $=1$):
1982
    \begin{fdfoptions}
1983
1984
      \option[level from <E1> to <E2>] %
1985
      Energy eigenstates \fdf*{E1} and \fdf*{E2} will be part of the
1986
      molecular orbitals that constitute this projection
1987
1988
      \option[level from <E> plus <N>] %
1989
      Energy eigenstates between \fdf*{E} and $\fdf*{E}+N-1$ will be
1990
      part of the molecular orbitals that constitute this projection
1991
1992
      \option[level from <E> minus <N>] %
1993
      Energy eigenstates between \fdf*{E} and $\fdf*{E}-N+1$ will be
1994
      part of the molecular orbitals that constitute this projection
1995
1996
      \option[level <E1> <E2> ... <En>] %
1997
      All eigenstates specified will be part of the molecular orbitals
1998
      that constitute this projection
1999
527.1.25 by Nick Papior
Updated documentation for change of list in fdf
2000
      \option[level {[ <list> ]}] %
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2001
      A comma-separated list specification.
2002
2003
      \option[end] %
2004
      All gathered eigenstates so far will constitute the projection
2005
      named \fdf*{<P-name>}
2006
      
2007
    \end{fdfoptions}
2008
2009
    Note that level $0$ refers to the Fermi level, it will be silently
2010
    removed as it is not an eigenstate, so you do not need to think
2011
    about it.
2012
2013
    You can specify named projection blocks as many times as you want.
2014
2015
    To conclude the full projection block here is an example
2016
    describing three different projections for the left molecule in
2017
    \begin{fdfexample}
2018
 %block TBT.Proj.M-L
2019
   # We have 2 atoms on this molecule
2020
   atom from 5 plus 2
2021
   # We only do a Gamma projection
2022
   Gamma .true.
2023
   # We will utilise three different projections on 
2024
   # this molecule
2025
   proj HOMO
2026
    level -1
2027
   end 
2028
   proj LUMO
2029
    level 1
2030
   end
2031
   proj H-plus-L
2032
    level from -1 to 1
2033
   end
2034
 %endblock
2035
    \end{fdfexample}
2036
2037
    Similarly for the right molecule we do
2038
    \begin{fdfexample}
2039
 %block TBT.Proj.M-R
2040
   # We have 2 atoms on this molecule
2041
   atom from 8 plus 2
2042
   # We only do a Gamma projection
2043
   Gamma .true.
2044
   # We will utilise three different projections on 
2045
   # this molecule
2046
   proj HOMO
2047
    level -1
2048
   end 
2049
   proj LUMO
2050
    level 1
2051
   end
2052
   proj H-plus-L
2053
    level from -1 to 1
2054
   end
2055
 %endblock
2056
    \end{fdfexample}
2057
   
2058
  \end{fdfoptions}
2059
 
2060
\end{fdfentry}
2061
2062
2063
\begin{fdflogicalF}{TBT.Proj!<>!States}%
2064
2065
  Save all states for the projection. The saved quantity can be
2066
  post-processed to decipher the locality of each projection.
2067
  
2068
  \emph{Needed if you wish to select specific molecular orbitals
2069
      dependent on the nature of the molecular orbital.}
2070
  
2071
\end{fdflogicalF}
2072
2073
2074
\begin{fdfentry}{TBT.CDF!Proj.Compress}[integer]<{<\fdf{TBT.CDF!Compress}>}>
2075
2076
  Allows a different compression for the projection file. The
2077
  projection file is typically larger than the default output file, so
2078
  compression of them separately might be needed.
2079
  
2080
\end{fdfentry}
2081
2082
\begin{fdflogicalF}{TBT.Projs!Init}
2083
2084
  Whether \tbtrans\ will only create the projection tables and then
2085
  quit.
2086
2087
  As \tbtrans\ allows to re-use the projection file the user can
2088
  choose to stop right after creation. Specifically it will allow one
2089
  to swap projection states with other projection states. This can be
2090
  useful when bias is applied and the hybridisation ``destroys'' the
2091
  molecule Hamiltonian. After initialising the projection tables the
2092
  user can manually swap them with those calculated at zero bias, thus
2093
  retaining the same projection tables for different bias'.
2094
2095
  Note that for spin calculations you need to utilise the
2096
  \fdf{TBT.Spin} flag to initialise both projection files (spin UP
2097
  \emph{and} spin DOWN) before proceeding with the calculation.
2098
  
2099
\end{fdflogicalF}
2100
2101
\begin{fdflogicalF}{TBT.Projs!Debug}
2102
2103
  Print out additional information regarding the projections. It will
2104
  print out assertion lines orthogonality.
2105
2106
  \emph{Possibly not useful for other than the developers.}
2107
  
2108
\end{fdflogicalF}
2109
2110
\begin{fdfentry}{TBT.Projs!T}[block]%
2111
2112
  As you might specify \emph{many} molecular projections to
2113
  investigate a lot of details of the system it seems perilous to
2114
  always calculate all allowed transmission permutations.
2115
2116
  Instead the user has to supply the permutations of transport that is
2117
  calculated. This block will let the user decide which to calculate
2118
  and which to not.
2119
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2120
  In the following \fdf*{Left}(L)/\fdf*{Right}(R) corresponds to
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2121
  $T=\Tr[\mathbf G\boldsymbol\Gamma_L\mathbf
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2122
  G^\dagger\boldsymbol\Gamma_R]$
2123
  where \fdf*{Left}, \fdf*{Right} are found in the \fdf{TBT!Elecs}
2124
  block.
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2125
2126
  \begin{fdfoptions}
2127
2128
    \option[from <proj-L> to]%
2129
    Projects $\boldsymbol\Gamma_L$ on to the \fdf*{<projection>}
2130
    before doing the R projections.
2131
2132
    The R projections are constructed in the following lines until
2133
    \fdf*{end} is seen.
2134
2135
    \begin{fdfoptions}
2136
      
2137
      \option[<proj-R>]%
2138
      Projects $\boldsymbol\Gamma_R$ on to the \fdf*{<projection>}
2139
      which then calculates the transmission
2140
    \end{fdfoptions}
2141
  
2142
  \end{fdfoptions}
2143
2144
  Each projection can be represented in three different ways:
2145
2146
  \begin{fdfoptions}
2147
    
2148
    \option[<elec>] %
2149
    Makes no projection on the scattering matrix
2150
2151
    \option[<elec>.<name>] %
2152
    Makes all permutations of the projections attached to the molecule
2153
    named \fdf*{<name>}
2154
  
2155
    \option[<elec>.<name>.<P-name>] %
2156
    Projects the named projection \fdf*{<P-name>} from molecule
2157
    \fdf*{<name>} onto electrode \fdf*{<elec>}
2158
2159
  \end{fdfoptions}
2160
527.1.22 by Nick Papior
Added documentation of charge/hartree gate
2161
  An example input for projection two molecules could be:
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2162
  \begin{fdfexample}
2163
 %block TBT.Projs.T
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2164
   from Left.M-L.HOMO to
2165
     Right.M-R
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2166
     Right
2167
   end
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2168
   from Left.M-L.LUMO to
2169
     Right.M-R.LUMO
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2170
   end
2171
 %endblock
2172
  \end{fdfexample}
2173
  which will be equivalent to the more verbose
2174
  \begin{fdfexample}
2175
 %block TBT.Projs.T
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2176
   from Left.M-L.HOMO to
2177
     Right.M-R.HOMO
2178
     Right.M-R.LUMO
2179
     Right.M-R.H-plus-L
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2180
     Right
2181
   end
560.1.126 by Nick Papior
Bugfix in documentation of tbtrans
2182
   from Left.M-L.LUMO to
2183
     Right.M-R.LUMO
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2184
   end
2185
 %endblock
2186
  \end{fdfexample}
2187
  
2188
\end{fdfentry}
2189
2190
\bgroup
2191
\def\bra#1{\langle#1|}
2192
\def\ket#1{|#1\rangle}
2193
\def\kb#1{\ket{#1}\bra{#1}}
2194
\def\Gf{\mathbf G}
2195
\def\Gam{\boldsymbol\Gamma}
2196
2197
This will calculate the transport using all these equations
2198
\begin{align}
2199
  \label{eq:T:proj:1}
2200
  T_{\ket{H_1},\ket{H_2}} &=\Tr\big[\Gf\kb{H_1}\Gam_L\kb{H_1}\Gf^\dagger\kb{H_2}\Gam_R\kb{H_2}\big]
2201
  \\
2202
  \label{eq:T:proj:2}
2203
  T_{\ket{H_1},\ket{L_2}} &=\Tr\big[\Gf\kb{H_1}\Gam_L\kb{H_1}\Gf^\dagger\kb{L_2}\Gam_R\kb{L_2}\big]
2204
  \\
2205
  \label{eq:T:two:one}
2206
  T_{\ket{H_1},\ket{H_2}+\ket{L_2}}
2207
  &=\Tr\Big[\Gf\kb{H_1}\Gam_L\kb{H_1}\Gf^\dagger\big(\kb{H_2}+\kb{L_2}\big)\Gam_R\big(\kb{H_2}+\kb{L_2}\big)\Big]
2208
  \\
2209
  \label{eq:T:single:one}
2210
  T_{\ket{H_1},R} &=\Tr\Big[\Gf\kb{H_1}\Gam_L\kb{H_1}\Gf^\dagger\Gam_R\Big]
2211
  \\
2212
  \label{eq:T:proj:5}
2213
  T_{\ket{L_1},\ket{L_2}} &=\Tr\big[\Gf\kb{L_1}\Gam_L\kb{L_1}\Gf^\dagger\kb{L_2}\Gam_R\kb{L_2}\big]
2214
\end{align}
2215
\egroup %
2216
Notice that \ref{eq:T:two:one} is equivalent to \ref{eq:T:single:one}
2217
in our two state model.
2218
2219
Note that removing an explicit named projection allows easy creation
2220
of all available permutations of the projection states associated with
2221
the molecule.
2222
2223
2224
\begin{fdflogicalF}{TBT.Projs!Only}
2225
2226
  Whether \tbtrans\ will not calculate non-projected transmissions. If
2227
  you are only interested in the projection transmissions and/or have
2228
  already calculated the non-projected transmissions you can use this
2229
  option.
2230
  
2231
\end{fdflogicalF}
2232
2233
\begin{fdflogicalF}{TBT.Projs!DOS.A}%
2234
2235
  Save the spectral density of states for the projections. In case you
2236
  have set \fdf{TBT.DOS!A} this will default to that flag.
2237
  
2238
\end{fdflogicalF}
2239
2240
\begin{fdflogicalF}{TBT.Projs!Current.Orb}%
560.1.61 by Nick Papior
Updated documentation of tbtrans
2241
  \fdfdepend{TBT.Projs!DOS.A}
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2242
2243
  Will calculate and save the orbital current for the device with the
2244
  projections.
2245
2246
  The orbital current will be saved in the same sparsity pattern as
2247
  the cut-out device region sparsity pattern. 
2248
  
2249
\end{fdflogicalF}
2250
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
2251
\begin{fdflogicalF}{TBT.Projs!T.All}%
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2252
560.6.17 by Nick Papior
Updated tbtrans documentation and keywords for Elecs.All => All
2253
  Same as \fdf{TBT.T!All}, but for projections. If differing
527.1.21 by Nick Papior
Added projection documentation for tbtrans
2254
  projections are performed on the scattering states the transmission
2255
  will not be reversible. You can turn on all projection operations
2256
  using this flag.
2257
2258
\end{fdflogicalF}
2259
2260
\begin{fdflogicalF}{TBT.Projs!T.Out}%
2261
2262
  Same as \fdf{TBT.T!Out} for projections. 
2263
  
2264
\end{fdflogicalF}
2265
527.1.18 by Nick Papior
Added tbtrans documentation
2266
2267
2268
\subsubsection{NetCDF4 support}
2269
2270
\tbtrans\ stores all relevant physical quantities in the
2271
\sysfile{TBT.nc} file which retains orbital resolved DOS, orbital
2272
currents, transmissions, transmission eigenvalues, etc. One may use
2273
\sisl\ to easily analyze and extract quantities from this file using
2274
Python. 
2275
2276
These files are created if NetCDF4 support is enabled
2277
\begin{description}
2278
  \def\fillsee#1{\hfill see \fdf{#1}}
2279
2280
  \item[\sysfile{TBT.nc}] %
2281
2282
  File which contain nearly everything calculated in \tbtrans.
2283
  The structure of this file is a natural tree structure to
2284
  accommodate $N$ electrode output.
2285
2286
  \item[\sysfile{TBT.SE.nc}] \fillsee{TBT.CDF!SelfEnergy.Save}%
2287
2288
  Down-folded self-energies are stored in this file. 
2289
2290
  \item[\sysfile{TBT.Proj.nc}] \fillsee{TBT.Projs}%
2291
2292
  Stores projected DOS, transmission and/or orbital currents. Using
2293
  projections for large $k$ and energy sampling will create very large
2294
  files. Ensure that you have a large amount of disk-space available.
2295
2296
  \item[\sysfile{DOS}] \fillsee{TBT.DOS!Gf}%
2297
2298
  The $k$ resolved density of states from the Green function. 
2299
2300
  \item[\sysfile{AVDOS}] \fillsee{TBT.DOS!Gf}%
2301
2302
  The $k$ averaged density of states from the Green function. 
2303
2304
  \item[\sysfile{ADOS\_<>}] \fillsee{TBT.DOS!A}%
2305
2306
  The $k$ resolved density of states from the electrode name \fdf*{<>}.
2307
2308
  \item[\sysfile{AVADOS\_<>}] \fillsee{TBT.DOS!A}%
2309
2310
  The $k$ averaged density of states from the electrode name \fdf*{<>}.
2311
2312
  \item[\sysfile{TRANS\_<1>\_<2>}] \mbox{}%
2313
2314
  The $k$ resolved transmission from \fdf*{<1>} to \fdf*{<2>}. 
2315
2316
  \item[\sysfile{AVTRANS\_<1>\_<2>}] \mbox{}%
2317
2318
  The $k$ averaged transmission from \fdf*{<1>} to \fdf*{<2>}. 
2319
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
2320
  \item[\sysfile{CORR\_<1>}] \fillsee{TBT.T!Out}%
2321
2322
  The $k$ resolved correction to the transmission for \fdf*{<1>}.
2323
2324
  \item[\sysfile{AVCORR\_<1>}] \fillsee{TBT.T!Out}%
2325
2326
  The $k$ averaged correction to the transmission for \fdf*{<1>}.
2327
527.1.18 by Nick Papior
Added tbtrans documentation
2328
  \item[\sysfile{TEIG\_<1>\_<2>}] \fillsee{TBT.T!Eig}%
2329
2330
  The $k$ resolved transmission eigenvalues from \fdf*{<1>} to
2331
  \fdf*{<2>}. 
2332
2333
  \item[\sysfile{AVTEIG\_<1>\_<2>}] \fillsee{TBT.T!Eig}%
2334
2335
  The $k$ averaged transmission eigenvalues from \fdf*{<1>} to
2336
  \fdf*{<2>}. 
2337
560.1.108 by Nick Papior
Fixes propagation calculation of the T.Out quantity
2338
  \item[\sysfile{CEIG\_<1>}] \fillsee{TBT.T!Out}%
2339
2340
  The $k$ resolved correction eigenvalues for \fdf*{<1>}.
2341
2342
  \item[\sysfile{AVCEIG\_<1>}] \fillsee{TBT.T!Out}%
2343
2344
  The $k$ averaged correction eigenvalues for \fdf*{<1>}.
2345
527.1.18 by Nick Papior
Added tbtrans documentation
2346
  \item[\sysfile{BDOS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2347
2348
  The $k$ resolved bulk density of states of electrode \fdf*{<>}.
2349
2350
  \item[\sysfile{AVBDOS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2351
2352
  The $k$ averaged bulk density of states of electrode \fdf*{<>}.
2353
2354
  \item[\sysfile{BTRANS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2355
2356
  The $k$ resolved bulk transmission of electrode \fdf*{<>}.
2357
  
2358
  \item[\sysfile{AVBTRANS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2359
2360
  The $k$ averaged bulk transmission of electrode \fdf*{<>}.
2361
2362
\end{description}
2363
2364
All the above files will only be created if \tbtrans\ was successfully
2365
executed and their respective options was enabled.
2366
2367
\subsubsection{No NetCDF4 support}
2368
2369
In case \tbtrans\ is not compiled with NetCDF4 support \tbtrans\ is
2370
heavily limited in functionality and subsequent analysis. Particularly
2371
the DOS quantities are not orbital resolved. Also none of the
2372
quantities will be $k$ averaged, this is required to be done
2373
externally. 
2374
2375
The following files are created:
2376
\begin{description}
2377
  \def\fillsee#1{\hfill see \fdf{#1}}
2378
2379
  \item[\sysfile{DOS}] \fillsee{TBT.DOS!Gf}%
2380
2381
  The $k$ resolved density of states from the Green function. 
2382
2383
  \item[\sysfile{ADOS\_<>}] \fillsee{TBT.DOS!A}%
2384
2385
  The $k$ resolved density of states from the electrode name \fdf*{<>}.
2386
2387
  \item[\sysfile{TRANS\_<1>\_<2>}] \mbox{}%
2388
2389
  The $k$ resolved transmission from \fdf*{<1>} to \fdf*{<2>}. 
2390
2391
  \item[\sysfile{TEIG\_<1>\_<2>}] \fillsee{TBT.T!Eig}%
2392
2393
  The $k$ resolved transmission eigenvalues from \fdf*{<1>} to
2394
  \fdf*{<2>}. 
2395
2396
  \item[\sysfile{BDOS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2397
2398
  The $k$ resolved bulk density of states of electrode \fdf*{<>}.
2399
2400
  \item[\sysfile{BTRANS\_<>}] \fillsee{TBT.DOS!Elecs}/\fdf{TBT.T!Bulk}%
2401
2402
  The $k$ resolved bulk transmission of electrode \fdf*{<>}.
2403
  
2404
\end{description}
2405
2406
2407
\clearpage
2408
\addcontentsline{toc}{section}{Bibliography}
2409
\bibliographystyle{plainnat}
2410
\bibliography{siesta}
2411
2412
% Indices
2413
\clearpage
2414
\addcontentsline{toc}{section}{Index}
2415
\printindex
2416
2417
\printindex[sfiles]
2418
\printindex[sfdf]
2419
2420
2421
\end{document}
2422
2423
2424
2425
2426
%%% Local Variables:
2427
%%% mode: latex
2428
%%% ispell-local-dictionary: "american"
2429
%%% fill-column: 70
2430
%%% TeX-master: t
2431
%%% End: