~b-ly/+junk/masterThesis

« back to all changes in this revision

Viewing changes to theoreticalBasis.tex

  • Committer: Antoine Pairet
  • Date: 2010-08-13 12:10:45 UTC
  • Revision ID: antoine@pairet.be-20100813121045-3w97naqjyiafeogw
nearly there

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 First-principles studies, also known as \textit{ab initio}, do not require the knowledge of experimental data. Studies are performed ``from scratch'' thanks to ``first-principles''. Only fundamental constants are needed to perform the analysis of a system. Namely, \abinitio calculations use:
 
1
 First-principles studies, also known as \textit{ab initio}, do not require the knowledge of experimental data. Studies are performed ``from scratch'' thanks to ``first-principles''. Only fundamental constants are needed to perform the analysis of a system. Namely, \abinitio\ calculations use:
2
2
\begin{description}
3
3
  \item[the electron mass] $m_e$ \unit{9.1093826(16)\times 10^{-31}}{\kilo\gram};
4
4
  \item[the electron charge] $e$ equals to \unit{1.602176487(40) \times 10^{-19}}{\coulomb};
13
13
%Then, the approximations made to simplify the problem are detailed: electrons and nuclei are treated separately thanks to the Born-Oppenheimer approximations, and pseudopotientals permit to treat explicitly only the valence electrons. 
14
14
Then, the approximations used to simplify the problem are detailed. For instance, the Born-Oppenheimer approximation is used to treat separately electrons and nuclei; the pseudopotentials are employed to treat explicitely only the valence electrons.
15
15
 
16
 
Last, \siesta implementation of the theory is presented. It is based on the usage of a local basis set. \siesta can be seen as a tight-binding method which takes into account the presence of all the neighbours. 
 
16
Last, \siesta\ implementation of the theory is presented. It is based on the usage of a local basis set. \siesta\ can be seen as a tight-binding method which takes into account the presence of all the neighbours. 
17
17
%\siesta employs a linear combination of atomic orbital (LCAO) to describe the basis set.
18
 
\siesta wavefunctions are described on the basis of atomic orbitals (LCAO).
 
18
\siesta\ wavefunctions are described on the basis of atomic orbitals (LCAO).
19
19
 
20
20
\section{The many-body problem}
21
21
\label{sec:schrodinger}
415
415
 
416
416
\begin{figure}[ht]
417
417
  \centering
418
 
  \caption{EX hole}
 
418
  \input{pstricksImg/exHole}
 
419
  \caption[Electron hole]{Due to its intrinsic properties, electrons create a depletion around themselves.}
419
420
  \label{fig:XCHole}
420
421
\end{figure}
421
422
 
545
546
  \begin{figure}[ht]
546
547
    \centering
547
548
    \input{pstricksImg/pspSi}
548
 
    \caption{Beyond a given cutoff radius (1.9 in this case), all pseudopotentials are equal to the ionic potential which is represented by dashed line. The pseudos were generated using the atom program delivered with \siesta following the scheme of \textcite{Troullier1993}. These pseudos are used throughout dhis work.}
 
549
    \caption[Pseudopotential of silicon]{Beyond a given cutoff radius (1.9 in this case), all pseudopotentials are equal to the ionic potential which is represented by dashed line. The pseudos were generated using the atom program delivered with \siesta\ following the scheme of \textcite{Troullier1993}. These pseudos are used throughout this work.}
549
550
    \label{fig:SiPseudo}
550
551
  \end{figure}
551
552
 
552
553
 
553
 
\section{\siesta implementation: atomic orbitals}
 
554
\section{\siesta\ implementation: atomic orbitals}
554
555
\label{sec:siestaImplementation}
555
 
The \siesta project (Spanish Initiative for Electronic Simulations with Thousands of Atoms) was born in 1996 to provide an order-$N$ simulation package within the self-consistent DFT framework \cite{siestaWebsite}. 
 
556
The \siesta\ project (Spanish Initiative for Electronic Simulations with Thousands of Atoms) was born in 1996 to provide an order-$N$ simulation package within the self-consistent DFT framework \cite{siestaWebsite}. 
556
557
Efficiency and linear scaling - with respect to the number of atoms - were the core of the project's philosophy. As the project evolved, new functionalities were added and the need for more precision with the results was met. This implied some sacrifices with respect to the linear scaling, but efficiency was still the core business of the project. Today's package version offers both linear and non-linear scaling capabilities. In the present work, \textbf{linear scaling is not used}. 
557
558
 
558
 
The aim of the current section is to explain and detail how \siesta implements the DFT framework and to understand the differences between linear and cubic scaling. Focus is put upon the specificities of \siesta: the usage of atomic orbitals as basis set. A complete description of the \siesta method can be found in the literature \cite{PhysRevB.53.R10441,siesta2002}, a more recent article describes the recent developments of the project \cite{Artacho2008}. Initial articles explaining how the basis set is generated are also worth reading \cite{PhysRevB.64.235111,Artacho1999,PhysRevB.66.205101}.
559
 
