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 | \label{SolverPoisson} |
6 | \index{Poisson solver} |
7 | |
8 | -Poisson equation is solved within SIESTA |
9 | -in order to compute a Hartree potential |
10 | - |
11 | +Poisson equation is solved within SIESTA in order to compute a Hartree |
12 | +potential |
13 | \begin{equation} |
14 | -\label{vh-def} |
15 | -V_{\mathrm{H}}(\mathbf{r}) = \iiint |
16 | -\frac{\rho(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} d^3r' |
17 | + \label{vh-def} |
18 | + V_{\mathrm{H}}(\mathbf{r}) = \iiint |
19 | + \frac{\rho(\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|} d^3r' |
20 | \end{equation} |
21 | for a given electric charge density $\rho(\mathbf{r})$. |
22 | |
23 | In momentum space, the Hartree potential becomes diagonal |
24 | \begin{equation} |
25 | -\label{vh-g} |
26 | -V_{\mathrm{H}}(\mathbf{p}) = \frac{4\pi}{p^2}\, \rho(\mathbf{p}), |
27 | -\end{equation} |
28 | -and this is the computationally cheapest method of calculating |
29 | -the potential. For instance, in case of periodic boundary |
30 | -conditions (PBC), the potential in real space is given by a |
31 | -Fourier sum |
32 | - |
33 | -\begin{equation} |
34 | -\label{vh-r} |
35 | -V_{\mathrm{H}}(\mathbf{r}) = \sum_{\mathbf{G}} |
36 | -\mathrm{e}^{\mathrm{i}\mathbf{Gr}} 4\pi G^{-2} \rho(\mathbf{G}), |
37 | -\end{equation} |
38 | -where $\rho(\mathbf{G})$ is the electric charge density in momentum space |
39 | -\begin{equation} |
40 | -\label{rho-g} |
41 | -\rho(\mathbf{G}) = \frac{1}{(2 \pi)^3}\sum_{\mathbf{R}} |
42 | -\mathrm{e}^{-\mathrm{i}\mathbf{GR}} \rho(\mathbf{R}). |
43 | -\end{equation} |
44 | -The summations in equations (\ref{vh-r}) and (\ref{rho-g}) |
45 | -are going over the multiples of unit cell vectors in momentum- |
46 | -$\mathbf{G}$ and coordinate- $\mathbf{R}$ space correspondingly. |
47 | -The Fourier transforms in equations (\ref{vh-r}) and (\ref{rho-g}) |
48 | -can be accelerated by fast Fourier transforms (FFT), leading |
49 | -to an low-complexity algorithm ($O(N)$, where $N$ is number of |
50 | -points on the grid). In SIESTA, only this FFT-accelerated |
51 | -method is originally implemented. It is used also for |
52 | -slabs, chains and molecules with success because, within |
53 | -self-consistent field loop, the method |
54 | -is applied for (almost) neutral charge distributions, i.~e. |
55 | -for electric charge densities given by the density of |
56 | -electrons $n_{\mathrm{e}}(\mathbf{r})$ |
57 | -and the density of atomic cores $n_{\mathrm{a}}(\mathbf{r})$ |
58 | -$$\rho(\mathbf{r}) = n_{\mathrm{e}}(\mathbf{r}) + n_{\mathrm{a}}(\mathbf{r}).$$ |
59 | - |
60 | -However, this approach may fail to give sufficient accuracy |
61 | -for systems with reduced dimensionality. There is a work around |
62 | -in the form of some cutoffs in momentum space as summarized |
63 | -nicely by Rozzi \textit{etal} \cite{Rozzi:2006}. |
64 | -For instance, for the case of molecules, i.e. for open boundary |
65 | -conditions (OBC), it is sufficient |
66 | -to modify the Hartree potential in momentum space (\ref{vh-g}) |
67 | - |
68 | -\begin{equation} |
69 | -\label{vh-r-0d} |
70 | -V_{\mathrm{H}}(\mathbf{G}) = V_{\mathrm{C}}(G)\, \rho(\mathbf{G}) |
71 | -[1-\cos(\alpha R G)], |
72 | -\end{equation} |
73 | -where $\alpha$ is a parameter |
74 | -$R=(3 V_{\mathrm{box}}/(4\pi))^{1/3}$ and |
75 | -\begin{equation} |
76 | -\label{vg-0d} |
77 | -V_{\mathrm{C}}(G) = |
78 | -\begin{cases} |
79 | -4\pi G^{-2}, \text{ if } G\ne 0; \\ |
80 | -2\pi\alpha R, \text{ if } G=0. |
81 | -\end{cases} |
82 | -\end{equation} |
83 | - |
84 | -The other approach to compute the Hartree potential (\ref{vh-def}) |
85 | -directly on a real-space grid, but for the coordinates |
86 | -situated in the middle of the discretization cells and |
87 | -subsequently to interpolate the potential to the input grid-points. |
88 | -This approach has an advantage of not introducing additional |
89 | -parameters. Moreover, if we notify that the potential |
90 | -(\ref{vh-def}) is a (3-dimensional) convolution, then we can accelerate |
91 | -this with FFT in such a way that there is no aliasing affects |
92 | -(i.e. we avoid cyclic convolutions by a suitable padding |
93 | -of data arrays). |
94 | + \label{vh-g} |
95 | + V_{\mathrm{H}}(\mathbf{p}) = \frac{4\pi}{p^2}\, \rho(\mathbf{p}), |
96 | +\end{equation} |
97 | +and this is the computationally cheapest method of calculating the |
98 | +potential. For instance, in case of periodic boundary conditions |
99 | +(PBC), the potential in real space is given by a Fourier sum |
100 | + |
101 | +\begin{equation} |
102 | + \label{vh-r} |
103 | + V_{\mathrm{H}}(\mathbf{r}) = \sum_{\mathbf{G}} |
104 | + \mathrm{e}^{\mathrm{i}\mathbf{Gr}} 4\pi G^{-2} \rho(\mathbf{G}), |
105 | +\end{equation} |
106 | +where $\rho(\mathbf{G})$ is the electric charge density in momentum |
107 | +space |
108 | +\begin{equation} |
109 | + \label{rho-g} |
110 | + \rho(\mathbf{G}) = \frac{1}{(2 \pi)^3}\sum_{\mathbf{R}} |
111 | + \mathrm{e}^{-\mathrm{i}\mathbf{GR}} \rho(\mathbf{R}). |
112 | +\end{equation} |
113 | +The summations in equations \eqref{vh-r} and \eqref{rho-g} are going |
114 | +over the multiples of unit cell vectors in momentum-$\mathbf{G}$ and |
115 | +coordinate-$\mathbf{R}$ space correspondingly. The Fourier transforms |
116 | +in equations \eqref{vh-r} and \eqref{rho-g} can be accelerated by fast |
117 | +Fourier transforms (FFT), leading to an low-complexity algorithm |
118 | +($O(N)$, where $N$ is number of points on the grid). In SIESTA, only |
119 | +this FFT-accelerated method is originally implemented. It is used also |
120 | +for slabs, chains and molecules with success because, within |
121 | +self-consistent field loop, the method is applied for (almost) neutral |
122 | +charge distributions, i.e. for electric charge densities given by the |
123 | +density of electrons $n_{\mathrm{e}}(\mathbf{r})$ and the density of |
124 | +atomic cores $n_{\mathrm{a}}(\mathbf{r})$ |
125 | +\begin{equation} |
126 | + \rho(\mathbf{r}) = n_{\mathrm{e}}(\mathbf{r}) + n_{\mathrm{a}}(\mathbf{r}). |
127 | +\end{equation} |
128 | + |
129 | +However, this approach may fail to give sufficient accuracy for |
130 | +systems with reduced dimensionality. There is a work around in the |
131 | +form of some cutoffs in momentum space as summarized nicely by Rozzi |
132 | +\textit{etal} \cite{Rozzi:2006}. For instance, for the case of |
133 | +molecules, i.e. for open boundary conditions (OBC), it is sufficient |
134 | +to modify the Hartree potential in momentum space \eqref{vh-g} |
135 | +\begin{equation} |
136 | + \label{vh-r-0d} |
137 | + V_{\mathrm{H}}(\mathbf{G}) = V_{\mathrm{C}}(G)\, \rho(\mathbf{G}) |
138 | + [1-\cos(\alpha R G)], |
139 | +\end{equation} |
140 | +where $\alpha$ is a parameter $R=(3 V_{\mathrm{box}}/(4\pi))^{1/3}$ |
141 | +and |
142 | +\begin{equation} |
143 | + \label{vg-0d} |
144 | + V_{\mathrm{C}}(G) = |
145 | + \begin{cases} |
146 | + 4\pi G^{-2}, \text{ if } G\ne 0; \\ |
147 | + 2\pi\alpha R, \text{ if } G=0. |
148 | + \end{cases} |
149 | +\end{equation} |
150 | + |
151 | +The other approach to compute the Hartree potential \eqref{vh-def} |
152 | +directly on a real-space grid, but for the coordinates situated in the |
153 | +middle of the discretization cells and subsequently to interpolate the |
154 | +potential to the input grid-points. This approach has an advantage of |
155 | +not introducing additional parameters. Moreover, if we notify that the |
156 | +potential \eqref{vh-def} is a (3-dimensional) convolution, then we can |
157 | +accelerate this with FFT in such a way that there is no aliasing |
158 | +affects (i.e. we avoid cyclic convolutions by a suitable padding of |
159 | +data arrays). |
160 | |
161 | In order to define a framework for using different Poisson solvers, |
162 | -there is an option \textbf{Poisson.Type} as described below |
163 | +there is an option \fdf{Poisson.Type} as described below |
164 | |
165 | \begin{fdfentry}{Poisson!Type}[string]<\fdfvalue{PBC}> |
166 | |
167 | Define the type of Poisson solver to use. |
168 | |
169 | -\begin{itemize} |
170 | -\item \fdfvalue{PBC} (\textit{default}) |
171 | -This is original SIESTA solver for periodic systems, i.e. |
172 | -for periodic boundary conditions in all three dimensions. |
173 | -The solver realizes the equation (\ref{vh-r}). |
174 | - |
175 | -\item \fdfvalue{PBC.Cutoff0D} |
176 | -This is a realization of 0D cutoff in periodic systems, given |
177 | -by equations (\ref{vh-r-0d}) and (\ref{vg-0d}) |
178 | -(see Rozzi \textit{etal} \cite{Rozzi:2006}). |
179 | - |
180 | -\item \fdfvalue{OBC.6Loop} |
181 | -This is a reference calculation with a 6-folded loop, |
182 | -directly computing the Hartree potential (\ref{vh-def}) |
183 | -for open boundary conditions (for atoms, molecules, clusters etc) |
184 | -in real space. |
185 | -The potential is computed in the middle of discretisation cells |
186 | -and is subsequently interpolated back to the points on which |
187 | -the density is given. It is a slow algorithm and can be practically |
188 | -used only for small systems. |
189 | - |
190 | -\item \fdfvalue{OBC.FastConv} |
191 | -FFT accelerated calculation of Hartree potential |
192 | -in real space. The results of this option should be |
193 | -equivalent to the option \fdfvalue{OBC.6Loop} |
194 | -up to the machine precision. |
195 | - |
196 | -\item \fdfvalue{OBC.Check} |
197 | -This option is to realize a cross check of the |
198 | -results delivered by options \fdfvalue{OBC.6Loop} |
199 | -and \fdfvalue{OBC.FastConv}. It invokes both algorithms |
200 | -and compares results. |
201 | - |
202 | -\end{itemize} |
203 | + \begin{fdfoptions} |
204 | + |
205 | + \option[PBC] % |
206 | + This is original SIESTA solver for periodic systems, i.e. for |
207 | + periodic boundary conditions in all three dimensions. The solver |
208 | + realizes the equation \eqref{vh-r}. |
209 | + |
210 | + \option[PBC.Cutoff0D] % |
211 | + This is a realization of 0D cutoff in periodic systems, given by |
212 | + equations \eqref{vh-r-0d} and \eqref{vg-0d} (see Rozzi |
213 | + \textit{etal} \cite{Rozzi:2006}). |
214 | + |
215 | + \option[OBC.6Loop] % |
216 | + This is a reference calculation with a 6-folded loop, directly |
217 | + computing the Hartree potential \eqref{vh-def} for open boundary |
218 | + conditions (for atoms, molecules, clusters etc.) in real space. |
219 | + The potential is computed in the middle of discretisation cells |
220 | + and is subsequently interpolated back to the points on which the |
221 | + density is given. It is a slow algorithm and can be practically |
222 | + used only for small systems. |
223 | + |
224 | + \option[OBC.FastConv] % |
225 | + FFT accelerated calculation of Hartree potential in real |
226 | + space. The results of this option should be equivalent to the |
227 | + option \fdfvalue{OBC.6Loop} up to the machine precision. |
228 | + |
229 | + \option[OBC.Check] % |
230 | + This option is to realize a cross check of the results delivered |
231 | + by options \fdfvalue{OBC.6Loop} and \fdfvalue{OBC.FastConv}. It |
232 | + invokes both algorithms and compares results. |
233 | + |
234 | + \end{fdfoptions} |
235 | |
236 | \end{fdfentry} |
237 | |
238 | |
239 | \begin{fdfentry}{Poisson!alpha}[real]<\fdfvalue{1.0}> |
240 | |
241 | -This parameter defines the constant $\alpha$ in the |
242 | -equations (\ref{vh-r-0d}) and (\ref{vg-0d}). It is |
243 | -effective only if \fdfvalue{Poisson.Type = PBC.Cutoff0D}. |
244 | - |
245 | + This parameter defines the constant $\alpha$ in the |
246 | + equations \eqref{vh-r-0d} and \eqref{vg-0d}. It is |
247 | + effective only if \fdf*{Poisson.Type PBC.Cutoff0D}. |
248 | |
249 | \end{fdfentry} |
250 | |
251 | |
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 @@ |
256 | -trunk-572 |
257 | +trunk-572--kovalp-manual-1 |