mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-10-05 23:55:57 +02:00
8b22e38c9c
* fixed laplacian of aos * corrected the laplacians of aos * added dft_one_e * added new feature for new dft functionals * changed the configure to add new functionals * changed the configure * added dft_one_e/README.rst * added README.rst in new_functionals * added source/programmers_guide/new_ks.rst * Thesis Yann * Added gmp installation in configure * improved qp_e_conv_fci * Doc * Typos * Added variance_max * Fixed completion in qp_create * modif TODO * fixed DFT potential for n_states gt 1 * improved pot pbe * trying to improve sr PBE * fixed potential pbe * fixed the vxc smashed for pbe sr and normal * Comments in selection * bug fixed by peter * Fixed bug with zero beta electrons * Update README.rst * Update e_xc_new_func.irp.f * Update links.rst * Update quickstart.rst * Update quickstart.rst * updated cipsi * Fixed energies of non-expected s2 (#9) * Moved diag_algorithm in Davdison * Add print_ci_vector in tools (#11) * Fixed energies of non-expected s2 * Moved diag_algorithm in Davdison * Fixed travis * Added print_ci_vector * Documentation * Cleaned qp_set_mo_class.ml * Removed Core in taskserver * Merge develop-toto and manus (#12) * Fixed energies of non-expected s2 * Moved diag_algorithm in Davdison * Fixed travis * Added print_ci_vector * Documentation * Cleaned qp_set_mo_class.ml * Removed Core in taskserver * Frozen core for heavy atoms * Improved molden module * In sync with manus * Fixed some of the documentation errors * Develop toto (#13) * Fixed energies of non-expected s2 * Moved diag_algorithm in Davdison * Fixed travis * Added print_ci_vector * Documentation * Cleaned qp_set_mo_class.ml * Removed Core in taskserver * Frozen core for heavy atoms * Improved molden module * In sync with manus * Fixed some of the documentation errors * Develop manus (#14) * modified printing for rpt2 * Comment * Fixed plugins * Scripting for functionals * Documentation * Develop (#10) * fixed laplacian of aos * corrected the laplacians of aos * added dft_one_e * added new feature for new dft functionals * changed the configure to add new functionals * changed the configure * added dft_one_e/README.rst * added README.rst in new_functionals * added source/programmers_guide/new_ks.rst * Thesis Yann * Added gmp installation in configure * improved qp_e_conv_fci * Doc * Typos * Added variance_max * Fixed completion in qp_create * modif TODO * fixed DFT potential for n_states gt 1 * improved pot pbe * trying to improve sr PBE * fixed potential pbe * fixed the vxc smashed for pbe sr and normal * Comments in selection * bug fixed by peter * Fixed bug with zero beta electrons * Update README.rst * Update e_xc_new_func.irp.f * Update links.rst * Update quickstart.rst * Update quickstart.rst * updated cipsi * Fixed energies of non-expected s2 (#9) * Moved diag_algorithm in Davdison * some modifs * modified gfortran_debug.cfg * fixed automatization of functionals * modified e_xc_general.irp.f * minor modifs in ref_bitmask.irp.f * modifying functionals * rs_ks_scf and ks_scf compiles with the automatic handling of functionals * removed prints * fixed configure * fixed the new functionals * Merge toto * modified automatic functionals * Changed python into python2 * from_xyz suppressed * Cleaning repo * Update README.md * Update README.md * Contributors * Update GITHUB.md * bibtex |
||
---|---|---|
.. | ||
cipsi.irp.f | ||
energy.irp.f | ||
environment.irp.f | ||
NEED | ||
pt2_stoch_routines.irp.f | ||
README.rst | ||
run_pt2_slave.irp.f | ||
run_selection_slave.irp.f | ||
selection_buffer.irp.f | ||
selection_types.f90 | ||
selection.irp.f | ||
slave_cipsi.irp.f | ||
stochastic_cipsi.irp.f | ||
zmq_selection.irp.f |
===== cipsi ===== |CIPSI| algorithm. The :c:func:`run_stochastic_cipsi` and :c:func:`run_cipsi` subroutines start with a single determinant, or with the wave function in the |EZFIO| database if :option:`determinants read_wf` is |true|. The :c:func:`run_cipsi` subroutine iteratively: * Selects the most important determinants from the external space and adds them to the internal space * If :option:`determinants s2_eig` is |true|, it adds all the necessary determinants to allow the eigenstates of |H| to be eigenstates of |S^2| * Diagonalizes |H| in the enlarged internal space * Computes the |PT2| contribution to the energy stochastically :cite:`Garniron_2017.2` or deterministically, depending on :option:`perturbation do_pt2` * Extrapolates the variational energy by fitting :math:`E=E_\text{FCI} - \alpha\, E_\text{PT2}` The difference between :c:func:`run_stochastic_cipsi` and :c:func:`run_cipsi` is that :c:func:`run_stochastic_cipsi` selects the determinants on the fly with the computation of the stochastic |PT2| :cite:`Garniron_2017.2`. Hence, it is a semi-stochastic selection. It * Selects the most important determinants from the external space and adds them to the internal space, on the fly with the computation of the PT2 with the stochastic algorithm presented in :cite:`Garniron_2017.2`. * If :option:`determinants s2_eig` is |true|, it adds all the necessary determinants to allow the eigenstates of |H| to be eigenstates of |S^2| * Extrapolates the variational energy by fitting :math:`E=E_\text{FCI} - \alpha\, E_\text{PT2}` * Diagonalizes |H| in the enlarged internal space The number of selected determinants at each iteration will be such that the size of the wave function will double at every iteration. If :option:`determinants s2_eig` is |true|, then the number of selected determinants will be 1.5x the current number, and then all the additional determinants will be added. By default, the program will stop when more than one million determinants have been selected, or when the |PT2| energy is below :math:`10^{-4}`. The variational and |PT2| energies of the iterations are stored in the |EZFIO| database, in the :ref:`module_iterations` module. Computation of the |PT2| energy ------------------------------- At each iteration, the |PT2| energy is computed considering the Epstein-Nesbet zeroth-order Hamiltonian: .. math:: E_{\text{PT2}} = \sum_{ \alpha } \frac{|\langle \Psi_S | \hat{H} | \alpha \rangle|^2} {E - \langle \alpha | \hat{H} | \alpha \rangle} where the |kalpha| determinants are generated by applying all the single and double excitation operators to all the determinants of the wave function :math:`\Psi_G`. When the hybrid-deterministic/stochastic algorithm is chosen (default), :math:`Psi_G = \Psi_S = \Psi`, the full wavefunction expanded in the internal space. When the deterministic algorithm is chosen (:option:`perturbation do_pt2` is set to |false|), :math:`Psi_G` is a truncation of |Psi| using :option:`determinants threshold_generators`, and :math:`Psi_S` is a truncation of |Psi| using :option:`determinants threshold_selectors`, and re-weighted by :math:`1/\langle \Psi_s | \Psi_s \rangle`. At every iteration, while computing the |PT2|, the variance of the wave function is also computed: .. math:: \sigma^2 & = \langle \Psi | \hat{H}^2 | \Psi \rangle - \langle \Psi | \hat{H} | \Psi \rangle^2 \\ & = \sum_{i \in \text{FCI}} \langle \Psi | \hat{H} | i \rangle \langle i | \hat{H} | \Psi \rangle - \langle \Psi | \hat{H} | \Psi \rangle^2 \\ & = \sum_{ \alpha } \langle |\Psi | \hat{H} | \alpha \rangle|^2. The expression of the variance is the same as the expression of the |PT2|, with a denominator of 1. It measures how far the wave function is from the |FCI| solution. Note that the absence of denominator in the Heat-Bath selected |CI| method is selection method by minimization of the variance, whereas |CIPSI| is a selection method by minimization of the energy. If :option:`perturbation do_pt2` is set to |false|, then the stochastic |PT2| is not computed, and an approximate value is obtained from the |CIPSI| selection. The calculation is faster, but the extrapolated |FCI| value is less accurate. This way of running the code should be used when the only goal is to generate a wave function, as for using |CIPSI| wave functions as trial wave functions of |QMC| calculations for example. The :command:`PT2` program reads the wave function of the |EZFIO| database and computes the energy and the |PT2| contribution. State-averaging --------------- Extrapolated |FCI| energy ------------------------- An estimate of the |FCI| energy is computed by extrapolating .. math:: E=E_\text{FCI} - \alpha\, E_\text{PT2} This extrapolation is done for all the requested states, and excitation energies are printed as energy differences between the extrapolated energies of the excited states and the extrapolated energy of the ground state. The extrapolations are given considering the 2 last points, the 3 last points, ..., the 7 last points. The extrapolated value should be chosen such that the extrpolated value is stable with the number of points.