The current section is based on those articles and on workshops organised by the \siesta project.
 
559
The aim of the current section is to explain and detail how \siesta\ implements the DFT framework and to understand the differences between linear and cubic scaling. Focus is put upon the specificities of \siesta: the usage of atomic orbitals as basis set. A complete description of the \siesta\ method can be found in the literature \cite{PhysRevB.53.R10441,siesta2002}, a more recent article describes the recent developments of the project \cite{Artacho2008}. Initial articles explaining how the basis set is generated are also worth reading \cite{PhysRevB.64.235111,Artacho1999,PhysRevB.66.205101}.
 
560
The current section is based on those articles and on workshops organised by the \siesta\ project.
560
561
 
561
562
First, a general discussion explains the differences between linear and cubic scaling. This discussion will illustrate the reason behind the decision of not using linear scaling for this work. 
562
 
Then, \siesta's bases are detailed along with other specific choices made by the project. 
563
 
Last, the way to obtain STM images is discussed.
 
563
Then, \siesta's bases are detailed along with other specific choices made by the project. A comparison with planewaves id also given.
564
564
 
565
565
\subsection{Explicit use of locality and linear scaling}
566
 
Linear scaling with respect to the number of atoms was one the objective of \siesta and the choices made by the project clearly reflect this goal. The key to linear scaling is the explicit use of locality. Locality means that perturbations which are ``far'' away from a region of the system do not significantly influence properties of that region. While this ``near-sightedness'' principle \cite{Kohn1996} seems straightforward for some systems, it is less evident in the case of metallic compounds. 
 
566
Linear scaling with respect to the number of atoms was one the objective of \siesta\ and the choices made by the project clearly reflect this goal. The key to linear scaling is the explicit use of locality. Locality means that perturbations which are ``far'' away from a region of the system do not significantly influence properties of that region. While this ``near-sightedness'' principle \cite{Kohn1996} seems straightforward for some systems, it is less evident in the case of metallic compounds. 
567
567
For example, consider a small chain of polyethylene: $C_2H_6$. If another $CH_2$ group is appended at the end of it, the increase in energy will only differ by \unit{10^{-4}}{\Ha} with respect to the addition of a $CH_2$ group to a quasi infinite chain \cite{RevModPhys.71.1085}. This clearly means that the near-sightedness principle can be applied to that kind of systems. Generally, it is well accepted for insulators and semi-conductors. 
568
568
In the case of metallic compounds in which electrons are not ``bound'' to nuclei, the concept is less evident to understand. However, \textcite{Kohn1996} explains that it can even be applied to systems such as ionic crystals, in which long range electric fields are present, by adding self-consistency to the external potential.\\
569
569
How is it done and which step of the DFT is concerned by locality and linear scaling?
570
570
 
571
 
Solving the electronic problem can be roughly decomposed into two steps. First the Hamiltonian needs to be built. Second, it must be solved. Each step is done with specific algorithms and do not necessarily have the same type of scaling. A large amount of researchers have worked on improving the algorithms to solve the Hamiltonian. On the other hand, \siesta focuses on the first step which afterwards permits to achieve the order-$N$ goal. Once \siesta has built the Hamiltonian, it is up to the user to choose the way it is solved:
 
571
Solving the electronic problem can be roughly decomposed into two steps. First the Hamiltonian needs to be built. Second, it must be solved. Each step is done with specific algorithms and do not necessarily have the same type of scaling. A large amount of researchers have worked on improving the algorithms to solve the Hamiltonian. On the other hand, \siesta\ focuses on the first step which afterwards permits to achieve the order-$N$ goal. Once \siesta\ has built the Hamiltonian, it is up to the user to choose the way it is solved:
572
572
\begin{itemize}
573
573
  \item diagonalization which is $\mathcal{O}(N^3)$;
574
574
  \item $\mathcal{O}(N)$ algorithms.
582
582
  \end{split}
583
583
  \label{eq:cpuTime}
584
584
\end{equation}
585
 
with $c_1 > c_3$. Figure \ref{fig:cpuTime} illustrates the evolution of the computation time (CPU) with respect to the number of atoms in the system. For small systems, it is more interesting to use diagonalization method whereas very large system clearly benefit from linear scaling. In this work, the 
 
585
with $c_1 > c_3$. Figure \ref{fig:cpuTime} illustrates the evolution of the computation time (CPU) with respect to the number of atoms in the system. For small systems, it is more interesting to use diagonalization method whereas very large systems clearly benefit from linear scaling.
586
586
 
587
587
\begin{figure}[ht]
588
588
  \centering
589
589
  \input{pstricksImg/cpuTime}
590
 
  \caption{The choice for the solving method depends on the size of the system. For small systems, it is advantageous to use ``classical'' diagonalization technique while for larger systems the computation time is strongly decreased when using linear-scaling algorithms.}
 
