mirror of
https://github.com/LCPQ/quantum_package
synced 2024-06-02 11:25:26 +02:00
Documentation
This commit is contained in:
parent
9a9d7907a8
commit
c4ceb53b20
|
@ -40,3 +40,16 @@
|
|||
.. |qp| replace:: *Quantum Package*
|
||||
.. |SLURM| replace:: `SLURM`_
|
||||
.. |ZeroMQ| replace:: `ZeroMQ`_
|
||||
|
||||
.. |CAS| replace:: :abbr:`CAS (Complete Active Space)`
|
||||
.. |CAS-SD| replace:: :abbr:`CAS-SD (Complete Active Space plus all Singles and Doubles)`
|
||||
.. |CCD| replace:: :abbr:`CCD (Coupled Cluster with Double Excitations)`
|
||||
.. |CCSD| replace:: :abbr:`CCSD (Coupled Cluster with Single and Double Excitations)`
|
||||
.. |CID| replace:: :abbr:`CID (Configuration Interaction with Double Excitations)`
|
||||
.. |CIPSI| replace:: :abbr:`CIPSI (Configuration Interaction using a Perturbative Selection)`
|
||||
.. |CI| replace:: :abbr:`CI (Configuration Interaction)`
|
||||
.. |CISD| replace:: :abbr:`CISD (Configuration Interaction with Single and Double Excitations)`
|
||||
.. |CIS| replace:: :abbr:`CIS (Configuration Interaction with Single Excitations)`
|
||||
.. |DDCI| replace:: :abbr:`DDCI (Difference Dedicated Configuration Interaction)`
|
||||
.. |FCI| replace:: :abbr:`FCI (Full Configuration Interaction)`
|
||||
.. |HF| replace:: :abbr:`HF (Hartree-Fock)`
|
||||
|
|
|
@ -47,9 +47,9 @@ suppress_warnings = [
|
|||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.mathjax',
|
||||
# 'sphinx.ext.imgmath',
|
||||
'sphinx.ext.githubpages',
|
||||
'sphinxcontrib.bibtex'
|
||||
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
|
@ -134,13 +134,15 @@ latex_elements = {
|
|||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
# 'preamble': '\usepackage{physics}\n',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
|
|
182
docs/source/intro/selected.bib
Normal file
182
docs/source/intro/selected.bib
Normal file
|
@ -0,0 +1,182 @@
|
|||
@article{Bytautas_2009,
|
||||
doi = {10.1016/j.chemphys.2008.11.021},
|
||||
url = {https://doi.org/10.1016%2Fj.chemphys.2008.11.021},
|
||||
year = 2009,
|
||||
month = {feb},
|
||||
publisher = {Elsevier {BV}},
|
||||
volume = {356},
|
||||
number = {1-3},
|
||||
pages = {64--75},
|
||||
author = {Laimutis Bytautas and Klaus Ruedenberg},
|
||||
title = {A priori identification of configurational deadwood},
|
||||
journal = {Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Anderson_2018,
|
||||
doi = {10.1016/j.comptc.2018.08.017},
|
||||
url = {https://doi.org/10.1016%2Fj.comptc.2018.08.017},
|
||||
year = 2018,
|
||||
month = {oct},
|
||||
publisher = {Elsevier {BV}},
|
||||
volume = {1142},
|
||||
pages = {66--77},
|
||||
author = {James S.M. Anderson and Farnaz Heidar-Zadeh and Paul W. Ayers},
|
||||
title = {Breaking the curse of dimension for the electronic Schrodinger equation with functional analysis},
|
||||
journal = {Computational and Theoretical Chemistry}
|
||||
}
|
||||
|
||||
@article{Bender_1969,
|
||||
doi = {10.1103/physrev.183.23},
|
||||
url = {http://dx.doi.org/10.1103/PhysRev.183.23},
|
||||
year = 1969,
|
||||
month = {jul},
|
||||
publisher = {American Physical Society ({APS})},
|
||||
volume = {183},
|
||||
number = {1},
|
||||
pages = {23--30},
|
||||
author = {Charles F. Bender and Ernest R. Davidson},
|
||||
title = {Studies in Configuration Interaction: The First-Row Diatomic Hydrides},
|
||||
journal = {Phys. Rev.}
|
||||
}
|
||||
|
||||
@article{Whitten_1969,
|
||||
doi = {10.1063/1.1671985},
|
||||
url = {https://doi.org/10.1063%2F1.1671985},
|
||||
year = 1969,
|
||||
month = {dec},
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {51},
|
||||
number = {12},
|
||||
pages = {5584--5596},
|
||||
author = {J. L. Whitten and Melvyn Hackmeyer},
|
||||
title = {Configuration Interaction Studies of Ground and Excited States of Polyatomic Molecules. I. The {CI} Formulation and Studies of Formaldehyde},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Huron_1973,
|
||||
doi = {10.1063/1.1679199},
|
||||
url = {https://doi.org/10.1063%2F1.1679199},
|
||||
year = 1973,
|
||||
month = {jun},
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {58},
|
||||
number = {12},
|
||||
pages = {5745--5759},
|
||||
author = {B. Huron and J. P. Malrieu and P. Rancurel},
|
||||
title = {Iterative perturbation calculations of ground and excited state energies from multiconfigurational zeroth-order wavefunctions},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Knowles_1984,
|
||||
author="Peter J. Knowles and Nicholas C Handy",
|
||||
year=1984,
|
||||
journal={Chem. Phys. Letters},
|
||||
volume=111,
|
||||
pages="315--321",
|
||||
title="A New Determinant-based Full Configuration Interaction Method"
|
||||
}
|
||||
|
||||
|
||||
@article{Scemama_2013,
|
||||
author = {{Scemama}, A. and {Giner}, E.},
|
||||
title = "{An efficient implementation of Slater-Condon rules}",
|
||||
journal = {ArXiv [physics.comp-ph]},
|
||||
pages = {1311.6244},
|
||||
year = 2013,
|
||||
month = nov,
|
||||
url = {https://arxiv.org/abs/1311.6244}
|
||||
}
|
||||
|
||||
@article{Sharma_2017,
|
||||
doi = {10.1021/acs.jctc.6b01028},
|
||||
url = {https://doi.org/10.1021%2Facs.jctc.6b01028},
|
||||
year = 2017,
|
||||
month = {mar},
|
||||
publisher = {American Chemical Society ({ACS})},
|
||||
volume = {13},
|
||||
number = {4},
|
||||
pages = {1595--1604},
|
||||
author = {Sandeep Sharma and Adam A. Holmes and Guillaume Jeanmairet and Ali Alavi and C. J. Umrigar},
|
||||
title = {Semistochastic Heat-Bath Configuration Interaction Method: Selected Configuration Interaction with Semistochastic Perturbation Theory},
|
||||
journal = {Journal of Chemical Theory and Computation}
|
||||
}
|
||||
|
||||
@article{Holmes_2016,
|
||||
doi = {10.1021/acs.jctc.6b00407},
|
||||
url = {https://doi.org/10.1021%2Facs.jctc.6b00407},
|
||||
year = 2016,
|
||||
month = {aug},
|
||||
publisher = {American Chemical Society ({ACS})},
|
||||
volume = {12},
|
||||
number = {8},
|
||||
pages = {3674--3680},
|
||||
author = {Adam A. Holmes and Norm M. Tubman and C. J. Umrigar},
|
||||
title = {Heat-Bath Configuration Interaction: An Efficient Selected Configuration Interaction Algorithm Inspired by Heat-Bath Sampling},
|
||||
journal = {Journal of Chemical Theory and Computation}
|
||||
}
|
||||
@article{Evangelisti_1983,
|
||||
doi = {10.1016/0301-0104(83)85011-3},
|
||||
url = {https://doi.org/10.1016%2F0301-0104%2883%2985011-3},
|
||||
year = 1983,
|
||||
month = {feb},
|
||||
publisher = {Elsevier {BV}},
|
||||
volume = {75},
|
||||
number = {1},
|
||||
pages = {91--102},
|
||||
author = {Stefano Evangelisti and Jean-Pierre Daudey and Jean-Paul Malrieu},
|
||||
title = {Convergence of an improved {CIPSI} algorithm},
|
||||
journal = {Chemical Physics}
|
||||
}
|
||||
@article{Booth_2009,
|
||||
doi = {10.1063/1.3193710},
|
||||
url = {https://doi.org/10.1063%2F1.3193710},
|
||||
year = 2009,
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {131},
|
||||
number = {5},
|
||||
pages = {054106},
|
||||
author = {George H. Booth and Alex J. W. Thom and Ali Alavi},
|
||||
title = {Fermion Monte Carlo without fixed nodes: A game of life, death, and annihilation in Slater determinant space},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
@article{Booth_2010,
|
||||
doi = {10.1063/1.3407895},
|
||||
url = {https://doi.org/10.1063%2F1.3407895},
|
||||
year = 2010,
|
||||
month = {may},
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {132},
|
||||
number = {17},
|
||||
pages = {174104},
|
||||
author = {George H. Booth and Ali Alavi},
|
||||
title = {Approaching chemical accuracy using full configuration-interaction quantum Monte Carlo: A study of ionization potentials},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
@article{Cleland_2010,
|
||||
doi = {10.1063/1.3302277},
|
||||
url = {https://doi.org/10.1063%2F1.3302277},
|
||||
year = 2010,
|
||||
month = {jan},
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {132},
|
||||
number = {4},
|
||||
pages = {041103},
|
||||
author = {Deidre Cleland and George H. Booth and Ali Alavi},
|
||||
title = {Communications: Survival of the fittest: Accelerating convergence in full configuration-interaction quantum Monte Carlo},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
||||
@article{Garniron_2017b,
|
||||
doi = {10.1063/1.4992127},
|
||||
url = {https://doi.org/10.1063%2F1.4992127},
|
||||
year = 2017,
|
||||
month = {jul},
|
||||
publisher = {{AIP} Publishing},
|
||||
volume = {147},
|
||||
number = {3},
|
||||
pages = {034101},
|
||||
author = {Yann Garniron and Anthony Scemama and Pierre-Fran{\c{c}}ois Loos and Michel Caffarel},
|
||||
title = {Hybrid stochastic-deterministic calculation of the second-order perturbative contribution of multireference perturbation theory},
|
||||
journal = {The Journal of Chemical Physics}
|
||||
}
|
||||
|
|
@ -1,90 +1,155 @@
|
|||
Selected Configuration Interaction
|
||||
==================================
|
||||
|
||||
These methods rely on the same principle as the usual CI approaches, except
|
||||
.. default-role:: cite
|
||||
|
||||
These methods rely on the same principle as the usual |CI| approaches, except
|
||||
that determinants aren't chosen *a priori* based on an occupation or
|
||||
excitation criterion, but selected *on the fly* among the entire set of
|
||||
determinants based on their estimated contribution to the Full-CI wave function.
|
||||
Conventional CI methods can be seen as an exact resolution of Schrödinger's
|
||||
equation for a complete, well-defined subset of determinants (and for a given
|
||||
atomic basis set), while selected CI methods are closer to a truncation of the
|
||||
Full-CI.
|
||||
|
||||
determinants based on their estimated contribution to the |FCI| wave function.
|
||||
It has been noticed long ago that, even inside a predefined subspace of
|
||||
determinants, only a small number significantly contributes to the wave
|
||||
function.:cite:`Bytautas_2009,Anderson_2018` Therefore, an *on the fly*
|
||||
function. `Bytautas_2009,Anderson_2018` Therefore, an *on the fly*
|
||||
selection of determinants is a rather natural idea that has been proposed
|
||||
in the late 60's by Bender and Davidson :cite:`Bender_1969` as well as Whitten
|
||||
and Hackmeyer :cite:`Whitten_1969`.
|
||||
in the late 60's by Bender and Davidson `Bender_1969` as well as Whitten
|
||||
and Hackmeyer. `Whitten_1969`
|
||||
|
||||
The approach we are using in the |qp| is based on :abbr:`CIPSI (Configuration
|
||||
Interaction using a Perturbative Selection` developed by Huron, Rancurel and
|
||||
Malrieu,:cite:`Huron_1973` that iteratively selects *external* determinants
|
||||
|kalpha| (determinants which are not present in the wave
|
||||
function :math:`|\Psi \rangle = \sum_i c_i |i \rangle`) using a perturbative
|
||||
criterion
|
||||
The approach we are using in the |qp| is based on |CIPSI| developed by Huron,
|
||||
Rancurel and Malrieu, `Huron_1973` that iteratively selects *external*
|
||||
determinants (determinants which are not present in the variational space)
|
||||
using a perturbative criterion.
|
||||
|
||||
.. math::
|
||||
|
||||
e_\alpha = \frac{\langle \Psi |{\hat H}| \alpha \rangle^2 }{E - H_{\alpha\alpha}}
|
||||
|
||||
with |kalpha| the external determinant being considered, and |ealpha| the
|
||||
estimated gain in correlation energy that would be brought by the inclusion of
|
||||
|kalpha| in the wave function. |EPT| is an estimation of the total missing
|
||||
correlation energy:
|
||||
|
||||
.. math::
|
||||
|
||||
\begin{align}
|
||||
E_\text{PT2} & = \sum_{\alpha} e_\alpha \\
|
||||
E_\text{FCI} & \approx E + E_\text{PT2}
|
||||
\end{align}
|
||||
|
||||
There is however a computational downside. In \textit{a priori} selected
|
||||
methods, the rule by which determinants are selected is known \textit{a
|
||||
priori}, and therefore, one can map a particular determinant to some row or
|
||||
column index.\cite{Knowles_1984} As a consequence, it can be systematically
|
||||
determined to which matrix element of $\widehat{H}$ a two-electron integral
|
||||
There is however a computational downside. In *a priori* selected
|
||||
methods, the rule by which determinants are selected is known *a
|
||||
priori*, and therefore, one can map a particular determinant to some row or
|
||||
column index. `Knowles_1984` As a consequence, it can be systematically
|
||||
determined to which matrix element of :math:`\hat H` a two-electron integral
|
||||
contributes. This allows for the implementation of so-called
|
||||
\emph{integral-driven} methods, that work essentially by iterating over
|
||||
integrals.
|
||||
*integral-driven* methods, that work essentially by iterating over
|
||||
integrals and are very fast.
|
||||
|
||||
On the contrary, in selected methods an explicit list has to be maintained, and
|
||||
there is no immediate way to know whether a determinant has been selected, or
|
||||
what its index is. Consequently, so-called \emph{determinant-driven} approaches
|
||||
will be used, in which iteration is done over determinants rather than
|
||||
integrals. This can be a lot more expensive, since the number of determinants
|
||||
is typically much larger than the number of integrals. The number of
|
||||
determinants scales as $\order{\Norb!}$ while the number of integrals scales as
|
||||
$\order{\Norb^4}$ with the number of MOs.
|
||||
On the contrary, in selected methods an explicit list of determinants has to be
|
||||
kept, and there is no immediate way to know whether a determinant has been
|
||||
selected, or what its index is in the list. Consequently, a
|
||||
*determinant-driven* approach will be used, in which the loops run over
|
||||
determinants rather than integrals. This can be a lot more computationally
|
||||
expensive since the number of determinants is typically much larger than the
|
||||
number of integrals.
|
||||
|
||||
Furthermore, determinant-driven methods require an effective way to compare
|
||||
determinants in order to extract the corresponding excitation operators, and a
|
||||
way to rapidly fetch the associated integrals involved
|
||||
section~\ref{sec:meth_mel}.
|
||||
What makes *determinant-driven* approaches possible here is:
|
||||
|
||||
Because of this high computational cost, approximations have been
|
||||
proposed.\cite{Evangelisti_1983} And recently, the \emph{Heat-Bath
|
||||
Configuration Interaction (HCI)} algorithm has taken farther the idea of a more
|
||||
approximate but extremely cheap selection.\cite{Holmes_2016, Sharma_2017}
|
||||
Compared to CIPSI, the selection criterion is simplified to
|
||||
- the fact that selected |CI| methods will keep the number of determinants small
|
||||
enough, orders of magnitude smaller than in *a priori* selected methods for
|
||||
wave functions with equal energies,
|
||||
- an efficient way to compare determinants in order to extract the
|
||||
corresponding excitation operators `Scemama_2013`,
|
||||
- an intense filtering of the internal space to avoid as much as possible
|
||||
determinant comparisons of disconnected determinants,
|
||||
- a fast retrieval of the corresponding two-electron integrals in memory.
|
||||
|
||||
|
||||
Simple Algorithm
|
||||
----------------
|
||||
|
||||
.. default-role:: math
|
||||
|
||||
.. |SetDI| replace:: `\{|D_I\rangle\}^{(n)}`
|
||||
.. |Psi_n| replace:: `|\Psi^{(n)}\rangle`
|
||||
.. |H| replace:: `\hat H`
|
||||
.. |kalpha| replace:: `|\alpha\rangle`
|
||||
.. |kalpha_star| replace:: `\{ |\alpha \rangle \}_\star ^{(n)}`
|
||||
.. |ealpha| replace:: `e_\alpha`
|
||||
.. |EPT| replace:: `E_\text{PT2}`
|
||||
|
||||
The variational wave function |Psi_n| is defined over a set of determinants
|
||||
|SetDI| in which we diagonalize |H|.
|
||||
|
||||
.. math::
|
||||
|
||||
e^{\text{HCI}}_\alpha = \max \qty( \qty| c_I \Hij{D_I}{\alpha} | )
|
||||
|
||||
This algorithmically allows for an extremely fast selection of doubly
|
||||
excited determinants by an integral-driven approach.
|
||||
|
||||
Full Configuration Interaction Quantum Monte Carlo (FCI-QMC) is an alternate
|
||||
approach to selection recently proposed in 2009 by Alavi \textit{et
|
||||
al.},\cite{Booth_2009,Booth_2010,Cleland_2010} where signed walkers spawn from
|
||||
one determinant to connected ones, with a probability that is a function of the
|
||||
associated matrix element. The average proportion of walkers on a determinant
|
||||
converges to its coefficient in the FCI wave function.
|
||||
|\Psi^{(n)}\rangle = \sum_{I} c_I^{(n)} |D_I\rangle
|
||||
|
||||
|
||||
.. |kalpha| replace:: :math:`| \alpha \rangle`
|
||||
.. |ealpha| replace:: :math:`e_\alpha `
|
||||
.. |EPT| replace:: :math:`E_{\text PT2}`
|
||||
The determinants in |SetDI| will be characterized as **internal**.
|
||||
|
||||
#. For all **external** determinants |kalpha| `\notin` |SetDI|, compute the
|
||||
Epstein-Nesbet second-order perturbative contribution to the energy
|
||||
|
||||
.. math::
|
||||
|
||||
e_\alpha = \frac{ \langle \Psi^{(n)}| {\hat H} | \alpha \rangle^2 }{E^{(n)} - \langle \alpha | {\hat H} | \alpha \rangle }.
|
||||
|
||||
`E^{(n)}` is the variational energy of the wave function at the current
|
||||
iteration. Note that another perturbation theory could be used to estimate
|
||||
|ealpha|.
|
||||
|
||||
#. An estimate of the total missing correlation energy can be computed
|
||||
by summing all the |ealpha| contributions
|
||||
|
||||
.. math::
|
||||
|
||||
E_\text{PT2} & = \sum_{\alpha} e_\alpha \\
|
||||
E_\text{FCI} & \approx E + E_\text{PT2}
|
||||
|
||||
#. |kalpha_star|, the subset of determinants |kalpha| with the largest
|
||||
contributions |ealpha|, is added to the variational space
|
||||
|
||||
.. math::
|
||||
|
||||
\{ |D_I \rangle \}^{(n+1)} = \{|D_I\rangle\}^{(n)} \cup \{ |\alpha\rangle \}_\star^{(n)}
|
||||
|
||||
|
||||
#. Go to iteration n+1, or exit on some criterion (number of determinants in
|
||||
the wave function, low |EPT|, ...).
|
||||
|
||||
|
||||
|
||||
Approximations to accelerate the selection
|
||||
------------------------------------------
|
||||
|
||||
The simple algorithm would be too slow to make calculations possible. Instead,
|
||||
we use the 3-class |CIPSI| approximation to accelerate the selection,
|
||||
:cite:`Evangelisti_1983` where instead of generating all possible |kalpha|,
|
||||
we only generate a subset which are likely to be selected.
|
||||
|
||||
We define **generator** determinants, as determinants of the internal space
|
||||
from which the |kalpha| are generated.
|
||||
We then define **selector** determinants, a truncated wave function
|
||||
used in the computation of |ealpha|.
|
||||
|
||||
For calculations in the |FCI| space, the determinants are sorted by
|
||||
decreasing `|c_I|^2`, and thresholds are used on the squared norm of the wave
|
||||
function. The default is to use :ref:`threshold_generators` = 0.99 for the
|
||||
generators, and :ref:`threshold_selectors` = 0.999 for the selectors.
|
||||
|
||||
The computation of |EPT| using a truncated wave function is biased,
|
||||
so if an accurate estimate of the |FCI| energy is desired, it is preferable
|
||||
to recompute |EPT| with the hybrid deterministic/stochastic algorithm
|
||||
:cite:`Garniron_2017b` which is unbiased (this is the default).
|
||||
|
||||
|
||||
Modifying the selection space
|
||||
-----------------------------
|
||||
|
||||
By changing the definition of generators, and the rules for the generation of
|
||||
the |kalpha|, it is easy to define selected variants of traditional |CI| methods.
|
||||
|
||||
For example, if one defines the |HF| determinant as the only generator,
|
||||
one will produce a selected |CISD|. If one also changes the rules for the generation
|
||||
to generate only the double excitations, one will have a selected |CID|.
|
||||
|
||||
The generators can also be chosen as determinants belonging to a |CAS|. If the
|
||||
rules allow only for excitations inside the |CAS|, we obtain a selected
|
||||
|CAS| |CI|. If the rules allow for excitations in the |FCI| space, we obtain
|
||||
a selected |CAS-SD|. And if one add the rule to prevent for doing double
|
||||
excitations with two holes and two particles outside of the active space, one
|
||||
obtains a selected |DDCI| method.
|
||||
|
||||
All such things can be done very easily when programming the the |qp|.
|
||||
|
||||
-----------------------------------
|
||||
|
||||
.. bibliography:: selected.bib
|
||||
:style: unsrt
|
||||
:labelprefix: A
|
||||
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ program fci_zmq
|
|||
threshold_davidson = threshold_davidson_in * 100.d0
|
||||
SOFT_TOUCH threshold_davidson
|
||||
|
||||
if (N_det < N_states) then
|
||||
! if (N_det < N_states) then
|
||||
call diagonalize_CI
|
||||
call save_wavefunction
|
||||
endif
|
||||
! endif
|
||||
|
||||
call ezfio_has_hartree_fock_energy(has)
|
||||
if (has) then
|
||||
|
|
Loading…
Reference in New Issue
Block a user