The Elk Code
 
Loading...
Searching...
No Matches
elk.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2011 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6! main routine for the Elk code
7program elk
8use modmain
9use modmpi
10use modomp
11use modvars
12use modramdisk
13use moddelf
14implicit none
15! local variables
16logical exist
17character(64) str
18! initialise MPI execution environment
19call mpi_init(ierror)
20! duplicate mpi_comm_world
21call mpi_comm_dup(mpi_comm_world,mpicom,ierror)
22! determine the number of MPI processes
23call mpi_comm_size(mpicom,np_mpi,ierror)
24! determine the local MPI process number
25call mpi_comm_rank(mpicom,lp_mpi,ierror)
26! determine if the local process is the master
27if (lp_mpi == 0) then
28 mp_mpi=.true.
29 write(str,'("Elk code version ",I0,".",I0,".",I0," started")') version
30 call writebox(6,trim(str))
31else
32 mp_mpi=.false.
33end if
3410 continue
35! read input files
36call readinput
37! initialise OpenMP variables
38call omp_init
39! initialise the MKL library
40call mkl_init
41if (mp_mpi) then
42 write(*,*)
43 write(*,'("Number of MPI processes : ",I6)') np_mpi
44 write(*,'("Number of OpenMP threads per MPI process : ",I4)') maxthd
45 write(*,'("Total number of threads (MPI x OpenMP) : ",I6)') np_mpi*maxthd
46 write(*,'("Maximum OpenMP nesting level : ",I4)') maxlvl
47 write(*,'("Number of OpenMP threads at first nesting level : ",I4)') maxthd1
48 write(*,'("Number of MKL threads : ",I4)') maxthdmkl
49! check if Elk is already running in this directory
50 inquire(file='RUNNING',exist=exist)
51 if (exist) then
52 write(*,*)
53 write(*,'("Info(elk): several copies of Elk may be running in this path")')
54 write(*,'("(this could be intentional, or result from a previous crash,")')
55 write(*,'(" or arise from an incorrect MPI compilation)")')
56 else
57 open(50,file='RUNNING')
58 close(50)
59 end if
60 if (batch) then
61 wrtvars=.true.
62 write(*,*)
63 write(*,'("Batch mode enabled")')
64 end if
65 if (wrtvars) then
66! delete the VARIABLES.OUT file
67 call delfile('VARIABLES.OUT')
68! write version number to VARIABLES.OUT
69 call writevars('version',nv=3,iva=version)
70 end if
71else
72 wrtvars=.false.
73end if
74! initialise the RAM disk if required
75if (ramdisk) then
76 call initrd
77 if (mp_mpi) then
78 write(*,*)
79 write(*,'("RAM disk enabled")')
80 if (.not.wrtdsk) then
81 write(*,*)
82 write(*,'("Info(elk): some direct access files are not written to disk")')
83 end if
84 end if
85else
86 wrtdsk=.true.
87end if
88! perform the tasks
89do itask=1,ntasks
91 if (mp_mpi) then
92 write(str,'("Current task : ",I0)') task
93 call writebox(6,trim(str))
94 end if
95! increment the batch variables if required
96 if (batch) call batchdv
97! check if task can be run with MPI
98 if (lp_mpi > 0) then
99 if (all(task /= [0,1,2,3,5,15,16,28,29,61,62,63,110,120,121,125,135,136, &
100 162,170,180,185,200,201,202,205,208,209,240,241,270,271,300,320,330,331, &
101 350,351,352,371,372,373,380,390,420,421,440,460,461,462,463,471,478,600, &
102 601,610,620,640,680,700,701,720,725])) then
103 write(*,'("Info(elk): MPI process ",I6," idle for task ",I6)') lp_mpi,task
104 goto 20
105 end if
106 end if
107! write task to VARIABLES.OUT
108 if (wrtvars) call writevars('task',iv=task)
109 select case(task)
110 case(0,1)
111 call gndstate
112 case(2,3)
113 call geomopt
114 case(5)
115 call hartfock
116 case(10)
117 call writedos
118 case(14)
119 call writesf
120 case(15,16)
121 call writelsj
122 case(20,21,22,23)
123 call bandstr
124 case(25)
125 call effmass
126 case(28,29)
127 call mae
128 case(31,32,33)
129 call rhoplot
130 case(41,42,43)
131 call potplot
132 case(51,52,53)
133 call elfplot
134 case(61,62,63,162)
135 call wfplot
136 case(65)
137 call wfcrplot
138 case(68)
139 call rdstatus
140 case(71,72,73,81,82,83,141,142,143,151,152,153)
141 call vecplot
142 case(91,92,93)
143 call dbxcplot
144 case(100,101,103,104)
145 call fermisurf
146 case(102)
147 call fermisurfbxsf
148 case(105)
149 call nesting
150 case(110)
151 call mossbauer
152 case(115)
153 call writeefg
154 case(120)
155 call writepmat
156 case(121)
157 call dielectric
158 case(122)
159 call moke
160 case(125)
161 call nonlinopt
162 case(130)
163 call writeexpmat
164 case(135)
165 call writewfpw
166 case(140)
167 call elnes
168 case(150)
169 call writeevsp
170 case(160)
171 call torque
172 case(170)
173 call writeemd
174 case(171,172,173)
175 call emdplot
176 case(180)
177 call writeepsinv
178 case(185)
179 call writehmlbse
180 case(186)
181 call writeevbse
182 case(187)
183 call dielectric_bse
184 case(190)
185 call geomplot
186 case(195)
187 call sfacrho
188 case(196)
189 call sfacmag
190 case(200,201,202)
191 call phononsc
192 case(205)
193 call phonon
194 case(208,209)
195 call bornechg
196 case(210)
197 call phdos
198 case(220)
199 call phdisp
200 case(230)
201 call writephn
202 case(240,241)
203 call ephcouple
204 case(245)
205 call phlwidth
206 case(250)
207 call alpha2f
208 case(260)
209 call eliashberg
210 case(270,271)
211 call gndsteph
212 case(280)
213 call ephdos
214 case(285)
215 call aceplot
216 case(300)
217 call rdmft
218 case(320)
219 call tddftlr
220 case(330,331)
221 call tddftsplr
222 case(341,342,343)
223 call wxcplot
224 case(350,351,352)
225 call spiralsc
226 case(371,372,373)
227 call jprplot
228 case(380)
229 call piezoelt
230 case(390)
231 call magnetoelt
232 case(400)
233 call writetm
234 case(420,421)
235 call moldyn
236 case(430)
237 call writestrain
238 case(440)
239 call writestress
240 case(450)
241 call genafieldt
242 case(455)
243 call writeafpdt
244 case(456)
245 call writeefieldw
246 case(460,461,462,463)
247 call tddft
248 case(471)
249 call rhosplot
250 case(478)
251 call bornecdyn
252 case(480,481)
253 call dielectric_tdrt
254 case(500)
255 call testcheck
256 case(550)
257 call writew90
258 case(600,601)
259 call gwsefm
260 case(610)
261 call gwspecf
262 case(620)
263 call gwbandstr
264 case(640)
265 call gwdmat
266 case(680)
267 call tdhfc
268 case(700,701)
269 call gndstulr
270 case(710)
271 call writedosu
272 case(720,725)
273 call bandstrulr
274 case(731,732,733)
275 call rhouplot
276 case(741,742,743)
277 call potuplot
278 case(771,772,773)
279 call maguplot
280 case default
281 write(*,*)
282 write(*,'("Error(elk): task not defined : ",I8)') task
283 write(*,*)
284 stop
285 end select
286! reset the OpenMP thread variables
287 call omp_reset
28820 continue
289! synchronise MPI processes
290 call mpi_barrier(mpicom,ierror)
291! check if a restart is requested
292 call checkrst
293 if (trestart) then
294 if (mp_mpi) then
295 write(*,*)
296 write(*,'("Restarting Elk")')
297 end if
298 goto 10
299 end if
300end do
301if (mp_mpi) then
302 call delfile('RUNNING')
303 call writebox(6,"Elk code stopped")
304end if
305! terminate MPI execution environment
306call mpi_finalize(ierror)
307end program
308
309!BOI
310! !TITLE: {\huge{\sc The Elk Code Manual}}\\ \Large{\sc Version 10.6.11}\\ \vskip 20pt \includegraphics[height=1cm]{elk_silhouette.pdf}
311! !AUTHORS: {\sc J. K. Dewhurst, S. Sharma} \\ {\sc L. Nordstr\"{o}m, F. Cricchio, O. Gr\aa n\"{a}s} \\ {\sc E. K. U. Gross}
312! !AFFILIATION:
313! !INTRODUCTION: Introduction
314! Welcome to the Elk Code! Elk is an all-electron full-potential linearised
315! augmented-plane-wave (FP-LAPW) code for determining the properties of
316! crystalline solids. It was developed originally at the
317! Karl-Franzens-Universit\"{a}t Graz as part of the EXCITING EU Research and
318! Training Network project\footnote{EXCITING code developed under the Research
319! and Training Network EXCITING funded by the EU, contract No.
320! HPRN-CT-2002-00317}. The guiding philosophy during the implementation of the
321! code was to keep it as simple as possible for both users and developers
322! without compromising on its capabilities. All the routines are released
323! under either the GNU General Public License (GPL) or the GNU Lesser General
324! Public License (LGPL) in the hope that they may inspire other scientists to
325! implement new developments in the field of density functional theory and
326! beyond.
327!
328! \section{Acknowledgments}
329! Lots of people contributed to the Elk code with ideas, checking and testing,
330! writing code or documentation and general encouragement. They include
331! Claudia Ambrosch-Draxl, Clas Persson, Fredrik Bultmark, Christian Brouder,
332! Rickard Armiento, Andrew Chizmeshya, Per Anderson, Igor Nekrasov, Sushil
333! Auluck, Frank Wagner, Fateh Kalarasse, J\"{u}rgen Spitaler, Stefano
334! Pittalis, Nektarios Lathiotakis, Tobias Burnus, Stephan Sagmeister,
335! Christian Meisenbichler, S\'{e}bastien Leb\`{e}gue, Yigang Zhang, Fritz
336! K\"{o}rmann, Alexey Baranov, Anton Kozhevnikov, Shigeru Suehara, Frank
337! Essenberger, Antonio Sanna, Tyrel McQueen, Tim Baldsiefen, Marty Blaber,
338! Anton Filanovich, Torbj\"{o}rn Bj\"{o}rkman, Martin Stankovski, Jerzy
339! Goraus, Markus Meinert, Daniel Rohr, Vladimir Nazarov, Kevin Krieger, Pink
340! Floyd, Arkardy Davydov, Florian Eich, Aldo Romero Castro, Koichi Kitahara,
341! James Glasbrenner, Konrad Bussmann, Igor Mazin, Matthieu Verstraete, David
342! Ernsting, Stephen Dugdale, Peter Elliott, Marcin Dulak, Jos\'{e} A. Flores
343! Livas, Stefaan Cottenier, Yasushi Shinohara, Michael Fechner, Yaroslav
344! Kvashnin, Tristan M\"uller, Arsenii Gerasimov, Manh Duc Le, Jon Lafuente
345! Bartolom\'{e}, Ren\'{e} Wirnata, Jagdish Kumar, Andrew Shyichuk, Nisha
346! Singh, Pietro Bonfa, Ronald Cohen, Alyn James, Chung-Yu Wang, Leon Kerber,
347! Yunfan Liang, Xavier Gonze, Mike Bruckhoff, Eddie Harris-Lee, Andreas
348! Fischer, Wenhan Chen and Jyoti Krishna. Special mention of David Singh's
349! very useful book on the LAPW method\footnote{D. J. Singh, {\it Planewaves,
350! Pseudopotentials and the LAPW Method} (Kluwer Academic Publishers, Boston,
351! 1994).} must also be made. Finally we would like to acknowledge the generous
352! support of Karl-Franzens-Universit\"{a}t Graz, the EU Marie-Curie Research
353! Training Networks initiative, the Max Born Institute and the Max Planck
354! Society.
355!
356! \vspace{24pt}
357! Kay Dewhurst, Sangeeta Sharma \\
358! Lars Nordstr\"{o}m, Francesco Cricchio, Oscar Gr\aa n\"{a}s \\
359! Hardy Gross
360!
361! \vspace{12pt}
362! Halle, Berlin, Uppsala and Jerusalem
363! \newpage
364!
365! \section{Units}
366! Unless explicitly stated otherwise, Elk uses atomic units. In this system
367! $\hbar=1$, the electron mass $m=1$, the Bohr radius $a_0=1$ and the electron
368! charge $e=1$ (note that the electron charge is positive, so that the atomic
369! numbers $Z$ are negative). Thus the atomic unit of length is
370! 0.529177210903(80) \AA, and the atomic unit of energy is the Hartree which
371! equals 27.211386245988(53) eV. The unit of the external magnetic fields is
372! defined such that one unit of magnetic field in {\tt elk.in} equals
373! 1715.255541 Tesla.
374!
375! \section{Compiling and running Elk}
376! \subsection{Compiling the code}
377! Unpack the code from the archive file. Edit the file {\tt make.inc} in the
378! {\tt elk} directory and adjust the compiler options for your computer
379! system. Use of machine-optimised BLAS/LAPACK and FFT libraries will result
380! in significant increase in performance. Following this, run
381! \begin{verbatim}
382! make
383! \end{verbatim}
384! This will hopefully compile the entire code and all the libraries into one
385! executable, {\tt elk}, located in the {\tt elk/src} directory. It will also
386! compile two useful auxiliary programs, namely {\tt spacegroup} for producing
387! crystal geometries from spacegroup data and {\tt eos} for fitting equations
388! of state to energy-volume data. If you want to compile everything all over
389! again, then run {\tt make clean} from the {\tt elk} directory, followed by
390! {\tt make}.
391! \subsubsection{Parallelism in Elk}
392! Three forms of parallelism are implemented in Elk, and all can be used in
393! combination with each other, with efficiency depending on the particular
394! task, crystal structure and computer system. You may need to contact your
395! system administrator for assistance with running Elk in parallel.
396! \begin{enumerate}
397! \item
398! OpenMP works for symmetric multiprocessors, i.e. computers that have many
399! cores with the same unified memory accessible to each. It is enabled by
400! setting the appropriate command-line options (e.g. {\tt -qopenmp} for the
401! Intel compiler) before compiling, and also at runtime by the environment
402! variable
403! \begin{verbatim}
404! export OMP_NUM_THREADS=n
405! \end{verbatim}
406! where n is the number of cores available on a particular node. The same can
407! be accomplished in {\tt elk.in} with
408! \begin{verbatim}
409! maxthd
410! n
411! \end{verbatim}
412! In addition, some vendor-supplied BLAS/LAPACK libraries use OpenMP
413! internally. The maximum number of threads used for LAPACK operations by
414! Intel's MKL can be set with
415! \begin{verbatim}
416! maxthdmkl
417! n
418! \end{verbatim}
419! \item
420! The message passing interface (MPI) is particularly suitable for running
421! Elk across multiple nodes of a cluster, with scaling to hundreds of
422! processors possible. To enable MPI, comment out the lines indicated in
423! {\tt elk/make.inc}. Then run {\tt make clean} followed by {\tt make}. If
424! $y$ is the number of nodes and $x$ is the number of cores per node, then at
425! runtime envoke
426! \begin{verbatim}
427! mpirun -np z ./elk
428! \end{verbatim}
429! where $z=x y$ is the total number of cores available on the machine.
430! Highest efficiency is obtained by using hybrid parallelism with OpenMP on
431! each node and MPI across nodes. This can be done by compiling the code
432! using the MPI Fortran compiler in combination with the OpenMP command-line
433! option. At runtime set {\tt export OMP\_NUM\_THREADS=x} and start the MPI
434! run with {\em one process per node} as follows
435! \begin{verbatim}
436! mpirun -pernode -np y ./elk
437! \end{verbatim}
438! The number of MPI processes is reported in the file {\tt INFO.OUT} which
439! serves as a check that MPI is running correctly. Note that version 2 of the
440! MPI libraries is required to run Elk.
441! \item
442! Phonon calculations use a simple form of parallelism by just examining the
443! run directory for dynamical matrix files. These files are of the form
444! \begin{verbatim}
445! DYN_Qqqqq_qqqq_qqqq_Sss_Aaa_Pp.OUT
446! \end{verbatim}
447! and contain a single row of a particular dynamical matrix. Elk simply finds
448! which {\tt DYN} files do not exist, chooses one and runs it. This way many
449! independent runs of Elk can be started in the same directory on a networked
450! file system (NFS), and will run until all the dynamical matrices files are
451! completed. Should a particular run crash, then delete the associated empty
452! {\tt DYN} file and rerun Elk.
453! \end{enumerate}
454!
455! \subsection{Memory requirements}
456! Elk is a memory-bound code and runs best on processors with large caches and
457! a large number of memory channels per core. Some tasks in Elk require a
458! considerable amount of memory which can exceed the physical memory of the
459! computer. In such cases, the number of threads at the first nesting level
460! can be reduced with (for example)
461! \begin{verbatim}
462! maxthd1
463! -4
464! \end{verbatim}
465! which restricts the number of threads at the first nesting level to
466! maxthd/4. Deeper nesting levels, which generally require less memory, will
467! still utilise the full compliment of available threads.
468! \subsubsection{Stack space}
469! The latest versions of Elk use stack space aggressively. This is because
470! accessing variables is faster on the stack than on the heap. This can,
471! however, result in the code crashing as threads run out of their stack
472! space. To avoid this, increase the stack size for each OpenMP thread with
473! (for example)
474! \begin{verbatim}
475! export OMP_STACKSIZE=512M
476! \end{verbatim}
477! before running the code.
478!
479! \subsection{Linking with the Libxc functional library}
480! Libxc is a library of exchange-correlation functionals. Elk can use the
481! complete set of LDA and GGA functionals available in Libxc as well as some
482! meta-GGAs. In order to enable this, first download and compile Libxc. This
483! should have produced the files {\tt libxc.a} and {\tt libxcf03.a} in the
484! Libxc directory {\tt src/.libs}. Copy these to the {\tt elk/src} directory
485! and then uncomment the lines indicated for Libxc in {\tt elk/make.inc}. Once
486! this is done, run {\tt make clean} followed by {\tt make}. To select a
487! particular functional of Libxc, use the block
488! \begin{verbatim}
489! xctype
490! 100 nx nc
491! \end{verbatim}
492! where {\tt nx} and {\tt nc} are, respectively, the numbers of the exchange
493! and correlation functionals in the Libxc library. See the file
494! {\tt elk/src/libxcf03.f90} for a list of the functionals and their
495! associated numbers.
496!
497! \subsection{Running the code}
498! As a rule, all input files for the code are in lower case and end with the
499! extension {\tt .in}. All output files are uppercase and have the extension
500! {\tt .OUT}. For most cases, the user will only need to modify the file
501! {\tt elk.in}. In this file input parameters are arranged in blocks.
502! Each block consists of a block name on one line and the block variables on
503! subsequent lines. Almost all blocks are optional: the code uses reasonable
504! default values in cases where they are absent. Blocks can appear in any
505! order, if a block is repeated then the second instance is used. Comment
506! lines can be included in the input file and begin with the {\tt !}
507! character.
508!
509! \subsubsection{Species files}
510! The only other input files are those describing the atomic species which go
511! into the crystal. These files are found in the {\tt species} directory and
512! are named with the element symbol and the extension {\tt .in}, for example
513! {\tt Sb.in}. They contain parameters like the atomic charge, mass,
514! muffin-tin radius, occupied atomic states and the type of linearisation
515! required. Here as an example is the copper species file {\tt Cu.in}:
516! \begin{verbatim}
517! 'Cu' : spsymb
518! 'copper' : spname
519! -29.0000 : spzn
520! 115837.2716 : spmass
521! 0.371391E-06 2.0000 34.8965 500 : rminsp, rmt, rmaxsp, nrmt
522! 10 : nstsp
523! 1 0 1 2.00000 T : nsp, lsp, ksp, occsp, spcore
524! 2 0 1 2.00000 T
525! 2 1 1 2.00000 T
526! 2 1 2 4.00000 T
527! 3 0 1 2.00000 T
528! 3 1 1 2.00000 F
529! 3 1 2 4.00000 F
530! 3 2 2 4.00000 F
531! 3 2 3 6.00000 F
532! 4 0 1 1.00000 F
533! 1 : apword
534! 0.1500 0 F : apwe0, apwdm, apwve
535! 1 : nlx
536! 2 2 : lx, apword
537! 0.1500 0 T : apwe0, apwdm, apwve
538! 0.1500 1 T
539! 4 : nlorb
540! 0 2 : lorbl, lorbord
541! 0.1500 0 F : lorbe0, lorbdm, lorbve
542! 0.1500 1 F
543! 1 2
544! 0.1500 0 F
545! 0.1500 1 F
546! 2 2
547! 0.1500 0 F
548! 0.1500 1 F
549! 1 3
550! 0.1500 0 F
551! 0.1500 1 F
552! -2.8652 0 T
553! \end{verbatim}
554! The input parameters are defined as follows:
555! \vskip 6pt
556! {\tt spsymb} \\
557! The symbol of the element.
558! \vskip 6pt
559! {\tt spname} \\
560! The name of the element.
561! \vskip 6pt
562! {\tt spzn} \\
563! Nuclear charge: should be negative since the electron charge is taken to be
564! postive in the code; it can also be fractional for purposes of doping.
565! \vskip 6pt
566! {\tt spmass} \\
567! Nuclear mass in atomic units.
568! \vskip 6pt
569! {\tt rminsp}, {\tt rmt}, {\tt rmaxsp}, {\tt nrmt} \\
570! Respectively, the minimum radius on logarithmic radial mesh; muffin-tin
571! radius; effective infinity for atomic radial mesh; and number of radial mesh
572! points to muffin-tin radius.
573! \vskip 6pt
574! {\tt nstsp} \\
575! Number of atomic states.
576! \vskip 6pt
577! {\tt nsp}, {\tt lsp}, {\tt ksp}, {\tt occsp}, {\tt spcore} \\
578! Respectively, the principal quantum number of the radial Dirac equation;
579! quantum number $l$; quantum number $k$ ($l$ or $l+1$); occupancy of atomic
580! state (can be fractional); {\tt .T.} if state is in the core and therefore
581! treated with the Dirac equation in the spherical part of the muffin-tin
582! Kohn-Sham potential.
583! \vskip 6pt
584! {\tt apword} \\
585! Default APW function order, i.e. the number of radial functions and
586! therefore the order of the radial derivative matching at the muffin-tin
587! surface.
588! \vskip 6pt
589! {\tt apwe0}, {\tt apwdm}, {\tt apwve} \\
590! Respectively, the default APW linearisation energy; the order of the energy
591! derivative of the APW radial function $\partial^m u(r)/\partial E^m$; and
592! {\tt .T.} if the linearisation energy is allowed to vary.
593! \vskip 6pt
594! {\tt nlx} \\
595! The number of exceptions to the default APW configuration. These should be
596! listed on subsequent lines for particular angular momenta. In this example,
597! the fixed energy APW with angular momentum $d$ ({\tt lx} $=2$) is replaced
598! with a LAPW, which has variable linearisation energy.
599! \vskip 6pt
600! {\tt nlorb} \\
601! Number of local-orbitals.
602! \vskip 6pt
603! {\tt lorbl}, {\tt lorbord} \\
604! Respectively, the angular momentum $l$ of the local-orbital; and the order
605! of the radial derivative which goes to zero at the muffin-tin surface.
606! \vskip 6pt
607! {\tt lorbe0}, {\tt lorbdm}, {\tt lorbve} \\
608! Respectively, the default local-orbital linearisation energy; the order of
609! the energy derivative of the local-orbital radial function; and {\tt .T.} if
610! the linearisation energy is allowed to vary.
611!
612! \subsubsection{Examples}
613! The best way to learn to use Elk is to run the examples included with the
614! package. These can be found in the {\tt examples} directory and use many of
615! the code's capabilities. The following section which describes all the input
616! parameters will be of invaluable assistance.
617!
618! \section{Input blocks}
619! This section lists all the input blocks available. It is arranged with the
620! name of the block followed by a table which lists each parameter name, what
621! the parameter does, its type and default value. A horizontal line in the
622! table indicates a new line in {\tt elk.in}. Below the table is a brief
623! overview of the block's function.
624!
625! \block{atoms}{
626! {\tt nspecies} & number of species & integer & 0 \\
627! \hline
628! {\tt spfname(i)} & species filename for species $i$ & string & - \\
629! \hline
630! {\tt natoms(i)} & number of atoms for species $i$ & integer & - \\
631! \hline
632! {\tt atposl(j,i)} & atomic position in lattice coordinates for atom $j$
633! & real(3) & - \\
634! {\tt bfcmt(j,i)} & muffin-tin external magnetic field in Cartesian
635! coordinates for atom $j$ & real(3) & -}
636! Defines the atomic species as well as their positions in the unit cell and
637! the external magnetic field applied throughout the muffin-tin. These fields
638! are used to break spin symmetry and should be considered infinitesimal as
639! they do not contribute directly to the total energy. Collinear calculations
640! are more efficient if the field is applied in the $z$-direction. One could,
641! for example, set up an antiferromagnetic crystal by pointing the field on
642! one atom in the positive $z$-direction and in the opposite direction on
643! another atom. If {\tt molecule} is {\tt .true.} then the atomic positions
644! are assumed to be in Cartesian coordinates. See also {\tt sppath},
645! {\tt bfieldc} and {\tt molecule}.
646!
647! \block{autokpt}{
648! {\tt autokpt} & {\tt .true.} if the $k$-point set is to be determined
649! automatically & logical & {\tt .false.}}
650! See {\tt radkpt} for details.
651!
652! \block{autolinengy}{
653! {\tt autolinengy} & {\tt .true.} if the fixed linearisation energies are
654! to be determined automatically & logical & {\tt .false.}}
655! See {\tt dlefe} for details.
656!
657! \block{autoswidth}{
658! {\tt autoswidth} & {\tt .true.} if the smearing parameter {\tt swidth}
659! should be determined automatically & logical & {\tt .false.}}
660! Calculates the smearing width from the $k$-point density, $V_{\rm BZ}/n_k$;
661! the valence band width, $W$; and an effective mass parameter, $m^{*}$;
662! according to
663! $$ \sigma=\frac{\sqrt{2W}}{m^{*}}\left(\frac{3}{4\pi}
664! \frac{V_{\rm BZ}}{n_k}\right)^{1/3}. $$
665! The variable {\tt mstar} then replaces {\tt swidth} as the control parameter
666! of the smearing width. A large value of $m^{*}$ gives a narrower smearing
667! function. Since {\tt swidth} is adjusted according to the fineness of the
668! ${\bf k}$-mesh, the smearing parameter can then be eliminated. It is not
669! recommended that {\tt autoswidth} be used in conjunction with the
670! Fermi-Dirac smearing function, since the electronic temperature will then be
671! a function of the $k$-point mesh. See T. Bj\"orkman and O. Gr\aa n\"as,
672! {\it Int. J. Quant. Chem.} DOI: 10.1002/qua.22476 (2010) for details. See
673! also {\tt stype} and {\tt swidth}.
674!
675! \block{avec}{
676! {\tt avec(1)} & first lattice vector & real(3) & $(1.0,0.0,0.0)$ \\
677! \hline
678! {\tt avec(2)} & second lattice vector & real(3) & $(0.0,1.0,0.0)$ \\
679! \hline
680! {\tt avec(3)} & third lattice vector & real(3) & $(0.0,0.0,1.0)$}
681! Lattice vectors of the crystal in atomic units (Bohr).
682!
683! \block{avecref}{
684! {\tt avecref(1)} & first reference lattice vector, etc. & real(3) &
685! $(0.0,0.0,0.0)$}
686! Reference lattice vectors for calculating the ${\bf G}$-vector grid and
687! derived quantities. If any of these elements are non-zero then the code
688! computes the corresponding reciprocal lattice vectors and set of
689! ${\bf G}$-vectors. These are then transformed to be identical to those
690! calculated with {\tt avec}. The purpose of this is to enable accurate
691! energy-volume curves, where the number of grid points should remain fixed
692! for all volumes.
693!
694! \block{beta0}{
695! {\tt beta0} & adaptive mixing parameter & real & $0.05$}
696! This determines how much of the potential from the previous self-consistent
697! loop is mixed with the potential from the current loop. It should be made
698! smaller if the calculation is unstable. See {\tt betamax} and also the
699! routine {\tt mixadapt}.
700!
701! \block{betamax}{
702! {\tt betamax} & maximum adaptive mixing parameter & real & $0.5$}
703! Maximum allowed mixing parameter used in routine {\tt mixadapt}.
704!
705! \block{bfdmag}{
706! {\tt bfdmag} & {\tt .true.} if the external ${\bf B}$-field diamagnetic
707! coupling term should be included & logical & {\tt .false.}}
708! This causes the diamagnetic coupling term
709! $$ H_{\rm dia}=\frac{B^2 r^2}{8c^2}\big(1-(\hat{\bf B}\cdot
710! \hat{\bf r})^2\big) $$
711! to be included in the first-variational Hamiltonian. Note that because this
712! is a scalar potential, spin-polarisation does not have to be enabled for
713! this term to have an effect.
714!
715! \block{bfieldc}{
716! {\tt bfieldc} & global external magnetic field in Cartesian coordinates &
717! real(3) & $(0.0,0.0,0.0)$}
718! This is a constant magnetic field applied throughout the entire unit cell
719! and enters the second-variational Hamiltonian as
720! $$ \frac{g_e}{4c}\,\vec{\sigma}\cdot{\bf B}, $$
721! where $g_e$ is the electron $g$-factor. This field is normally used to break
722! spin symmetry for spin-polarised calculations and considered to be
723! infinitesimal with no direct contribution to the total energy. In cases
724! where the magnetic field is finite (for example when computing magnetic
725! response) the external ${\bf B}$-field energy reported in {\tt INFO.OUT}
726! should be added to the total by hand. This field is applied throughout the
727! entire unit cell. To apply magnetic fields in particular muffin-tins use the
728! {\tt bfcmt} vectors in the {\tt atoms} block. Collinear calculations are
729! more efficient if the field is applied in the $z$-direction.
730!
731! \block{bfieldcu}{
732! {\tt bfieldcu} & global external magnetic field in Cartesian coordinates &
733! real(3) & $(0.0,0.0,0.0)$}
734! As with {\tt bfieldc} but applied only in the ultracell during an ultra
735! long-range calculation.
736!
737! \block{bforb}{
738! {\tt bforb} & {\tt .true.} if the external ${\bf B}$-field-orbit coupling
739! term should be included & logical & {\tt .false.}}
740! This causes the term corresponding to the coupling between an external
741! magnetic field and the orbit of an electron (orbital paramagnetism)
742! $$ \hat{H}_{{\bf B}{\rm o}}=\frac{1}{2c}{\bf B}\cdot\hat{\bf L} $$
743! to be added to the second-variational Hamiltonian. Spin-polarisation is
744! automatically enabled.
745!
746! \block{broydpm}{
747! {\tt broydpm} & Broyden mixing parameters $\alpha$ and $w_0$ & real &
748! $(0.4,0.15)$}
749! See {\tt mixtype} and {\tt mixsdb}.
750!
751! \block{c\_tb09}{
752! {\tt c\_tb09} & Tran-Blaha constant $c$ & real & -}
753! Sets the constant $c$ in the Tran-Blaha '09 functional. Normally this is
754! calculated from the density, but there may be situations where this needs to
755! be adjusted by hand. See {\it Phys. Rev. Lett.} {\bf 102}, 226401 (2009).
756!
757! \block{chgexs}{
758! {\tt chgexs} & excess electronic charge & real & $0.0$}
759! This controls the amount of charge in the unit cell beyond that required to
760! maintain neutrality. It can be set positive or negative depending on whether
761! electron or hole doping is required.
762!
763! \block{cmagz}{
764! {\tt cmagz} & .true. if $z$-axis collinear magnetism is to be enforced &
765! logical & {\tt .false.}}
766! This variable can be set to .true. in cases where the magnetism is
767! predominantly collinear in the $z$-direction, for example a ferromagnet with
768! spin-orbit coupling. This will make the calculation considerably faster at
769! the slight expense of precision.
770!
771! \block{deltaem}{
772! {\tt deltaem} & the size of the ${\bf k}$-vector displacement used when
773! calculating numerical derivatives for the effective mass tensor & real &
774! $0.025$}
775! See {\tt ndspem} and {\tt vklem}.
776!
777! \block{deltaph}{
778! {\tt deltaph} & size of the atomic displacement used for calculating
779! dynamical matrices & real & $0.01$}
780! Phonon calculations are performed by constructing a supercell corresponding
781! to a particular ${\bf q}$-vector and making a small periodic displacement of
782! the atoms. The magnitude of this displacement is given by {\tt deltaph}.
783! This should not be made too large, as anharmonic terms could then become
784! significant, neither should it be too small as this can introduce numerical
785! error.
786!
787! \block{deltast}{
788! {\tt deltast} & size of the change in lattice vectors used for calculating
789! the stress tensor & real & $0.005$}
790! The stress tensor is computed by changing the lattice vector matrix $A$ by
791! $$ A\rightarrow (1+\delta t\,e_k)A, $$
792! where $\delta t$ is an infinitesimal equal in practice to {\tt deltast} and
793! $e_k$ is the $k^{\rm th}$ strain tensor. Numerical finite differences are
794! used to compute the stress tensor as the derivative of the total energy
795! $dE_k/dt$.
796!
797! \block{dft+u}{
798! {\tt dftu} & type of DFT+$U$ calculation & integer & 0 \\
799! {\tt inpdftu} & type of input for DFT+U calculation & integer & 1 \\
800! \hline
801! {\tt is} & species number & integer & - \\
802! {\tt l} & angular momentum value & integer & -1 \\
803! {\tt u} & the desired $U$ value & real & $0.0$ \\
804! {\tt j} & the desired $J$ value & real & $0.0$}
805! This block contains the parameters required for an DFT+$U$ calculation, with
806! the list of parameters for each species terminated with a blank line. The
807! type of double counting required is set with the parameter {\tt dftu}.
808! Currently implemented are:
809! \vskip 6pt
810! \begin{tabularx}{\textwidth}[h]{lX}
811! 0 & No DFT+$U$ calculation \\
812! 1 & Fully localised limit (FLL) \\
813! 2 & Around mean field (AFM) \\
814! 3 & An interpolation between FLL and AFM
815! \end{tabularx}
816! \vskip 6pt
817! The type of input parameters is set with the parameter {\tt inpdftu}.
818! The current possibilities are:
819! \vskip 6pt
820! \begin{tabularx}{\textwidth}[h]{lX}
821! 1 & U and J \\
822! 2 & Slater parameters \\
823! 3 & Racah parameters \\
824! 4 & Yukawa screening length \\
825! 5 & U and determination of corresponding Yukawa screening length
826! \end{tabularx}
827! \vskip 6pt
828! See (amongst others) {\it Phys. Rev. B} {\bf 67}, 153106 (2003),
829! {\it Phys. Rev. B} {\bf 52}, R5467 (1995), {\it Phys. Rev. B} {\bf 60},
830! 10763 (1999), and {\it Phys. Rev. B} {\bf 80}, 035121 (2009).
831!
832! \block{dlefe}{
833! {\tt dlefe} & difference between the fixed linearisation energy and the
834! Fermi energy & real & $-0.1$}
835! When {\tt autolinengy} is {\tt .true.} then the fixed linearisation energies
836! are set to the Fermi energy plus {\tt dlefe}.
837!
838! \block{dncgga}{
839! {\tt dncgga} & small constant used to stabilise non-collinear GGA &
840! real & $1\times 10^{-8}$}
841! This small constant, $d$, is required in order to remove the infinite
842! gradients obtained when using `Kubler's trick' in conjunction with GGA and
843! non-collinear magnetism. It is applied by calculating the up and down
844! densities as
845! $$ \rho^{\uparrow}({\bf r})=\rho({\bf r})+\widetilde{m}({\bf r})
846! \qquad \rho^{\downarrow}({\bf r})=\rho({\bf r})-\widetilde{m}({\bf r}), $$
847! where $\widetilde{m}({\bf r})=\sqrt{{\bf m}^2({\bf r})+d}$,
848! and should be taken as the smallest value for which the exchange-correlation
849! magnetic field ${\bf B}_{\rm xc}$ is smooth.
850!
851! \block{dosmsum}{
852! {\tt dosmsum} & {\tt .true.} if the partial DOS is to be summed over $m$ &
853! logical & {\tt .false.}}
854! By default, the partial density of states is resolved over $(l,m)$ quantum
855! numbers. If {\tt dosmsum} is set to {\tt .true.} then the partial DOS is
856! summed over $m$, and thus depends only on $l$.
857!
858! \block{dosssum}{
859! {\tt dosssum} & {\tt .true.} if the partial DOS is to be summed over spin &
860! logical & {\tt .false.}}
861! By default, the partial density of states for spin-polarised systems is spin
862! resolved.
863!
864! \block{dtimes}{
865! {\tt dtimes} & time step used in time evolution run & real & $0.1$}
866! See also {\tt tstime}.
867!
868! \block{epsband}{
869! {\tt epsband} & convergence tolerance for determining band energies & real &
870! $1\times 10^{-12}$}
871! APW and local-orbital linearisation energies are determined from the band
872! energies. This is done by first searching upwards in energy until the radial
873! wavefunction at the muffin-tin radius is zero. This is the energy at the top
874! of the band, denoted $E_{\rm t}$. A downward search is now performed from
875! $E_{\rm t}$ until the slope of the radial wavefunction at the muffin-tin
876! radius is zero. This energy, $E_{\rm b}$, is at the bottom of the band. The
877! band energy is taken as $(E_{\rm t}+E_{\rm b})/2$. If either $E_{\rm t}$ or
878! $E_{\rm b}$ is not found, then the band energy is set to the default value.
879!
880! \block{epschg}{
881! {\tt epschg} & maximum allowed error in the calculated total charge beyond
882! which a warning message will be issued & real & $1\times 10^{-3}$}
883!
884! \block{epsengy}{
885! {\tt epsengy} & convergence criterion for the total energy & real &
886! $1\times 10^{-4}$}
887! See {\tt epspot}.
888!
889! \block{epsforce}{
890! {\tt epsforce} & convergence tolerance for the forces during a geometry
891! optimisation run & real & $5\times 10^{-3}$}
892! If the mean absolute value of the atomic forces is less than {\tt epsforce}
893! then the geometry optimisation run is ended. See also {\tt tasks} and
894! {\tt latvopt}.
895!
896! \block{epslat}{
897! {\tt epslat } & vectors with lengths less than this are considered zero &
898! real & $10^{-6}$}
899! Sets the tolerance for determining if a vector or its components are zero.
900! This is to account for any numerical error in real or reciprocal space
901! vectors.
902!
903! \block{epsocc}{
904! {\tt epsocc} & smallest occupancy for which a state will contribute to the
905! density & real & $1\times 10^{-8}$}
906!
907! \block{epspot}{
908! {\tt epspot} & convergence criterion for the Kohn-Sham potential and field &
909! real & $1\times 10^{-6}$}
910! If the RMS change in the Kohn-Sham potential and magnetic field is smaller
911! than {\tt epspot} and the absolute change in the total energy is less than
912! {\tt epsengy}, then the self-consistent loop is considered converged
913! and exited. For geometry optimisation runs this results in the forces being
914! calculated, the atomic positions updated and the loop restarted. See also
915! {\tt epsengy} and {\tt maxscl}.
916!
917! \block{epsstress}{
918! {\tt epsstress} & convergence tolerance for the stress tensor during a
919! geometry optimisation run with lattice vector relaxation & real &
920! $2\times 10^{-3}$}
921! See also {\tt epsforce} and {\tt latvopt}.
922!
923! \block{emaxelnes}{
924! {\tt emaxelnes} & maximum allowed initial-state eigenvalue for ELNES
925! calculations & real & $-1.2$}
926!
927! \block{emaxrf}{
928! {\tt emaxrf} & energy cut-off used when calculating Kohn-Sham response
929! functions & real & $10^6$}
930! A typical Kohn-Sham response function is of the form
931! \begin{align*}
932! \chi_s({\bf r},{\bf r}',\omega)
933! \equiv\frac{\delta\rho({\bf r},\omega)}{\delta v_s({\bf r}',\omega)}
934! =\frac{1}{N_k}\sum_{i{\bf k},j{\bf k}'}(f_{i{\bf k}}-f_{j{\bf k}'})
935! \frac{\langle i{\bf k}|\hat{\rho}({\bf r})|j{\bf k}'\rangle
936! \langle j{\bf k}'|\hat{\rho}({\bf r}')|i{\bf k}\rangle}
937! {w+(\varepsilon_{i{\bf k}}-\varepsilon_{j{\bf k}'})+i\eta},
938! \end{align*}
939! where $\hat{\rho}$ is the density operator; $N_k$ is the number of
940! $k$-points; $\varepsilon_{i{\bf k}}$ and $f_{i{\bf k}}$ are the eigenvalues
941! and occupation numbers, respectively. The variable {\tt emaxrf} is an energy
942! window which limits the summation over states in the formula above so that
943! $|\varepsilon_{i{\bf k}}-\varepsilon_{\rm Fermi}|<{\tt emaxrf}$. Reducing
944! this can result in a faster calculation at the expense of accuracy.
945!
946! \block{fracinr}{
947! {\tt fracinr} & fraction of the muffin-tin radius up to which {\tt lmaxi}
948! is used as the angular momentum cut-off & real & $0.01$}
949! If {\tt fracinr} is negative then the fraction is determined from
950! $f=\sqrt{({\tt lmaxi}+1)^2/({\tt lmaxo}+1)^2}$ in order to
951! maintain a minimum density of points throughout the muffin-tin. See
952! {\tt lmaxi} and {\tt lmaxo}.
953!
954! \block{fsmtype}{
955! {\tt fsmtype} & fixed spin moment (FSM) type & integer & 0}
956! The magnetic moment, its direction or magnitude can be fixed both globally
957! as well as in each muffin-tin individually. The options are as follows:
958! \vskip 6pt
959! \begin{tabularx}{\textwidth}[h]{lX}
960! 0 & no FSM \\
961! 1 (-1) & total moment (direction) \\
962! 2 (-2) & individual muffin-tin moments (direction) \\
963! 3 (-3) & total and muffin-tin moments (direction) \\
964! 4 & total moment magnitude \\
965! 5 & individual muffin-tin moment magnitudes \\
966! 6 & total and muffin-tin moment magnitudes
967! \end{tabularx}
968! \vskip 6pt
969! See also {\tt momfix}, {\tt momfixm}, {\tt mommtfix}, {\tt mommtfixm},
970! {\tt taufsm} and {\tt spinpol}.
971!
972! \block{ftmtype}{
973! {\tt ftmtype} & 1 to enable a fixed tensor moment (FTM) calculation,
974! 0 otherwise & integer & 0}
975! If {\tt ftmtype} is $-1$ then the symmetry corresponding to the tensor
976! moment is broken but no FTM calculation is performed. See also {\tt tm3fix}.
977!
978! \block{fxclrc}{
979! {\tt fxclrc} & parameters for the dynamical long-range contribution (LRC) to
980! the TDDFT exchange-correlation kernel & real(2) & $(0.0,0.0)$}
981! These are the parameters $\alpha$ and $\beta$ for the kernel proposed in
982! {\it Phys. Rev. B} {\bf 72}, 125203 (2005), namely
983! $$ f_{xc}({\bf G},{\bf G}',{\bf q},\omega)=-\frac{\alpha+\beta\omega^2}{q^2}
984! \delta_{{\bf G},{\bf G}'}\delta_{{\bf G},{\bf 0}}. $$
985!
986! \block{fxctype}{
987! {\tt fxctype} & integer defining the type of exchange-correlation kernel
988! $f_{\rm xc}$ & integer & $-1$}
989! The acceptable values are:
990! \vskip 6pt
991! \begin{tabularx}{\textwidth}[h]{lX}
992! $-1$ & $f_{\rm xc}$ defined by {\tt xctype} \\
993! 0,1 & RPA ($f_{\rm xc}=0$) \\
994! 200 & Long-range contribution (LRC) kernel, S. Botti {\it et al.},
995! {\it Phys. Rev. B} {\bf 72}, 125203 (2005); see {\tt fxclrc} \\
996! 210 & `Bootstrap' kernel, S. Sharma, J. K. Dewhurst, A. Sanna and
997! E. K. U. Gross, {\it Phys. Rev. Lett.} {\bf 107}, 186401 (2011) \\
998! 211 & Single iteration bootstrap
999! \end{tabularx}
1000!
1001! \block{gmaxrf}{
1002! {\tt gmaxrf} & maximum length of $|{\bf G}|$ for computing response
1003! functions & real & $3.0$}
1004!
1005! \block{gmaxvr}{
1006! {\tt gmaxvr} & maximum length of $|{\bf G}|$ for expanding the interstitial
1007! density and potential & real & $12.0$}
1008! This variable has a lower bound which is enforced by the code as follows:
1009! $$ {\rm gmaxvr}\rightarrow\max\,({\rm gmaxvr},2\times{\rm gkmax}
1010! +{\rm epslat}) $$
1011! See {\tt rgkmax}.
1012!
1013! \block{hdbse}{
1014! {\tt hdbse} & {\tt .true.} if the direct term is to be included in the BSE
1015! Hamiltonian & logical & {\tt .true.}}
1016!
1017! \block{highq}{
1018! {\tt highq} & {\tt .true.} if a high-quality parameter set should be used &
1019! logical & {\tt .false.}}
1020! Setting this to {\tt .true.} results in some default parameters being
1021! changed to ensure good convergence in most situations. These changes can be
1022! overruled by subsequent blocks in the input file. See also {\tt vhighq}.
1023!
1024! \block{hmaxvr}{
1025! {\tt hmaxvr} & maximum length of ${\bf H}$-vectors & real & $6.0$}
1026! The ${\bf H}$-vectors are used for calculating X-ray and magnetic structure
1027! factors. They are also used in linear response phonon calculations for
1028! expanding the density and potential in plane waves. See also {\tt gmaxvr},
1029! {\tt vhmat}, {\tt reduceh}, {\tt wsfac} and {\tt hkmax}.
1030!
1031! \block{hxbse}{
1032! {\tt hxbse} & {\tt .true.} if the exchange term is to be included in the BSE
1033! Hamiltonian & {\tt .true.}}
1034!
1035! \block{hybrid}{
1036! {\tt hybrid} & {\tt .true} if a hybrid functional is to be used when running
1037! a Hartree-Fock calculation & logical & {\tt .false}}
1038! See also {\tt hybridc} and {\tt xctype}.
1039!
1040! \block{hybridc}{
1041! {\tt hybridc} & hybrid functional mixing coefficient & real & $1.0$}
1042!
1043! \block{intraband}{
1044! {\tt intraband} & {\tt .true.} if the intraband (Drude-like) contribution is
1045! to be added to the dieletric tensor & logical & {\tt .false.}}
1046!
1047! \block{isgkmax}{
1048! {\tt isgkmax} & species for which the muffin-tin radius will be used for
1049! calculating {\tt gkmax} & integer & $-1$}
1050! The APW cut-off is determined from ${\tt gkmax}={\tt rgkmax}/R$. The
1051! variable {\tt isgkmax} determines which muffin-tin radius is to be used for
1052! $R$. These are the options:
1053! \vskip 6pt
1054! \begin{tabularx}{\textwidth}[h]{lX}
1055! -4 & Use the largest radius \\
1056! -3 & Use the smallest radius \\
1057! -2 & Use the fixed value $R=2.0$ \\
1058! -1 & Use the average of the muffin-tin radii \\
1059! $n\ge 1$ & Use the radius of species $n$
1060! \end{tabularx}
1061!
1062! \block{kstlist}{
1063! {\tt kstlist(i)} & $i$th $k$-point and state pair & integer(2) & $(1,1)$}
1064! This is a user-defined list of $k$-point and state index pairs which are
1065! those used for plotting wavefunctions and writing ${\bf L}$, ${\bf S}$ and
1066! ${\bf J}$ expectation values. Only the first pair is used by the
1067! aforementioned tasks. The list should be terminated by a blank line.
1068!
1069! \block{latvopt}{
1070! {\tt latvopt} & type of lattice vector optimisation to be performed during
1071! structural relaxation & integer & 0}
1072! Optimisation of the lattice vectors will be performed with ${\tt task}=2,3$
1073! when ${\tt latvopt}\ne 0$. When ${\tt latvopt}=1$ the lattice vector
1074! optimisation will be constrained only by symmetry. Optimisation over all
1075! symmetry-preserving strains except isotropic scaling is performed when
1076! ${\tt latvopt}=2$. If ${\tt latvopt}<0$ then the optimisation will be over
1077! strain number $|{\tt latvopt}|$. The list of symmetric strain tensors can be
1078! produced with ${\tt task}=430$. By default (${\tt latvopt}=0$) no lattice
1079! vector optimisation is performed during structural relaxation. See also
1080! {\tt tau0latv} and {\tt atpopt}.
1081!
1082! \block{lmaxapw}{
1083! {\tt lmaxapw} & angular momentum cut-off for the APW functions & integer &
1084! $8$}
1085!
1086! \block{lmaxdos}{
1087! {\tt lmaxdos} & angular momentum cut-off for the partial DOS plot &
1088! integer & $3$}
1089!
1090! \block{lmaxi}{
1091! {\tt lmaxi} & angular momentum cut-off for the muffin-tin density and
1092! potential on the inner part of the muffin-tin & integer & 2}
1093! Close to the nucleus, the density and potential is almost spherical and
1094! therefore the spherical harmonic expansion can be truncated a low angular
1095! momentum. See also {\tt fracinr}.
1096!
1097! \block{lmaxo}{
1098! {\tt lmaxo} & angular momentum cut-off for the muffin-tin density and
1099! potential & integer & 6}
1100!
1101! \block{lmirep}{
1102! {\tt lmirep} & {\tt .true.} if the $Y_{lm}$ basis is to be transformed
1103! into the basis of irreducible representations of the site symmetries for
1104! DOS plotting & logical & {\tt .true.}}
1105! When lmirep is set to .true., the spherical harmonic basis is transformed
1106! into one in which the site symmetries are block diagonal. Band characters
1107! determined from the density matrix expressed in this basis correspond to
1108! irreducible representations, and allow the partial DOS to be resolved into
1109! physically relevant contributions, for example $e_g$ and $t_{2g}$.
1110!
1111! \block{lorbcnd}{
1112! {\tt lorbcnd} & {\tt .true.} if conduction state local-orbitals are to be
1113! automatically added to the basis & logical & {\tt .false.}}
1114! Adding these higher energy local-orbitals can improve calculations which
1115! rely on accurate unoccupied states, such as the response function. See also
1116! {\tt lorbordc}.
1117!
1118! \block{lorbordc}{
1119! {\tt lorbordc} & the order of the conduction state local-orbitals &
1120! integer & 2}
1121! See {\tt lorbcnd}.
1122!
1123! \block{lradstp}{
1124! {\tt lradstp} & radial step length for determining coarse radial mesh &
1125! integer & 4}
1126! Some muffin-tin functions (such as the density) are calculated on a coarse
1127! radial mesh and then interpolated onto a fine mesh. This is done for the
1128! sake of efficiency. {\tt lradstp} defines the step size in going from the
1129! fine to the coarse radial mesh. If it is too large, loss of precision may
1130! occur.
1131!
1132! \block{maxitoep}{
1133! {\tt maxitoep} & maximum number of iterations when solving the exact
1134! exchange integral equations & integer & 300}
1135! See {\tt tau0oep}.
1136!
1137! \block{maxscl}{
1138! {\tt maxscl} & maximum number of self-consistent loops allowed & integer &
1139! 200}
1140! This determines after how many loops the self-consistent cycle will
1141! terminate if the convergence criterion is not met. If {\tt maxscl} is $1$
1142! then the density and potential file, {\tt STATE.OUT}, will {\bf not} be
1143! written to disk at the end of the loop. See {\tt epspot}.
1144!
1145! \block{mbwgrf}{
1146! {\tt mbwgrf} & matrix bandwidth of response functions in the
1147! ${\bf G}$-vector basis & integer & $-1$}
1148! Setting this to a positive integer results in response functions and the
1149! screened interaction $W({\bf G},{\bf G}',{\bf q},\omega)$ being treated as a
1150! banded matrix in ${\bf G}$ and ${\bf G}'$ with bandwidth {\tt mbwgrf}.
1151! This can be used to speed up $GW$ calculations.
1152!
1153! \block{mixsave}{
1154! {\tt mixsave} & {\tt .true.} if the mixer work array is to be saved during a
1155! ground-state run & logical & {\tt .false.}}
1156! If {\tt mixsave} is {\tt .true.}, then the mixer work array is saved to
1157! {\tt MIXWORK.OUT} every {\tt nwrite} iterations and at the end of the
1158! self-consistent loop. This array is subsequently read in at the beginning of
1159! a restarted calculation in order to improve convergence.
1160!
1161! \block{mixtype}{
1162! {\tt mixtype } & type of mixing required for the potential & integer & 3}
1163! Currently implemented are:
1164! \vskip 6pt
1165! \begin{tabularx}{\textwidth}[h]{lX}
1166! 0 & Linear mixing \\
1167! 1 & Adaptive linear mixing \\
1168! 3 & Broyden mixing, {\it J. Phys. A: Math. Gen.} {\bf 17}, L317 (1984)
1169! \end{tabularx}
1170!
1171! \block{mixsdb}{
1172! {\tt mixsdb} & subspace dimension for Broyden mixing & integer & 5}
1173! This is the number of mixing vectors which define the subspace in which the
1174! Hessian matrix is calculated. See {\tt mixtype} and {\tt broydpm}.
1175!
1176! \block{molecule}{
1177! {\tt molecule} & {\tt .true.} if the system is an isolated molecule &
1178! logical & {\tt .false.}}
1179! If {\tt molecule} is {\tt .true.}, then the atomic positions given in the
1180! {\tt atoms} block are assumed to be in Cartesian coordinates.
1181!
1182! \block{momfix}{
1183! {\tt momfix} & the desired total moment for a FSM calculation &
1184! real(3) & $(0.0,0.0,0.0)$}
1185! Note that all three components must be specified (even for collinear
1186! calculations). Applies when {\tt fsmtype} is 1(-1) or 3(-3). See
1187! {\tt fsmtype}, {\tt taufsm} and {\tt spinpol}.
1188!
1189! \block{momfixm}{
1190! {\tt momfixm} & the desired total moment magnitude for a FSM calculation &
1191! real & $0.0$}
1192! This applies when {\tt fsmtype} is 4 or 6.
1193!
1194! \block{mommtfix}{
1195! {\tt is} & species number & integer & 0 \\
1196! {\tt ia} & atom number & integer & 0 \\
1197! {\tt mommtfix} & desired muffin-tin moment for a FSM calculation &
1198! real(3) & $(0.0,0.0,0.0)$}
1199! The local muffin-tin moments are specified for a subset of atoms, with the
1200! list terminated with a blank line. Note that all three components must be
1201! specified (even for collinear calculations). Applies when {\tt fsmtype} is
1202! 2(-2) or 3(-3). Note that the moment is not fixed in a particular muffin-tin
1203! when the magnitude of any component of the corresponding {\tt mommtfix} is
1204! $\ge 1000$. See {\tt fsmtype}, {\tt taufsm} and {\tt spinpol}.
1205!
1206! \block{mommtfixm}{
1207! {\tt is} & species number & integer & 0 \\
1208! {\tt ia} & atom number & integer & 0 \\
1209! {\tt mommtfixm} & desired muffin-tin moment magnitude for a FSM
1210! calculation & real & $-1$}
1211! This applies when {\tt fsmtype} is 5 or 6. Note that the moment magnitude is
1212! not fixed in a particular muffin-tin when the corresponding {\tt mommtfixm}
1213! is negative.
1214!
1215! \block{mrmtav}{
1216! {\tt mrmtav} & order of averaging applied to the muffin-tin radii &
1217! integer & 0}
1218! Crystal structures with muffin-tin radii which are widely varying in size
1219! can cause calculations to become unstable. Applying a simple averaging
1220! procedure to the radii reduces this variation and can improve stability.
1221! The larger {\tt mrmtav}, the more equal the muffin-tin radii will become.
1222! See the routine {\tt rmtavrg}.
1223!
1224! \block{mstar}{
1225! {\tt mstar} & value of the effective mass parameter used for adaptive
1226! determination of {\tt swidth} & real & $10.0$}
1227! See {\tt autoswidth}.
1228!
1229! \block{mustar}{
1230! {\tt mustar} & Coulomb pseudopotential, $\mu^*$, used in the
1231! McMillan-Allen-Dynes equation & real & $0.15$}
1232! This is used when calculating the superconducting critical temperature with
1233! the formula {\it Phys. Rev. B 12, 905 (1975)}
1234! $$ T_c=\frac{\omega_{\rm log}}{1.2 k_B}\exp\left[\frac{-1.04(1+\lambda)}
1235! {\lambda-\mu^*(1+0.62\lambda)}\right], $$
1236! where $\omega_{\rm log}$ is the logarithmic average frequency and $\lambda$
1237! is the electron-phonon coupling constant.
1238!
1239! \block{ncbse}{
1240! {\tt ncbse} & number of conduction states to be used for BSE calculations &
1241! integer & 3}
1242! See also {\tt nvbse}.
1243!
1244! \block{ndspem}{
1245! {\tt ndspem} & the number of {\bf k}-vector displacements in each direction
1246! around {\tt vklem} when computing the numerical derivatives for the
1247! effective mass tensor & integer & 1}
1248! See {\tt deltaem} and {\tt vklem}.
1249!
1250! \block{nempty}{
1251! {\tt nempty} & the number of empty states per atom and spin & real & $4.0$ }
1252! Defines the number of eigenstates beyond that required for charge
1253! neutrality. When running metals it is not known {\it a priori} how many
1254! states will be below the Fermi energy for each $k$-point. Setting
1255! {\tt nempty} greater than zero allows the additional states to act as a
1256! buffer in such cases. Furthermore, magnetic calculations use the
1257! first-variational eigenstates as a basis for setting up the
1258! second-variational Hamiltonian, and thus {\tt nempty} will determine the
1259! size of this basis set. Convergence with respect to this quantity should be
1260! checked.
1261!
1262! \block{ngridk}{
1263! {\tt ngridk } & the $k$-point mesh sizes & integer(3) & $(1,1,1)$}
1264! The ${\bf k}$-vectors are generated using
1265! $$ {\bf k}=(\frac{i_1+v_1}{n_1},\frac{i_2+v_2}{n_2},\frac{i_3+v_3}{n_3}), $$
1266! where $i_j$ runs from 0 to $n_j-1$ and $0\le v_j<1$ for $j=1,2,3$. The
1267! vector ${\bf v}$ is given by the variable {\tt vkloff}. See also
1268! {\tt reducek}.
1269!
1270! \block{ngridq}{
1271! {\tt ngridq } & the phonon $q$-point mesh sizes & integer(3) & $(1,1,1)$}
1272! Same as {\tt ngridk}, except that this mesh is for the phonon $q$-points
1273! and other tasks. See also {\tt reduceq}.
1274!
1275! \block{nosource}{
1276! {\tt nosource} & when set to {\tt .true.}, source fields are projected out
1277! of the exchange-correlation magnetic field & logical & {\tt .false.}}
1278! Experimental feature.
1279!
1280! \block{notes}{
1281! {\tt notes(i)} & the $i$th line of the notes & string & -}
1282! This block allows users to add their own notes to the file {\tt INFO.OUT}.
1283! The block should be terminated with a blank line, and no line should exceed
1284! 80 characters.
1285!
1286! \block{npmae}{
1287! {\tt npmae } & number or distribution of directions for MAE calculations &
1288! integer & $-1$}
1289! Automatic determination of the magnetic anisotropy energy (MAE) requires
1290! that the total energy is determined for a set of directions of the total
1291! magnetic moment. This variable controls the number or distribution of these
1292! directions. The convention is:
1293! \vskip 6pt
1294! \begin{tabularx}{\textwidth}[h]{lX}
1295! $-4,-3,-2,-1$ & Cardinal directions given by the primitive translation
1296! vectors $n_1{\bf A}_1+n_2{\bf A}_2+n_3{\bf A}_3$, where
1297! $1\le n_i\le|{\tt npmae}|$ \\
1298! 2 & Cartesian $x$ and $z$ directions \\
1299! 3 & Cartesian $x$, $y$ and $z$ directions \\
1300! $4,5,\ldots$ & Even distribution of {\tt npmae} directions
1301! \end{tabularx}
1302!
1303! \block{ntemp}{
1304! {\tt ntemp} & number of temperature steps & integer & 40}
1305! This is the number of temperature steps to be used in the Eliashberg gap
1306! and thermodynamic properties calculations.
1307!
1308! \block{num\_wann}{
1309! {\tt num\_wann} & number of Wannier90 wavefunctions & integer & 0}
1310! If ${\tt num\_wann}>0$ then this is the number of Wannier wavefunctions
1311! to be found by the Wannier90 package. If ${\tt num\_wann}\le 0$ then the
1312! number of wavefunctions is given by ${\tt num\_bands}+{\tt num\_wann}$.
1313!
1314! \block{nvbse}{
1315! {\tt nvbse} & number of valence states to be used for BSE calculations &
1316! integer & 2}
1317! See also {\tt ncbse}.
1318!
1319! \block{nwrite}{
1320! {\tt nwrite} & number of self-consistent loops after which {\tt STATE.OUT}
1321! is to be written & integer & 0}
1322! Normally, the density and potentials are written to the file {\tt STATE.OUT}
1323! only after completion of the self-consistent loop. By setting {\tt nwrite}
1324! to a positive integer the file will instead be written every {\tt nwrite}
1325! loops.
1326!
1327! \block{nxoapwlo}{
1328! {\tt nxoapwlo} & extra order of radial functions to be added to the existing
1329! APW and local-orbital set & integer & 0}
1330! Setting this variable will result in the APWs and local-orbitals for all
1331! species becoming higher order with corresponding increase in derivative
1332! matching at the muffin-tin surface. For example, setting {\tt nxoapwlo}=1
1333! turns all APWs into LAPWs.
1334!
1335! \block{optcomp}{
1336! {\tt optcomp} & the components of the first- or second-order optical tensor
1337! to be calculated & integer(3) & $(1,1,1)$}
1338! This selects which components of the optical tensor you would like to plot.
1339! Only the first two are used for the first-order tensor. Several components
1340! can be listed one after the other with a blank line terminating the list.
1341!
1342! \block{phwrite}{
1343! {\tt nphwrt} & number of $q$-points for which phonon modes are to be found &
1344! integer & 1 \\
1345! \hline
1346! {\tt vqlwrt(i)} & the $i$th $q$-point in lattice coordinates & real(3) &
1347! $(0.0,0.0,0.0)$}
1348! This is used in conjunction with {\tt task}=230. The code will write the
1349! phonon frequencies and eigenvectors to the file {\tt PHONON.OUT} for all the
1350! $q$-points in the list. The $q$-points can be anywhere in the Brillouin zone
1351! and do not have to lie on the mesh defined by {\tt ngridq}. Obviously, all
1352! the dynamical matrices have to be computed first using {\tt task}=200.
1353!
1354! \block{plot1d}{
1355! {\tt nvp1d} & number of vertices & integer & 2 \\
1356! {\tt npp1d} & number of plotting points & integer & 200 \\
1357! \hline
1358! {\tt vvlp1d(i)} & lattice coordinates for vertex $i$ & real(3) &
1359! $(0.0,0.0,0.0)\rightarrow(1.0,1.0,1.0)$}
1360! Defines the path in either real or reciprocal space along which the 1D plot
1361! is to be produced. The user should provide {\tt nvp1d} vertices in lattice
1362! coordinates.
1363!
1364! \block{plot2d}{
1365! {\tt vclp2d(0)} & zeroth corner (origin) & real(3) & $(0.0,0.0,0.0)$ \\
1366! \hline
1367! {\tt vclp2d(1)} & first corner & real(3) & $(1.0,0.0,0.0)$ \\
1368! \hline
1369! {\tt vclp2d(2)} & second corner & real(3) & $(0.0,1.0,0.0)$ \\
1370! \hline
1371! {\tt np2d} & number of plotting points in both directions & integer(2) &
1372! $(40,40)$}
1373! Defines the corners of a parallelogram and the grid size used for producing
1374! 2D plots.
1375!
1376! \block{plot3d}{
1377! {\tt vclp3d(0)} & zeroth corner (origin) & real(3) & $(0.0,0.0,0.0)$ \\
1378! \hline
1379! {\tt vclp3d(1)} & first corner & real(3) & $(1.0,0.0,0.0)$ \\
1380! \hline
1381! {\tt vclp3d(2)} & second corner & real(3) & $(0.0,1.0,0.0)$ \\
1382! \hline
1383! {\tt vclp3d(3)} & third corner & real(3) & $(0.0,0.0,1.0)$ \\
1384! \hline
1385! {\tt np3d} & number of plotting points each direction & integer(3) &
1386! $(20,20,20)$}
1387! Defines the corners of a box and the grid size used for producing 3D plots.
1388!
1389! \block{primcell}{
1390! {\tt primcell} & {\tt .true.} if the primitive unit cell should be found
1391! & logical & {\tt .false.}}
1392! Allows the primitive unit cell to be determined automatically from the
1393! conventional cell. This is done by searching for lattice vectors among all
1394! those which connect atomic sites, and using the three shortest which produce
1395! a unit cell with non-zero volume.
1396!
1397! \block{pulse}{
1398! {\tt n} & number of pulses & integer & - \\
1399! \hline
1400! {\tt a0(i)} & polarisation vector (including amplitude) & real(3) & - \\
1401! {\tt w(i)} & frequency & real & - \\
1402! {\tt phi(i)} & phase in degrees & real & - \\
1403! {\tt rc(i)} & chirp rate & real & - \\
1404! {\tt t0(i)} & peak time & real & - \\
1405! {\tt d(i)} & full-width at half-maximum & real & -}
1406! Parameters used to generate a time-dependent vector potential ${\bf A}(t)$
1407! representing a laser pulse. The total vector potential is the sum of
1408! individual pulses and is given by the formula
1409! $$ {\bf A}(t)=\sum_{i=1}^n {\bf A}_0^i\exp
1410! \left[-(t-t_0^i)^2/2\sigma_i^2\right]
1411! \sin\left[w_i(t-t_0^i)+\phi_i+r_{\rm c}^i t^2/2\right], $$
1412! where $\sigma=d/2\sqrt{2\ln 2}$. See also {\tt ramp}.
1413!
1414! \block{q0cut}{
1415! {\tt q0cut} & Q-vector cut-off for the ultra long-range Coulomb Green's
1416! function & real & $0.0$}
1417! The ultra long-range Poisson equation is solved using the Green's function
1418! $4\pi/|{\bf G}+{\bf Q}|^2$. This is set to zero for all
1419! $|{\bf G}+{\bf Q}|<{\tt q0cut}$ when {\tt q0cut} is positive. For negative
1420! {\tt q0cut}, a Yukawa-type screening of the form
1421! $4\pi/(|{\bf G}+{\bf Q}|^2+{\tt q0cut}^2)$ is employed. Setting this
1422! variable to be small but finite can improve the stability of a
1423! self-consistent calculation.
1424!
1425! \block{radkpt}{
1426! {\tt radkpt} & radius of sphere used to determine $k$-point density &
1427! real & $40.0$}
1428! Used for the automatic determination of the $k$-point mesh. If {\tt autokpt}
1429! is set to {\tt .true.} then the mesh sizes will be determined by
1430! $n_i=R_k|{\bf B}_i|+1$, where ${\bf B}_i$ are the primitive reciprocal
1431! lattice vectors.
1432!
1433! \block{ramp}{
1434! {\tt n} & number of ramps & integer & - \\
1435! \hline
1436! {\tt a0(i)} & polarisation vector (including amplitude) & real(3) & - \\
1437! {\tt t0(i)} & ramp start time & real & - \\
1438! {\tt c1(i)} & linear coefficient of ${\bf A}(t)$ & real & - \\
1439! {\tt c2(i)} & quadratic coefficient & real & -}
1440! Parameters used to generate a time-dependent vector potential ${\bf A}(t)$
1441! representing a constant or linearly increasing electric field
1442! ${\bf E}(t)=-\partial{\bf A}(t)/\partial t$. The vector potential is given
1443! by
1444! $$ {\bf A}(t)=\sum_{i=1}^n {\bf A}_0^i
1445! \left[c_1(t-t_0)+c_2(t-t_0)^2\right]\Theta(t-t_0). $$
1446!
1447! \block{readadu}{
1448! {\tt readadu} & set to {\tt .true.} if the interpolation constant for
1449! DFT+$U$ should be read from file rather than calculated & logical &
1450! {\tt .false.}}
1451! When {\tt dftu}=3, the DFT+$U$ energy and potential are interpolated
1452! between FLL and AFM. The interpolation constant, $\alpha$, is normally
1453! calculated from the density matrix, but can also be read in from the file
1454! {\tt ALPHADU.OUT}. This allows the user to fix $\alpha$, but is also
1455! necessary when calculating forces, since the contribution of the potential
1456! of the variation of $\alpha$ with respect to the density matrix is not
1457! computed. See {\tt dft+u}.
1458!
1459! \block{reducebf}{
1460! {\tt reducebf} & reduction factor for the external magnetic fields & real &
1461! $1.0$}
1462! After each self-consistent loop, the external magnetic fields are multiplied
1463! with {\tt reducebf}. This allows for a large external magnetic field at the
1464! start of the self-consistent loop to break spin symmetry, while at the end
1465! of the loop the field will be effectively zero, i.e. infinitesimal. See
1466! {\tt bfieldc} and {\tt atoms}.
1467!
1468! \block{reduceh}{
1469! {\tt reduceh} & set to {\tt .true.} if the reciprocal ${\bf H}$-vectors
1470! should be reduced by the symmorphic crystal symmetries & logical & .true.}
1471! See {\tt hmaxvr} and {\tt vmat}.
1472!
1473! \block{reducek}{
1474! {\tt reducek} & type of reduction of the $k$-point set & integer & 1}
1475! Types of reduction are defined by the symmetry group used:
1476! \vskip 6pt
1477! \begin{tabularx}{\textwidth}[h]{lX}
1478! 0 & no reduction \\
1479! 1 & reduce with full crystal symmetry group (including non-symmorphic
1480! symmetries) \\
1481! 2 & reduce with symmorphic symmetries only
1482! \end{tabularx}
1483! \vskip 6pt
1484! See also {\tt ngridk} and {\tt vkloff}.
1485!
1486! \block{reduceq}{
1487! {\tt reduceq} & type of reduction of the $q$-point set & integer & 1}
1488! See {\tt reducek} and {\tt ngridq}.
1489!
1490! \block{rgkmax}{
1491! {\tt rgkmax} & $R^{\rm MT}_{\rm min}\times\max\{|{\bf G}+{\bf k}|\}$ &
1492! real & $7.0$}
1493! This sets the maximum length for the ${\bf G}+{\bf k}$ vectors, defined as
1494! {\tt rgkmax} divided by the average muffin-tin radius. See {\tt isgkmax}.
1495!
1496! \block{rmtall}{
1497! {\tt rmtall} & muffin-tin radius for all species & real & $-1.0$}
1498! If {\tt rmtall} is positive then all muffin-tin radii are set to this value.
1499!
1500! \block{rmtdelta}{
1501! {\tt rmtdelta} & minimum allowed distance between muffin-tin surfaces &
1502! real & $0.05$}
1503!
1504! \block{rmtscf}{
1505! {\tt rmtscf} & muffin-tin radius scaling factor & real & $1.0$}
1506! All muffin-tin radii read from the species files are scaled by this factor.
1507!
1508! \block{rndavec}{
1509! {\tt rndavec} & lattice vector randomisation amplitude & real & $0.0$}
1510! Setting this to a number larger than zero causes the code add random jitter
1511! to the lattice vectors proportional to this amplitude. This can be used to
1512! break lattice symmetry.
1513!
1514! \block{rotavec}{
1515! {\tt axang} & axis-angle representation of lattice vector rotation &
1516! real(4) & $(0.0,0.0,0.0,0.0)$}
1517! This determines the rotation matrix which is applied to the lattice vectors
1518! prior to any calculation. The first three components specify the axis and
1519! the last component is the angle in degrees. The `right-hand rule' convention
1520! is followed.
1521!
1522! \block{scale}{
1523! {\tt scale } & lattice vector scaling factor & real & $1.0$}
1524! Scaling factor for all three lattice vectors. Applied in conjunction with
1525! {\tt scale1}, {\tt scale2} and {\tt scale3}.
1526!
1527! \block{scale1/2/3}{
1528! {\tt scale1/2/3 } & separate scaling factors for each lattice vector &
1529! real & $1.0$}
1530!
1531! \block{scissor}{
1532! {\tt scissor} & the scissor correction & real & $0.0$}
1533! This is the scissor shift applied to states above the Fermi energy
1534! {\it Phys. Rev. B} {\bf 43}, 4187 (1991). Affects optics calculations only.
1535!
1536! \block{scrpath}{
1537! {\tt scrpath} & scratch space path & string & null}
1538! This is the scratch space path where the eigenvector files {\tt EVALFV.OUT}
1539! and {\tt EVALSV.OUT} will be written. If the run directory is accessed via a
1540! network then {\tt scrpath} can be set to a directory on the local disk, for
1541! example {\tt /tmp/}. Note that the forward slash {\tt /} at the end of the
1542! path must be included.
1543!
1544! \block{socscf}{
1545! {\tt socscf} & scaling factor for the spin-orbit coupling term in the
1546! Hamiltonian & real & $1.0$}
1547! This can be used to enhance the effect of spin-orbit coupling in order to
1548! accurately determine the magnetic anisotropy energy (MAE).
1549!
1550! \block{spincore}{
1551! {\tt spincore} & set to {\tt .true.} if the core should be spin-polarised
1552! & logical & {\tt .false.}}
1553!
1554! \block{spinorb}{
1555! {\tt spinorb} & set to {\tt .true.} if a spin-orbit coupling is required
1556! & logical & {\tt .false.}}
1557! If {\tt spinorb} is {\tt .true.}, then a $\boldsymbol\sigma\cdot{\bf L}$
1558! term is added to the second-variational Hamiltonian. See {\tt spinpol}.
1559!
1560! \block{spinpol}{
1561! {\tt spinpol} & set to {\tt .true.} if a spin-polarised calculation is
1562! required & logical & {\tt .false.}}
1563! If {\tt spinpol} is {\tt .true.}, then the spin-polarised Hamiltonian is
1564! solved as a second-variational step using two-component spinors in the
1565! Kohn-Sham magnetic field. The first variational scalar wavefunctions are
1566! used as a basis for setting this Hamiltonian.
1567!
1568! \block{spinsprl}{
1569! {\tt spinsprl} & set to {\tt .true.} if a spin-spiral calculation is
1570! required & logical & {\tt .false.}}
1571! Experimental feature for the calculation of spin-spiral states. See
1572! {\tt vqlss} for details.
1573!
1574! \block{sppath}{
1575! {\tt sppath} & path where the species files can be found & string & null}
1576! Note that the forward slash {\tt /} at the end of the path must be included.
1577!
1578! \block{ssdph}{
1579! {\tt ssdph} & set to {\tt .true.} if a complex de-phasing factor is to be
1580! used in spin-spiral calculations & logical & {\tt .true.}}
1581! If this is {\tt .true.} then spin-spiral wavefunctions in each muffin-tin at
1582! position ${\bf r}_{\alpha}$ are de-phased by the matrix
1583! $$ \begin{pmatrix} e^{-i{\bf q}\cdot{\bf r}_{\alpha}/2} & 0 \\
1584! 0 & e^{i{\bf q}\cdot{\bf r}_{\alpha}/2} \end{pmatrix}. $$
1585! In simple situations, this has the advantage of producing magnon dynamical
1586! matrices which are already in diagonal form. This option should be used with
1587! care, and a full understanding of the spin-spiral configuration is required.
1588! See {\tt spinsprl}.
1589!
1590! \block{stype}{
1591! {\tt stype} & integer defining the type of smearing to be used & integer &
1592! $3$}
1593! A smooth approximation to the Dirac delta function is needed to compute the
1594! occupation numbers of the Kohn-Sham states. The variable {\tt swidth}
1595! determines the width of the approximate delta function. Currently
1596! implemented are
1597! \vskip 6pt
1598! \begin{tabularx}{\textwidth}[h]{lX}
1599! 0 & Gaussian \\
1600! 1 & Methfessel-Paxton order 1, Phys. Rev. B {\bf 40}, 3616 (1989) \\
1601! 2 & Methfessel-Paxton order 2 \\
1602! 3 & Fermi-Dirac
1603! \end{tabularx}
1604! \vskip 6pt
1605! See also {\tt autoswidth}, {\tt swidth} and {\tt tempk}.
1606!
1607! \block{swidth}{
1608! {\tt swidth} & width of the smooth approximation to the Dirac delta
1609! function & real & $0.001$}
1610! See {\tt stype} for details and the variable {\tt tempk}.
1611!
1612! \newpage
1613! \block{tasks}{
1614! {\tt task(i) } & the $i$th task & integer & $-1$}
1615! A list of tasks for the code to perform sequentially. The list should be
1616! terminated with a blank line. Each task has an associated integer as
1617! follows:
1618! \vskip 6pt
1619! \begin{tabularx}{\textwidth}[h]{lX}
1620! 0 & Ground-state run starting from the atomic densities. \\
1621! 1 & Resumption of ground-state run using density in {\tt STATE.OUT}. \\
1622! 2 & Geometry optimisation run starting from the atomic densities, with
1623! atomic positions written to {\tt GEOMETRY.OUT}. \\
1624! 3 & Resumption of geometry optimisation run using density in {\tt STATE.OUT}
1625! but with positions from {\tt elk.in}. \\
1626! 5 & Ground-state Hartree-Fock run. \\
1627! 10 & Total, partial and interstitial density of states (DOS). \\
1628! 14 & Plots the smooth Dirac delta and Heaviside step functions used by the
1629! code to calculate occupation numbers. \\
1630! 15 & Output ${\bf L}$, ${\bf S}$ and ${\bf J}$ total expectation values. \\
1631! 16 & Output ${\bf L}$, ${\bf S}$ and ${\bf J}$ expectation values for each
1632! $k$-point and state in {\tt kstlist}. \\
1633! 20 & Band structure plot. \\
1634! 21 & Band structure plot which includes total and angular momentum
1635! characters for every atom. \\
1636! 22 & Band structure plot which includes $(l,m)$ character for every atom. \\
1637! 23 & Band structure plot which includes spin character for every atom. \\
1638! 25 & Compute the effective mass tensor at the $k$-point given by
1639! {\tt vklem}. \\
1640! 31/2/3 & 1/2/3D charge density plot. \\
1641! 41/2/3 & 1/2/3D exchange-correlation and Coulomb potential plots. \\
1642! 51/2/3 & 1/2/3D electron localisation function (ELF) plot. \\
1643! 61/2/3 & 1/2/3D wavefunction plot:
1644! $\left|\Psi_{i{\bf k}}({\bf r})\right|^2$. \\
1645! 65 & Write the core wavefunctions to file for plotting. \\
1646! 68 & Output the status of the RAM disk. \\
1647! 71/2/3 & 1/2/3D plot of magnetisation vector field, ${\bf m}({\bf r})$. \\
1648! 81/2/3 & 1/2/3D plot of exchange-correlation magnetic vector field,
1649! ${\bf B}_{\rm xc}({\bf r})$. \\
1650! 91/2/3 & 1/2/3D plot of $\nabla\cdot{\bf B}_{\rm xc}({\bf r})$. \\
1651! 100 & 3D Fermi surface plot using the scalar product
1652! $p({\bf k})=\prod_i(\epsilon_{i{\bf k}}-\epsilon_{\rm F})$. \\
1653! 101 & 3D Fermi surface plot using separate bands (minus the Fermi
1654! energy). \\
1655! 102 & 3D Fermi surface which can be plotted with XCrysDen. \\
1656! 105 & 3D nesting function plot. \\
1657! 110 & Calculation of M\"{o}ssbauer contact charge densities and magnetic
1658! fields at the nuclear sites. \\
1659! 115 & Calculation of the electric field gradient (EFG) at the nuclear
1660! sites. \\
1661! 120 & Output of the momentum matrix elements
1662! $\langle\Psi_{i{\bf k}}|-i\nabla|\Psi_{j{\bf k}}\rangle$. \\
1663! 121 & Linear optical dielectric response tensor calculated within the random
1664! phase approximation (RPA) and in the $q\rightarrow 0$ limit, with no
1665! microscopic contributions. \\
1666! 122 & Magneto optical Kerr effect (MOKE) angle. \\
1667! 125 & Non-linear optical second harmonic generation. \\
1668! 130 & Output matrix elements of the type
1669! $\langle\Psi_{i{\bf k+q}}|e^{i{\bf q}\cdot{\bf r}}|
1670! \Psi_{j{\bf k}}\rangle$.
1671! \end{tabularx}
1672!
1673! \begin{tabularx}{\textwidth}[h]{lX}
1674! 135 & Output all wavefunctions expanded in the plane wave basis up to a
1675! cut-off defined by {\tt hkmax}. \\
1676! 140 & Energy loss near edge structure (ELNES). \\
1677! 141/2/3 & 1/2/3D plot of the electric field
1678! ${\bf E}({\bf r})\equiv\nabla V_{\rm C}({\bf r})$. \\
1679! 150 & Write out the atomic eigenvalues for each species. \\
1680! 151/2/3 & 1/2/3D plot of
1681! ${\bf m}({\bf r})\times{\bf B}_{\rm xc}({\bf r})$. \\
1682! 160 & Calculates the total exchange-correlation spin-torque acting on the
1683! system: $\boldsymbol\tau=\int d^3r\, {\bf m}({\bf r})\times
1684! {\bf B}_{\rm xc}({\bf r}).$ \\
1685! 162 & 2D scanning-tunneling microscopy (STM) image. \\
1686! 170 & Writes the electron momentum density to {\tt EMD.OUT}. \\
1687! 171/2/3 & 1/2/3D plot of the electron momentum density. \\
1688! 180 & Generate the RPA inverse dielectric function with local contributions
1689! $\epsilon^{-1}({\bf G},{\bf G}',{\bf q},\omega)$ and write it to file. \\
1690! 185 & Write the Bethe-Salpeter equation (BSE) Hamiltonian to file. \\
1691! 186 & Diagonalise the BSE Hamiltonian and write the eigenvectors and
1692! eigenvalues to file. \\
1693! 187 & Output the BSE dielectric response function. \\
1694! 190 & Write the atomic geometry to file for plotting with XCrySDen and
1695! V\_Sim. \\
1696! 195 & Calculation of X-ray density structure factors. \\
1697! 196 & Calculation of magnetic structure factors. \\
1698! 200 & Calculation of phonon dynamical matrices on a $q$-point set defined by
1699! {\tt ngridq} using the supercell method. \\
1700! 202 & Phonon dry run: just produce a set of empty {\tt DYN} files. \\
1701! 205 & Calculation of phonon dynamical matrices using density functional
1702! perturbation theory (DFPT). \\
1703! 208 & Calculation of static Born effective charges. \\
1704! 209 & Born effective charge dry run: produce a set of empty {\tt BEC}
1705! files. \\
1706! 210 & Phonon density of states. \\
1707! 220 & Phonon dispersion plot. \\
1708! 230 & Phonon frequencies and eigenvectors for an arbitrary $q$-point. \\
1709! 240/1 & Generate the ${\bf q}$-dependent phonon linewidths and
1710! electron-phonon coupling constants and write them to file. Task 241 also
1711! writes the complete set of electron-phonon coupling matrix elements to
1712! {\tt EPHMAT.OUT}. \\
1713! 245 & Phonon linewidths plot. \\
1714! 250 & Eliashberg function $\alpha^2F(\omega)$, electron-phonon coupling
1715! constant $\lambda$, and the McMillan-Allen-Dynes critical temperature
1716! $T_c$. \\
1717! 260 & Solves the Eliashberg equations to find the superconducting gap. \\
1718! 270 & Electron-phonon Bogoliubov equation ground-state. \\
1719! 271 & Resumption of the Bogoliubov ground-state. \\
1720! 280 & Electron-phonon Bogoliubov density of states. \\
1721! 285 & Electron and phonon anomalous correlation entropy (ACE). \\
1722! 300 & Reduced density matrix functional theory (RDMFT) calculation. \\
1723! 320 & Time-dependent density functional theory (TDDFT) calculation of the
1724! dielectric response function including microscopic contributions. \\
1725! 330/1 & TDDFT calculation of the spin-polarised response function for
1726! arbitrary ${\bf q}$-vectors. Task 331 writes the entire response function
1727! $\overleftrightarrow{\chi}({\bf G},{\bf G}',{\bf q},\omega)$ to file.
1728! \end{tabularx}
1729!
1730! \begin{tabularx}{\textwidth}[h]{lX}
1731! 341/2/3 & 1/2/3D plot of
1732! $w_{\rm xc}({\bf r})\equiv \left.\delta E_{\rm xc}[\rho,\tau]/
1733! \delta \tau({\bf r})\right|_{\rho}$ which is calculated for meta-GGA
1734! functionals. \\
1735! 350/1/2 & Spin-spiral supercell calculations (spin-orbit coupling can be
1736! included). Task 352 is a dry run: produce a set of empty {\tt SS} files. \\
1737! 371/2/3 & 1/2/3D plot of the paramagnetic current density
1738! ${\bf j}_{\rm p}({\bf r})$. \\
1739! 380 & Piezoelectric tensor. \\
1740! 390 & Magnetoelectric tensor. \\
1741! 400 & Calculation of tensor moments and corresponding DFT+$U$ Hartree-Fock
1742! energy contributions. \\
1743! 420/1 & Molecular dynamics (MD) calculation within the adiabatic
1744! approximation. Task 421 restarts an interrupted MD calculation. \\
1745! 430 & Write the strain tensors to {\tt STRAIN.OUT}. \\
1746! 440 & Write the stress tensor components corresponding to the strain tensors
1747! to {\tt STRESS.OUT}. \\
1748! 450 & Generates a laser pulse in the form of a time-dependent vector
1749! potential ${\bf A}(t)$ and writes it to {\tt AFIELDT.OUT}. \\
1750! 455 & Writes the time-dependent power density and total energy density of
1751! ${\bf A}(t)$. \\
1752! 456 & Writes the frequency-dependent electric field ${\bf E}(\omega)$
1753! corresponding to ${\bf A}(t)$. \\
1754! 460/1/2/3 & Time evolution run using TDDFT under the influence of
1755! ${\bf A}(t)$. Tasks 462 and 463 include nuclear Ehrenfest dynamics. Tasks
1756! 461 and 463 restart interrupted calculations. \\
1757! 471 & 1D plot of the static charge density. \\
1758! 478 & Calculation of the dynamical Born effective charges. \\
1759! 480/1 & Computes the dielectric function from the time-dependent current
1760! density in {\tt JTOT\_TD.OUT}. Task 481 assumes that the vector potential
1761! ${\bf A}(t)$ is a step function at $t=0$, while task 480 makes no such
1762! assumptions. \\
1763! 500 & Checks the test files generated when {\tt test} is {\tt .true.} \\
1764! 550 & Writes the files required by Wannier90. \\
1765! 600 & Output the $GW$ self-energy matrix elements. \\
1766! 610 & Generates the $GW$ spectral function. \\
1767! 620 & Generates the $GW$ band structure, i.e. the ${\bf k}$-dependent
1768! spectral function). \\
1769! 640 & Determines the $GW$ density matrix in terms of natural orbitals and
1770! occupation numbers. The files {\tt EVECSV.OUT} and {\tt OCCSV.OUT} are
1771! overwritten by these and can then be used for other calculations. \\
1772! 700/1 & Ultra long-range ground-state calculation. Task 701 is for
1773! restarting from the potential in {\tt STATE\_ULR.OUT}. \\
1774! 720/5 & Ultra long-range band structure and spectral function. Task 720 is
1775! for the central $k$-point (i.e. $\kappa=0$), while task 725 averages over
1776! all $\kappa$-points.\\
1777! 731/2/3 & 1/2/3D plot of the ultra long-range density. \\
1778! 741/2/3 & 1/2/3D plot of the ultra long-range Kohn-Sham potential. \\
1779! 771/2/3 & 1/2/3D plot of the ultra long-range magnetisation.
1780! \end{tabularx}
1781!
1782! \block{tau0atp}{
1783! {\tt tau0atp} & the step size to be used for atomic position optimisation &
1784! real & $0.25$}
1785! The position of atom $\alpha$ is updated on step $m$ of a geometry
1786! optimisation run using
1787! $$ {\bf r}_{\alpha}^{m+1}={\bf r}_{\alpha}^m+\tau_{\alpha}^m
1788! \left({\bf F}_{\alpha}^m+{\bf F}_{\alpha}^{m-1}\right), $$
1789! where $\tau_{\alpha}$ is set to {\tt tau0atp} for $m=0$, and incremented by
1790! the same amount if the atom is moving in the same direction between steps.
1791! If the direction changes then $\tau_{\alpha}$ is reset to {\tt tau0atp}.
1792!
1793! \block{tau0latv}{
1794! {\tt tau0latv} & the step size to be used for lattice vector optimisation &
1795! real & $0.25$}
1796! This parameter is used for lattice vector optimisation in a procedure
1797! identical to that for atomic position optimisation. See {\tt tau0atp} and
1798! {\tt latvopt}.
1799!
1800! \block{tau0oep}{
1801! {\tt tau0oep} & initial step length for the OEP iterative solver & real &
1802! $0.5$}
1803! The optimised effective potential is determined using an interative method
1804! [Phys. Rev. Lett. 98, 196405 (2007)]. This variable sets the step length as
1805! described in the article. See {\tt maxitoep}.
1806!
1807! \block{taufsm}{
1808! {\tt taufsm} & the step size to be used when finding the effective magnetic
1809! field in fixed spin moment calculations & real & $0.01$}
1810! An effective magnetic field, ${\bf B}_{\rm FSM}$, is required for fixing the
1811! spin moment to a given value, ${\bf M}_{\rm FSM}$. This is found by adding a
1812! vector to the field which is proportional to the difference between the
1813! moment calculated in the $i$th self-consistent loop and the required moment:
1814! $$ {\bf B}_{\rm FSM}^{i+1}={\bf B}_{\rm FSM}^i+\lambda\left({\bf M}^i
1815! -{\bf M}_{\rm FSM}\right), $$
1816! where $\lambda$ is proportional to {\tt taufsm}. See also {\tt fsmtype},
1817! {\tt momfix} and {\tt spinpol}.
1818!
1819! \block{tempk}{
1820! {\tt tempk} & temperature $T$ of the electronic system in kelvin & real & -}
1821! Assigning a value to this variable sets {\tt stype} to 3 (Fermi-Dirac) and
1822! the smearing width to $k_{\rm B}T$.
1823!
1824! \block{tforce}{
1825! {\tt tforce} & set to {\tt .true.} if the force should be calculated at the
1826! end of the self-consistent cycle & logical & {\tt .false.}}
1827! This variable is automatically set to {\tt .true.} when performing geometry
1828! optimisation.
1829!
1830! \block{tefvit}{
1831! {\tt tefvit} & set to {\tt .true.} if the first-variational eigenvalue
1832! equation should be solved iteratively & logical & {\tt .false.}}
1833!
1834! \block{tefvr}{
1835! {\tt tefvr} & set to {\tt .true.} if a real symmetric eigenvalue solver
1836! should be used for crystals which have inversion symmetry & logical &
1837! {\tt .true.}}
1838! For crystals with inversion symmetry, the first-variational Hamiltonian and
1839! overlap matrices can be made real by using appropriate transformations. In
1840! this case, a real symmetric (instead of complex Hermitian) eigenvalue solver
1841! can be used. This makes the calculation about three times faster.
1842!
1843! \block{tm3fix}{
1844! {\tt ntmfix} & number of tensor moments (TM) to be fixed & integer & 0 \\
1845! \hline
1846! {\tt is(i)} & species number for entry $i$ & integer & - \\
1847! {\tt ia(i)} & atom number & integer & - \\
1848! {\tt l(i)} & $l$ of TM & integer & - \\
1849! \hline
1850! {\tt (k, p, r, t)(i)} & indices for the 3-index TM & integer & - \\
1851! \hline
1852! {\tt wkpr(t)(i)} & real TM value & real & - }
1853! This block sets up the fixed tensor moment (FTM). There should be as many
1854! TM entries as {\tt ntmfix}. See the routine {\tt tm3todm} for the tensor
1855! moment indexing convention.
1856!
1857! \block{tmwrite}{
1858! {\tt tmwrite} & set to {\tt .true.} if the tensor moments and the
1859! corresponding decomposition of DFT+$U$ energy should be calculated
1860! at every loop of the self-consistent cycle & logical & {\tt .false.}}
1861! This variable is useful to check the convergence of the tensor moments in
1862! DFT+$U$ calculations. Alternatively, with {\tt task} equal to 400, one can
1863! calculate the tensor moments and corresponding DFT+$U$ energy contributions
1864! from a given density matrix and set of Slater parameters at the end of the
1865! self-consistent cycle.
1866!
1867! \block{trdbfcr}{
1868! {\tt trdbfcr} & set to {\tt .true.} if the ultra long-range, real-space
1869! external magnetic field in Cartesian coordinates should be read in from
1870! {\tt BFCR.OUT} & logical & {\tt .false.}}
1871!
1872! \block{trdvclr}{
1873! {\tt trdvclr} & set to {\tt .true.} if the ultra long-range, real-space
1874! external Coulomb potential should be read in from {\tt VCLR.OUT} &
1875! logical & {\tt .false.}}
1876!
1877! \block{tsediag}{
1878! {\tt tsediag} & set to {\tt .true.} if the self-energy matrix should be
1879! treated as diagonal & logical & {\tt .true.}}
1880! When this variable is {\tt .true.}, the self-energy used in a $GW$
1881! calculation $\Sigma_{ij}({\bf k},\omega)$ is taken to be diagonal in the
1882! Kohn-Sham state indices $i$ and $j$. When {\tt tsediag} is {\tt .false.},
1883! the entire matrix is used.
1884!
1885! \block{tshift}{
1886! {\tt tshift} & set to {\tt .true.} if the crystal can be shifted so that the
1887! atom closest to the origin is exactly at the origin &
1888! logical & {\tt .true.}}
1889!
1890! \block{tstime}{
1891! {\tt tstime} & total simulation time of time evolution run & real &
1892! $1000.0$}
1893! See also {\tt dtimes}.
1894!
1895! \block{vhmat}{
1896! {\tt vhmat(1)} & matrix row 1 & real(3) & $(1.0,0.0,0.0)$ \\
1897! \hline
1898! {\tt vhmat(2)} & matrix row 2 & real(3) & $(0.0,1.0,0.0)$ \\
1899! \hline
1900! {\tt vhmat(3)} & matrix row 3 & real(3) & $(0.0,0.0,1.0)$}
1901! This is the transformation matrix $M$ applied to every vector $\bf H$ in the
1902! structure factor output files {\tt SFACRHO.OUT} and {\tt SFACMAG.OUT}. It is
1903! stored in the usual row-column setting and applied directly as
1904! ${\bf H}'=M{\bf H}$ to every vector but {\em only} when writing the output
1905! files. See also {\tt hmaxvr} and {\tt reduceh}.
1906!
1907! \block{vhighq}{
1908! {\tt vhighq} & {\tt .true.} if a very high-quality parameter set should be
1909! used & logical & {\tt .false.}}
1910! Setting this to {\tt .true.} results in some default parameters being
1911! changed to ensure excellent convergence in most situations. See also
1912! {\tt highq}.
1913!
1914! \block{vklem}{
1915! {\tt vklem} & the $k$-point in lattice coordinates at which to compute the
1916! effective mass tensors & real(3) & $(0.0,0.0,0.0)$}
1917! See {\tt deltaem} and {\tt ndspem}.
1918!
1919! \block{vkloff}{
1920! {\tt vkloff } & the $k$-point offset vector in lattice coordinates &
1921! real(3) & $(0.0,0.0,0.0)$}
1922! See {\tt ngridk}.
1923!
1924! \block{vqlss}{
1925! {\tt vqlss} & the ${\bf q}$-vector of the spin-spiral state in lattice
1926! coordinates & real(3) & $(0.0,0.0,0.0)$}
1927! Spin-spirals arise from spinor states assumed to be of the form
1928! $$ \Psi^{\bf q}_{\bf k}({\bf r})=
1929! \left( \begin{array}{c}
1930! U^{{\bf q}\uparrow}_{\bf k}({\bf r})e^{i({\bf k+q/2})\cdot{\bf r}} \\
1931! U^{{\bf q}\downarrow}_{\bf k}({\bf r})e^{i({\bf k-q/2})\cdot{\bf r}} \\
1932! \end{array} \right). $$
1933! These are determined using a second-variational approach, and give rise to a
1934! magnetisation density of the form
1935! $$ {\bf m}^{\bf q}({\bf r})=(m_x({\bf r})\cos({\bf q \cdot r}),
1936! m_y({\bf r})\sin({\bf q \cdot r}),m_z({\bf r})), $$
1937! where $m_x$, $m_y$ and $m_z$ are lattice periodic. See also {\tt spinsprl}.
1938!
1939! \block{wmaxgw}{
1940! {\tt wmaxgw} & maximum Matsubara frequency for $GW$ calculations & real &
1941! $-5.0$}
1942! This defines the cut-off of the Matsubara frequencies on the imaginary
1943! axis for calculating the $GW$ self-energy and solving the Dyson equation.
1944! If this number is negative then the cut-off is taken to be
1945! $|{\tt wmaxgw}|\times\Delta\epsilon$, where $\Delta\epsilon$ is the
1946! difference between the largest and smallest Kohn-Sham valence eigenvalues.
1947!
1948! \block{wplot}{
1949! {\tt nwplot} & number of frequency/energy points in the DOS or optics plot &
1950! integer & $500$ \\
1951! {\tt ngrkf} & fine $k$-point grid size used for integrating functions in the
1952! Brillouin zone & integer & $100$ \\
1953! {\tt nswplot} & level of smoothing applied to DOS/optics output & integer &
1954! $1$ \\
1955! \hline
1956! {\tt wplot} & frequency/energy window for the DOS or optics plot & real(2) &
1957! $(-0.5,0.5)$}
1958! DOS and optics plots require integrals of the kind
1959! $$ g(\omega_i)=\frac{\Omega}{(2\pi)^3}\int_{\rm BZ} f({\bf k})
1960! \delta(\omega_i-e({\bf k}))d{\bf k}. $$
1961! These are calculated by first interpolating the functions $e({\bf k})$ and
1962! $f({\bf k})$ with the trilinear method on a much finer mesh whose size is
1963! determined by {\tt ngrkf}. Then the $\omega$-dependent histogram of the
1964! integrand is accumulated over the fine mesh. If the output function is noisy
1965! then either {\tt ngrkf} should be increased or {\tt nwplot} decreased.
1966! Alternatively, the output function can be artificially smoothed up to a
1967! level given by {\tt nswplot}. This is the number of successive 3-point
1968! averages to be applied to the function $g$.
1969!
1970! \block{wsfac}{
1971! {\tt wsfac} & energy window to be used when calculating density or magnetic
1972! structure factors & real(2) & $(-10^6,10^6)$}
1973! Only those states with eigenvalues within this window will contribute to the
1974! density or magnetisation. See also {\tt hmaxvr} and {\tt vhmat}.
1975!
1976! \block{xctype}{
1977! {\tt xctype} & integers defining the type of exchange-correlation functional
1978! to be used & integer(3) & $(3,0,0)$}
1979! Normally only the first value is used to define the functional type. The
1980! other value may be used for external libraries. Currently implemented are:
1981! \vskip 6pt
1982! \begin{tabularx}{\textwidth}[h]{lX}
1983! $-n$ & Exact-exchange optimised effective potential (EXX-OEP) method with
1984! correlation energy and potential given by functional number $n$ \\
1985! 1 & No exchange-correlation funtional ($E_{\rm xc}\equiv 0$) \\
1986! 2 & LDA, Perdew-Zunger/Ceperley-Alder, {\it Phys. Rev. B} {\bf 23}, 5048
1987! (1981) \\
1988! 3 & LSDA, Perdew-Wang/Ceperley-Alder, {\it Phys. Rev. B} {\bf 45}, 13244
1989! (1992) \\
1990! 4 & LDA, X-alpha approximation, J. C. Slater, {\it Phys. Rev.} {\bf 81}, 385
1991! (1951) \\
1992! 5 & LSDA, von Barth-Hedin, {\it J. Phys. C} {\bf 5}, 1629 (1972) \\
1993! 20 & GGA, Perdew-Burke-Ernzerhof, {\it Phys. Rev. Lett.} {\bf 77}, 3865
1994! (1996) \\
1995! 21 & GGA, Revised PBE, Zhang-Yang, {\it Phys. Rev. Lett.} {\bf 80}, 890
1996! (1998) \\
1997! 22 & GGA, PBEsol, Phys. Rev. Lett. 100, 136406 (2008) \\
1998! 26 & GGA, Wu-Cohen exchange (WC06) with PBE correlation, {\it Phys. Rev. B}
1999! {\bf 73}, 235116 (2006) \\
2000! 30 & GGA, Armiento-Mattsson (AM05) spin-unpolarised functional,
2001! {\it Phys. Rev. B} {\bf 72}, 085108 (2005) \\
2002! 100 & Libxc functionals; the second and third values of {\tt xctype} define
2003! the exchange and correlation functionals in the Libxc library,
2004! respectively
2005! \end{tabularx}
2006!
2007! \section{Contributing to Elk}
2008! Please bear in mind when writing code for the Elk project that it should be
2009! an exercise in physics and not software engineering. All code should
2010! therefore be kept as simple and concise as possible, and above all it should
2011! be easy for anyone to locate and follow the Fortran representation of the
2012! original mathematics. We would also appreciate the following conventions
2013! being adhered to:
2014! \begin{itemize}
2015! \item Strict Fortran 2008 should be used. Features which are marked as
2016! obsolescent in Fortran 2008 should be avoided. These include assigned
2017! format specifiers, labeled do-loops, computed goto statements and statement
2018! functions.
2019! \item Modules should be used in place of common blocks for declaring
2020! global variables. Use the existing modules to declare new global variables.
2021! \item Any code should be written in lower-case free form style, starting
2022! from column one. Try and keep the length of each line to fewer than 80
2023! characters using the \& character for line continuation.
2024! \item Every function or subroutine, no matter how small, should be in its
2025! own file named {\tt routine.f90}, where {\tt routine} is the function or
2026! subroutine name. It is recommended that the routines are named so as to
2027! make their purpose apparent from the name alone.
2028! \item Use of {\tt implicit none} is mandatory. Remember also to define the
2029! {\tt intent} of any passed arguments.
2030! \item Local allocatable arrays must be deallocated on exit of the routine to
2031! prevent memory leakage. Use of automatic arrays should be limited to arrays
2032! of small size.
2033! \item Every function or subroutine must be documented with the Protex source
2034! code documentation system. This should include a short \LaTeX\ description
2035! of the algorithms and methods involved. Equations which need to be
2036! referenced should be labeled with {\tt routine\_1}, {\tt routine\_2}, etc.
2037! The authorship of each new piece of code or modification should be
2038! indicated in the {\tt REVISION HISTORY} part of the header. See the Protex
2039! documentation for details.
2040! \item Ensure as much as possible that a routine will terminate the program
2041! when given improper input instead of continuing with erroneous results.
2042! Specifically, functions should have a well-defined domain for which they
2043! return accurate results. Input outside that domain should result in an
2044! error message and termination.
2045! \item Report errors prior to termination with a short description, for
2046! example:
2047! \begin{verbatim}
2048! write(*,*)
2049! write(*,'("Error(readinput): natoms < 1 : ",I8)') natoms(is)
2050! write(*,'(" for species ",I4)') is
2051! write(*,*)
2052! stop
2053! \end{verbatim}
2054! \item Wherever possible, real numbers outputted as ASCII data should be
2055! formatted with the {\tt G18.10} specifier.
2056! \item Avoid redundant or repeated code: check to see if the routine you need
2057! already exists, before writing a new one.
2058! \item All reading in of ASCII data should be done in the subroutine
2059! {\tt readinput}. For binary data, separate routines for reading and writing
2060! should be used (for example {\tt writestate} and {\tt readstate}).
2061! \item Input filenames should be in lowercase and have the extension
2062! {\tt .in} . All output filenames should be in uppercase with the extension
2063! {\tt .OUT} .
2064! \item All internal units should be atomic. Input and output units should be
2065! atomic by default and clearly stated otherwise. Rydbergs should not be used
2066! under any circumstances.
2067! \end{itemize}
2068! \subsection{Licensing}
2069! Routines which constitute the main part of the code are released under the
2070! GNU General Public License (GPL). Library routines are released under the
2071! less restrictive GNU Lesser General Public License (LGPL). Both licenses
2072! are contained in the file {\tt COPYING}. Any contribution to the code must
2073! be licensed at the authors' discretion under either the GPL or LGPL.
2074! Author(s) of the code retain the copyrights. Copyright and (L)GPL
2075! information must be included at the beginning of every file, and no code
2076! will be accepted without this.
2077!
2078!EOI
2079
subroutine aceplot
Definition aceplot.f90:7
subroutine alpha2f
Definition alpha2f.f90:7
subroutine bandstr
Definition bandstr.f90:10
subroutine bandstrulr
Definition bandstrulr.f90:7
subroutine batchdv
Definition batchdv.f90:7
subroutine bornecdyn
Definition bornecdyn.f90:7
subroutine bornechg
Definition bornechg.f90:7
subroutine checkrst
Definition checkrst.f90:7
subroutine dbxcplot
Definition dbxcplot.f90:7
subroutine dielectric
subroutine dielectric_bse
subroutine dielectric_tdrt
subroutine effmass
Definition effmass.f90:7
subroutine elfplot
Definition elfplot.f90:10
subroutine eliashberg
program elk
Definition elk.f90:7
subroutine elnes
Definition elnes.f90:7
subroutine emdplot
Definition emdplot.f90:7
subroutine ephcouple
Definition ephcouple.f90:7
subroutine ephdos
Definition ephdos.f90:7
subroutine fermisurf
Definition fermisurf.f90:7
subroutine fermisurfbxsf
subroutine genafieldt
subroutine geomopt
Definition geomopt.f90:7
subroutine geomplot
Definition geomplot.f90:7
subroutine gndstate
Definition gndstate.f90:10
subroutine gndsteph
Definition gndsteph.f90:7
subroutine gndstulr
Definition gndstulr.f90:7
subroutine gwbandstr
Definition gwbandstr.f90:7
subroutine gwdmat
Definition gwdmat.f90:7
subroutine gwsefm
Definition gwsefm.f90:7
subroutine gwspecf
Definition gwspecf.f90:7
subroutine hartfock
Definition hartfock.f90:7
subroutine jprplot
Definition jprplot.f90:7
subroutine mae
Definition mae.f90:7
subroutine magnetoelt
Definition magnetoelt.f90:7
subroutine maguplot
Definition maguplot.f90:7
subroutine mkl_init
Definition mkl_init.f90:7
subroutine moke
Definition moke.f90:7
subroutine moldyn
Definition moldyn.f90:7
subroutine mossbauer
Definition mossbauer.f90:10
subroutine delfile(fname)
Definition moddelf.f90:15
integer itask
Definition modmain.f90:1294
logical trestart
Definition modmain.f90:1054
integer ntasks
Definition modmain.f90:1292
integer, dimension(3), parameter version
Definition modmain.f90:1288
integer task
Definition modmain.f90:1298
integer, dimension(maxtasks) tasks
Definition modmain.f90:1296
integer lp_mpi
Definition modmpi.f90:15
integer ierror
Definition modmpi.f90:19
integer mpicom
Definition modmpi.f90:11
integer np_mpi
Definition modmpi.f90:13
logical mp_mpi
Definition modmpi.f90:17
subroutine omp_reset
Definition modomp.f90:71
integer maxthdmkl
Definition modomp.f90:15
integer maxlvl
Definition modomp.f90:17
integer maxthd
Definition modomp.f90:11
integer maxthd1
Definition modomp.f90:13
subroutine omp_init
Definition modomp.f90:32
subroutine rdstatus
type(file_t), dimension(:), allocatable, private file
subroutine initrd
logical wrtdsk
logical ramdisk
Definition modramdisk.f90:9
subroutine writevars(vname, n1, n2, n3, n4, n5, n6, nv, iv, iva, rv, rva, zv, zva, sv, sva)
Definition modvars.f90:16
logical batch
Definition modvars.f90:11
logical wrtvars
Definition modvars.f90:9
subroutine nesting
Definition nesting.f90:7
subroutine nonlinopt
Definition nonlinopt.f90:10
subroutine phdisp
Definition phdisp.f90:7
subroutine phdos
Definition phdos.f90:7
subroutine phlwidth
Definition phlwidth.f90:7
subroutine phonon
Definition phonon.f90:7
subroutine phononsc
Definition phononsc.f90:7
subroutine piezoelt
Definition piezoelt.f90:7
subroutine potplot
Definition potplot.f90:10
subroutine potuplot
Definition potuplot.f90:7
subroutine rdmft
Definition rdmft.f90:10
subroutine readinput
Definition readinput.f90:10
subroutine rhoplot
Definition rhoplot.f90:10
subroutine rhosplot
Definition rhosplot.f90:7
subroutine rhouplot
Definition rhouplot.f90:7
subroutine sfacmag
Definition sfacmag.f90:10
subroutine sfacrho
Definition sfacrho.f90:10
subroutine spiralsc
Definition spiralsc.f90:7
subroutine tddft
Definition tddft.f90:7
subroutine tddftlr
Definition tddftlr.f90:7
subroutine tddftsplr
Definition tddftsplr.f90:7
subroutine tdhfc
Definition tdhfc.f90:7
subroutine testcheck
Definition testcheck.f90:7
subroutine torque
Definition torque.f90:7
subroutine vecplot
Definition vecplot.f90:10
subroutine wfcrplot
Definition wfcrplot.f90:7
subroutine wfplot
Definition wfplot.f90:7
subroutine writeafpdt
Definition writeafpdt.f90:7
subroutine writebox(fnum, str)
Definition writebox.f90:7
subroutine writedos
Definition writedos.f90:7
subroutine writedosu
Definition writedosu.f90:7
subroutine writeefg
Definition writeefg.f90:10
subroutine writeefieldw
subroutine writeemd
Definition writeemd.f90:7
subroutine writeepsinv
subroutine writeevbse
Definition writeevbse.f90:7
subroutine writeevsp
Definition writeevsp.f90:7
subroutine writeexpmat
subroutine writehmlbse
subroutine writelsj
Definition writelsj.f90:7
subroutine writephn
Definition writephn.f90:7
subroutine writepmat
Definition writepmat.f90:10
subroutine writesf
Definition writesf.f90:7
subroutine writestrain
subroutine writestress
subroutine writetm
Definition writetm.f90:7
subroutine writew90
Definition writew90.f90:7
subroutine writewfpw
Definition writewfpw.f90:7
subroutine wxcplot
Definition wxcplot.f90:7