590
  \caption[Linear and cubic scaling of \siesta\ algorithms]{The choice for the solving method depends on the size of the system. For small systems, it is advantageous to use ``classical'' diagonalization technique while for larger systems the computation time is strongly decreased when using linear-scaling algorithms.}
591
591
  \label{fig:cpuTime}
592
592
\end{figure}
593
593
 
594
594
Realising a linear-scaling method implementing DFT is not a matter of mathematical tricks or computer science algorithms. It requires the explicit use of quantum locality. Of course, many algorithmic concepts are inherent to this subject, but it is only achievable based on the physical description of the system. As it is highly desirable, it strongly encouraged research groups to better understand the physics behind locality. From a mathematical point of view, the explicit use of locality permits to have a finite range for matrix elements and results in a sparse matrix.
595
595
 
596
 
In order to build an Hamiltonian suited for order-$N$ algorithms, a large amount of strategies have been proposed. In his PhD thesis, \textcite{Haynes1998} presents Bessel functions in overlapping spheres as candidates. Another approach is the use of systematic basis set consisting of localized functions on the points of a three-dimensional grid. Such functions are known as ``blips'', they are centered on the points of a grid, and vanish exactly outside a limited domain surrounding each grid point. This technique was proposed by \textcite{PhysRevB.55.13485} and has been implemented in the {\sc Conquest} code \cite{conquest}.  \textcite{PhysRevB.62.1713} have chosen a method based on a real space grid with a finite- difference method. Even a plane-wave approach has been proposed and implemented to provide order-$N$ scaling by making well controlled approximations \cite{onetep}. The last approach, which is the one chosen by \siesta developers, is to take advantageof atomic orbitals. 
 
596
In order to build an Hamiltonian suited for order-$N$ algorithms, a large amount of strategies have been proposed. In his PhD thesis, \textcite{Haynes1998} presents Bessel functions in overlapping spheres as candidates. Another approach is the use of systematic basis set consisting of localized functions on the points of a three-dimensional grid. Such functions are known as ``blips'', they are centered on the points of a grid, and vanish exactly outside a limited domain surrounding each grid point. This technique was proposed by \textcite{PhysRevB.55.13485} and has been implemented in the {\sc Conquest} code \cite{conquest}.  \textcite{PhysRevB.62.1713} have chosen a method based on a real space grid with a finite- difference method. Even a plane-wave approach has been proposed and implemented to provide order-$N$ scaling by making well controlled approximations \cite{onetep}. The last approach, which is the one chosen by \siesta\ developers, is to take advantage of atomic orbitals. 
597
597
 
598
 
Different techniques can be used in order to represent the orbitals of the basis set. A popular choice is the usage of Gaussian type orbitals (GTO). Another possibility is the usage of Slater type orbitals. The \siesta project is implemented with Numerical Atomic Orbitals (NAO). \\ The purpose of the next section is to detail this approach. 
 
598
Different techniques can be used in order to represent the orbitals of the basis set. A popular choice is the usage of Gaussian type orbitals (GTO). Another possibility is the usage of Slater type orbitals. The \siesta\ project is implemented with Numerical Atomic Orbitals (NAO). \\ The purpose of the next section is to detail this approach. 
599
599
 
600
600
 
601
601
 
602
602
\subsection{Atomic orbitals as basis set}\label{subsec:paoBasis}
603
 
  In order to build the Hamiltonian, \siesta uses numerical atomic orbitals (NAO) as a basis set. Molecular orbitals representing the bonding between two atoms are described through a Linear Combination of Atomic Orbitals (LCAO). 
604
 
NAO are the numerical solutions of the KS Hamiltonian for the isolated atom with the same approximations (exchange-correlation and pseudopotential) as the one that are used for the condensed system. When pseudopotentials are used the basis set is composed of pseudo-atomic orbitals (PAO).
605
 
 
606
 
 
607
 
  The main advantage of atomic orbitals is their efficiency, only a small number of orbitals are needed to reach a good precision. Other advantages include direct interpretation of the results as concepts of orbitals are inherent in chemistry. On the other hand, orbital bases present the disadvantages of lacking a systematic method for optimal convergence.
608
 
 
609
 
  \siesta is able to generate a basis set given a small number of parameters but it is not exclusive in that users can perform simulations with their own orbitals and basis set. Two conditions are to be met though
 
603
  In order to build the Hamiltonian, \siesta\ uses numerical atomic orbitals (NAO) as a basis set. Molecular orbitals representing the bonding between two atoms are described through a Linear Combination of Atomic Orbitals (LCAO). 
 
604
NAO are the numerical solutions of the KS Hamiltonian for the isolated atom with the same approximations (exchange-correlation and pseudopotential) as the ones that are used for the condensed system. When pseudopotentials are used the basis set is composed of pseudo-atomic orbitals (PAO).
 
