10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00

Update DIIS.mli

This commit is contained in:
Anthony Scemama 2018-05-31 10:56:01 +02:00
parent 6d783999af
commit 47864a9fb7

View File

@ -1,25 +1,29 @@
(** Direct Inversion of the Iterative Subspace algorithm. (** Direct Inversion of the Iterative Subspace algorithm.
At each iteration, one has: At iteration {% $m$ %}, one has:
- {% $\mathbf{p}$ %}, a vector of parameters - {% $\mathbf{p}_m$ %}, a vector of parameters
- {% $\mathbf{e}$ %}, an approximate error vector - {% $\mathbf{e}_m$ %}, an approximate error vector
The DIIS approximate solution for iteration $m+1$ is given by
The DIIS approximate solution is given by
{% \begin{align*} {% \begin{align*}
\mathbf{p}^{\text{DIIS}} & = \sum_i c_i (\mathbf{p}^f + \mathbf{e}_i) \\ \mathbf{p}_{m+1} & = \sum_{i=1}^m c_i (\mathbf{p}^f + \mathbf{e}_i) \\
& = \sum_i c_i \mathbf{p}^f + \sum_i c_i \mathbf{e}_i) \\ & = \sum_{i=1}^m c_i \mathbf{p}^f + \sum_i c_i \mathbf{e}_i
\end{align*} %} \end{align*} %}
where {% $\mathbf{p}^f$ %} is the exact solution, so one wants to minimize
the norm of the error vector imposing the constraint that $\sum_i c_i = 1$ with where {% $\mathbf{p}^f$ %} is the exact solution. One wants to minimize the
a Langrange multiplier {% $\lambda$ %}. norm of the error vector imposing the constraint that {% $\sum_{i=1}^m c_i = 1$ %}
with a Langrange multiplier {% $\lambda$ %}.
{% {%
\begin{align*} \begin{align*}
\mathcal{L} & = ||\sum_i c_i \mathbf{e}_i)||^2 - \lambda \left(\sum_i c_i - 1\right) \\ \mathcal{L} & = ||\sum_i c_i \mathbf{e}_i||^2 - \lambda \left(\sum_i c_i - 1\right) \\
& = \sum_{ij} c_i c_j B_{ij} - \lambda \left(\sum_i c_i - 1\right) & = \sum_{ij} c_i c_j B_{ij} - \lambda \left(\sum_i c_i - 1\right)
\end{align*} \end{align*}
with {% $B_{ij} = \langle \mathbf{e}_i | \mathbf{e}_j \rangle$ %}. %}
with
{% $B_{ij} = \langle \mathbf{e}_i | \mathbf{e}_j \rangle$ %}.
Equating zero to the derivatives of {% $\mathcal{L}$ %} with respect to {% $c_i$ %} and {% $\lambda$ %} leads to Equating zero to the derivatives of {% $\mathcal{L}$ %} with respect to {% $c_i$ %} and {% $\lambda$ %} leads to