Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
main.m
Go to the documentation of this file.
1 % Eotvos Quantum Transport Utilities - Introduction to EQuUs
2 % Copyright (C) 2018 Peter Rakyta, Ph.D.
3 %
4 % This program is free software: you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation, either version 3 of the License, or
7 % (at your option) any later version.
8 %
9 % This program is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License for more details.
13 %
14 % You should have received a copy of the GNU General Public License
15 % along with this program. If not, see http://www.gnu.org/licenses/.
16 
17 %> \LATEX_HEADER
18 %
19 %> \mainpage Introduction to @EQuUs @version
20 %>
21 %> @image latex logo_equus.jpg
22 %>
23 %> @EQuUs @version is a free software distributed under the <a href="http://www.gnu.org/licenses/">GNU General Public License</a>.
24 %> @EQuUs @version is designed for transport calculations implementing the equilibrium Greens function formalism developed in:
25 %> * A. Cresti, G. Grosso and G. Pastori Parravicini, Eur. Phys. J. B <b>53</b>, 537-549 (2006).
26 %> * S. Sanvito, C.~J. Lambert, J.~H. Jefferson and A. M. Bratkovsky, Phys. Rev. B <b>59</b>, 11936 (1999).
27 %> * I. Rungger and S. Sanvito, Phys. Rev. B <b>78</b>, 035407 (2008).
28 %> * P. Rakyta, E. T&oacute;v&aacute;ri, M. Csontos, Sz. Csonka, A. Csord&aacute;s, J. Cserti, Phys. Rev. B <b>90</b>, 125428 (2014).
29 %> * P. Rakyta, A. Korm&aacute;nyos, J. Cserti, Phys. Rev. B <b>93</b>, 224510 (2016).
30 %>
31 %> ## @EQuUs @version comes with the following functionalities:
32 %>
33 %> <table id="home" style="cell-spacing: 0px;">
34 %> <tr>
35 %> <td id="tdhome" style="width: 400px">
36 %> * Spin and charge transport in normal/superconducting systems
37 %> * Multi-terminal structures
38 %> * Automatically generated predefined lattice structures
39 %> * Inclusion of overlap matrices.
40 %> * SVD regularization of the leads.
41 %> * Interface for the SIESTA package
42 %> * Inclusion of custom Hamiltonians (molecular structures)
43 %> * Automatic transformation to the Bogoliubov-de Gennes model
44 %> </td>
45 %> <td id="tdhome">
46 %> @image html intro_focusing_geometry.jpg
47 %> @image latex intro_focusing_geometry.jpg
48 %> </td>
49 %> </tr>
50 %> <tr>
51 %> <td id="tdhome" style="width: 400px">
52 %> @image html intro_geometry.jpg
53 %> @image latex intro_geometry.jpg
54 %> </td>
55 %> <td id="tdhome">
56 %> * Efficient numerical components for large-scaled non-trivial structures using \subpage MKL
57 %> * Automatic magnetic field and gauge transformation
58 %> * DC Josephson current
59 %> * DC Josephson current in multi-terminal structures
60 %> * Self-consistent framework for electron density based functionals. </br> (self-consistent charge distribution, electron-electron interaction, s-type pair potential)
61 %> </td>
62 %> </tr>
63 %> <tr>
64 %> <td id="tdhome" style="width: 400px">
65 %> * Transverse momentum resolved computations.
66 %> * Computing the energy and the wave function of the eigenstates.
67 %> </td>
68 %> <td id="tdhome">
69 %> @image html intro_wavefunc.jpg
70 %> @image latex intro_wavefunc.jpg
71 %> </td>
72 %> </tr>
73 %>
74 %> </table>
75 %>
76 %> ## Download and Install @EQuUs @version
77 %> To download and to install stable packages of @EQuUs @version.x follow instructions at \subpage intall_guide
78 %> @}
79 
80 
81 
82 
83 %> \page intall_guide Installation Guide
84 %>
85 %> \section requirements_sec System requirements
86 %> <p class="syntax">@EQuUs @version is compatible with MATLAB R2011b (7.13.0.564) or higher and with Octave 4.0 or higher.
87 %> \subsection Download
88 %> <p class="syntax">Download @EQuUs @version from the list of provided <a href="download.html">stable packages</a>. Altrenatively @EQuUs @version package can be downloaded by the shell command</p> <p class="syntax">wget http://eqt.elte.hu/EQuUs/EQuUs_@version.tar.gz </p>
89 %> \subsection Unpack
90 %> <p class="syntax">Unpack the downloaded package into the directory "/path/to/EQuUs" the commands </p>
91 %> <p class="syntax">mkdir /path/to/EQuUs</p>
92 %> <p class="syntax">and</p>
93 %> <p class="syntax"> tar -xzf EQuUs_@version.tar.gz -C /path/to/EQuUs</p>
94 %> <p class="syntax"> to create the output directory and unpack the package respectively.</p>
95 %>
96 %> \section install_sec Install
97 %> <p class="syntax">Add the following lines to the "startup.m" (.octaverc) file located at the search path of MATLAB (Octave):</p>
98 %> <p class="syntax" style="height: 45px">addpath('/path/to/EQuUs'); <br> addpath('/path/to/EQuUs/utils'); <br> addpath('/path/to/EQuUs/Filters'); <br> addpath('/path/to/EQuUs/MEX');</p>
99 %>
100 %> <p class="syntax">Alternatively add the directories "/path/to/EQuUs" and "/path/to/EQuUs/utils" to the search path of MATLAB. To this end open the file pathdef.m and add the following lines:</p> <p class="syntax" style="height: 45px">'/path/to/EQuUs:', ... <br>'/path/to/EQuUs/utils:', ... <br>'/path/to/EQuUs/Filters:', ...<br>'/path/to/EQuUs/MEX:', ...</p>
101 %>
102 %> <p class="syntax">In Octave one should also download the <a href="http://xerces.apache.org/mirrors.cgi">Xerces Java XML parser libraries</a> to the installation. Without these libraries Octave would not be able to parse the input files of EQuUs. (However, it is possible to run EQuUs even without XML input file.)</p>
103 %> <p class="syntax">Then add the following lines to the .octaverc file located at the search path of Octave:</p>
104 %> <p class="syntax" style="height: 25px"> javaaddpath('/path/to/EQuUs/xerces/xercesImpl.jar'); <br> javaaddpath('/path/to/EQuUs/xerces/xml-apis.jar'); </p>
105 %>
106 %> <p class="syntax">To install additional components (MKL, Siesta) please refer to the individual pages.</p>
107 %>
108 %> <p class="syntax">Now the @EQuUs @version package is successfully installed.</p>
109 %>
110 %>
111 %> \section structure_sec The structure of @EQuUs @version
112 %> <p class="syntax" style="height: 60px">@EQuUs @version is organized into interfaces. Each interface has a separated workspace consisting of
113 %> related variables (e.g., the surface Greens function, the propagating and evanescent modes, the group velocities are grouped into one workspace if they belong to the same lead.).
114 %> The interfaces also provide several methods to run specific calculations on the variables of the workspace. The interfaces form two levels of abstraction.
115 %> The members of the 1st level (/root) are responsible for specific elementary tasks, while the interfaces of the 2nd level (/root/utils) combine the functionalities of the 1st level interfaces, and can be used as the building blocks of the studied structure.</p>
116 %>
117 %> \section run_sec Run @EQuUs @version
118 %> <p class="syntax">@EQuUs @version can be run by small MATLAB scripts that initialize the interfaces and combine their functionalities.
119 %> Physical and other running parameters (intended not to be changed during the calculations) are read in from an xml structure.
120 %> Within the @EQuUs @version package (see the directory "/path/to/EQuUs/Examples") there are provided several executable examples demonstrating the usage of the package. These examples are also invoked by the built-in automatic test procedure (automatic_test.m) of @EQuUs @version.</p>
121 
122 
123 
124 
125 
126 %> \page MKL @MKL component
127 %>
128 %>
129 %> The @MKL component is an interface to the <a href="https://software.intel.com/en-us/node/470282">Intel MKL PARDISO</a> package providing a high-performance, robust, memory efficient, and easy to use software package for solving large sparse linear systems of equations on shared memory multiprocessors.
130 %> @MKL component uses the <a href="http://www.mathworks.com/help/matlab/matlab_external/introducing-mex-files.html">MEX</a> technology to incorporate C, C++ and fortran libraries into Matlab and Octave packages.
131 %> </br>
132 %> The PARDISO package enables us to calculate individual elements of the inverse of a sparse matrix.
133 %> Calculating, for example, the Green's function between the surface points of the scattering region, or evaluating the density of states on the atomic sites enables us to treat large scale systems including disorders and other kind of inhomogeneities or performing self-consistent calculations.
134 %> The PARDISO solver is based on the following publications:
135 %> <ul>
136 %> <li>M. Luisier, O. Schenk et.al., Euro-Par 2013, LNCS 8097, F. Wolf, B. Mohr, and D. an Ney (Eds.), Springer-Verlag Berlin Heidelberg, pp. 533-544, 2013.</li>
137 %> <li> O. Schenk, M. Bollhofer, and R. Romer, SIAM Review 50 (2008), pp. 91-112.</li>
138 %> <li>O. Schenk, A. Wachter, and M. Hagemann, Journal of Computational Optimization and Applications, pp. 321-341, Volume 36, Numbers 2-3 (April, 2007).</li>
139 %> </ul>
140 %> </br>
141 %>
142 %> The @MKL component is compatible with both MATLAB and octave packages, however, one need to compile separate binaries for the two products.
143 %> The implemented Intel MKL PARDISO routines can treat structurally symmetric matrices (thus the matrix does not to be Hermitian).
144 %> To compile the @MKL component please following the <a href="http://eqt.elte.hu/equus/MKL/install">installation guide</a>.
145 %> @MKL can be used as an independent component it does not depend on the other EQuUs components.
146 %> </br>
147 %> For technical support or for implementing new functionalities please do not hesitate to contact <a href="http://eqt.elte.hu/contact">us</a>.
148 %>
149 %> ## Usage of the @MKL component
150 %> @MKL component contains of individual functions that are independent from other EQuUs components.
151 %> After a successful compilation (see section \ref install_MKL_sec) the generated MEX files can be invoked from the MATLAB/octave command line as described <a href="http://www.mathworks.com/help/matlab/matlab_external/introducing-mex-files.html">here</a>. The description of the individual functions can be found here:
152 %>
153 %> * dgetPartialInv.c
154 %> * zgetPartialInv.c
155 %> * dggev.c
156 %> * zggev.c
157 %>
158 %>
159 %> \section install_MKL_sec Installation Guide
160 %>
161 %> \subsection requirements_MKL System requirements
162 %> @MKL was successfully compiled and tested with Intel compiler v16.0.2 including MKL v11.2.3.187 and with Intel compiler v12.1.5 including MKL v10.3.11. @MKL can also be compiled and linked with the GNU compiler)
163 %> \subsection download_MKL Download
164 %> Download the @EQuUs @version from the list of provided <a href="download.html">stable packages</a>. Altrenatively @EQuUs @version package can be downloaded by the shell command
165 %> wget http://eqt.elte.hu/equus/Downloads/EQuUs_@version.tar.gz
166 %> \subsection unpack_MKL Unpack
167 %> <p class="syntax">Unpack the downloaded package into the directory "/path/to/EQuUs" with the commands </p>
168 %> <p class="syntax">mkdir /path/to/EQuUs</p>
169 %> <p class="syntax">and</p>
170 %> <p class="syntax"> tar -xzf @EQuUs @version.tar.gz -C /path/to/EQuUs</p>
171 %> <p class="syntax"> to create the output directory and unpack the package respectively.</p>
172 %>
173 %> \subsection install_MKL Install
174 %> Currently the configuration files for the compilation are given only for Unix system. For Windows system please create appropriate configuration files. (Binaries compiled on Unix system can not be used on other operating systems.)
175 %> To compile the @MKL component one needs to setup environment variables EQUUSDIR=/path/to/EQuUs and the standard <a href="https://software.intel.com/en-us/articles/setting-up-the-build-environment-for-using-intel-c-or-fortran-compilers">built-in environment variables</a> of the Intel compiler.
176 %> After the environment variables were successfully set, please open and edit the file /path/to/EQuUs/MKL/commonvars.in. This file contains some other variables needed to be also given for a successful installation:
177 %>
178 %> * MATLABROOT=path/to/the/MATLAB/installation
179 %> * OCTAVEROOT=path/to/the/octave/installation
180 %> * COMPILER_F=path/to/the/C/compiler/binary
181 %> * COMPILER_C=path/to/the/C/compiler/binary
182 %>
183 %>
184 %>
185 %> For the compilation use the provided makefile in the directory /path/to/EQuUs/MKL/. The makefile can be run with the following syntax:
186 %> <b>make [debug] [THREAD=SEQ/PAR/MIC] [LINKING=static/dynamic] [BUILD=matlab/octave]</b>
187 %>
188 %> * Use the option debug for verbose compilation.
189 %> * Use the option THREAD=SEQ for single threaded compilation, THREAD=PAR for multi threaded (openMP) compilation, or THREAD=MIC for Intel MIC compilation.
190 %> * Use the option LINKING=static for static linking of the produced MEX files (thus the MEX files becomes transferable) or LINKING=dynamic for dynamic linking (using shared libraries provided by the system).
191 %> * Use the option BUILD=matlab for compilation for MATLAB or BUILD=octave for compilation for octave.
192 
193 
194 
function Transport(Energy, B)
Calculates the conductance at a given energy value.
function structures(name)