605
 
 
606
 
 
607
  The main advantage of atomic orbitals is their efficiency, only a small number of orbitals are needed to reach a good precision. Other advantages include direct interpretation of the results as concepts of orbitals are inherent in chemistry. On the other hand, orbital bases present the disadvantage of lacking a systematic method for optimal convergence.
 
608
 
 
609
  \siesta\ is able to generate a basis set given a small number of parameters but it is not exclusive in that users can perform simulations with their own orbitals and basis set. Two conditions are to be met though
610
610
  \begin{enumerate}
611
611
    \item the functions must be atomic like, i.e.\ (radial function) $\times$ (spherical harmonic),
612
612
    \item each orbital must be zero beyond a given radius.
613
613
  \end{enumerate}
614
614
The latter condition guarantees a sparse Hamiltonian which is consistent with the Hilbert space spanned by the basis. Moreover, this approach is robust from a numerical point of view, even for small ranges. This is not the case when matrix elements are dropped when their value is smaller than a tolerance criterion. In that case, the problem becomes numerically unstable.
615
615
 
616
 
  If the user does not provide its own basis, \siesta will generate it. For this purpose, the two most important parameters are:
 
616
  If the user does not provide its own basis, \siesta\ will generate it. For this purpose, the two most important parameters are:
617
617
  \begin{description}
 
618
    \item[The range] of the orbitals is controlled by a single parameter expressing the energy shift (increase) induced by limiting its range while keeping its norm. 
618
619
    \item[The size] of the basis can be tuned by using single- or multiple-$\zeta$ orbitals and by adding polarized orbitals. It determines the number of orbitals related to each atom of the system.
619
 
    \item[The range] of the orbitals is controlled by a single parameter expressing the energy shift (increase) induced by limiting its range while keeping its norm. 
620
620
  \end{description}
621
 
  These are not the only parameters through which the generation of the basis is controlled. For example, it is possible to control the way multiple-$\zeta$ are generated. The \siesta manual provides the user all the required information in this regard \cite{siestaMan}.\\
 
621
  These are not the only parameters through which the generation of the basis is controlled. For example, it is possible to control the way multiple-$\zeta$ are generated. The \siesta\ manual provides the user all the required information in this regard \cite{siestaMan}.\\
622
622
  Note that the basis selection is a variational problem. Hence, a way to determine any of parameter controlling the basis is to find the value of that parameter minimizing the total energy of the system.
623
623
 
 
624
  \subsubsection{Range of the orbitals}
 
625
\siesta\ implements an universal method to obtain finite-range orbitals. Beyond a cutoff radius, orbitals goes to zero. This is performed by implementing the method of \textcite{PhysRevB.40.3979}: single-$\zeta$ orbitals are numerical solutions of:
 
626
%This procedure is performed in such a way that the norm of the integral is conserved. This results in an energy shift (increase). By defining this shift in energy, the cutoff radius is computed. 
 
627
\begin{equation}
 
628
  \left(
 
629
    -\frac{1}{2r} \ddtot{}{r} r 
 
630
    + \frac{l \left(l+1 \right)}{2r^2}
 
631
    + V_l(r)
 
632
  \right) \phi(r)
 
633
  = \left(\e_l + \Delta E_{\text{PAO}} \right)\phi(r),
 
634
  \label{eq:deltaPAO}
 
635
\end{equation}
 
636
in which $V_l(r)$ is the atomic pseudopotential and $\Delta E_{\text{PAO}}$ is the energy shift  such that $\phi(r)=0$ for all $r>R^l_c$.
 
637
The larger the allowed shift, the more confined are the orbitals. A small energy shift thus allows the orbitals to be more extended. This method which is universal in that it can be applied to any element without restriction, is illustrated in \figref{fig:cutoffRadiusEnergyShift}. 
 
638
While it is systematic or universal, the method does not guarantee to provide the most suited orbitals for specific problem. It is up to the user to test the basis and make sure that the studied system is correctly described. 
 
639
 
 
640
\begin{figure}
 
641
  \centering
 
642
  \input{pstricksImg/energyShit}
 
643
  \caption[Range of atomic orbitals controlled by the energy shift ($\Delta E_{\text{PAO}}$)]{\siesta\ is able to generate finite-range orbitals by specifying a single parameter: the energy shift ($\Delta E_{\text{PAO}}$). It expresses the energy increase implied by the confinement of the orbitals. The case of silicon is illustrated (only the radial part of the orbital is plotted). {\color{gray} $R_c(500)$} and $R_c(50)$ are to the cutoff radii corresponding to {\color{gray} $\Delta E_{\text{PAO}} = 500$} and $\Delta E_{\text{PAO}} = 50$ respectively.}
 
644
  \label{fig:cutoffRadiusEnergyShift}
 
645
\end{figure}
 
646
 
 
647
 
 
648
 
624
649
  \subsubsection{Size of the basis set}\label{subsubsec:basisSize}
