1%!TEX root=./user_guide.tex
2\chapter{Parameters}\label{chap:parameters}
3
4\section{Usage}
5{\tt wannier90.x} can be run in parallel using MPI libraries to
6reduce the computation time.
7
8For serial execution use: {\tt wannier90.x [-pp] [seedname]}
9
10\begin{itemize}
11\item{ {\tt seedname}: If a seedname string is given the code will read its input
12from a file {\tt seedname.win}. The default value is {\tt wannier}. One can also equivalently provide the string
13  {\tt seedname.win} instead of  {\tt seedname}.}
14\item { {\tt -pp}: This optional flag tells the code to generate
15a list of the required overlaps and then exit.
16This information is written to the file {\tt seedname.nnkp}.}
17\end{itemize}
18
19For parallel execution use: {\tt mpirun -np NUMPROCS wannier90.x [-pp] [seedname]}
20
21\begin{itemize} \item
22{\tt NUMPROCS}: substitute with the number of processors that you want
23to use.
24\end{itemize}
25
26Note that the {\tt mpirun} command and command-line flags may be
27different in your MPI implementation: read your MPI manual or ask your
28computer administrator.
29
30Note also that this requires that the {\tt wannier90.x} executable has been
31compiled in its parallel version (follow the instructions in the file
32{\tt README.install} in the main directory of the wannier90
33distribution) and
34that the MPI libraries and binaries are installed and correctly
35configured on your machine.
36
37
38\section{{\tt seedname.win} File\label{sec:seednamefile}}
39The \wannier\ input file {\tt seedname.win} has a flexible free-form
40structure.
41
42The ordering of the keywords is not significant. Case is ignored (so
43\verb#num_bands# is the same as \verb#Num_Bands#). Characters after !, or \#
44are treated as comments. Most keywords have a default value that is
45used unless the keyword is given in {\tt seedname.win}. Keywords can be set
46in any of the following ways
47{\tt
48\begin{quote}
49num\_wann   4
50
51num\_wann = 4
52
53num\_wann : 4
54\end{quote} }
55A logical keyword can be set to {\tt true} using any of the following
56strings: {\tt T}, {\tt true}, {\tt .true.}.
57
58For further examples see Section~\ref{winfile} and the the \wannier\ Tutorial.
59
60\section{Keyword List}
61\label{parameter_data}
62
63\begin{table}[b]
64\begin{center}
65\begin{tabular}{|c|c|p{6cm}|}
66\hline
67Keyword & Type & Description \\
68        &      &             \\
69\hline\hline
70\multicolumn{3}{|c|}{System Parameters} \\
71\hline
72{\sc num\_wann }   & I & Number of WF \\
73{\sc num\_bands }   & I & Number of bands passed to the code \\
74{\sc unit\_cell\_cart }   & P & Unit cell vectors in Cartesian coordinates \\
75{\sc atoms\_cart }*   & P & Positions of atoms in Cartesian coordinates \\
76{\sc atoms\_frac }*   & R & Positions of atoms in fractional
77coordinates with respect to the lattice vectors \\
78{\sc mp\_grid }   & I & Dimensions of the Monkhorst-Pack grid of
79k-points \\
80%{\sc mp\_grid\_automatic }**   & L & Determine the k-point automatically \\
81{\sc kpoints }   & R & List of k-points in the Monkhorst-Pack grid \\
82{\sc gamma\_only} & L & Wavefunctions from underlying ab initio
83calculation are manifestly real \\
84{\sc spinors} & L & WF are spinors \\
85{\sc shell\_list }   & I & Which shells to use in finite difference formula \\
86{\sc search\_shells }   & I & The number of shells to search when
87determining finite difference formula \\
88{\sc skip\_B1\_tests }   & L & Check the condition B1 of Ref.~\cite{marzari-prb97}  \\
89{\sc nnkpts} & I & Explicit list of nearest-neighbour k-points.\\
90{\sc kmesh\_tol } & R & The tolerance to control if two kpoint belong to the same shell \\
91\hline
92\end{tabular}
93\caption[Parameter file keywords controlling system parameters.]
94{{\tt seedname.win} file keywords defining the system.  Argument types
95are represented by, I for a integer, R for a real number, P for a
96physical value, L for a logical value and S for a text string.\\
97 {\footnotesize
98* {\sc atoms\_cart } and  {\sc atoms\_frac } may not both be defined in
99the same input file. }}
100\label{parameter_keywords1}
101\end{center}
102\end{table}
103
104\clearpage
105
106\begin{table}
107\begin{center}
108\begin{tabular}{|c|c|p{6cm}|}
109\hline
110Keyword & Type & Description \\
111        &      &             \\
112\hline\hline
113\multicolumn{3}{|c|}{Job Control} \\
114\hline
115{\sc postproc\_setup }   & L & To output the {\tt seedname.nnkp} file \\
116%{\sc cp\_pp }   & L & CP code post-processing \\
117%{\sc calc\_only\_a }   & L & Only recalculate the projections \\
118{\sc exclude\_bands }   & I & List of bands to exclude from the calculation \\
119{\sc select\_projections }   & I & List of projections to use in Wannierisation \\
120{\sc auto\_projections } & L & To automatically generate initial projections \\
121{\sc restart }   & S & Restart from checkpoint file \\
122{\sc iprint }   & I & Output verbosity level \\
123{\sc length\_unit }   & S & System of units to output lengths \\
124{\sc wvfn\_formatted }   & L & Read the wavefunctions from a  (un)formatted file  \\
125{\sc spin }   & S & Which spin channel to read \\
126{\sc devel\_flag }   & S & Flag for development use \\
127{\sc timing\_level } & I & Determines amount of timing information
128written to output \\
129{\sc optimisation } & I & Optimisation level \\
130{\sc translate\_home\_cell } & L & To translate final Wannier centres
131to home unit cell when writing xyz file\\
132{\sc write\_xyz }  & L & To write atomic positions and final centres in xyz file format \\
133{\sc write\_vdw\_data }  & L & To write data for futher processing by w90vdw utility\\
134{\sc write\_hr\_diag }  & L & To write the diagonal elements of
135the Hamiltonian in the Wannier basis to seedname.wout (in eV)\\
136\hline
137\end{tabular}
138\caption[win file keywords.]
139{{\tt seedname.win} file keywords defining job control.  Argument types
140are represented by, I for a integer, R for a real number, P for a
141physical value, L for a logical value and S for a text string. {\sc
142  translate\_home\_cell } only relevant if {\sc write\_xyz} is
143\texttt{.true.}}
144\label{parameter_keywords2}
145\end{center}
146\end{table}
147
148
149
150
151
152\begin{table}
153\begin{center}
154\begin{tabular}{|c|c|p{6cm}|}
155\hline
156Keyword & Type & Description \\
157        &      &             \\
158\hline\hline
159\multicolumn{3}{|c|}{Disentanglement Parameters} \\
160\hline
161{\sc dis\_win\_min }   & P & Bottom of the outer energy window \\
162{\sc dis\_win\_max }   & P & Top of the outer energy window \\
163{\sc dis\_froz\_min }   & P & Bottom of the inner (frozen) energy window \\
164{\sc dis\_froz\_max }   & P & Top of the inner (frozen) energy window \\
165{\sc dis\_num\_iter }   & I & Number of iterations for the minimisation
166of $\omi$ \\
167{\sc dis\_mix\_ratio }   & R & Mixing ratio during the minimisation of $\omi$\\
168{\sc dis\_conv\_tol }   & R & The convergence tolerance for finding $\omi$ \\
169{\sc dis\_conv\_window }   & I & The number of iterations over which
170convergence of $\omi$ is assessed. \\
171{\sc dis\_spheres\_num }   & I & Number of spheres in k-space where disentaglement is performed\\
172{\sc dis\_spheres\_first\_wann }   & I & Index of the first band to be considered a Wannier function \\
173{\sc dis\_spheres } & R & List of centres and radii, for disentanglement only in spheres \\
174\hline
175\end{tabular}
176\caption[Parameter file keywords controlling disentanglement parameters.]
177{{\tt seedname.win} file keywords controlling the disentanglement.
178  Argument types
179are represented by, I for a integer, R for a real number, P for a
180physical value, L for a logical value and S for a text string.}
181\label{parameter_keywords4}
182\end{center}
183\end{table}
184
185
186
187\begin{table}
188\begin{center}
189\begin{tabular}{|c|c|p{6cm}|}
190\hline
191Keyword & Type & Description \\
192        &      &             \\
193\hline\hline
194\multicolumn{3}{|c|}{Wannierise Parameters} \\
195\hline
196{\sc num\_iter }   & I & Number of iterations for the minimisation
197of $\Omega$ \\
198{\sc num\_cg\_steps }   & I & During the minimisation
199of $\Omega$ the number of Conjugate Gradient steps before resetting to
200Steepest Descents \\
201{\sc conv\_window }   & I & The number of iterations over which
202convergence of $\Omega$ is assessed \\
203{\sc conv\_tol }   & P & The convergence tolerance for finding $\Omega$  \\
204{\sc precond }   & L & Use preconditioning \\
205{\sc conv\_noise\_amp} & R & The amplitude of random noise applied
206towards end of minimisation procedure \\
207{\sc conv\_noise\_num} & I & The number of times random noise is
208applied \\
209{\sc num\_dump\_cycles }   & I & Control frequency of check-pointing \\
210{\sc num\_print\_cycles }   & I & Control frequency of printing \\
211{\sc write\_r2mn }   & L & Write matrix elements of $r^2$ between
212WF to file \\
213{\sc guiding\_centres }   & L & Use guiding centres \\
214{\sc num\_guide\_cycles }   & I & Frequency of guiding centres \\
215{\sc num\_no\_guide\_iter }   & I & The number of iterations
216after which guiding centres are used\\
217{\sc trial\_step }*   & R & The trial step length for the parabolic
218line search during the minimisation
219of $\Omega$\\
220{\sc fixed\_step }*   & R & The fixed step length to take during the minimisation
221of $\Omega$, instead of doing a parabolic line search \\
222{\sc use\_bloch\_phases }**   & L & To use phases for initial projections \\
223{\sc site\_symmetry}***   & L & To construct symmetry-adapted Wannier functions  \\
224{\sc  symmetrize\_eps}***   & R &  The convergence tolerance used in the symmetry-adapted mode \\
225{\sc slwf\_num} & I & The number of objective WFs for selective localization \\
226{\sc slwf\_constrain} & L & Whether to constrain the centres of the objective WFs \\
227{\sc slwf\_lambda} & R & Value of the Lagrange multiplier for constraining the objective WFs \\
228{\sc slwf\_centres} & P & The centres to which the objective WFs are to be constrained \\
229\hline
230\end{tabular}
231\caption[Parameter file keywords controlling the Wannierise routine.]
232{{\tt seedname.win} file keywords controlling the wannierisation.
233  Argument types
234are represented by, I for a integer, R for a real number, P for a
235physical value, L for a logical value and S for a text string.
236{\footnotesize
237* {\sc fixed\_step } and  {\sc trial\_step } may not both be defined in
238the same input file. **Cannot be used in conjunction with disentanglement.
239***Cannot be used in conjunction with the inner (frozen) energy window.}}
240\label{parameter_keywords5}
241\end{center}
242\end{table}
243
244
245
246\begin{longtable}{|c|c|p{6cm}|}
247%\begin{center}
248%\begin{tabular}{|c|c|p{6cm}|}
249  \hline
250  Keyword & Type & Description \\
251  &      &             \\
252  \hline\hline
253  \multicolumn{3}{|c|}{Plot Parameters} \\
254  \hline
255  {\sc wannier\_plot }   & L & Plot the WF \\
256  {\sc wannier\_plot\_list } & I & List of WF to plot \\
257  {\sc wannier\_plot\_supercell }   & I & Size of the supercell for
258  plotting the WF \\
259  {\sc wannier\_plot\_format }   & S & File format in which to plot the
260  WF \\
261  {\sc wannier\_plot\_mode }   & S & Mode in which to plot the
262  WF, molecule or crystal \\
263  {\sc wannier\_plot\_radius } & R & Cut-off radius of WF* \\
264  {\sc wannier\_plot\_scale } & R & Scaling parameter for cube files \\
265  {\sc wannier\_plot\_spinor\_mode } & S& Quantity to plot for spinor WF\\
266  {\sc wannier\_plot\_spinor\_phase } & L& Include the ``phase'' when plotting spinor WF\\
267  {\sc bands\_plot }   & L & Plot interpolated band structure \\
268  {\sc kpoint\_path }   & P & K-point path for the interpolated band structure  \\
269  {\sc bands\_num\_points }   & I & Number of points along the first
270  section of the k-point path \\
271  {\sc bands\_plot\_format }   & S & File format in which to plot the
272  interpolated bands \\
273  {\sc bands\_plot\_project } & I & WF to project the band structure onto \\
274  {\sc bands\_plot\_mode }   & S & Slater-Koster type interpolation or
275  Hamiltonian cut-off \\
276  {\sc bands\_plot\_dim } & I & Dimension of the system \\
277  {\sc fermi\_surface\_plot }   & L & Plot the Fermi surface \\
278  {\sc fermi\_surface\_num\_points }   & I & Number of points in the Fermi
279  surface plot\\
280  {\sc fermi\_energy }   & P & The Fermi energy \\
281  {\sc fermi\_energy\_min }   & P & Lower limit of
282  the Fermi energy range\\
283  {\sc fermi\_energy\_max }   & P & Upper limit of
284  the Fermi energy range\\
285  {\sc fermi\_energy\_step }   & R & Step for increasing the
286Fermi energy in the specified range\\
287  {\sc fermi\_surface\_plot\_format }   & S & File format for the Fermi
288  surface plot \\
289  \old{\sc hr\_plot} & L & \old{This parameter is not used anymore. Use {\sc write\_hr} instead.} \\
290  \new{\sc write\_hr} & L & \new{Write the Hamiltonian in the WF basis} \\
291  \new{\sc write\_rmn } & L & \new{Write the position operator in the WF basis} \\
292  \new{\sc write\_bvec } & L & \new{Write to file the matrix elements of the bvectors and their weights} \\
293\new{\sc write\_tb }  & L & \new{Write lattice vectors,
294Hamiltonian, and position operator in WF basis} \\
295  {\sc hr\_cutoff} & P &  Cut-off for the absolute value of the Hamiltonian \\
296  {\sc dist\_cutoff} & P & Cut-off for the distance between WF \\
297  {\sc dist\_cutoff\_mode} & S & Dimension in which the distance between WF
298  is calculated \\
299  {\sc translation\_centre\_frac } & R & Centre of the unit cell to which
300  final WF are translated \\
301  \new{\sc use\_ws\_distance } & L & \new{Improve interpolation using minimum distance between WFs, see Chap.~\ref{chap:interpolation}} \\
302  \new{\sc ws\_distance\_tol } & R & \new{Absolute tolerance for the distance to equivalent positions.} \\
303  \new{\sc ws\_search\_size } & I & \new{Maximum extension in each direction of the super-cell of the Born-von Karmann cell to search for points inside the Wigner-Seitz cell}\\
304  \new{\sc write\_u\_matrices } & L & \new{Write $\mathbf{U}^{(\mathbf{k})}$ and $\mathbf{U}^{\mathrm{dis}(\mathbf{k})}$ matrices to files} \\
305%{\sc slice\_plot }   & L & Plot the Wannier Functions along a slice \\
306%{\sc slice\_coord }   & P & Coordinates of the slice \\
307%{\sc slice\_num\_points }   & I & Number of points in the slice plot \\
308%{\sc slice\_plot\_format }   & S & File format of the slice plot \\
309%{\sc dos\_plot }   & L & Plot the interpolated density of states \\
310%{\sc dos\_num\_points }   & I & Number of points in the dos plot \\
311%{\sc dos\_energy\_step }   & P & Size of the energy step in the dos plot \\
312%{\sc dos\_gaussian\_width }   & P & Width of the convolving gaussian
313%smearing for the dos plot \\
314%{\sc dos\_plot\_format }   & S & Format of the dos plot \\
315\hline
316%\end{tabular}
317\caption[Parameter file keywords controlling plotting.]
318{{\tt seedname.win} file keywords controlling the  plotting.  Argument types
319are represented by, I for a integer, R for a real number, P for a
320physical value, L for a logical value and S for a text string. * Only
321applies when {\sc wannier\_plot\_format} is {\tt cube}.}
322\label{parameter_keywords6}
323%\end{center}
324\end{longtable}
325
326
327
328\begin{table}
329\begin{center}
330\begin{tabular}{|c|c|p{6cm}|}
331\hline
332Keyword & Type & Description \\
333        &      &             \\
334\hline\hline
335\multicolumn{3}{|c|}{Transport Parameters} \\
336\hline
337{\sc transport}   & L & Calculate quantum conductance and density of states \\
338{\sc transport\_mode }  & S & Bulk or left-lead\_conductor\_right-lead calculation \\
339{\sc tran\_win\_min } & P &  Bottom of the energy window for transport calculation\\
340{\sc tran\_win\_max } & P &  Top of the energy window for transport calculation\\
341{\sc tran\_energy\_step } & R & Sampling interval of the energy values \\
342{\sc fermi\_energy } & R & The Fermi energy \\
343{\sc tran\_num\_bb } & I & Size of a bulk Hamiltonian \\
344{\sc tran\_num\_ll } & I & Size of a left-lead Hamiltonian \\
345{\sc tran\_num\_rr } & I & Size of a right-lead Hamiltonian \\
346{\sc tran\_num\_cc } & I & Size of a conductor Hamiltonian \\
347{\sc tran\_num\_lc } & I & Number of columns in a left-lead\_conductor Hamiltonian \\
348{\sc tran\_num\_cr } & I & Number of rows in a conductor\_right-lead Hamiltonian \\
349{\sc tran\_num\_cell\_ll } & I & Number of unit cells in PL of left lead \\
350{\sc tran\_num\_cell\_rr } & I & Number of unit cells in PL of right lead \\
351{\sc tran\_num\_bandc } & I & Half-bandwidth+1 of a band-diagonal conductor Hamiltonian \\
352{\sc tran\_write\_ht } & L & Write the Hamiltonian for transport calculation \\
353{\sc tran\_read\_ht } & L & Read the Hamiltonian for transport calculation \\
354{\sc tran\_use\_same\_lead } & L & Left and right leads are the same \\
355{\sc tran\_group\_threshold } & R & Distance that determines the grouping of WFs \\
356{\sc hr\_cutoff} & P &  Cut-off for the absolute value of the Hamiltonian \\
357{\sc dist\_cutoff} & P & Cut-off for the distance between WF \\
358{\sc dist\_cutoff\_mode} & S & Dimension in which the distance between WF
359is calculated \\
360{\sc one\_dim\_axis} & S &  Extended direction for a one-dimensional system \\
361{\sc translation\_centre\_frac } & R & Centre of the unit cell to which
362final WF are translated \\
363\hline
364\end{tabular}
365\caption[Parameter file keywords controlling transport.]
366{{\tt seedname.win} file keywords controlling transport. Argument types
367are represented by, I for a integer, R for a real number, P for a
368physical value, L for a logical value and S for a text string.}
369\label{parameter_keywords7}
370\end{center}
371\end{table}
372
373\clearpage
374
375
376\section{System}
377
378\subsection[num\_wann]{\tt integer :: num\_wann}
379Number of WF to be found.
380
381No default.
382
383\subsection[num\_bands]{\tt integer :: num\_bands}
384
385Total number of bands passed to the code in the {\tt seedname.mmn} file.
386
387Default \verb#num_bands#=\verb#num_wann#
388
389\subsection[Cell Lattice Vectors]{Cell Lattice Vectors}
390
391The cell lattice vectors should be specified in Cartesian coordinates.
392
393
394\noindent \verb#begin unit_cell_cart# \\
395\verb#[units]#
396$$
397\begin{array}{ccc}
398A_{1x} & A_{1y} & A_{1z} \\
399A_{2x} & A_{2y} & A_{2z} \\
400A_{3x} & A_{3y} & A_{3z}
401\end{array}
402$$
403\verb#end unit_cell_cart#
404
405Here $A_{1x}$ is the $x$-component of the first lattice vector $\mathbf{A}_1$,
406$A_{2y}$ is the $y$-component of the second lattice vector $\mathbf{A}_2$, etc.
407
408\verb#[units]# specifies the units in which the lattice vectors are
409defined: either \verb#Bohr# or \verb#Ang#.
410
411The default value is \verb#Ang#.
412
413
414
415\subsection[Ionic Positions]{Ionic Positions}
416
417The ionic positions may be specified in fractional coordinates relative
418to the lattice vectors of the unit cell, or in absolute Cartesian coordinates.
419Only one of \verb#atoms_cart# and \verb#atoms_frac# may be given in the input
420file.
421
422
423\subsubsection{Cartesian coordinates}
424
425\noindent \verb#begin atoms_cart# \\
426\verb#[units]#
427$$
428\begin{array}{cccc}
429P  & R^{P}_{x} & R^{P}_{y} & R^{P}_{z} \\
430Q  & R^{Q}_{x} & R^{Q}_{y} & R^{Q}_{z} \\
431\vdots
432\end{array}
433$$
434\verb#end atoms_cart#
435
436
437The first entry on a line is the atomic symbol. The next three entries
438are the atom's position $\mathbf{R}=(R_x , R_y, R_z)$ in Cartesian
439coordinates. The first line of the block, \verb#[units]#, specifies
440the units in which the coordinates are given and can be either
441\verb#bohr# or \verb#ang#. If not present, the default is \verb#ang#.
442
443\subsubsection{Fractional coordinates}
444
445\noindent \verb#begin atoms_frac#
446$$
447\begin{array}{cccc}
448P  & F^{P}_{1} & F^{P}_{2} & F^{P}_{3} \\
449Q  & F^{Q}_{1} & F^{Q}_{2} & F^{Q}_{3} \\
450\vdots
451\end{array}
452$$
453\verb#end atoms_frac#
454
455The first entry on a line is the atomic symbol. The next three entries
456are the atom's position in fractional coordinates $\mathbf{F} = F_1
457\mathbf{A}_{1} + F_2 \mathbf{A}_{2} + F_3 \mathbf{A}_{3}$
458relative to the cell lattice vectors $\mathbf{A}_i$, $i\in [1,3]$.
459
460\subsection[mp\_grid]{\tt integer, dimension :: mp\_grid(3)}
461Dimensions of the regular (Monkhorst-Pack) k-point mesh. For example,
462for a $2\times2\times2$ grid:
463
464\verb#mp_grid : 2  2  2#
465
466No default.
467
468
469%
470%\subsection[mp\_grid\_automatic]{\tt logical :: mp\_grid\_automatic}
471%\red{Not yet implemented}
472%
473%If
474%$\verb#mp_grid_automatic#=\verb#true#$
475%then a "standard" Monkhorst-Pack grid over the interval (0,1] with dimensions \verb#mp_grid#
476%will be used. The k-points will be assumed to be numbered such that the
477%loop over the x is fastest eg
478%
479%$$
480%\begin{array}{cccc}
481%Kpoint 1 &  0.0 & 0.0& 0.0 \\
482%Kpoint 2 & 0.25 &0.0 & 0.0 \\
483%Kpoint 3 & 0.50 &0.0 & 0.0 \\
484%Kpoint 4 & 0.75 &0.0 & 0.0 \\
485%Kpoint 5 & 0.0  &0.25& 0.0 \\
486%\vdots
487%\end{array}
488%$$
489%
490%If $\verb#mp_grid_automatic#=\verb#true#$ then a \verb#kpoint# block must not be present.
491%
492
493%{\it This keyword is helpful if one is using a dense MP mesh (eg
494%  12x12x12) as it saves typing in a very long list of kpoints}
495%
496%The default for this keyword is \verb#FALSE#.
497
498
499\subsection[Kpoints]{K-points}
500Each line gives the coordinate $\mathbf{K}=K_1 \mathbf{B}_{1} + K_2
501\mathbf{B}_{2} + K_3 \mathbf{B}_3$ of a k-point
502in relative (crystallographic) units, i.e., in fractional units with
503respect to the primitive reciprocal lattice vectors $\mathbf{B}_{i}$,
504$i \in [1,3]$. The position  of each
505k-point in this list assigns its numbering; the first k-point is
506k-point 1, the second is k-point 2, and so on.
507
508
509\noindent \verb#begin kpoints# \\
510$$
511\begin{array}{ccc}
512 K^{1}_{1} & K^{1}_{2} & K^{1}_{3} \\
513 K^{2}_{1} & K^{2}_{2} & K^{2}_{3} \\
514\vdots
515\end{array}
516$$
517\verb#end kpoints#
518
519%If a kpoint list is specified then \verb#mp_grid_automatic# must be
520%\verb#FALSE#.
521
522There is no default.
523
524{\bfseries Note}: There is an utility provided with {\tt wannier90},
525called {\tt kmesh.pl}, which helps to generate the explicit list of
526$k$ points required by {\tt wannier90}. See Sec.~\ref{sec:kmesh}.
527
528\subsection[gamma\_only]{{\tt logical :: gamma\_only}}
529
530If {\tt gamma\_only=true}, then \wannier\ uses a branch of algorithms
531for disentanglement and localisation that exploit the fact that the
532Bloch eigenstates obtained from the underlying ab initio calculation
533are manifestly real. This can be the case when only the $\Gamma$-point
534is used to sample the Brillouin zone. The localisation procedure
535that is used in the $\Gamma$-only branch is based on the method of
536Ref.~\cite{gygi-cpc03}.
537
538The default value is {\tt false}.
539
540
541\subsection[spinors]{{\tt logical :: spinors}}
542
543If {\tt spinors=true}, then \wannier\
544assumes that the WF correspond to singularly occupied spinor states and {\tt num\_elec\_per\_state=1}.
545
546The default value is {\tt false}.
547
548\subsection{Shells}
549
550The MV scheme requires a finite difference expression
551for $\nabla_{\bf k}$ defined on a uniform Monkhorst-Pack mesh of
552k-points. The vectors $\{{\bf b}\}$ connect each mesh-point ${\bf k}$
553  to its nearest neighbours. $N_{\mathrm{sh}}$ shells of neighbours
554  are included in the finite-difference formula, with $M_s$ vectors in
555  the $s^{\mathrm{th}}$ shell. For $\nabla_{{\bf k}}$ to be correct to
556  linear order, we require that the following equation is satisfied
557  (Eq.~B1 of Ref.~\cite{marzari-prb97}):
558\begin{equation}\label{eq:B1}
559\sum_{s}^{N_{\mathrm{sh}}} w_s \sum_i^{M_{\mathrm{s}}}
560b_{\alpha}^{i,s} b_{\beta}^{i,s} = \delta_{\alpha\beta}\:,
561\end{equation}
562where ${\bf b}^{i,s}$, $i\in[1,M_s]$, is the
563$i^{\mathrm{th}}$ vector belonging to the $s^{\mathrm{th}}$ shell
564with associated weight $w_s$, and $\alpha$ and $\beta$ run over the
565three Cartesian indices.
566
567
568\subsection[shell\_list]{\tt integer :: shell\_list(:)}
569
570\verb#shell_list# is vector listing the shells
571to include in the finite difference expression. If this keyword is
572absent, the shells are chosen automatically.
573
574\subsection[search\_shells]{\tt integer :: search\_shells}
575
576Specifies the number of shells of neighbours over which to search in
577attempting to determine an automatic solution to the B1 condition
578Eq.~\ref{eq:B1}. Larger values than the default may be required in special
579cases e.g. for very long thin unit cells.
580
581The default value is 36.
582
583\subsection[skip\_B1\_tests]{\tt logical :: skip\_B1\_tests}
584
585If set to \texttt{.true.}, does not check the B1 condition
586Eq.~\ref{eq:B1}. This should \emph{only} be used if one knows
587why the B1 condition should not be verified. A typical use of this
588flag is in conjunction with the Z2PACK code:
589\url{http://www.physics.rutgers.edu/z2pack/}.
590
591The default value is \texttt{.false.}.
592
593\subsection[nnkpts]{\tt integer, dimension(:, 5) :: nnkpts}
594
595Specifies the nearest-neighbour k-points which are written to the \texttt{.nnkp} file. This can be used to explicitly specify which overlap matrices should be calculated.
596
597\begin{verbatim}
598begin nnkpts
5991   2   0  0  0
600.
601.
602end nnkpts
603\end{verbatim}
604
605Each nearest neighbour $\mathbf{k + b}$ is given by a line of 5 integers. The first specifies the k-point number \texttt{nkp} of $\mathbf{k}$. The second is the k-point number of the neighbour. The final three integers specify the reciprocal lattice vector which brings the k-point specified by the second integer to $\mathbf{k + b}$.
606
607This format is the same as in the \texttt{.nnkp} file, except that the number of neighbours per k-point is not specified. However, the number of neighbours still needs to be a multiple of the number of k-points.
608
609This input parameter can be used only if \texttt{postproc\_setup = .true.}, and is not intended to be used with a full Wannier90 run. It can be used also if the k-points do not describe a regular mesh.
610
611\subsection[kmesh\_tol]{\tt real(kind=dp) :: kmesh\_tol}
612
613Two kpoints belong to the same shell if the distance between them is
614less than {\tt kmesh\_tol}.
615Units are Ang.
616
617The default value is 0.000001 Ang.
618
619\section{Projection}
620
621 The projections block defines a set of localised functions used to
622 generate an initial guess for the unitary transformations. %The projection block can be specified
623%in conjunction with {\tt scdm\_proj=true} (see below). This is only used to read the centres of the projections, which in some cases could help the optimisation if {\tt guiding\_centres=true} is added to the input file.
624This data will be written in the {\tt seedname.nnkp} file to be used
625by a first-principles code.
626
627\noindent \verb#begin projections# \\
628  . \\
629  . \\
630\verb#end projections#
631
632If \verb#guiding_centres#={\tt true}, then the projection centres are
633used as the guiding centres in the Wannierisation routine.
634
635For details see Section~\ref{sec:proj}.
636
637%\section{Constrains on centres}
638%
639%The constrained centres block defines the target positions, in fractional co-ordinates, for the OWFs whose centres are meant to be constrained.
640%
641%The block below shows all possible ways of setting the constraints. In particular, assuming $J'=5<J=${\tt num\_wann} :
642%
643%\noindent \verb#begin centre_constraints# \\
644%2 0.0 0.0 0.0 \\
645%4 0.25 0.0 0.0 \\
646%\verb#end centre_constraints#
647%
648%\begin{itemize}
649%\item The first line sets the constraint for the centre of OWF number 2 (as defined in the projection block) to (0.0,0.0,0.0) in fractional co-ordinates.
650%\item The second line sets the constraint for the centre of OWF number 4 (as defined in the projection block) to (0.25,0.0,0.0) in fractional co-ordinates.
651%\item The centres of all the other Objective Wannier functions, i.e. 1,3,5, etc. are set to their initial projection centres.
652%\end{itemize}
653
654\section{Job Control}
655
656\subsection[postproc\_setup]{\tt logical :: postproc\_setup}
657If \verb#postproc_setup#=\verb#true#, then the wannier code will write
658 {\tt seedname.nnkp} file and exit.
659If \wannier\ is called with the option {\tt -pp}, then
660 \verb#postproc_setup# is set to
661\verb#true#, over-riding its
662value in the {\tt seedname.win} file.
663
664The default value is \verb#false#.
665
666
667%\subsection[cp\_pp]{\tt logical :: cp\_pp}
668%If \verb#cp_pp#=\verb#true# we are using input files from the CP code.
669%
670%The default value is \verb#false#.
671
672
673\subsection[iprint]{\tt integer :: iprint}
674
675This indicates the level of verbosity of the output from 0 (``low''),
676the bare minimum, to 3 (``high''), which corresponds to full debugging output.
677
678The default value is 1.
679
680\subsection[optimisation]{\tt integer :: optimisation}
681
682This indicates the level of optimisation used in the code. This is a
683trade between speed and memory. A positive number indicates fastest execution time at the cost
684of more memory. Zero or negative numbers indicates a smaller memory footprint - at increased
685execution time.
686
687At the moment the only values that have an effect are \verb#optimisation<=0# (low memory) and \verb#optimisation>0# (fast)
688
689The default value is 3.
690
691
692
693\subsection[length\_unit]{\tt character(len=20) :: length\_unit}
694The length unit to be used for writing quantities in the output file
695{\tt seedname.wout}.
696
697The valid options for this parameter are:
698\begin{itemize}
699\item[{\bf --}]  \verb#Ang# (default)
700\item[{\bf --}]  \verb#Bohr#
701\end{itemize}
702
703\subsection[devel\_flag]{\tt character(len=50) :: devel\_flag}
704
705Not a regular keyword. Its purpose is to allow a developer to pass a
706string into the code to be used inside a new routine as it is developed.
707
708No default.
709
710%\subsection[calc\_only\_A]{\tt logical :: calc\_only\_A}
711%\red{Not yet implemented}
712%
713%If $\verb#calc_only_A#=\verb#.true.#$, then the \textit{ab initio}
714%code, eg \textsc{pwscf},
715%calculates only $A_{mn}^{(\mathbf{k})}$. Otherwise, both
716%$M_{mn}^{(\mathbf{k,b})}$ and $A_{mn}^{(\mathbf{k})}$ are
717%calculated.
718%
719%The default value of this parameter is \verb#false#.
720
721
722\subsection[exclude\_bands]{\tt integer :: exclude\_bands(:)}
723
724A k-point independent list of states to excluded from the calculation
725 of the overlap matrices;
726 for example to select only valence states, or ignore semi-core states.
727 This keyword is passed to the first-principles code via the
728 {\tt seedname.nnkp} file. For example, to exclude bands 2, 6, 7, 8
729 and 12:
730
731 \verb#exclude_bands : 2, 6-8, 12#
732
733\subsection[select\_projections]{\tt integer :: select\_projections(:)}
734
735A list of projections to be included in the wannierisation procedure.
736In the case that \verb#num_proj# is greater than \verb#num_wann#,
737  this keyword allows a subset of the projections in the projection matrices to be used.
738For example, to select the projections given by the indices 2, 6, 7, 8 and 12:
739
740 \verb#select_projections : 2, 6-8, 12#
741
742\subsection[auto\_projections]{\tt logical :: auto\_projections}
743
744If {\tt .true.} and no projections block is defined, then \wannier\ writes an additional block in the {\tt .nnkp} file during the pre-processing step, to instruct the interface code to automatically generate the $A_{mn}^{(\mathbf{k})}$.
745
746For additional information on the behavior and on the added block, see Sec.~\ref{sec:auto-projections-block}.
747
748\textbf{Note:} the interface code (e.g. \texttt{pw2wannier90.x}) must have at least one implementation of a
749method to automatically generate initial projections in order for this option to be usable.
750
751The default value of this parameter is $\verb#false#$.
752
753\subsection[restart]{\tt character(len=20) :: restart}
754
755If \verb#restart# is present the code will attempt to restart the calculation
756from the {\tt seedname.chk } file. The value of the parameter
757determines the position of the restart
758
759The valid options for this parameter are:
760\begin{itemize}
761\item[{\bf --}]  \verb#default#. Restart from the point at which the
762  check file {\tt seedname.chk} was written
763\item[{\bf --}]  \verb#wannierise#. Restart from the beginning of the
764  wannierise routine
765\item[{\bf --}]  \verb#plot#. Go directly to the plotting phase
766\item[{\bf --}]  \verb#transport#. Go directly to the transport routines
767
768
769\end{itemize}
770
771
772
773\subsection[wvfn\_formated]{\tt character(len=20) :: wvfn\_formatted}
774
775If \verb#wvfn_formatted#=\verb#true#, then the wavefunctions will be
776read from disk as formatted (ie ASCII) files; otherwise they will be
777read as unformatted files. Unformatted is generally preferable as the
778files will take less disk space and I/O is significantly
779faster. However such files will not be transferable between all
780machine architectures and formatted files should be used if
781transferability is required (i.e., for test cases).
782
783The default value of this parameter is $\verb#false#$.
784
785
786\subsection[spin]{\tt character(len=20) :: spin}
787For bands from a spin polarised calculation {\tt spin} determines which set
788of bands to read in, either \verb#up# or \verb#down#.
789
790The default value of this parameter is \verb#up#.
791
792
793\subsection[timing\_level]{\tt integer :: timing\_level}
794
795Determines the amount of timing information regarding the calculation
796that will be written to the output file. A value of 1 produces the
797least information.
798
799The default value is 1.
800
801\subsection[translate\_home\_cell]{\tt logical :: translate\_home\_cell}
802
803Determines whether to translate the final Wannier centres to the home
804unit cell at the end of the calculation. Mainly useful for molecular
805systems in which the molecule resides entirely within the home unit
806cell and user wants to write an xyz file ({\tt write\_xyz=.true.}) for
807the WF centres to compare with the structure.
808
809The default value is \verb#false#.
810
811\subsection[write\_xyz]{\tt logical :: write\_xyz}
812
813Determines whether to write the atomic positions and
814final Wannier centres to an xyz file,
815\verb#seedname_centres.xyz#, for subsequent
816visualisation.
817
818The default value is \verb#false#.
819
820\subsection[write\_vdw\_data]{\tt logical :: write\_vdw\_data}
821
822Determines whether to write \verb#seedname.vdw# for
823subsequent post-processing by the \verb#w90vdw# utility
824(in the \verb#utility/w90vdw/# directory of the
825distribution) for calculating van der Waals energies.
826Brillouin zone sampling must be at the Gamma-point only.
827
828The default value is \verb#false#.
829
830
831\section{Disentanglement}
832These keywords control the disentanglement routine of
833Ref.~\cite{souza-prb01}, i.e., the iterative minimisation of $\omi$. This
834routine will be activated if \verb#num_wann#$\:<\:$\verb#num_bands#.
835
836
837\subsection[dis\_win\_min]{\tt real(kind=dp) :: dis\_win\_min}
838The lower bound of the outer energy window for the disentanglement
839procedure. Units are eV.
840
841The default is the lowest eigenvalue in the system.
842
843\subsection[dis\_win\_max]{\tt real(kind=dp) :: dis\_win\_max}
844The upper bound of the outer energy window for the disentanglement
845procedure. Units are eV.
846
847The default is the highest eigenvalue in the given states (i.e., all states
848are included in the disentanglement procedure).
849
850\subsection[dis\_froz\_min]{\tt real(kind=dp) :: dis\_froz\_min}
851The lower bound of the inner energy window for the disentanglement
852procedure.  Units are eV.
853
854If \verb#dis_froz_max# is given, then the default for
855\verb#dis_froz_min# is \verb#dis_win_min#.
856
857
858\subsection[dis\_froz\_max]{\tt real(kind=dp) :: dis\_froz\_max}
859The upper bound of the inner (frozen) energy window for the
860disentanglement procedure. If \verb#dis_froz_max# is not specified,
861then there are no frozen states. Units are eV.
862
863No default.
864
865\subsection[dis\_num\_iter]{\tt integer :: dis\_num\_iter}
866In the disentanglement procedure, the
867number of iterations used to extract the most connected subspace.
868
869The default value is 200.
870
871\subsection[dis\_mix\_ratio]{\tt real(kind=dp) :: dis\_mix\_ratio}
872In the disentanglement procedure, the mixing parameter to use for
873convergence (see pages 4-5 of Ref.~\cite{souza-prb01}). A value of 0.5
874is a `safe' choice. Using 1.0 (i.e., no mixing) often gives faster
875convergence, but may cause the minimisation of $\omi$ to be unstable
876in some cases.
877
878Restriction: $0.0<\:${\tt dis\_mix\_ratio}$\:\leq 1.0$
879
880The default value is 0.5
881
882\subsection[dis\_conv\_tol]{\tt real(kind=dp) :: dis\_conv\_tol}
883
884In the disentanglement procedure, the minimisation of $\omi$ is said
885to be converged if the fractional change in the gauge-invariant spread
886between successive iterations is less than
887\verb#dis_conv_tol# for \verb#dis_conv_window# iterations. Units are \AA$^2$.
888
889The default value is 1.0E-10
890
891
892\subsection[dis\_conv\_window]{\tt integer :: dis\_conv\_window}
893
894In the disentanglement procedure, the minimisation is said to be converged
895if the fractional change in the spread between successive
896iterations is less than
897\verb#dis_conv_tol# for \verb#dis_conv_window# iterations.
898
899The default value of this parameter is 3.
900
901\subsection[dis\_spheres\_num]{\tt integer :: dis\_spheres\_num}
902Number of spheres in reciprocal space where the k-dependent
903disentanglement is performed. No disentanglement is performed for
904those k-points that are not included in any of the spheres.
905
906The default is 0, which means disentangle at every k-point in the full BZ (the standard mode in Wannier90).
907
908
909\subsection[dis\_spheres\_first\_wann]{\tt integer :: dis\_spheres\_first\_wann}
910Index of the first band that has to be considered as a Wannier function. Used only if {\tt dis\_spheres\_num} is greater than zero.
911At k-points where disentanglement is not performed the bands from
912{\tt dis\_spheres\_first\_wann} to {\tt dis\_spheres\_first\_wann+num\_wann} are used
913to wannierise. The bands excluded using {\tt exclude\_bands} should not
914be counted.
915
916The default is 1, the band at the lowest energy.
917
918
919\subsection[dis\_spheres]{dis\_spheres}
920Each line gives the coordinate $\mathbf{K}=K_1 \mathbf{B}_{1} + K_2
921\mathbf{B}_{2} + K_3 \mathbf{B}_3$ of a k-point representing the
922center of one of the spheres used for k-dependent disentanglement.
923The same crystallographic units as for {\tt kpoints} are used here.
924Each k-point coordinate $\mathbf{K}^i$ must the followed by the
925respectice sphere radius $r_{i}$ in inverse angstrom (on the same line).
926
927The number of lines must be equal to {\tt dis\_spheres\_num}.
928
929\noindent  \verb#begin dis_spheres#
930$$
931\begin{array}{cccc}
932 K^{1}_{1} & K^{1}_{2} & K^{1}_{3} & r_{1} \\
933 K^{2}_{1} & K^{2}_{2} & K^{2}_{3} & r_{2} \\
934\vdots
935\end{array}
936$$
937\verb#end dis_spheres#
938
939There is no default.
940
941
942\section{Wannierise}\label{sec:wann_params}
943Iterative minimisation of $\omt$, the non-gauge-invariant part of the
944spread functional.
945
946\subsection[num\_iter]{\tt integer :: num\_iter}
947
948Total number of iterations in the minimisation procedure.
949Set {\tt num\_iter=0} if you wish to generate
950  projected WFs rather than maximally-localized WFs (see Example~8 in
951  the Tutorial).
952
953The default value is 100
954
955\subsection[num\_cg\_steps]{\tt integer :: num\_cg\_steps}
956
957Number of conjugate gradient steps to take before resetting to steepest descents.
958
959The default value is 5
960
961\subsection[conv\_window]{\tt integer :: conv\_window}
962
963If {\tt conv\_window}$\:>1$, then the minimisation is said to be
964  converged if the change in $\Omega$ over {\tt
965  conv\_window} successive iterations is less than {\tt
966  conv\_tol}. Otherwise, the minimisation proceeds for
967  {num\_iter} iterations (default).
968
969The default value is -1
970
971\subsection[conv\_tol]{\tt real(kind=dp) :: conv\_tol}
972
973If {\tt conv\_window}$\:>1$, then this is the convergence tolerance on
974$\Omega$, otherwise not used. Units are \AA$^2$.
975
976The default value is 1.0E-10
977
978\subsection[precond]{\tt logical :: precond}
979
980Whether or not to use preconditioning to speed up the minimization of
981the spreads. This is based on the same idea as the classical
982Tetter-Payne-Allan preconditionning for DFT and dampens the
983high-frequency oscillations of the gradient due to contributions from
984large real lattice vectors. It is useful when the optimization is
985slow, especially on fine grids. When \verb#optimisation<3#, this uses
986a slower algorithm to save memory.
987
988The default value is \verb#false#.
989
990\subsection[conv\_noise\_amp]{\tt real(kind=dp) :: conv\_noise\_amp}
991
992If {\tt conv\_noise\_amp}$\:>0$, once convergence (as defined above) is
993achieved, some random noise $f$ is added to the search direction, and the
994minimisation is continued until convergence is achieved once more. If
995the same value of $\Omega$ as before is arrived at, then the calculation
996is considered to be converged. If not, then random noise is added
997again and the procedure repeated up to a maximum of {\tt
998  conv\_noise\_num} times. {\tt conv\_noise\_amp} is the amplitude of
999the random noise $f$ that is added to the search direction:
1000$0 < |f| <\:${\tt conv\_noise\_amp}. This functionality requires {\tt
1001  conv\_window}$\:>1$. If {\tt conv\_window} is not specified, it is set
1002to the value 5 by default.
1003
1004If {\tt conv\_noise\_amp}$\:\leq 0$, then no noise is added (default).
1005
1006The default value is -1.0
1007
1008\subsection[conv\_noise\_num]{\tt integer :: conv\_noise\_num}
1009
1010If {\tt conv\_noise\_amp}$\:>0$, then this is the number of times in the
1011minimisation that random noise is added.
1012
1013The default value is 3
1014
1015\subsection[num\_dump\_cycles]{\tt integer :: num\_dump\_cycles}
1016Write sufficient information to do a restart every
1017\verb#num_dump_cycles# iterations.
1018
1019The default is 100
1020
1021\subsection[num\_print\_cycles]{\tt integer :: num\_print\_cycles}
1022Write data to the master output file {\tt seedname.wout} every
1023\verb#num_print_cycles# iterations.
1024
1025The default is 1
1026
1027\subsection[write\_r2mn]{\tt logical :: write\_r2mn}
1028
1029If $\verb#write_r2mn#=\verb#true#$, then the matrix elements
1030$\langle m|r^2|n\rangle$ (where $m$ and $n$ refer to WF) are written
1031to file \verb#seedname.r2mn# at the end of the Wannierisation
1032procedure.
1033
1034The default value of this parameter is \verb#false#.
1035
1036
1037\subsection[guiding\_centres]{\tt logical :: guiding\_centres}
1038Use guiding centres during the minimisation, in order to avoid
1039local minima.
1040
1041\wannier\ uses a logarithm definition of the spread functional. As we are taking the log of a complex argument there is a possibility that the algorithm might make inconsistent choices for the branch cut. This manifests itself as complex WF with a large spread. By using guiding centres the code will attempt to make a consistent choice of branch cut. Experience shows that with \verb#guiding_centres# set to true this problem is avoided and doing so
1042does not cause any problems. For this reason we recommend setting \verb#guiding_centres# to true where possible (it is only not possible if an explicit projection block is not defined).
1043
1044The default value is \verb#false#.
1045
1046\subsection[num\_guide\_cycles]{\tt integer :: num\_guide\_cycles}
1047If \verb#guiding_centres# is set to true, then the
1048guiding centres are used only every \verb#num_guide_cycles#.
1049
1050The default value is 1.
1051
1052\subsection[num\_no\_guide\_iter]{\tt integer :: num\_no\_guide\_iter}
1053If \verb#guiding_centres# is set to true, then the
1054guiding centres are used only after \verb#num_no_guide_iter#
1055minimisation iterations have been completed.
1056
1057The default value is 0.
1058
1059\subsection[trial\_step]{\tt real(kind=dp) :: trial\_step}
1060The value of the trial step for the parabolic fit in the line
1061search minimisation used in the minimisation of the spread
1062function. Cannot be used in conjunction with \verb#fixed_step# (see
1063below). If the minimisation procedure doesn't converge, try decreasing
1064the value of \verb#trial_step# to give a more accurate line search.
1065
1066The default value is 2.0
1067
1068\subsection[fixed\_step]{\tt real(kind=dp) :: fixed\_step}
1069If this is given a value in the input file, then a fixed step of length
1070\verb#fixed_step# (instead of a parabolic
1071line search) is used at each iteration of the spread function
1072minimisation. Cannot be used in conjunction with
1073\verb#trial_step#. This can be useful in cases in which minimisation
1074with a line search fails to converge.
1075
1076There is no default value.
1077
1078\subsection[use\_bloch\_phases]{\tt logical :: use\_bloch\_phases}
1079
1080Determines whether to use the Bloch functions as the
1081initial guess for the projections. Can only be used if
1082\verb#disentanglement = false#.
1083
1084The default value is \verb#false#.
1085
1086
1087\subsection[site\_symmetry]{\tt logical :: site\_symmetry}
1088
1089Construct symmetry-adapted Wannier functions.
1090For the detail of the theoretical background, see Ref.~\cite{sakuma-prb13}.
1091Cannot be used in conjunction with the inner (frozen) energy window.
1092
1093The default value is \verb#false#.
1094
1095\subsection[symmetrize\_eps]{\tt real(kind=dp) :: symmetrize\_eps}
1096
1097Convergence threshold to check whether the symmetry condition (Eq. (19) in Ref.~\cite{sakuma-prb13})
1098on the unitary matrix $\Uk$ is satisfied or not.
1099See also Eq. (29) in Ref.~\cite{sakuma-prb13}.
1100Used when \verb#site_symmetry = .true#.
1101
1102The default value is 1.0E-3.
1103
1104% VV: Removed from Wannier90 and moved to pw2wannier90.f90
1105%\subsection[scdm\_proj]{\tt logical :: scdm\_proj}
1106%If {\tt scdm\_proj=true} then the $A_{mn}^{(\mathbf{k})}$ matrices are generated with the SCDM-k method of Ref.~\cite{LinLin-ArXiv2017}. In this case, one also needs to specify the {\tt scdm\_entanglement} keyword. One then needs to run {\tt wannier90.x -pp seedname} to generate the {\tt seedname.nnkp} file, to be used by a first-principle code (at the moment only interface available is with the QuantumEspresso code).
1107%
1108%The default value is {\tt false}.
1109%
1110%\subsection[scdm\_entanglement]{\tt integer :: scdm\_entanglement}
1111%Select the functional form for the occupation number matrix $f(\epsilon_{n\mathbf{k}})$ for the SCDM-k method.
1112%Only three integer values are allowed:
1113%
1114%\noindent {\tt isolated}: $f(\epsilon_{n\mathbf{k}})$ is the identity matrix $I_{n\mathbf{k}}$
1115%
1116%\noindent {\tt erfc}: The occupation number matrix is given by: $$f(\epsilon_{n\mathbf{k}})=\frac{1}{2}\mathtt{ERFC}\left(\frac{\epsilon_{n\mathbf{k}} - \mu}{\sigma}\right) $$
1117%
1118%\noindent {\tt gaussian}: The occupation number matrix is given by $$f(\epsilon_{n\mathbf{k}})=\mathtt{EXP}\left(-\frac{(\epsilon_{n\mathbf{k}}-\mu)^2}{\sigma^2}\right)$$
1119%
1120%The default value is {\tt isolated}.
1121%
1122%\subsection[scdm\_mu]{\tt real(kind=dp) :: scdm\_mu}
1123%The value of the $\mu$ parameter in the formulas above. It is strictly required only when {\tt scdm\_entanglement=erfc} or {\tt gaussian}. It defines the characteristic energy for the occupation numbers matrix, in units of eV. If {\tt scdm\_entanglement=erfc}, it gives the mean value of the complementary error function. If {\tt scdm\_entanglement=gaussian}, it gives the mean value of the gaussian instead.
1124%
1125%The default value is {\tt 0 eV}.
1126%
1127%\subsection[scdm\_sigma]{\tt real(kind=dp) :: scdm\_sigma}
1128%The value of the $\sigma$ parameter in the formulas for the occupation numbers matrix. It is strictly required only when {\tt scdm\_entanglement=erfc} or {\tt gaussian}. It defines the spread of the occupation numbers matrix around $\mu$, and as such it must be a positive real number. It must be given in units of eV.
1129%
1130%The default value is {\tt 1.0 eV}.
1131
1132\subsection[slwf\_num]{\tt integer :: slwf\_num}
1133The number of objective Wannier functions for selective localisation in the selectively localised Wannier function (SLWF) method of Ref.~\cite{Marianetti}. These functions are obtained by minimising the spread functional only with respect to the degrees of freedom of a subset of {\tt slwf\_num} $<$ {\tt num\_wann} functions. At convergence, the objective WFs will have a minimum cumulative spread, whereas the remaining {\tt num\_wann} $-$ {\tt slwf\_num} functions are left unoptimised. The initial guesses for the objective WFs are given by the first {\tt slwf\_num} orbitals in the {\tt projections} block. If {\tt slwf\_num = num\_wann} no selective minimisation is performed. In this case, \wannier\ will simply generate a set of {\tt num\_wann} MLWFs.
1134
1135The default is {\tt num\_wann}.
1136
1137\subsection[slwf\_constrain]{\tt logical :: slwf\_constrain}
1138If {\tt slwf\_constrain=true}, then the centres of the objective Wannier functions are constrained to either the centres of the first {\tt slwf\_num} orbitals in the {\tt projections} block or to new positions specified in the {\tt slwf\_centres} block (see Sec.~\ref{sec:centre_constraints}). In this case, a modified spread functional, $\Omega_c$, with the addition of a constraint term, as described in Ref.~\cite{Marianetti}.
1139
1140The default is {\tt false}
1141
1142\subsection[slwf\_lambda]{\tt real(kind=dp) :: slwf\_lambda}
1143The value of the Lagrange multiplier $\lambda$ for the constraint term in term added to modify the spread functional: $ \lambda \sum_{n=1}^{J'} \left(\overline{\mathbf{r}}_n - \mathbf{r}_{0n}\right)^2$, where $J'$ is {\tt slwf\_num}, and $\overline{\mathbf{r}}_{n}$ and $\mathbf{r}_{0n}$ are the centre and target centre, respectively, for the $n^{\text{th}}$ objective WF.
1144
1145The default is {\tt 0.0}.
1146
1147\subsection{Constraints on centres}
1148\label{sec:centre_constraints}
1149
1150If {\tt slwf\_constrain=true}, then by default the centres to which the {\tt slwf\_num} objective Wannier function centres are constrained are given by the first {\tt slwf\_num} rows of the {\tt projections} block.
1151
1152Optionally, the {\tt slwf\_centres} block may be used to define alternative target centres for some or all of the {\tt slwf\_num} objective Wannier functions.
1153
1154The block below shows an example of how to set the constraints:
1155
1156\noindent \verb#begin slwf_centres# \\
1157\verb#   2  0.0   0.0  0.0# \\
1158\verb#   4  0.25  0.0  0.0# \\
1159\verb#end slwf_centres#
1160
1161\begin{itemize}
1162\item The first line sets the constraint for the centre of objective WF number 2 (as defined by the order of WFs in the {\tt projections} block) to (0.0,0.0,0.0) in fractional co-ordinates.
1163\item The second line sets the constraint for the centre of objective WF number 4 (as defined by the order of WFs in the {\tt projections} block) to (0.25,0.0,0.0) in fractional co-ordinates.
1164\item The target centres of all other objective Wannier functions remain as the centres given in the corresponding rows of the {\tt projections} block.
1165\end{itemize}
1166
1167\section{Post-Processing}
1168\label{sec:post-p}
1169
1170 Capabilities:
1171
1172\begin{itemize}
1173\item[{\bf --}]  Plot the WF
1174\item[{\bf --}]  Plot the interpolated band structure
1175\item[{\bf --}]  Plot the Fermi surface
1176\item[{\bf --}]  Output the Hamiltonian in the WF basis
1177\item[{\bf --}]  Transport calculation (quantum conductance and
1178  density of states)
1179%\item[{\bf --}]  Plot the density of states.
1180\end{itemize}
1181
1182
1183\subsection[wannier\_plot]{\tt logical :: wannier\_plot}
1184
1185If $\verb#wannier_plot#=\verb#true#$, then the code will write out the
1186Wannier functions in a format specified by \verb#wannier_plot_format#
1187
1188The default value of this parameter is \verb#false#.
1189
1190
1191\subsection[wannier\_plot\_list]{\tt integer :: wannier\_plot\_list(:)}
1192
1193 A list of WF to plot. The WF numbered
1194 as per the {\tt seedname.wout} file after the minimisation of the
1195 spread.
1196
1197 The default behaviour is to plot all WF. For example,
1198 to plot WF 4, 5, 6 and 10:
1199
1200 \verb#wannier_plot_list : 4-6, 10#
1201
1202
1203\subsection[wannier\_plot\_supercell]{\tt integer :: wannier\_plot\_supercell}
1204
1205The code generates the WFs on a grid corresponding to a `super-unit-cell'.
1206If \verb#wannier_plot_supercell# is provided as a single integer,
1207then the size of the super-unit-cell is \verb#wannier_plot_supercell# times
1208the size of the unit cell along all three linear dimensions (the `home' unit cell
1209is kept approximately in the middle); otherwise, if three integers are
1210provided, the size of the super-unit-cell is \verb#wannier_plot_supercell(i)#
1211times the size of the unit cell along the $i-$th linear dimension.
1212
1213The default value is 2.
1214
1215
1216\subsection[wannier\_plot\_format]{\tt character(len=20) :: wannier\_plot\_format}
1217
1218WF can be plotted in either XCrySDen (xsf) format or Gaussian cube
1219format. The valid options for this parameter are:
1220\begin{itemize}
1221\item[{\bf --}] \verb#xcrysden# (default)
1222\item[{\bf --}] \verb#cube#
1223%\item[{\bf --}] gopenmol
1224%\item[{\bf --}] dan
1225\end{itemize}
1226
1227If {\tt wannier\_plot\_format=xsf}: the code outputs the WF on the entire super-unit-cell
1228specified by {\tt wannier\_plot\_supercell}.
1229
1230If {\tt wannier\_plot\_format=cube}: the code outputs the WF on a grid that is smaller
1231than the super-unit-cell specified by {\tt wannier\_plot\_supercell}. This grid is
1232determined by {\tt wannier\_plot\_mode}, {\tt wannier\_plot\_radius} and {\tt wannier\_plot\_scale},
1233described in detail below.
1234
1235The code is able to output Gaussian cube files for systems with non-orthogonal lattice vectors.
1236Many visualisation programs (including XCrySDen), however, are only able to handle cube files for systems
1237with \emph{orthogonal} lattice vectors. One visualisation program that is capable of dealing with non-orthogonal lattice vectors is
1238VESTA (\url{http://jp-minerals.org/vesta/en/}).\footnote{It's worth noting that another
1239  visualisation program, VMD (\url{http://www.ks.uiuc.edu/Research/vmd}), is able to
1240  deal with certain special cases of non-orthogonal lattice
1241  vectors; see \url{http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/cubeplugin.html} for details.}
1242
1243\subsection[wannier\_plot\_mode]{\tt character(len=20) :: wannier\_plot\_mode}
1244
1245Choose the mode in which to plot the WF, either as a molecule
1246or as a crystal.
1247%Only relevant if {\tt wannier\_plot\_format=xcrysden}.
1248
1249The valid options for this parameter are:
1250\begin{itemize}
1251\item[{\bf --}] \verb#crystal# (default)
1252\item[{\bf --}] \verb#molecule#
1253\end{itemize}
1254
1255If {\tt wannier\_plot\_format=cube}:
1256\begin{itemize}
1257\item if {\tt wannier\_plot\_mode = molecule}, then wherever the WF centre sits in the supercell, the origin of the cube is shifted (for the purpose of plotting only, ie, nothing is done to the U matrices etc) to coincide with the centre of mass of the atomic positions specified by the user in the {\tt *.win} input file. These atomic positions are also written to the cube file, so when it is visualised, the WF appears superimposed on the molecular structure.
1258\item if {\tt wannier\_plot\_mode = crystal}, then the WF is not shifted, but instead the code searches for atoms that are within a radius of {\tt wannier\_plot\_scale} $\times$ {\tt wannier\_plot\_radius} of the WF centre and writes the coordinates of these atoms to the cube file. In this way, when the cube file is visualised, the WF appears superimposed on the nearest atoms to the WF centre.
1259\item {\tt crystal} mode can be used for molecules, and {\tt molecule} mode can be used for crystals.
1260\end{itemize}
1261
1262\subsection[wannier\_plot\_radius]{\tt real(kind=dp) ::
1263  wannier\_plot\_radius}
1264
1265If {\tt wannier\_plot\_format=cube}, then {\tt
1266  wannier\_plot\_radius} is the radius of the sphere that must fit inside the parallelepiped in which the WF is plotted. {\tt wannier\_plot\_radius} must be greater than
1267  0. Units are \AA.
1268
1269The default value is 3.5.
1270
1271\subsection[wannier\_plot\_scale]{\tt real(kind=dp) ::
1272  wannier\_plot\_scale}
1273If {\tt wannier\_plot\_format=cube} and {\tt wannier\_plot\_mode=crystal}, then the code searches for atoms that are within a radius
1274of {\tt wannier\_plot\_scale} $\times$ {\tt wannier\_plot\_radius} of the WF centre and writes the coordinates of these atoms to the cube file.
1275In this way, when the cube file is visualised, the WF appears superimposed on the nearest atoms to the WF centre. {\tt wannier\_plot\_scale} must
1276be greater than 0. This parameter is dimensionless.
1277
1278The default value is 1.0.
1279
1280\subsection[wannier\_plot\_spinor\_mode]{\tt character(len=20) :: wannier\_plot\_spinor\_mode}
1281If $\verb#spinors#=\verb#true#$ then this parameter controls the
1282quantity to plot. For a spinor WF with components $[\phi,\psi]$ the quatity plotted is
1283\begin{itemize}
1284\item[{\bf --}] \verb#total# (default). $\sqrt{[|\phi|^2+|\psi|^2}$
1285\item[{\bf --}] \verb#up#. $|\phi|\times sign(Re\{\phi\})$ if $\verb#wannier_plot_spinor_mode#=\verb#true#$,
1286 otherwise $|\phi|$
1287\item[{\bf --}] \verb#down#. $|\psi|\times sign(Re\{\psi\})$ if
1288  $\verb#wannier_plot_spinor_mode#=\verb#true#$, otherwise $|\psi|$
1289\end{itemize}
1290Note: making a visual representation of a spinor WF is not as
1291straightforward as for a scalar WF. While  a scalar WF is typically a
1292real valued function, a spinor WF is a complex, two component
1293spinor. \wannier\ is able to plot several different quantities derived
1294from a spinor WF which should give you a good idea of the nature of
1295the WF.
1296
1297\subsection[wannier\_plot\_spinor\_phase]{\tt logical ::   wannier\_plot\_spinor\_phase}
1298If $\verb#wannier_plot_spinor_phase#=\verb#true#$ phase information will
1299be taken into account when plotting a spinor WF.
1300
1301\subsection[bands\_plot]{\tt logical :: bands\_plot}
1302
1303If $\verb#bands_plot#=\verb#true#$, then the code will calculate the band
1304structure, through Wannier interpolation,
1305 along
1306the path in k-space defined by \verb#bands_kpath# using \verb#bands_num_points# along the first
1307section of the path and write out an output file in a format specified
1308by \verb#bands_plot_format#.
1309
1310The default value is \verb#false#.
1311
1312
1313\subsection[kpoint\_path]{kpoint\_path}
1314Defines the path in k-space along which to calculate the
1315bandstructure. Each line gives the start and end point (with labels)
1316for a section of the path. Values are in fractional coordinates with
1317respect to the primitive reciprocal lattice vectors.
1318
1319\noindent  \verb#begin kpoint_path#
1320$$
1321\begin{array}{cccccccc}
1322G & 0.0 & 0.0 & 0.0 & L & 0.0 & 0.0 & 1.0 \\
1323L & 0.0 & 0.0 & 1.0 & N & 0.0 & 1.0 & 1.0 \\
1324\vdots
1325\end{array}
1326$$
1327\verb#end kpoint_path#
1328
1329
1330There is no default
1331
1332\subsection[bands\_num\_points]{\tt integer :: bands\_num\_points}
1333
1334If $\verb#bands_plot#=\verb#true#$, then the number of points along
1335the first section of the bandstructure plot given by
1336\verb#kpoint_path#. Other sections will have the same density of
1337k-points.
1338
1339The default value for \verb#bands_num_points# is 100.
1340
1341
1342\subsection[bands\_plot\_format]{\tt character(len=20) :: bands\_plot\_format}
1343
1344Format in which to plot the interpolated band structure.
1345The valid options for this parameter are:
1346\begin{itemize}
1347\item[{\bf --}] \verb#gnuplot# (default)
1348\item[{\bf --}] \verb#xmgrace#
1349\end{itemize}
1350Note: it is possible to request output in both formats eg
1351$\verb#bands_format#=\verb#gnuplot xmgrace#$
1352
1353
1354
1355\subsection[bands\_plot\_project]{\tt integer :: bands\_plot\_project(:)}
1356
1357If present \wannier\ will compute the contribution of this set of WF to the
1358states at each point of the interpolated band structure.
1359The WF are numbered according to the seedname.wout file. The result is written
1360in the {\tt seedname\_band.dat} file, and a corresponding gnuplot script to
1361{\tt seedname\_band\_proj.dat} .
1362
1363 For example, to project on to WFs 2, 6, 7, 8 and 12:
1364
1365 \verb#bands_plot_project : 2, 6-8, 12#
1366
1367
1368\subsection[bands\_plot\_mode]{\tt character(len=20) :: bands\_plot\_mode}
1369
1370To interpolate the band structure along the k-point path,
1371either use the Slater-Koster interpolation scheme
1372or truncate the Hamiltonian matrix in the WF basis.
1373Truncation criteria are provided by \verb#hr_cutoff#
1374and \verb#dist_cutoff#.
1375
1376The valid options for this parameter are:
1377\begin{itemize}
1378\item[{\bf --}] \verb#s-k# (default)
1379\item[{\bf --}] \verb#cut#
1380\end{itemize}
1381
1382\subsection[bands\_plot\_dim]{\tt integer :: bands\_plot\_dim}
1383
1384Dimension of the system.
1385If $\verb#bands_plot_dim#<\:$3 and $\verb#bands_plot_mode#=\verb#cut#$,
1386lattice vector $\mathbf{R}=N_1 \mathbf{A}_{1} + N_2 \mathbf{A}_{2} + N_3 \mathbf{A}_3$,
1387where $N_i=0$ if $\mathbf{A}_i$ is parallel to any of the
1388confined directions specified by \verb#one_dim_axis#,
1389are exclusively used in the band structure interpolation.
1390
1391The valid options for this parameter are:
1392\begin{itemize}
1393\item[{\bf --}] 3 (default)
1394\item[{\bf --}] 2
1395\item[{\bf --}] 1
1396\end{itemize}
1397
1398
1399\subsection[fermi\_surface\_plot]{\tt logical :: fermi\_surface\_plot}
1400
1401If $\verb#fermi_surface_plot#=\verb#true#$, then the code will calculate,
1402through Wannier interpolation, the
1403eigenvalues on a regular grid with \verb#fermi_surface_num_points# in
1404each direction. The code will write a file in bxsf format which can be
1405read by XCrySDen in order to plot the Fermi surface.
1406
1407The default value is \verb#false#.
1408
1409
1410\subsection[fermi\_surface\_num\_points]{\tt integer :: fermi\_surface\_num\_points}
1411
1412If $\verb#fermi_surface_plot#=\verb#true#$, then the number of divisions in
1413the regular k-point grid used to calculate the Fermi surface.
1414
1415The default value for \verb#fermi_surface_num_points# is 50.
1416
1417
1418\subsection[fermi\_energy]{\tt real(kind=dp) :: fermi\_energy}
1419The Fermi energy in eV. This parameter is written into the bxsf file.
1420If {\tt fermi\_energy} is specified, {\tt
1421    fermi\_energy\_min}, {\tt fermi\_energy\_max}, and {\tt
1422    fermi\_energy\_step} should not be specified, and vice-versa.
1423
1424%Whilst this is not directly used by the
1425%\wannier, it is a useful parameter to set as it will be written
1426%into the bxsf file.
1427
1428% There is no default value.
1429The default value is 0.0
1430
1431
1432\subsection[fermi\_energy]{\tt real(kind=dp) :: fermi\_energy\_min}
1433Instead of specifyfing a single Fermi energy, it is possible to scan
1434the Fermi level over a range of values, and recompute certain
1435quantities for each $\varepsilon_F$.\footnote{Scanning the Fermi level
1436  is currently supported only by the {\tt postw90} module {\tt berry},
1437  for {\tt berry\_task=ahc,morb}. For all other functionalities that
1438  require a knowledge of $\varepsilon_F$, use {\tt fermi\_energy}
1439  instead.}  This is the minimum value in the range (in eV).
1440
1441There is no default value.
1442
1443\subsection[fermi\_energy]{\tt real(kind=dp) :: fermi\_energy\_max}
1444The maximum value in the range of Fermi energies. Units are eV.
1445
1446The default value is {\tt fermi\_energy\_min}+1.0.
1447
1448\subsection[fermi\_energy]{\tt real(kind=dp) :: fermi\_energy\_step}
1449Difference between consecutive values of the Fermi energy when
1450scanning from {\tt fermi\_energy\_min} to {\tt
1451  fermi\_energy\_max}. Units are eV.
1452
1453The default value is 0.01.
1454
1455
1456\subsection[fermi\_surface\_plot\_format]{\tt character(len=20) ::
1457  fermi\_surface\_plot\_format}
1458
1459Format in which to plot the Fermi surface.
1460The valid options for this parameter are:
1461\begin{itemize}
1462\item[{\bf --}] \verb#xcrysden#  (default)
1463\end{itemize}
1464
1465\subsection[write\_hr]{\tt logical :: write\_hr}
1466
1467If $\verb#write_hr#=\verb#true#$, then the Hamiltonian matrix in the
1468WF basis will be written to a file {\tt seedname\_hr.dat}.
1469
1470The default value is {\tt false}.
1471
1472\subsection[write\_rmn]{\tt logical :: write\_rmn}
1473
1474If $\verb#write_rmn#=\verb#true#$, then the position operator in the
1475WF basis will be written to a file {\tt seedname\_r.dat}.
1476
1477The default value is {\tt false}.
1478
1479\subsection[write\_bvec]{\tt logical :: write\_bvec}
1480
1481If $\verb#write_bvec#=\verb#true#$, then the the matrix elements of
1482bvector and their weights will be written to a file {\tt seedname.bvec}.
1483
1484The default value is {\tt false}.
1485
1486
1487\subsection[write\_tb]{\tt logical :: write\_tb}
1488
1489If $\verb#write_tb#=\verb#true#$, then the lattice vectors, together
1490with the Hamiltonian and position-operator matrices in the WF basis,
1491will be written to a file {\tt seedname\_tb.dat}, in units
1492of Angstrom and eV.
1493
1494The default value is {\tt false}.
1495
1496
1497\subsection[transport]{\tt logical :: transport}
1498
1499If $\verb#transport#=\verb#true#$, then the code will calculate
1500quantum conductance and density of states of a one-dimensional system.
1501The results will be written to files \verb#seedname_qc.dat#
1502and \verb#seedname_dos.dat#, respectively.
1503Since both quantities are a function of energy,
1504they will be evaluated from \verb#tran_win_min# to \verb#tran_win_max#
1505with an interval of \verb#tran_energy_step#.
1506
1507The default value of this parameter is \verb#false#.
1508
1509\subsection[transport\_mode]{\tt character(len=20) :: transport\_mode}
1510
1511If $\verb#transport_mode#=\verb#bulk#$, quantum conductance
1512and density of states are calculated for a perfectly-periodic one-dimensional system.
1513In this case, the transport part can either use
1514the Hamiltonian matrix in the WF basis generated by \wannier\
1515or a Hamiltonian matrix provided by the external file
1516{\tt seedname\_htB.dat}.
1517
1518If $\verb#transport_mode#=\verb#lcr#$, quantum conductance and density
1519of states are calculated for a system where semi-infinite, left and
1520right leads are connected through a central conductor region.  In this
1521case, the transport part will work independently from the
1522disentanglement and wannierise procedure.  Details of the method is
1523described in Ref. \cite{nardelli-prb99}.
1524
1525If $\verb#tran_read_ht# = \verb#true#$ then the
1526Hamiltonian matrices must be provided by
1527the five external files:
1528{\tt seedname\_htL.dat, seedname\_htLC.dat, seedname\_htC.dat,
1529seedname\_htCR.dat, seedname\_htR.dat}.
1530If $\verb#tran_read_ht# = \verb#false#$ then the Hamiltonian
1531matrices are found automatically provided the supercell adheres to
1532conditions outlined in Section~\ref{sec:2c2}.
1533
1534The valid options for this parameter are:
1535\begin{itemize}
1536\item[{\bf --}] \verb#bulk#  (default)
1537\item[{\bf --}] \verb#lcr#
1538\end{itemize}
1539
1540\subsection[tran\_win\_min]{\tt real(kind=dp) :: tran\_win\_min}
1541The lower bound of the energy window for the transport calculation.
1542Units are eV.
1543
1544The default value is -3.0.
1545
1546\subsection[tran\_win\_max]{\tt real(kind=dp) :: tran\_win\_max}
1547The upper bound of the energy window for the transport calculation.
1548Units are eV.
1549
1550The default value is 3.0.
1551
1552\subsection[tran\_energy\_step]{\tt real(kind=dp) :: tran\_energy\_step}
1553Sampling interval of the energy values from \verb#tran_win_min#
1554to \verb#tran_win_max#.
1555Units are eV.
1556
1557The default value is 0.01.
1558
1559\subsection[fermi\_energy]{\tt real(kind=dp) :: fermi\_energy}
1560The Fermi energy in eV. The energy axis of the quantum conductance and
1561density of states data will be shifted rigidly by this amount.
1562
1563The default value is 0.0
1564
1565\subsection[tran\_num\_bb]{\tt integer :: tran\_num\_bb}
1566Size of a bulk Hamiltonian matrix.
1567This number is equal to the number of WFs in one principal
1568layer.
1569
1570A one-dimensional system can be viewed
1571as an array of principal layers
1572which are defined in a way that
1573localized basis functions inside a certain principal layer
1574only interact with those in the nearest neighbor principal layer.
1575In \wannier\ a principal layer will be an integer multiple
1576of a unit cell, and the size is determined by
1577\verb#hr_cutoff# and/or \verb#dist_cutoff#.
1578The criterion is rather arbitrary
1579when WFs are adopted as a localized basis set,
1580and it is up to a user's choice.
1581
1582The default value is 0.
1583
1584\subsection[tran\_num\_ll]{\tt integer :: tran\_num\_ll}
1585Size of a left-lead Hamiltonian matrix.
1586If $\verb#transport_mode# = \verb#lcr#$ and
1587$\verb#tran_read_ht# = \verb#false#$ then
1588\verb#tran_num_ll# is the number of Wannier functions
1589in a principal layer.
1590
1591The default value is 0.
1592
1593\subsection[tran\_num\_rr]{\tt integer :: tran\_num\_rr}
1594Size of a right-lead Hamiltonian matrix.
1595
1596The default value is 0.
1597
1598\subsection[tran\_num\_cc]{\tt integer :: tran\_num\_cc}
1599Size of a conductor Hamiltonian matrix.
1600
1601The default value is 0.
1602
1603\subsection[tran\_num\_lc]{\tt integer :: tran\_num\_lc}
1604Number of columns in a left-lead\_conductor Hamiltonian matrix.
1605Number of rows must be equal to \verb#tran_num_ll#.
1606
1607
1608The default value is 0.
1609
1610\subsection[tran\_num\_cr]{\tt integer :: tran\_num\_cr}
1611Number of rows in a conductor\_right-lead Hamiltonian matrix.
1612Number of columns must be equal to \verb#tran_num_rr#.
1613
1614The default value is 0.
1615
1616\subsection[tran\_num\_cell\_ll]{\tt integer :: tran\_num\_cell\_ll}
1617Number of unit cells in one principal layer of left lead.
1618Used if $\verb#transport_mode# = \verb#lcr#$ and
1619$\verb#tran_read_ht# = \verb#false#$.
1620
1621The default value is 0.
1622
1623\subsection[tran\_num\_cell\_rr]{\tt integer :: tran\_num\_cell\_rr}
1624Number of unit cells in one principal layer of right lead.
1625Not used at present.
1626
1627The default value is 0.
1628
1629\subsection[tran\_num\_bandc]{\tt integer :: tran\_num\_bandc}
1630
1631Half-bandwidth+1 of a band-diagonal conductor Hamiltonian matrix.
1632
1633The Hamiltonian matrix of a central conductor part, which is
1634read from \verb#seedname_htC.dat#, will be diagonally dominant
1635when \verb#tran_num_cc# is very large.
1636\verb#tran_num_bandc# is used to construct
1637a compact matrix which contains
1638the non-zero band-diagonal part of a full conductor Hamiltonian matrix.
1639Setting this parameter is only meaningful when
1640\verb#tran_num_bandc# is greater than
1641\verb#tran_num_lc# and \verb#tran_num_cr#.
1642
1643The default value is 0.
1644
1645\subsection[tran\_write\_ht]{\tt logical :: tran\_write\_ht}
1646
1647If $\verb#tran_write_ht#=\verb#true#$, then the Hamiltonian matrix
1648formatted for the transport calculation will be written
1649to a file \verb#seedname_htB.dat#.
1650
1651The default value is {\tt false}.
1652
1653\subsection[tran\_read\_ht]{\tt logical :: tran\_read\_ht}
1654
1655If $\verb#tran_write_ht#=\verb#true#$, then the Hamiltonian matrix
1656formatted for the transport calculation will be read
1657from a set of files described in the
1658parameter \verb#transport_mode#.
1659Set $\verb#tran_write_ht#=\verb#false#$ to perform automated
1660lcr calculations (see Section~\ref{sec:2c2}).
1661
1662The default value is {\tt false}.
1663
1664\subsection[tran\_use\_same\_lead]{\tt logical :: tran\_use\_same\_lead}
1665
1666If $\verb#tran_use_same_lead#=\verb#true#$, then the
1667left and the right leads are the same. In this case,
1668\verb#seedname_htR.dat# is not required.
1669
1670The default value is {\tt true}.
1671
1672\subsection[tran\_group\_threshold]{\tt real(kind=dp) :: tran\_group\_threshold}
1673
1674Used to group and sort Wannier functions according to the positions of their centres.
1675Wannier functions in a group are within \verb#tran_group_threshold#
1676from one another in \verb#x,y# and \verb#z# directions. Units are \AA
1677
1678The default is 0.15
1679
1680\subsection[translation\_centre\_frac]{\tt real(kind=dp) :: translation\_centre\_frac(3)}
1681
1682Centre of the unit cell to which the final Wannier centres are
1683translated. Numbers are in fractional coordinates with respect to the
1684lattice vectors.
1685
1686The default value is (0.0,0.0,0.0).
1687
1688\subsection[use\_ws\_distance]{\tt logical :: use\_ws\_distance}
1689
1690Improves the interpolation of the k-space Hamiltonian, by
1691applying a translation to each WF by a basis
1692vector of the super-lattice that minimises the distance between their centres.
1693The translation is dependent on both WF and on the unit cell vector
1694to which they belong, i.e., translate function $W_j({\bf r}-{\bf R})$ inside
1695the Wigner-Seitz cell centred on WF $W_i({\bf r})$.
1696
1697For a longer explanation, see Chapter~\ref{chap:interpolation}.
1698
1699If {\tt false} the code puts all the WF in the home cell, only possible choice until wannier90 v2.0.1.
1700
1701The default value is {\tt true} (default changed since v.3.0). Introduced in v2.1.
1702
1703\subsection[ws\_distance\_tol]{\tt real(kind=dp) :: ws\_distance\_tol}
1704
1705Tolerance when determining whether two values $\|\mathbf{d}_{ij\mathbf{R}} + \tilde{\mathbf{R}}_{nml} \|$ and $\|\mathbf{d}_{ij\mathbf{R}} + \tilde{\mathbf{R}}_{n'm'l'} \|$ (as defined in chapter~\ref{chap:interpolation}) for the shortest distance between two Wannier functions are equivalent. If the difference in distance (in Angstrom) is less than \texttt{ws\_distance\_tol}, they are taken to be equivalent.
1706
1707The default value is $10^{-5}$.
1708
1709\subsection[ws\_search\_size]{\tt :: ws\_search\_size}
1710Maximum absolute value for the integers $n,m,l$ that identify the super-lattice vectors $\tilde{\mathbf{R}}_{nml}$ (see chapter~\ref{chap:interpolation})
1711when searching for points inside the Wigner-Seitz cell.
1712If \verb#ws_search_size# is provided as a single integer,
1713then the number of repetitions of the Born-von Karman cell is the same
1714along all three linear dimensions; otherwise, if three integers are
1715provided, the number of repetitions along the $i-$th linear dimension is \verb#ws_search_size(i)#.
1716The variable is used both in \verb#hamiltonian.F90# and in \verb#ws_distance.F90#. In the latter case, its value is incremented by one in order to account for WFs whose centre wanders away from the original reference unit cell.\\
1717The default value is generally sufficient, but might need to be increased in case of elongated cells.
1718
1719The default value is 2.
1720
1721
1722\subsection[write\_u\_matrices]{\tt logical :: write\_u\_matrices}
1723
1724Write the $\mathbf{U}^{(\mathbf{k})}$ and $\mathbf{U}^{\mathrm{dis}(\mathbf{k})}$ matrices obtained at the end of wannierization to files
1725{\tt seedname\_u.mat} and {\tt seedname\_u\_dis.mat}, respectively.
1726
1727The default value is {\tt false}.
1728
1729
1730\subsection[hr\_cutoff]{\tt real(kind=dp) :: hr\_cutoff}
1731
1732The absolute value of the smallest matrix element of the
1733Hamiltonian in the WF basis.
1734If $h_{mn}(\mathbf{R})>\:${\tt
1735  hr\_cutoff}, then the matrix element
1736$h_{mn}(\mathbf{R})$ is retained and used in
1737the band structure interpolation (when $\verb#bands_plot_mode#=\verb#cut#$)
1738or in the transport calculation.
1739Otherwise it is deemed to be insignificant
1740and is discarded. Units are eV.
1741
1742%The absolute value of the largest matrix element of the
1743%Hamiltonian in the WF basis at lattice vector $\mathbf{R}$ is given by
1744%$h_{\mathrm{max}}(\mathbf{R}) = \left|\mathrm{max}\:\:
1745%H_{mn}(\mathbf{R})\right|$. If $h_{\mathrm{max}}(\mathbf{R})>\:${\tt
1746%  hr\_cutoff}, then the matrix elements
1747%$H_{mn}(\mathbf{R})$ are retained in the Hamiltonian that is written
1748%to {\tt seedname.h.dat}. Otherwise they are deemed to be insignificant
1749%and are discarded.
1750
1751The default value is 0.0.
1752
1753\subsection[dist\_cutoff]{\tt real(kind=dp) :: dist\_cutoff}
1754
1755The largest distance between two WFs for which
1756the Hamiltonian matrix element is retained and used in
1757the band interpolation (when $\verb#bands_plot_mode#=\verb#cut#$)
1758or in the transport calculation. Units are \AA.
1759
1760The default value is 1000.0.
1761
1762\subsection[dist\_cutoff\_mode]{\tt character(len=20) :: dist\_cutoff\_mode}
1763
1764Dimension in which the distance between two WFs is calculated.
1765The vector connecting two WFs may be projected
1766to a line (\verb#one_dim#) or a plane (\verb#two_dim#).
1767The size of the projected vector
1768is calculated, and \verb#dist_cutoff# is applied.
1769When \verb#one_dim# or \verb#two_dim#
1770is used, \verb#one_dim_axis# must be given
1771to specify extended or confined direction.
1772
1773The valid options for this parameter are:
1774\begin{itemize}
1775\item[{\bf --}] \verb#three_dim#  (default)
1776\item[{\bf --}] \verb#two_dim#
1777\item[{\bf --}] \verb#one_dim#
1778\end{itemize}
1779
1780\subsection[one\_dim\_axis]{\tt character(len=20) :: one\_dim\_axis}
1781
1782Extended direction for a one-dimensional system
1783or confined direction for a two-dimensional system.
1784This direction must be parallel to one of the Cartesian axes.
1785
1786The valid options for this parameter are:
1787\begin{itemize}
1788\item[{\bf --}] \verb#x#
1789\item[{\bf --}] \verb#y#
1790\item[{\bf --}] \verb#z#
1791\end{itemize}
1792
1793No default.
1794
1795
1796%\subsection[slice\_plot]{\tt logical :: slice\_plot}
1797%\red{Not yet implemented}
1798%
1799%If $\verb#slice_plot#=\verb#true#$ plot the wannier orbitals along
1800% slices in the super-unit-cell defined by \verb#slice_coord#.
1801
1802%The default value of this parameter is false
1803%
1804%\subsection[slice\_coord]{slice\_coord}
1805%\red{Not yet implemented}
1806%
1807%\noindent \verb#begin slice_coord#
1808%$$
1809%\begin{array}{ccccccccc}
1810%O_x & O_y & O_x & X_x & X_y & X_z & Y_x & Y_y & Y_z \\
1811%\vdots
1812%\end{array}
1813%$$
1814%\verb#end slice_coord#
1815%
1816%Define the direction of the plotting slices. O is the origin. The slice
1817%is defined by the lines OX and OY.
1818%
1819%There is no default
1820%
1821%\subsection[slice\_num\_points]{\tt integer :: slice\_num\_points}
1822%\red{Not yet implemented}
1823%
1824%If $\verb#slice_plot#=\verb#true#$ the number of points in the first
1825%direction of the slice. The number of points in the second direction
1826%will be chosen to give the same density of points.
1827%
1828%The default value for \verb#slice_num_points# is 50
1829%
1830%
1831%\subsection[slice\_plot\_format]{\tt character(len=20) :: slice\_plot\_format}
1832%\red{Not yet implemented}
1833%
1834%Format in which to plot the interpolated bandstructure
1835%
1836%The valid options for this parameter are:
1837%\begin{itemize}
1838%\item[{\bf --}] gnuplot
1839%\item[{\bf --}] plotmtv
1840%\end{itemize}
1841%
1842%The default value for \verb#slice_plot_format# is gnuplot.
1843
1844
1845
1846
1847%\subsection[dos\_plot]{\tt logical :: dos\_plot}
1848%\red{Not yet implemented}
1849%
1850%If $\verb#dos_plot#=\verb#true#$ the code will calculate,
1851%through Wannier interpolation, the
1852%eigenvalues on a regular grid with dimension \verb#dos_num_points#. The
1853%density of states will be calculated by applying a Gaussian smearing of
1854%width \verb#dos_gaussian_width#.
1855%
1856%The default value of this parameter is false
1857%
1858%
1859%\subsection[dos\_num\_points]{\tt integer :: dos\_num\_points}
1860%\red{Not yet implemented}
1861%
1862%If $\verb#dos_plot#=\verb#true#$ the dimension of the k-point mesh
1863%to sample in calculating the density of states.
1864%
1865%The default value for \verb#dos_num_points# is 50
1866%
1867%\subsection[dos\_energy\_step]{\tt real(kind=dp) :: dos\_energy\_step}
1868%\red{Not yet implemented}
1869%
1870%The density of states will be calculated from the
1871%lowest to highest eigenenergies in the system. \verb#dos_energy_step# determines
1872%the size of the steps on the energy axis.
1873%
1874%The default value for \verb#dos_energy_step# is 0.02eV
1875%
1876%\subsection[dos\_gaussian\_width]{\tt real(kind=dp) :: dos\_gaussian\_width}
1877%\red{Not yet implemented}
1878%
1879%The width of the gaussian smearing to apply to each eigenenergy when
1880%calculating the dos.
1881
1882
1883%The default value for \verb#dos_gaussian_width# is 0.2eV
1884%
1885%\subsection[dos\_plot\_format]{\tt character(len=20) :: dos\_plot\_format}
1886%\red{Not yet implemented}
1887%
1888%Format in which to plot the density of states
1889%
1890%The valid options for this parameter are:
1891%\begin{itemize}
1892%\item[{\bf --}] gnuplot
1893%\item[{\bf --}] xmgrace
1894%\end{itemize}
1895
1896%The default value for \verb#dos_plot_format# is gnuplot.
1897