Merge lp:~nickpapior/siesta/trunk-kovalp into lp:~kovalp/siesta/siesta
- trunk-kovalp
- Merge into siesta
Proposed by
Nick Papior
Status: | Merged |
---|---|
Merged at revision: | 589 |
Proposed branch: | lp:~nickpapior/siesta/trunk-kovalp |
Merge into: | lp:~kovalp/siesta/siesta |
Diff against target: |
257 lines (+108/-115) 2 files modified
Docs/siesta.tex (+107/-114) version.info (+1/-1) |
To merge this branch: | bzr merge lp:~nickpapior/siesta/trunk-kovalp |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Petr Koval | Approve | ||
Review via email: mp+308922@code.launchpad.net |
Commit message
Description of the change
Manual changes
To post a comment you must log in.
Revision history for this message
Petr Koval (kovalp) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Docs/siesta.tex' | |||
2 | --- Docs/siesta.tex 2016-10-20 11:53:53 +0000 | |||
3 | +++ Docs/siesta.tex 2016-10-20 12:24:23 +0000 | |||
4 | @@ -6775,139 +6775,132 @@ | |||
5 | 6775 | \label{SolverPoisson} | 6775 | \label{SolverPoisson} |
6 | 6776 | \index{Poisson solver} | 6776 | \index{Poisson solver} |
7 | 6777 | 6777 | ||
11 | 6778 | Poisson equation is solved within SIESTA | 6778 | Poisson equation is solved within SIESTA in order to compute a Hartree |
12 | 6779 | in order to compute a Hartree potential | 6779 | potential |
10 | 6780 | |||
13 | 6781 | \begin{equation} | 6780 | \begin{equation} |
17 | 6782 | \label{vh-def} | 6781 | \label{vh-def} |
18 | 6783 | V_{\mathrm{H}}(\mathbf{r}) = \iiint | 6782 | V_{\mathrm{H}}(\mathbf{r}) = \iiint |
19 | 6784 | \frac{\rho(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} d^3r' | 6783 | \frac{\rho(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} d^3r' |
20 | 6785 | \end{equation} | 6784 | \end{equation} |
21 | 6786 | for a given electric charge density $\rho(\mathbf{r})$. | 6785 | for a given electric charge density $\rho(\mathbf{r})$. |
22 | 6787 | 6786 | ||
23 | 6788 | In momentum space, the Hartree potential becomes diagonal | 6787 | In momentum space, the Hartree potential becomes diagonal |
24 | 6789 | \begin{equation} | 6788 | \begin{equation} |
94 | 6790 | \label{vh-g} | 6789 | \label{vh-g} |
95 | 6791 | V_{\mathrm{H}}(\mathbf{p}) = \frac{4\pi}{p^2}\, \rho(\mathbf{p}), | 6790 | V_{\mathrm{H}}(\mathbf{p}) = \frac{4\pi}{p^2}\, \rho(\mathbf{p}), |
96 | 6792 | \end{equation} | 6791 | \end{equation} |
97 | 6793 | and this is the computationally cheapest method of calculating | 6792 | and this is the computationally cheapest method of calculating the |
98 | 6794 | the potential. For instance, in case of periodic boundary | 6793 | potential. For instance, in case of periodic boundary conditions |
99 | 6795 | conditions (PBC), the potential in real space is given by a | 6794 | (PBC), the potential in real space is given by a Fourier sum |
100 | 6796 | Fourier sum | 6795 | |
101 | 6797 | 6796 | \begin{equation} | |
102 | 6798 | \begin{equation} | 6797 | \label{vh-r} |
103 | 6799 | \label{vh-r} | 6798 | V_{\mathrm{H}}(\mathbf{r}) = \sum_{\mathbf{G}} |
104 | 6800 | V_{\mathrm{H}}(\mathbf{r}) = \sum_{\mathbf{G}} | 6799 | \mathrm{e}^{\mathrm{i}\mathbf{Gr}} 4\pi G^{-2} \rho(\mathbf{G}), |
105 | 6801 | \mathrm{e}^{\mathrm{i}\mathbf{Gr}} 4\pi G^{-2} \rho(\mathbf{G}), | 6800 | \end{equation} |
106 | 6802 | \end{equation} | 6801 | where $\rho(\mathbf{G})$ is the electric charge density in momentum |
107 | 6803 | where $\rho(\mathbf{G})$ is the electric charge density in momentum space | 6802 | space |
108 | 6804 | \begin{equation} | 6803 | \begin{equation} |
109 | 6805 | \label{rho-g} | 6804 | \label{rho-g} |
110 | 6806 | \rho(\mathbf{G}) = \frac{1}{(2 \pi)^3}\sum_{\mathbf{R}} | 6805 | \rho(\mathbf{G}) = \frac{1}{(2 \pi)^3}\sum_{\mathbf{R}} |
111 | 6807 | \mathrm{e}^{-\mathrm{i}\mathbf{GR}} \rho(\mathbf{R}). | 6806 | \mathrm{e}^{-\mathrm{i}\mathbf{GR}} \rho(\mathbf{R}). |
112 | 6808 | \end{equation} | 6807 | \end{equation} |
113 | 6809 | The summations in equations (\ref{vh-r}) and (\ref{rho-g}) | 6808 | The summations in equations \eqref{vh-r} and \eqref{rho-g} are going |
114 | 6810 | are going over the multiples of unit cell vectors in momentum- | 6809 | over the multiples of unit cell vectors in momentum-$\mathbf{G}$ and |
115 | 6811 | $\mathbf{G}$ and coordinate- $\mathbf{R}$ space correspondingly. | 6810 | coordinate-$\mathbf{R}$ space correspondingly. The Fourier transforms |
116 | 6812 | The Fourier transforms in equations (\ref{vh-r}) and (\ref{rho-g}) | 6811 | in equations \eqref{vh-r} and \eqref{rho-g} can be accelerated by fast |
117 | 6813 | can be accelerated by fast Fourier transforms (FFT), leading | 6812 | Fourier transforms (FFT), leading to an low-complexity algorithm |
118 | 6814 | to an low-complexity algorithm ($O(N)$, where $N$ is number of | 6813 | ($O(N)$, where $N$ is number of points on the grid). In SIESTA, only |
119 | 6815 | points on the grid). In SIESTA, only this FFT-accelerated | 6814 | this FFT-accelerated method is originally implemented. It is used also |
120 | 6816 | method is originally implemented. It is used also for | 6815 | for slabs, chains and molecules with success because, within |
121 | 6817 | slabs, chains and molecules with success because, within | 6816 | self-consistent field loop, the method is applied for (almost) neutral |
122 | 6818 | self-consistent field loop, the method | 6817 | charge distributions, i.e. for electric charge densities given by the |
123 | 6819 | is applied for (almost) neutral charge distributions, i.~e. | 6818 | density of electrons $n_{\mathrm{e}}(\mathbf{r})$ and the density of |
124 | 6820 | for electric charge densities given by the density of | 6819 | atomic cores $n_{\mathrm{a}}(\mathbf{r})$ |
125 | 6821 | electrons $n_{\mathrm{e}}(\mathbf{r})$ | 6820 | \begin{equation} |
126 | 6822 | and the density of atomic cores $n_{\mathrm{a}}(\mathbf{r})$ | 6821 | \rho(\mathbf{r}) = n_{\mathrm{e}}(\mathbf{r}) + n_{\mathrm{a}}(\mathbf{r}). |
127 | 6823 | $$\rho(\mathbf{r}) = n_{\mathrm{e}}(\mathbf{r}) + n_{\mathrm{a}}(\mathbf{r}).$$ | 6822 | \end{equation} |
128 | 6824 | 6823 | ||
129 | 6825 | However, this approach may fail to give sufficient accuracy | 6824 | However, this approach may fail to give sufficient accuracy for |
130 | 6826 | for systems with reduced dimensionality. There is a work around | 6825 | systems with reduced dimensionality. There is a work around in the |
131 | 6827 | in the form of some cutoffs in momentum space as summarized | 6826 | form of some cutoffs in momentum space as summarized nicely by Rozzi |
132 | 6828 | nicely by Rozzi \textit{etal} \cite{Rozzi:2006}. | 6827 | \textit{etal} \cite{Rozzi:2006}. For instance, for the case of |
133 | 6829 | For instance, for the case of molecules, i.e. for open boundary | 6828 | molecules, i.e. for open boundary conditions (OBC), it is sufficient |
134 | 6830 | conditions (OBC), it is sufficient | 6829 | to modify the Hartree potential in momentum space \eqref{vh-g} |
135 | 6831 | to modify the Hartree potential in momentum space (\ref{vh-g}) | 6830 | \begin{equation} |
136 | 6832 | 6831 | \label{vh-r-0d} | |
137 | 6833 | \begin{equation} | 6832 | V_{\mathrm{H}}(\mathbf{G}) = V_{\mathrm{C}}(G)\, \rho(\mathbf{G}) |
138 | 6834 | \label{vh-r-0d} | 6833 | [1-\cos(\alpha R G)], |
139 | 6835 | V_{\mathrm{H}}(\mathbf{G}) = V_{\mathrm{C}}(G)\, \rho(\mathbf{G}) | 6834 | \end{equation} |
140 | 6836 | [1-\cos(\alpha R G)], | 6835 | where $\alpha$ is a parameter $R=(3 V_{\mathrm{box}}/(4\pi))^{1/3}$ |
141 | 6837 | \end{equation} | 6836 | and |
142 | 6838 | where $\alpha$ is a parameter | 6837 | \begin{equation} |
143 | 6839 | $R=(3 V_{\mathrm{box}}/(4\pi))^{1/3}$ and | 6838 | \label{vg-0d} |
144 | 6840 | \begin{equation} | 6839 | V_{\mathrm{C}}(G) = |
145 | 6841 | \label{vg-0d} | 6840 | \begin{cases} |
146 | 6842 | V_{\mathrm{C}}(G) = | 6841 | 4\pi G^{-2}, \text{ if } G\ne 0; \\ |
147 | 6843 | \begin{cases} | 6842 | 2\pi\alpha R, \text{ if } G=0. |
148 | 6844 | 4\pi G^{-2}, \text{ if } G\ne 0; \\ | 6843 | \end{cases} |
149 | 6845 | 2\pi\alpha R, \text{ if } G=0. | 6844 | \end{equation} |
150 | 6846 | \end{cases} | 6845 | |
151 | 6847 | \end{equation} | 6846 | The other approach to compute the Hartree potential \eqref{vh-def} |
152 | 6848 | 6847 | directly on a real-space grid, but for the coordinates situated in the | |
153 | 6849 | The other approach to compute the Hartree potential (\ref{vh-def}) | 6848 | middle of the discretization cells and subsequently to interpolate the |
154 | 6850 | directly on a real-space grid, but for the coordinates | 6849 | potential to the input grid-points. This approach has an advantage of |
155 | 6851 | situated in the middle of the discretization cells and | 6850 | not introducing additional parameters. Moreover, if we notify that the |
156 | 6852 | subsequently to interpolate the potential to the input grid-points. | 6851 | potential \eqref{vh-def} is a (3-dimensional) convolution, then we can |
157 | 6853 | This approach has an advantage of not introducing additional | 6852 | accelerate this with FFT in such a way that there is no aliasing |
158 | 6854 | parameters. Moreover, if we notify that the potential | 6853 | affects (i.e. we avoid cyclic convolutions by a suitable padding of |
159 | 6855 | (\ref{vh-def}) is a (3-dimensional) convolution, then we can accelerate | 6854 | data arrays). |
91 | 6856 | this with FFT in such a way that there is no aliasing affects | ||
92 | 6857 | (i.e. we avoid cyclic convolutions by a suitable padding | ||
93 | 6858 | of data arrays). | ||
160 | 6859 | 6855 | ||
161 | 6860 | In order to define a framework for using different Poisson solvers, | 6856 | In order to define a framework for using different Poisson solvers, |
163 | 6861 | there is an option \textbf{Poisson.Type} as described below | 6857 | there is an option \fdf{Poisson.Type} as described below |
164 | 6862 | 6858 | ||
165 | 6863 | \begin{fdfentry}{Poisson!Type}[string]<\fdfvalue{PBC}> | 6859 | \begin{fdfentry}{Poisson!Type}[string]<\fdfvalue{PBC}> |
166 | 6864 | 6860 | ||
167 | 6865 | Define the type of Poisson solver to use. | 6861 | Define the type of Poisson solver to use. |
168 | 6866 | 6862 | ||
203 | 6867 | \begin{itemize} | 6863 | \begin{fdfoptions} |
204 | 6868 | \item \fdfvalue{PBC} (\textit{default}) | 6864 | |
205 | 6869 | This is original SIESTA solver for periodic systems, i.e. | 6865 | \option[PBC] % |
206 | 6870 | for periodic boundary conditions in all three dimensions. | 6866 | This is original SIESTA solver for periodic systems, i.e. for |
207 | 6871 | The solver realizes the equation (\ref{vh-r}). | 6867 | periodic boundary conditions in all three dimensions. The solver |
208 | 6872 | 6868 | realizes the equation \eqref{vh-r}. | |
209 | 6873 | \item \fdfvalue{PBC.Cutoff0D} | 6869 | |
210 | 6874 | This is a realization of 0D cutoff in periodic systems, given | 6870 | \option[PBC.Cutoff0D] % |
211 | 6875 | by equations (\ref{vh-r-0d}) and (\ref{vg-0d}) | 6871 | This is a realization of 0D cutoff in periodic systems, given by |
212 | 6876 | (see Rozzi \textit{etal} \cite{Rozzi:2006}). | 6872 | equations \eqref{vh-r-0d} and \eqref{vg-0d} (see Rozzi |
213 | 6877 | 6873 | \textit{etal} \cite{Rozzi:2006}). | |
214 | 6878 | \item \fdfvalue{OBC.6Loop} | 6874 | |
215 | 6879 | This is a reference calculation with a 6-folded loop, | 6875 | \option[OBC.6Loop] % |
216 | 6880 | directly computing the Hartree potential (\ref{vh-def}) | 6876 | This is a reference calculation with a 6-folded loop, directly |
217 | 6881 | for open boundary conditions (for atoms, molecules, clusters etc) | 6877 | computing the Hartree potential \eqref{vh-def} for open boundary |
218 | 6882 | in real space. | 6878 | conditions (for atoms, molecules, clusters etc.) in real space. |
219 | 6883 | The potential is computed in the middle of discretisation cells | 6879 | The potential is computed in the middle of discretisation cells |
220 | 6884 | and is subsequently interpolated back to the points on which | 6880 | and is subsequently interpolated back to the points on which the |
221 | 6885 | the density is given. It is a slow algorithm and can be practically | 6881 | density is given. It is a slow algorithm and can be practically |
222 | 6886 | used only for small systems. | 6882 | used only for small systems. |
223 | 6887 | 6883 | ||
224 | 6888 | \item \fdfvalue{OBC.FastConv} | 6884 | \option[OBC.FastConv] % |
225 | 6889 | FFT accelerated calculation of Hartree potential | 6885 | FFT accelerated calculation of Hartree potential in real |
226 | 6890 | in real space. The results of this option should be | 6886 | space. The results of this option should be equivalent to the |
227 | 6891 | equivalent to the option \fdfvalue{OBC.6Loop} | 6887 | option \fdfvalue{OBC.6Loop} up to the machine precision. |
228 | 6892 | up to the machine precision. | 6888 | |
229 | 6893 | 6889 | \option[OBC.Check] % | |
230 | 6894 | \item \fdfvalue{OBC.Check} | 6890 | This option is to realize a cross check of the results delivered |
231 | 6895 | This option is to realize a cross check of the | 6891 | by options \fdfvalue{OBC.6Loop} and \fdfvalue{OBC.FastConv}. It |
232 | 6896 | results delivered by options \fdfvalue{OBC.6Loop} | 6892 | invokes both algorithms and compares results. |
233 | 6897 | and \fdfvalue{OBC.FastConv}. It invokes both algorithms | 6893 | |
234 | 6898 | and compares results. | 6894 | \end{fdfoptions} |
201 | 6899 | |||
202 | 6900 | \end{itemize} | ||
235 | 6901 | 6895 | ||
236 | 6902 | \end{fdfentry} | 6896 | \end{fdfentry} |
237 | 6903 | 6897 | ||
238 | 6904 | 6898 | ||
239 | 6905 | \begin{fdfentry}{Poisson!alpha}[real]<\fdfvalue{1.0}> | 6899 | \begin{fdfentry}{Poisson!alpha}[real]<\fdfvalue{1.0}> |
240 | 6906 | 6900 | ||
245 | 6907 | This parameter defines the constant $\alpha$ in the | 6901 | This parameter defines the constant $\alpha$ in the |
246 | 6908 | equations (\ref{vh-r-0d}) and (\ref{vg-0d}). It is | 6902 | equations \eqref{vh-r-0d} and \eqref{vg-0d}. It is |
247 | 6909 | effective only if \fdfvalue{Poisson.Type = PBC.Cutoff0D}. | 6903 | effective only if \fdf*{Poisson.Type PBC.Cutoff0D}. |
244 | 6910 | |||
248 | 6911 | 6904 | ||
249 | 6912 | \end{fdfentry} | 6905 | \end{fdfentry} |
250 | 6913 | 6906 | ||
251 | 6914 | 6907 | ||
252 | === modified file 'version.info' | |||
253 | --- version.info 2016-10-11 19:50:15 +0000 | |||
254 | +++ version.info 2016-10-20 12:24:23 +0000 | |||
255 | @@ -1,1 +1,1 @@ | |||
257 | 1 | trunk-572 | 1 | trunk-572--kovalp-manual-1 |