625
 
  \siesta follows the nomenclature of Quantum Chemistry to name the different options regarding the size of basis sets. 
 
650
  \siesta\ follows the nomenclature of Quantum Chemistry to name the different options regarding the size of basis sets. 
626
651
  \begin{description}
627
652
    \item[A single-$\zeta$] basis is a minimal basis set in that it has only one radial function per angular momentum channel and only for the angular momenta constituting occupied states of the free atom.
628
 
    \item[A Multiple-$\zeta$] basis follows the same rule as single-$\zeta$ regarding which angular momentum channels are described, but extends the number of radial functions describing them. In the case of a double-$\zeta$ basis, two radial functions are used per valence-orbital. As each radial function attached to a valence-orbital has a different spatial expansion, multiple-$\zeta$ offers radial flexibility.
 
653
    \item[A Multiple-$\zeta$] basis follows the same rule as single-$\zeta$ regarding which angular momentum channels are described, but extends the number of radial functions describing them. In the case of a double-$\zeta$ basis, two radial functions are used per valence-orbital. As each radial function attached to a valence-orbital has a different spatial expansion, multiple-$\zeta$ offer radial flexibility.
629
654
    \item[Polarization] adds angular flexibility by adding orbitals of higher angular momentum. It can be used independently from the number of radial function per momentum channel.
630
655
  \end{description}
631
 
  FIXME: precision required: cf GMR correction.
632
 
  Each ``add-on'' permits to better describe the electronic density. By increasing the basis size, the precision is improved. As the size of the basis can be increased at will, there exists no intrinsic limitation for LCAO with respect to quality. However, one must always check whether the quality improvements are worth the computation time. 
 
656
  Each ``add-on'' permits to better describe the electronic density. By increasing the basis size, the precision is improved. As the size of the basis can be increased at will, there exists no intrinsic limitation for LCAO with respect to quality. However, increasing the basis size can not be performed systematically in that there are different ways to increase the basis size, there is no single parameter like is the case with planewaves for which the cutoff energy can be changed at will in a systematic manner.
 
657
  However, one must always check whether the quality improvements are worth the computation time. 
633
658
 
634
659
   Generating multiple-$\zeta$ basis sets is done with the split valence scheme. It is not the only possibility. For example, excited PAO of isolated atoms can be used, but this leads to unbounded orbitals and gives poor convergence with respect to the energy shift, $E_{\Delta \text{PAO}}$. The split scheme can be applied thanks to GTO's, but, while flexible, it fails with PAO bases because the confinement is lost.\\
635
 
   \siesta implementation of the split scheme is illustrated in \figref{fig:splitScheme}. The procedure can be divided into three steps. First a function reproducing the tail of the first-$\zeta$ orbital beyond a given radius, $R_{\text{DZ}}$ and, which smoothly goes to the origin is produced:
 
660
   \siesta\ implementation of the split scheme is illustrated in \figref{fig:splitScheme}. The procedure can be divided into three steps. First a function reproducing the tail of the first-$\zeta$ orbital beyond a given radius, $R_{\text{DZ}}$ and, which smoothly goes to the origin is produced:
636
661
   \begin{equation}
637
662
     r^l~\left(a - b r^2 \right)
638
663
     \label{eq:splitValenceSmoothOrigin}
639
664
   \end{equation}
640
 
   in which, the two parameters permit to ensure that this function and its first derivative are continuous at $R_{\text{DZ}}$.
 
665
   in which, the two parameters ($a$ and $b$) permit to ensure that this function and its first derivative are continuous at $R_{\text{DZ}}$. $l$ refers to the ``$l$'' quantum number.
641
666
   This function is then subtracted from the first-$\zeta$. The resulting function is thus zero beyond the $R_{\text{DZ}}$: 
642
667
   \begin{equation}
643
 
     R^{1\zeta} - r^l~\left(a - b r^2 \right)
 
668
     \bar{R}^{2\zeta} = R^{1\zeta} - r^l~\left(a - b r^2 \right)
644
669
     \label{eq:splitValenceFirstZeta}
645
670
   \end{equation}
646
 
   Finally, the latter function is normalized to obtain the double-$\zeta$ orbital. The value of the radius $R_{\text{DZ}}$ is controlled by the splitNorm parameter inside the \siesta code. This parameter thus controls the spatial expansion of the multiple-$\zeta$ orbitals which is always smaller than the one of the first-$\zeta$ orbitals. 
 
671
   Finally, the latter function ($\bar{R}^{2\zeta}$) is normalized to obtain the double-$\zeta$ orbital. The value of the radius $R_{\text{DZ}}$ is controlled by the splitNorm parameter inside the \siesta\ code. This parameter thus controls the spatial expansion of the multiple-$\zeta$ orbitals which is always smaller than the one of the first-$\zeta$ orbitals. 
647
672
 
648
673
   \begin{figure}
649
674
     \centering
650
675
     \input{pstricksImg/splitScheme}
651
 
     \caption[Multiple-$\zeta$ bases]{Multiple-$\zeta$ bases have radial flexibility and can be generated by the split scheme using numerical atomic-orbitals. Generation of double-$\zeta$ is illustrated in the case of silicon. The cutoff radius, $R_{\text{DZ}}$ is controlled by the PAO.SplitNorm parameter and is always smaller than $R_c$.}
 
676
     \caption[Generation of multiple-$\zeta$ bases]{Multiple-$\zeta$ bases have radial flexibility and can be generated by the split scheme using numerical atomic-orbitals. Generation of double-$\zeta$ is illustrated in the case of silicon. The cutoff radius, $R_{\text{DZ}}$ is controlled by the PAO.SplitNorm parameter and is always smaller than $R_c$.}
652
677
     \label{fig:splitScheme}
653
678
   \end{figure}
654
679
   
655
680
 
656
 
  Polarization can be achieved in different ways. To polarize a shell with momentum $l$, one can simply add a shell $l+1$. However, this technique results in orbitals that are too extended. Therefore, \siesta adopts another method. Numerical orbitals, resulting from the actual polarization of the pseudo-atomic orbital in the presence of a small electric field, are solved exactly with DFT. This leads to $l+1$ orbitals by comparison with first order perturbation theory. \\
 
681
  Polarization can be achieved in different ways. To polarize a shell with momentum $l$, one can simply add a shell $l+1$. However, this technique results in orbitals that are too extended. Therefore, \siesta\ adopts another method. Numerical orbitals, resulting from the actual polarization of the pseudo-atomic orbital in the presence of a small electric field, are solved exactly with DFT. This leads to $l+1$ orbitals by comparison with first order perturbation theory. \\
657
682
  Note that the range of these orbitals is defined by the range of the orbitals they polarize.
658
683
 
659
684
 
660
685
  Let us take Silicon as an example. Its valence-electron configuration is $3s^2$ $3p^2$. A minimal basis set will thus consist in one $s$-orbital and three $p$-orbital an is called single-$\zeta$ basis set. 
661
 
  If a double-$\zeta$ basis is used, each type of orbital is doubled: two $s$, two $p_x$, two $p_y$, two $p_z$. Thus, double-$\zeta$ basis set gives radial flexibility by adding one more radial function within the same angular momentum shell. In this case, the number of orbitals is equal to height. 
 
686
  If a double-$\zeta$ basis is used, each type of orbital is doubled: two $s$, two $p_x$, two $p_y$ and two $p_z$. Thus, double-$\zeta$ basis set gives radial flexibility by adding one more radial function within the same angular momentum shell. In this case, the number of orbitals is equal to height. 
662
687
  Polarization provides angular flexibility by adding shells of different angular momentum. As far as silicon is concerned, five $d$ orbitals complete the basis set: $d_{xy}$, $d_{yz}$, $d_{zx}$, $d_{x^2-y^2}$, $d_{3z^2}$. Single-$\zeta$ polarized basis is constituted of nine orbitals while double-$\zeta$ polarized basis set has thirteen orbitals.\\
663
688
  Table \ref{tab:siliconBasisSets} illustrates the different orbitals involved when the basis size is changed in the case of silicon.
664
689
 
674
699
                          &                 &                 & 1 $d_{3z^2}$\\ 
675
700
        Total             & 4               & 8               & 5
676
701
  \end{tabular}
677
 
  \caption{The size of the basis set can be determined through the usage of multiple-$\zeta$ (radial flexibility) and polarized (angular flexibility) orbitals. The accuracy of the results is improved as the basis size is increase, but so does the computation time. The case of silicon is illustrated, a polarized single-$\zeta$ basis will thus have $4+5=9$ orbitals per silicon atom, while for a polarized double-$\zeta$ this number grows to $8+5=13$.}
 
702
  \caption[Size of \siesta\ bases in the case of silicon]{The size of the basis set can be determined through the usage of multiple-$\zeta$ (radial flexibility) and polarized (angular flexibility) orbitals. The accuracy of the results is improved as the basis size is increase, but so does the computation time. The case of silicon is illustrated, a polarized single-$\zeta$ basis will thus have $4+5=9$ orbitals per silicon atom, while for a polarized double-$\zeta$ this number grows to $8+5=13$.}
678
703
  \label{tab:siliconBasisSets}
679
704
\end{table}
680
705
 
681
 
In section \ref{sec:bsSiBulk}, the effect of the basis size on the bandstructure of silicon is studied. The results are summarized on figure \ref{fig:bsComparison} and table \ref{tab:basisComparison}. Polarization and multiple-$\zeta$ extend the basis in different ways and have thus a different influence on the accuracy. In the case of silicon, using a polarized basis is more important than using a double-$\zeta$ one. This is particularly seen when the bandstructure of silicon is studied.
682
 
 
683
 
 
684
 
\subsubsection{Range of the orbitals}
685
 
\siesta implements an universal method to obtain finite-range orbitals. Beyond a cutoff radius, orbitals goes to zero. This is performed by implementing the method of \textcite{PhysRevB.40.3979}: single-$\zeta$ orbitals are numerical solutions of:
686
 
%This procedure is performed in such a way that the norm of the integral is conserved. This results in an energy shift (increase). By defining this shift in energy, the cutoff radius is computed. 
687
 
\begin{equation}
688
 
  \left(
689
 
    -\frac{1}{2r} \ddtot{}{r} r 
690
 
    + \frac{l \left(l+1 \right)}{2r^2}
691
 
    + V_l(r)
692
 
  \right) \phi(r)
693
 
  = \left(\e_l + \Delta E_{\text{PAO}} \right)\phi(r),
694
 
  \label{eq:deltaPAO}
695
 
\end{equation}
696
 
in which $V_l(r)$ is the atomic pseudopotential and $\Delta E_{\text{PAO}}$ is the energy shift  such that $\phi(r)=0$ for all $r>r^l_c$.
697
 
The larger the allowed shift, the more confined are the orbitals. A small energy shift thus allows the orbitals to be more extended. This method which is universal in that it can be applied to any element without restriction, is illustrated in \figref{fig:cutoffRadiusEnergyShift}. 
698
 
While it is systematic or universal, the method does not guarantee to provide the most suited orbitals for specific problem. It is up to the user to test the basis and make sure that the studied system is correctly described. 
699
 
 
700
 
\begin{figure}
701
 
  \centering
702
 
  \input{pstricksImg/energyShit}
703
 
  \caption[energy shift ($\Delta E_{\text{PAO}}$)]{\siesta is able to generate finite-range orbitals by specifying a single parameter: the energy shift ($\Delta E_{\text{PAO}}$). It expresses the energy increase implied by the confinement of the orbitals. The case of silicon is illustrated. {\color{gray} $R^{500}_c$} and $R^{50}_c$ are to the cutoff radii corresponding to {\color{gray} $\Delta E_{\text{PAO}} = 500$} and $\Delta E_{\text{PAO}} = 50$ respectively.}
704
 
  \label{fig:cutoffRadiusEnergyShift}
705
 
\end{figure}
 
706
In section \ref{sec:bsSiBulk}, the effect of the basis size on the bandstructure of bulk silicon is studied. The results are summarized on figure \ref{fig:bsComparison} and table \ref{tab:basisComparison}. Polarization and multiple-$\zeta$ extend the basis in different ways and have thus a different influence on the accuracy. In the case of bulk silicon, using a polarized basis is more important than using a double-$\zeta$ one. This is particularly seen when the bandstructure of silicon is studied.
706
707
 
707
708
 
708
709
\subsection{PAO vs plane wave basis}
709
 
Using planewaves (PW) to construct the basis set constitutes another popular way to implement the DFT, and a lot of codes have chosen this route. To name only one, the {\sc Abinit} package is developed here  at ``Université catholique de Louvain'' and uses planewaves as basis functions. planewaves present the advantage that a systematic convergence method with respect to the basis can be applied easily. The number of PW composing the basis is controlled by an energy cutoff which represents the maximum kinetic energy a plane wave can have and for which no aliasing effects are observed during Fourrier transforms. While the basis size can be large, they allow simple evaluation of matrix elements and easy parallelization. PW methods present the disadvantage of scaling with the volume of the periodic cell and not directly with the number of atoms. Indeed, the number of planewaves for a given cutoff scales with the volume. Therefore, computations for systems which comprise a large amount of free volume may become very expensive. Such systems include low-density porous structures, or molecules. Indeed, the latter are put in a sufficiently large simulation box in order to prevent interactions between repeated/translated replicas of that box. On the other hand, atom-centered bases scale directly with the number of atoms and the size of the basis (see section \ref{subsec:paoBasis} and table \ref{tab:siliconBasisSets}). In this case, adding free volume inside the unit cell barely costs anything as the basis functions have a limited range and will not describe this area. If one could have the guarantee for a good atom-centered basis, that is, a basis which offers good variational freedom in the regions where it is most needed, i.e. where bonds are created between atoms, then computations would be very efficient. The problem is to find that ``good'' basis, and this is precisely not an easy task. \siesta offers a systematic way to generate basis functions based on two main parameters: the basis size and the energy shift implied by its finite range. However, remember that the quality of the basis is not guaranteed. This method does not provide the optimized basis for all atoms and systems. Therefore, one should always check the basis.\\
 
710
Using planewaves (PW) to construct the basis set constitutes another popular way to implement the DFT, and a lot of codes have chosen this route. To name only one, the {\sc Abinit} package is developed here  at ``Université catholique de Louvain'' and uses planewaves as basis functions. planewaves present the advantage that a systematic convergence method with respect to the basis can be applied easily. The number of PW composing the basis is controlled by an energy cutoff which represents the maximum kinetic energy a plane wave can have and for which no aliasing effects are observed during Fourrier transforms. While the basis size can be large, they allow simple evaluation of matrix elements and easy parallelization. PW methods present the disadvantage of scaling with the volume of the periodic cell and not directly with the number of atoms. Indeed, the number of planewaves for a given cutoff scales with the volume. Therefore, computations for systems which comprise a large amount of free volume may become very expensive. Such systems include low-density porous structures, molecules or 2D surfaces which is our interest here. Indeed, the latter have to be put into a sufficiently large simulation box in order to prevent interactions between repeated/translated replicas of that box. On the other hand, atom-centered bases scale directly with the number of atoms and the size of the basis (see section \ref{subsec:paoBasis} and table \ref{tab:siliconBasisSets}). In this case, adding free volume inside the unit cell barely costs anything as the basis functions have a limited range and will not describe this area. If one could have the guarantee for a good atom-centered basis, that is, a basis which offers good variational freedom in the regions where it is most needed, i.e. where bonds are created between atoms, then computations would be very efficient. The problem is to find that ``good'' basis, and this is precisely not an easy task. \siesta\ offers a systematic way to generate basis functions based on two main parameters: the basis size and the energy shift implied by its finite range. However, remember that the quality of the basis is not guaranteed. This method does not provide the optimized basis for all atoms and systems. Therefore, one should always check the basis.\\
710
711
Note that there also exists hybrid methods combining the accuracy of planewaves in intra-atomic regions and the flexibility of atom-centered basis in inter-atomic regions.
711
712
 
712
713
 
713
714
\subsection{Real-space grid}
714
 
Within \siesta, the matrix elements are evaluated using planewaves on a real-space grid. Hence, \siesta has also a concept of energy cutoff (controlled by the MeshCutoff parameter). 
 
715
Within \siesta, the matrix elements are evaluated using planewaves on a real-space grid. Hence, \siesta\ has also a concept of energy cutoff (controlled by the MeshCutoff parameter). 
715
716
MeshCutoff controls the number of points constituting this real-space, 3D grid. The larger the cutoff, the more points are forming the grid. Therefore, properties sampled on it are represented with more accuracy. 
716
717
 
717
718
\begin{figure}[ht]
718
719
  \centering
719
720
  \input{pstricksImg/meshCutOff}
720
 
  \caption{The grid cutoff determines the maximum kinetic energy of the planewaves that can be represented in this grid without aliasing.}
 
721
  \caption[Grid cutoff in real space]{The grid cutoff determines the maximum kinetic energy of the planewaves that can be represented in this grid without aliasing.}
721
722
  \label{fig:meshCutoff}
722
723
\end{figure}
723
724
 
724
 
The grid cutoff from \siesta should not be confused with the cutoff energy of PWs. Indeed, in the case of a PW basis, electronic wavefunctions are described as a linear combination of PWs and those PWs are projected on a real-space grid. On the other hand, \siesta uses a real grid only to represent the charge density.
 
725
The grid cutoff from \siesta\ should not be confused with the cutoff energy of PWs. Indeed, in the case of a PW basis, electronic wavefunctions are described as a linear combination of PWs and those PWs are projected on a real-space grid. On the other hand, \siesta\ uses a real grid only to represent the charge density.
725
726
%However, it must not be confused with the cutoff energy used with plane wave basis set. For plane wave basis sets, wavefunctions are represented on the grid which fineness is defined by a cutoff energy. In \siesta, the grid is used to represent the density: the density is written as a combination of pseudo atomic orbitals (squared!) which are projected into that grid. 
726
727
Strictly speaking, the density requires a cutoff value which is four times larger \cite{siesta2002}.  
727
728
While differences exist, in both cases, the grid cutoff corresponds to the maximum kinetic energy of the planewaves that can be represented in the grid without aliasing, that is without error or distortion (see \figref{fig:meshCutoff}). 
734
735
%Note that the required fineness of the real grid depends only on the softness/hardness of the pseudopotential. Convergence studies So, you don't need to relax the structure, setting NumCGsteps to 0; this way, only the scf calculation is performed.
735
736
 
736
737
 
737
 
\subsection{Obtain STM images within \siesta}
 
738
%\subsection{Obtain STM images within \siesta}
738
739
%from PHYSICAL REVIEW B 79, 205427 2009:\\
739
740
%Simulations of scanning tunnelling microscopy (STM) measurements within \siesta can be done based on a perturbative approach, most typically employing the Tersoff-Hamann method. 
740
741
%It assumes that the STM tip is far from the sample so that the two do not interact with each other. However, when the tip gets close to the molecule to perform measurements, its electrostatic interplay with the substrate may generate non-trivial potential distribution, charge transfer, and forces, all of which may alter the electronic and physical structure of the molecule.