diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 00000000..f114dbf9
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,32 @@
+# .readthedocs.yaml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version and other tools you might need
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.12"
+ # You can also specify other tool versions:
+ # nodejs: "19"
+ # rust: "1.64"
+ # golang: "1.19"
+
+# Build documentation in the "docs/" directory with Sphinx
+sphinx:
+ configuration: docs/source/conf.py
+
+# Optionally build your docs in additional formats such as PDF and ePub
+# formats:
+# - pdf
+# - epub
+
+# Optional but recommended, declare the Python requirements required
+# to build your documentation
+# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+python:
+ install:
+ - requirements: docs/requirements.txt
diff --git a/README.md b/README.md
index 5a35f63d..7a9503d7 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,9 @@
executables for Quantum Package. Please use ifort as long as you can, and
consider switching to gfortran in the long term.
+---
+
+
# Quantum Package 2.2
diff --git a/docs/ref b/docs/ref
index 58cc4721..49599966 100644
--- a/docs/ref
+++ b/docs/ref
@@ -20,5 +20,5 @@ Then, to reference for "myref" just type :ref:`myref`
or use `IRPF90`_ and define
_IRPF90: http://irpf90.ups-tlse.fr
somewhere
-* References of published results with QP should be added into docs/source/research.bib in bibtex
+* References of published results with QP should be added into docs/source/references.bib in bibtex
format
diff --git a/docs/requirements.txt b/docs/requirements.txt
index b73f3706..135f6044 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,2 +1,2 @@
-sphinxcontrib-bibtex==0.4.0
-sphinx-rtd-theme==0.4.2
+sphinxcontrib-bibtex
+sphinx-rtd-theme
diff --git a/docs/source/appendix/contributors.rst b/docs/source/appendix/contributors.rst
index bf58adc2..e3574e5a 100644
--- a/docs/source/appendix/contributors.rst
+++ b/docs/source/appendix/contributors.rst
@@ -2,13 +2,13 @@
Contributors
============
-The |qp| is maintained by
+The |qp| is maintained by
-Anthony Scemama
+Anthony Scemama
| `Laboratoire de Chimie et Physique Quantiques `_,
| CNRS - Université Paul Sabatier
| Toulouse, France
- | scemama@irsamc.ups-tlse.fr
+ | scemama@irsamc.ups-tlse.fr
Emmanuel Giner
@@ -18,27 +18,27 @@ Emmanuel Giner
| emmanuel.giner@lct.jussieu.fr
-Thomas Applencourt
- | `Argonne Leadership Computing Facility `_
- | Argonne, USA
- | tapplencourt@anl.gov
-
-
-
The following people have contributed to this project (by alphabetical order):
+* Abdallah Ammar
+* Thomas Applencourt
* Roland Assaraf
* Pierrette Barbaresco
* Anouar Benali
* Chandler Bennet
* Michel Caffarel
+* Vijay Gopal Chilkuri
+* Yann Damour
* Grégoire David
+* Amanda Dumi
* Anthony Ferté
-* Madeline Galbraith
+* Madeline Galbraith
* Yann Garniron
* Kevin Gasperich
+* Fabris Kossoski
* Pierre-François Loos
* Jean-Paul Malrieu
+* Antoine Marie
* Barry Moore
* Julien Paquier
* Barthélémy Pradines
@@ -49,6 +49,7 @@ The following people have contributed to this project (by alphabetical order):
* Mikaël Véril
-If you have contributed and don't appear in this list, please modify this file
+If you have contributed and don't appear in this list, please modify the file
+`$QP_ROOT/docs/source/appendix/contributors.rst`
and submit a pull request.
diff --git a/docs/source/appendix/references.rst b/docs/source/appendix/references.rst
new file mode 100644
index 00000000..b277a6ac
--- /dev/null
+++ b/docs/source/appendix/references.rst
@@ -0,0 +1,8 @@
+References
+==========
+
+.. bibliography:: /references.bib
+ :style: unsrt
+ :all:
+
+
diff --git a/docs/source/appendix/research.rst b/docs/source/appendix/research.rst
deleted file mode 100644
index 992cc1eb..00000000
--- a/docs/source/appendix/research.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-Some research made with the |qp|
-================================
-
-.. bibliography:: /research.bib
- :style: unsrt
- :all:
-
-
diff --git a/docs/source/auto_generate.py b/docs/source/auto_generate.py
index d767b922..6b50bce9 100755
--- a/docs/source/auto_generate.py
+++ b/docs/source/auto_generate.py
@@ -29,7 +29,8 @@ def generate_modules(abs_module, entities):
rst += ["", "EZFIO parameters", "----------------", ""]
config_file = configparser.ConfigParser()
with open(EZFIO, 'r') as f:
- config_file.readfp(f)
+# config_file.readfp(f)
+ config_file.read_file(f)
for section in config_file.sections():
doc = config_file.get(section, "doc")
doc = " " + doc.replace("\n", "\n\n ")+"\n"
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 21498968..bafd95fa 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -70,7 +70,7 @@ master_doc = 'index'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -208,3 +208,5 @@ epub_exclude_files = ['search.html']
# -- Extension configuration -------------------------------------------------
+bibtex_bibfiles = [ "references.bib" ]
+
diff --git a/docs/source/intro/intro.rst b/docs/source/intro/intro.rst
index aecd072d..6561f11a 100644
--- a/docs/source/intro/intro.rst
+++ b/docs/source/intro/intro.rst
@@ -11,25 +11,25 @@ The |qp|
What it is
==========
-The |qp| is an open-source **programming environment** for quantum chemistry.
-It has been built from the **developper** point of view in order to help
-the design of new quantum chemistry methods,
-especially for `wave function theory `_ (|WFT|).
+The |qp| is an open-source **programming environment** for quantum chemistry.
+It has been built from the **developper** point of view in order to help
+the design of new quantum chemistry methods,
+especially for `wave function theory `_ (|WFT|).
-From the **user** point of view, the |qp| proposes a stand-alone path
-to use optimized selected configuration interaction |sCI| based on the
-|CIPSI| algorithm that can efficiently reach near-full configuration interaction
-|FCI| quality for relatively large systems (see for instance :cite:`Caffarel_2016,Caffarel_2016.2,Loos_2018,Scemama_2018,Dash_2018,Garniron_2017.2,Loos_2018,Garniron_2018,Giner2018Oct`).
-To have a simple example of how to use the |CIPSI| program, go to the `users_guide/quickstart`.
+From the **user** point of view, the |qp| proposes a stand-alone path
+to use optimized selected configuration interaction |sCI| based on the
+|CIPSI| algorithm that can efficiently reach near-full configuration interaction
+|FCI| quality for relatively large systems.
+To have a simple example of how to use the |CIPSI| program, go to the `users_guide/quickstart`.
The main goal is the development of selected configuration interaction |sCI|
methods and multi-reference perturbation theory |MRPT| in the
-determinant-driven paradigm. It also contains the very basics of Kohn-Sham `density functional theory `_ |KS-DFT| and `range-separated hybrids `_ |RSH|.
+determinant-driven paradigm. It also contains the very basics of Kohn-Sham `density functional theory `_ |KS-DFT| and `range-separated hybrids `_ |RSH|.
-The determinant-driven framework allows the programmer to include any arbitrary set of
-determinants in the variational space, and thus gives a complete freedom in the methodological
-development. The basic ingredients of |RSH| together with those of the |WFT| framework available in the |qp| library allows one to easily develop range-separated DFT (|RSDFT|) approaches (see for instance the plugins at ``_).
+The determinant-driven framework allows the programmer to include any arbitrary set of
+determinants in the variational space, and thus gives a complete freedom in the methodological
+development. The basic ingredients of |RSH| together with those of the |WFT| framework available in the |qp| library allows one to easily develop range-separated DFT (|RSDFT|) approaches (see for instance the plugins at ``_).
All the programs are developed with the `IRPF90`_ code generator, which considerably simplifies
the collaborative development, and the development of new features.
@@ -40,20 +40,20 @@ What it is not
==============
The |qp| is *not* a general purpose quantum chemistry program.
-First of all, it is a *library* to develop new theories and algorithms in quantum chemistry.
+First of all, it is a *library* to develop new theories and algorithms in quantum chemistry.
Therefore, beside the use of the programs of the core modules, the users of the |qp| should develop their own programs.
The |qp| has been designed specifically for |sCI|, so all the
algorithms which are programmed are not adapted to run SCF or DFT calculations
on thousands of atoms. Currently, the systems targeted have less than 600
-molecular orbitals. This limit is due to the memory bottleneck induced by the storring of the two-electron integrals (see ``mo_two_e_integrals`` and ``ao_two_e_integrals``).
+molecular orbitals. This limit is due to the memory bottleneck induced by the storring of the two-electron integrals (see ``mo_two_e_integrals`` and ``ao_two_e_integrals``).
The |qp| is *not* a massive production code. For conventional
methods such as Hartree-Fock, CISD or MP2, the users are recommended to use the
existing standard production codes which are designed to make these methods run
fast. Again, the role of the |qp| is to make life simple for the
developer. Once a new method is developed and tested, the developer is encouraged
-to consider re-expressing it with an integral-driven formulation, and to
+to consider re-expressing it with an integral-driven formulation, and to
implement the new method in open-source production codes, such as `NWChem`_
or |GAMESS|.
diff --git a/docs/source/intro/selected.bib b/docs/source/intro/selected.bib
deleted file mode 100644
index 32df8bce..00000000
--- a/docs/source/intro/selected.bib
+++ /dev/null
@@ -1,182 +0,0 @@
-@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}
-}
-
diff --git a/docs/source/modules/becke_numerical_grid.rst b/docs/source/modules/becke_numerical_grid.rst
index e67c443a..27a95877 100644
--- a/docs/source/modules/becke_numerical_grid.rst
+++ b/docs/source/modules/becke_numerical_grid.rst
@@ -99,6 +99,71 @@ EZFIO parameters
Default: 1.e-20
+.. option:: my_grid_becke
+
+ if True, the number of angular and radial grid points are read from EZFIO
+
+ Default: False
+
+.. option:: my_n_pt_r_grid
+
+ Number of radial grid points given from input
+
+ Default: 300
+
+.. option:: my_n_pt_a_grid
+
+ Number of angular grid points given from input. Warning, this number cannot be any integer. See file list_angular_grid
+
+ Default: 1202
+
+.. option:: n_points_extra_final_grid
+
+ Total number of extra_grid points
+
+
+.. option:: extra_grid_type_sgn
+
+ Type of extra_grid used for the Becke's numerical extra_grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ]
+
+ Default: 0
+
+.. option:: thresh_extra_grid
+
+ threshold on the weight of a given extra_grid point
+
+ Default: 1.e-20
+
+.. option:: my_extra_grid_becke
+
+ if True, the number of angular and radial extra_grid points are read from EZFIO
+
+ Default: False
+
+.. option:: my_n_pt_r_extra_grid
+
+ Number of radial extra_grid points given from input
+
+ Default: 300
+
+.. option:: my_n_pt_a_extra_grid
+
+ Number of angular extra_grid points given from input. Warning, this number cannot be any integer. See file list_angular_extra_grid
+
+ Default: 1202
+
+.. option:: rad_grid_type
+
+ method used to sample the radial space. Possible choices are [KNOWLES | GILL]
+
+ Default: KNOWLES
+
+.. option:: extra_rad_grid_type
+
+ method used to sample the radial space. Possible choices are [KNOWLES | GILL]
+
+ Default: KNOWLES
+
Providers
---------
@@ -122,6 +187,8 @@ Providers
:columns: 3
* :c:data:`final_weight_at_r`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
* :c:data:`grid_points_per_atom`
@@ -156,6 +223,66 @@ Providers
* :c:data:`grid_points_per_atom`
+.. c:var:: angular_quadrature_points_extra
+
+
+ File : :file:`becke_numerical_grid/angular_extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: angular_quadrature_points_extra (n_points_extra_integration_angular,3)
+ double precision, allocatable :: weights_angular_points_extra (n_points_extra_integration_angular)
+
+
+ weights and grid points_extra for the integration on the angular variables on
+ the unit sphere centered on (0,0,0)
+ According to the LEBEDEV scheme
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`n_points_extra_radial_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+
+
+.. c:var:: dr_radial_extra_integral
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: grid_points_extra_radial (n_points_extra_radial_grid)
+ double precision :: dr_radial_extra_integral
+
+
+ points_extra in [0,1] to map the radial integral [0,\infty]
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`n_points_extra_radial_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+
+
.. c:var:: dr_radial_integral
@@ -223,6 +350,11 @@ Providers
.. hlist::
:columns: 3
+ * :c:data:`ao_abs_int_grid`
+ * :c:data:`ao_overlap_abs_grid`
+ * :c:data:`ao_prod_abs_r`
+ * :c:data:`ao_prod_center`
+ * :c:data:`ao_prod_dist_grid`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_in_r_array`
* :c:data:`aos_lapl_in_r_array`
@@ -241,11 +373,60 @@ Providers
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
+ * :c:data:`f_psi_cas_ab`
+ * :c:data:`f_psi_hf_ab`
+ * :c:data:`final_grid_points_transp`
+ * :c:data:`mo_grad_ints`
* :c:data:`mos_in_r_array`
* :c:data:`mos_in_r_array_omp`
+ * :c:data:`mu_average_prov`
+ * :c:data:`mu_grad_rho`
+ * :c:data:`mu_of_r_dft_average`
+ * :c:data:`mu_rsc_of_r`
* :c:data:`one_e_dm_and_grad_alpha_in_r`
+.. c:var:: final_grid_points_extra
+
+
+ File : :file:`becke_numerical_grid/extra_grid_vector.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_grid_points_extra (3,n_points_extra_final_grid)
+ double precision, allocatable :: final_weight_at_r_vector_extra (n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra (3,n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra_reverse (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ final_grid_points_extra(1:3,j) = (/ x, y, z /) of the jth grid point
+
+ final_weight_at_r_vector_extra(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
+
+ index_final_points_extra(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
+
+ index_final_points_extra_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`thresh_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`aos_in_r_array_extra`
+
+
.. c:var:: final_grid_points_per_atom
@@ -272,12 +453,28 @@ Providers
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
- Needed by:
+
+
+.. c:var:: final_grid_points_transp
+
+
+ File : :file:`becke_numerical_grid/grid_becke_vector.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_grid_points_transp (n_points_final_grid,3)
+
+
+ Transposed final_grid_points
+
+ Needs:
.. hlist::
:columns: 3
- * :c:data:`aos_in_r_array_per_atom`
+ * :c:data:`final_grid_points`
+ * :c:data:`n_points_final_grid`
+
.. c:var:: final_weight_at_r
@@ -304,6 +501,8 @@ Providers
* :c:data:`m_knowles`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
+ * :c:data:`r_gill`
+ * :c:data:`rad_grid_type`
* :c:data:`weight_at_r`
Needed by:
@@ -317,6 +516,43 @@ Providers
* :c:data:`n_pts_per_atom`
+.. c:var:: final_weight_at_r_extra
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_weight_at_r_extra (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ Total weight on each grid point which takes into account all Lebedev, Voronoi and radial weights.
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`alpha_knowles`
+ * :c:data:`angular_quadrature_points_extra`
+ * :c:data:`extra_rad_grid_type`
+ * :c:data:`grid_atomic_number`
+ * :c:data:`grid_points_extra_radial`
+ * :c:data:`m_knowles`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`r_gill`
+ * :c:data:`weight_at_r_extra`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_grid_points_extra`
+ * :c:data:`n_points_extra_final_grid`
+
+
.. c:var:: final_weight_at_r_vector
@@ -355,6 +591,11 @@ Providers
.. hlist::
:columns: 3
+ * :c:data:`ao_abs_int_grid`
+ * :c:data:`ao_overlap_abs_grid`
+ * :c:data:`ao_prod_abs_r`
+ * :c:data:`ao_prod_center`
+ * :c:data:`ao_prod_dist_grid`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_in_r_array`
* :c:data:`aos_lapl_in_r_array`
@@ -373,11 +614,60 @@ Providers
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
+ * :c:data:`f_psi_cas_ab`
+ * :c:data:`f_psi_hf_ab`
+ * :c:data:`final_grid_points_transp`
+ * :c:data:`mo_grad_ints`
* :c:data:`mos_in_r_array`
* :c:data:`mos_in_r_array_omp`
+ * :c:data:`mu_average_prov`
+ * :c:data:`mu_grad_rho`
+ * :c:data:`mu_of_r_dft_average`
+ * :c:data:`mu_rsc_of_r`
* :c:data:`one_e_dm_and_grad_alpha_in_r`
+.. c:var:: final_weight_at_r_vector_extra
+
+
+ File : :file:`becke_numerical_grid/extra_grid_vector.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_grid_points_extra (3,n_points_extra_final_grid)
+ double precision, allocatable :: final_weight_at_r_vector_extra (n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra (3,n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra_reverse (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ final_grid_points_extra(1:3,j) = (/ x, y, z /) of the jth grid point
+
+ final_weight_at_r_vector_extra(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
+
+ index_final_points_extra(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
+
+ index_final_points_extra_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`thresh_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`aos_in_r_array_extra`
+
+
.. c:var:: final_weight_at_r_vector_per_atom
@@ -404,12 +694,6 @@ Providers
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
- Needed by:
-
- .. hlist::
- :columns: 3
-
- * :c:data:`aos_in_r_array_per_atom`
.. c:var:: grid_atomic_number
@@ -438,9 +722,77 @@ Providers
:columns: 3
* :c:data:`final_weight_at_r`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
* :c:data:`grid_points_per_atom`
+.. c:var:: grid_points_extra_per_atom
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: grid_points_extra_per_atom (3,n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ x,y,z coordinates of grid points_extra used for integration in 3d space
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`alpha_knowles`
+ * :c:data:`angular_quadrature_points_extra`
+ * :c:data:`extra_rad_grid_type`
+ * :c:data:`grid_atomic_number`
+ * :c:data:`grid_points_extra_radial`
+ * :c:data:`m_knowles`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_coord`
+ * :c:data:`nucl_num`
+ * :c:data:`r_gill`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_grid_points_extra`
+ * :c:data:`weight_at_r_extra`
+
+
+.. c:var:: grid_points_extra_radial
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: grid_points_extra_radial (n_points_extra_radial_grid)
+ double precision :: dr_radial_extra_integral
+
+
+ points_extra in [0,1] to map the radial integral [0,\infty]
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`n_points_extra_radial_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+
+
.. c:var:: grid_points_per_atom
@@ -466,6 +818,8 @@ Providers
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_coord`
* :c:data:`nucl_num`
+ * :c:data:`r_gill`
+ * :c:data:`rad_grid_type`
Needed by:
@@ -544,6 +898,11 @@ Providers
.. hlist::
:columns: 3
+ * :c:data:`ao_abs_int_grid`
+ * :c:data:`ao_overlap_abs_grid`
+ * :c:data:`ao_prod_abs_r`
+ * :c:data:`ao_prod_center`
+ * :c:data:`ao_prod_dist_grid`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_in_r_array`
* :c:data:`aos_lapl_in_r_array`
@@ -562,11 +921,101 @@ Providers
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
+ * :c:data:`f_psi_cas_ab`
+ * :c:data:`f_psi_hf_ab`
+ * :c:data:`final_grid_points_transp`
+ * :c:data:`mo_grad_ints`
* :c:data:`mos_in_r_array`
* :c:data:`mos_in_r_array_omp`
+ * :c:data:`mu_average_prov`
+ * :c:data:`mu_grad_rho`
+ * :c:data:`mu_of_r_dft_average`
+ * :c:data:`mu_rsc_of_r`
* :c:data:`one_e_dm_and_grad_alpha_in_r`
+.. c:var:: index_final_points_extra
+
+
+ File : :file:`becke_numerical_grid/extra_grid_vector.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_grid_points_extra (3,n_points_extra_final_grid)
+ double precision, allocatable :: final_weight_at_r_vector_extra (n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra (3,n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra_reverse (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ final_grid_points_extra(1:3,j) = (/ x, y, z /) of the jth grid point
+
+ final_weight_at_r_vector_extra(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
+
+ index_final_points_extra(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
+
+ index_final_points_extra_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`thresh_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`aos_in_r_array_extra`
+
+
+.. c:var:: index_final_points_extra_reverse
+
+
+ File : :file:`becke_numerical_grid/extra_grid_vector.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: final_grid_points_extra (3,n_points_extra_final_grid)
+ double precision, allocatable :: final_weight_at_r_vector_extra (n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra (3,n_points_extra_final_grid)
+ integer, allocatable :: index_final_points_extra_reverse (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ final_grid_points_extra(1:3,j) = (/ x, y, z /) of the jth grid point
+
+ final_weight_at_r_vector_extra(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
+
+ index_final_points_extra(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
+
+ index_final_points_extra_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`thresh_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`aos_in_r_array_extra`
+
+
.. c:var:: index_final_points_per_atom
@@ -593,12 +1042,6 @@ Providers
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
- Needed by:
-
- .. hlist::
- :columns: 3
-
- * :c:data:`aos_in_r_array_per_atom`
.. c:var:: index_final_points_per_atom_reverse
@@ -627,12 +1070,6 @@ Providers
* :c:data:`nucl_num`
* :c:data:`thresh_grid`
- Needed by:
-
- .. hlist::
- :columns: 3
-
- * :c:data:`aos_in_r_array_per_atom`
.. c:var:: index_final_points_reverse
@@ -673,6 +1110,11 @@ Providers
.. hlist::
:columns: 3
+ * :c:data:`ao_abs_int_grid`
+ * :c:data:`ao_overlap_abs_grid`
+ * :c:data:`ao_prod_abs_r`
+ * :c:data:`ao_prod_center`
+ * :c:data:`ao_prod_dist_grid`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_in_r_array`
* :c:data:`aos_lapl_in_r_array`
@@ -691,8 +1133,16 @@ Providers
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
+ * :c:data:`f_psi_cas_ab`
+ * :c:data:`f_psi_hf_ab`
+ * :c:data:`final_grid_points_transp`
+ * :c:data:`mo_grad_ints`
* :c:data:`mos_in_r_array`
* :c:data:`mos_in_r_array_omp`
+ * :c:data:`mu_average_prov`
+ * :c:data:`mu_grad_rho`
+ * :c:data:`mu_of_r_dft_average`
+ * :c:data:`mu_rsc_of_r`
* :c:data:`one_e_dm_and_grad_alpha_in_r`
@@ -714,9 +1164,148 @@ Providers
:columns: 3
* :c:data:`final_weight_at_r`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
* :c:data:`grid_points_per_atom`
+.. c:var:: n_points_extra_final_grid
+
+
+ File : :file:`becke_numerical_grid/extra_grid_vector.irp.f`
+
+ .. code:: fortran
+
+ integer :: n_points_extra_final_grid
+
+
+ Number of points_extra which are non zero
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_num`
+ * :c:data:`thresh_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`aos_in_r_array_extra`
+ * :c:data:`aos_in_r_array_extra_transp`
+ * :c:data:`final_grid_points_extra`
+
+
+.. c:var:: n_points_extra_grid_per_atom
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ integer :: n_points_extra_grid_per_atom
+
+
+ Number of grid points_extra per atom
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`n_points_extra_radial_grid`
+
+
+
+.. c:var:: n_points_extra_integration_angular
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ integer :: n_points_extra_radial_grid
+ integer :: n_points_extra_integration_angular
+
+
+ n_points_extra_radial_grid = number of radial grid points_extra per atom
+
+ n_points_extra_integration_angular = number of angular grid points_extra per atom
+
+ These numbers are automatically set by setting the grid_type_sgn parameter
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`extra_grid_type_sgn`
+ * :c:data:`my_extra_grid_becke`
+ * :c:data:`my_n_pt_a_extra_grid`
+ * :c:data:`my_n_pt_r_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`angular_quadrature_points_extra`
+ * :c:data:`final_grid_points_extra`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`grid_points_extra_radial`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_grid_per_atom`
+ * :c:data:`weight_at_r_extra`
+
+
+.. c:var:: n_points_extra_radial_grid
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ integer :: n_points_extra_radial_grid
+ integer :: n_points_extra_integration_angular
+
+
+ n_points_extra_radial_grid = number of radial grid points_extra per atom
+
+ n_points_extra_integration_angular = number of angular grid points_extra per atom
+
+ These numbers are automatically set by setting the grid_type_sgn parameter
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`extra_grid_type_sgn`
+ * :c:data:`my_extra_grid_becke`
+ * :c:data:`my_n_pt_a_extra_grid`
+ * :c:data:`my_n_pt_r_extra_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`angular_quadrature_points_extra`
+ * :c:data:`final_grid_points_extra`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`grid_points_extra_radial`
+ * :c:data:`n_points_extra_final_grid`
+ * :c:data:`n_points_extra_grid_per_atom`
+ * :c:data:`weight_at_r_extra`
+
+
.. c:var:: n_points_final_grid
@@ -744,9 +1333,17 @@ Providers
.. hlist::
:columns: 3
+ * :c:data:`act_mos_in_r_array`
* :c:data:`alpha_dens_kin_in_r`
+ * :c:data:`ao_abs_int_grid`
+ * :c:data:`ao_overlap_abs_grid`
+ * :c:data:`ao_prod_abs_r`
+ * :c:data:`ao_prod_center`
+ * :c:data:`ao_prod_dist_grid`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_grad_in_r_array_transp`
+ * :c:data:`aos_grad_in_r_array_transp_3`
+ * :c:data:`aos_grad_in_r_array_transp_bis`
* :c:data:`aos_in_r_array`
* :c:data:`aos_in_r_array_transp`
* :c:data:`aos_lapl_in_r_array`
@@ -759,6 +1356,14 @@ Providers
* :c:data:`aos_vxc_alpha_lda_w`
* :c:data:`aos_vxc_alpha_pbe_w`
* :c:data:`aos_vxc_alpha_sr_pbe_w`
+ * :c:data:`basis_mos_in_r_array`
+ * :c:data:`core_density`
+ * :c:data:`core_inact_act_mos_grad_in_r_array`
+ * :c:data:`core_inact_act_mos_in_r_array`
+ * :c:data:`core_inact_act_v_kl_contracted`
+ * :c:data:`core_mos_in_r_array`
+ * :c:data:`effective_alpha_dm`
+ * :c:data:`effective_spin_dm`
* :c:data:`elec_beta_num_grid_becke`
* :c:data:`energy_c_lda`
* :c:data:`energy_c_sr_lda`
@@ -766,14 +1371,39 @@ Providers
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
+ * :c:data:`f_psi_cas_ab`
+ * :c:data:`f_psi_cas_ab_old`
+ * :c:data:`f_psi_hf_ab`
* :c:data:`final_grid_points`
+ * :c:data:`final_grid_points_transp`
+ * :c:data:`full_occ_2_rdm_cntrctd`
+ * :c:data:`full_occ_2_rdm_cntrctd_trans`
+ * :c:data:`full_occ_v_kl_cntrctd`
+ * :c:data:`grad_total_cas_on_top_density`
+ * :c:data:`inact_density`
+ * :c:data:`inact_mos_in_r_array`
* :c:data:`kinetic_density_generalized`
+ * :c:data:`mo_grad_ints`
* :c:data:`mos_grad_in_r_array`
* :c:data:`mos_grad_in_r_array_tranp`
+ * :c:data:`mos_grad_in_r_array_transp_3`
+ * :c:data:`mos_grad_in_r_array_transp_bis`
* :c:data:`mos_in_r_array`
* :c:data:`mos_in_r_array_omp`
* :c:data:`mos_in_r_array_transp`
* :c:data:`mos_lapl_in_r_array`
+ * :c:data:`mos_lapl_in_r_array_tranp`
+ * :c:data:`mu_average_prov`
+ * :c:data:`mu_grad_rho`
+ * :c:data:`mu_of_r_dft`
+ * :c:data:`mu_of_r_dft_average`
+ * :c:data:`mu_of_r_hf`
+ * :c:data:`mu_of_r_prov`
+ * :c:data:`mu_of_r_psi_cas`
+ * :c:data:`mu_rsc_of_r`
+ * :c:data:`one_e_act_density_alpha`
+ * :c:data:`one_e_act_density_beta`
+ * :c:data:`one_e_cas_total_density`
* :c:data:`one_e_dm_and_grad_alpha_in_r`
* :c:data:`pot_grad_x_alpha_ao_pbe`
* :c:data:`pot_grad_x_alpha_ao_sr_pbe`
@@ -789,6 +1419,8 @@ Providers
* :c:data:`potential_x_alpha_ao_sr_lda`
* :c:data:`potential_xc_alpha_ao_lda`
* :c:data:`potential_xc_alpha_ao_sr_lda`
+ * :c:data:`total_cas_on_top_density`
+ * :c:data:`virt_mos_in_r_array`
.. c:var:: n_points_grid_per_atom
@@ -928,7 +1560,6 @@ Providers
.. hlist::
:columns: 3
- * :c:data:`aos_in_r_array_per_atom`
* :c:data:`final_grid_points_per_atom`
@@ -960,10 +1591,31 @@ Providers
.. hlist::
:columns: 3
- * :c:data:`aos_in_r_array_per_atom`
* :c:data:`final_grid_points_per_atom`
+.. c:var:: r_gill
+
+
+ File : :file:`becke_numerical_grid/grid_becke.irp.f`
+
+ .. code:: fortran
+
+ double precision :: r_gill
+
+
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r`
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`grid_points_per_atom`
+
+
.. c:var:: weight_at_r
@@ -1001,6 +1653,43 @@ Providers
* :c:data:`final_weight_at_r`
+.. c:var:: weight_at_r_extra
+
+
+ File : :file:`becke_numerical_grid/extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: weight_at_r_extra (n_points_extra_integration_angular,n_points_extra_radial_grid,nucl_num)
+
+
+ Weight function at grid points_extra : w_n(r) according to the equation (22)
+ of Becke original paper (JCP, 88, 1988)
+
+ The "n" discrete variable represents the nucleis which in this array is
+ represented by the last dimension and the points_extra are labelled by the
+ other dimensions.
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`grid_points_extra_per_atom`
+ * :c:data:`n_points_extra_radial_grid`
+ * :c:data:`nucl_coord_transp`
+ * :c:data:`nucl_dist_inv`
+ * :c:data:`nucl_num`
+ * :c:data:`slater_bragg_type_inter_distance_ua`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+
+
.. c:var:: weights_angular_points
@@ -1032,6 +1721,37 @@ Providers
* :c:data:`grid_points_per_atom`
+.. c:var:: weights_angular_points_extra
+
+
+ File : :file:`becke_numerical_grid/angular_extra_grid.irp.f`
+
+ .. code:: fortran
+
+ double precision, allocatable :: angular_quadrature_points_extra (n_points_extra_integration_angular,3)
+ double precision, allocatable :: weights_angular_points_extra (n_points_extra_integration_angular)
+
+
+ weights and grid points_extra for the integration on the angular variables on
+ the unit sphere centered on (0,0,0)
+ According to the LEBEDEV scheme
+
+ Needs:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`n_points_extra_radial_grid`
+
+ Needed by:
+
+ .. hlist::
+ :columns: 3
+
+ * :c:data:`final_weight_at_r_extra`
+ * :c:data:`grid_points_extra_per_atom`
+
+
Subroutines / functions
-----------------------
@@ -1043,7 +1763,7 @@ Subroutines / functions
.. code:: fortran
- double precision function cell_function_becke(r,atom_number)
+ double precision function cell_function_becke(r, atom_number)
atom_number :: atom on which the cell function of Becke (1988, JCP,88(4))
@@ -1067,7 +1787,7 @@ Subroutines / functions
.. code:: fortran
- double precision function derivative_knowles_function(alpha,m,x)
+ double precision function derivative_knowles_function(alpha, m, x)
Derivative of the function proposed by Knowles (JCP, 104, 1996) for distributing the radial points
@@ -1118,7 +1838,7 @@ Subroutines / functions
.. code:: fortran
- double precision function knowles_function(alpha,m,x)
+ double precision function knowles_function(alpha, m, x)
Function proposed by Knowles (JCP, 104, 1996) for distributing the radial points :
diff --git a/docs/source/modules/cipsi.rst b/docs/source/modules/cipsi.rst
index 501a91dd..77212469 100644
--- a/docs/source/modules/cipsi.rst
+++ b/docs/source/modules/cipsi.rst
@@ -21,7 +21,7 @@ The :c:func:`run_cipsi` subroutine iteratively:
* 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`
+* Computes the |PT2| contribution to the energy stochastically :cite:`Garniron_2017b`
or deterministically, depending on :option:`perturbation do_pt2`
* Extrapolates the variational energy by fitting
:math:`E=E_\text{FCI} - \alpha\, E_\text{PT2}`
diff --git a/docs/source/references.bib b/docs/source/references.bib
new file mode 100644
index 00000000..6580eefa
--- /dev/null
+++ b/docs/source/references.bib
@@ -0,0 +1,847 @@
+
+@article{Ammar_2023,
+ author = {Ammar, Abdallah and Scemama, Anthony and Giner, Emmanuel},
+ title = {{Transcorrelated selected configuration interaction in a bi-orthonormal basis and with a cheap three-body correlation factor}},
+ journal = {J. Chem. Phys.},
+ volume = {159},
+ number = {11},
+ year = {2023},
+ month = sep,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0163831}
+}
+
+@article{Ammar_2023.2,
+ author = {Ammar, Abdallah and Scemama, Anthony and Giner, Emmanuel},
+ title = {{Biorthonormal Orbital Optimization with a Cheap Core-Electron-Free Three-Body Correlation Factor for Quantum Monte Carlo and Transcorrelation}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {19},
+ number = {15},
+ pages = {4883--4896},
+ year = {2023},
+ month = aug,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.3c00257}
+}
+
+@article{Damour_2023,
+ author = {Damour, Yann and Quintero-Monsebaiz, Ra{\'{u}}l and Caffarel, Michel and Jacquemin, Denis and Kossoski, F{\'{a}}bris and Scemama, Anthony and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Ground- and Excited-State Dipole Moments and Oscillator Strengths of Full Configuration Interaction Quality}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {19},
+ number = {1},
+ pages = {221--234},
+ year = {2023},
+ month = jan,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.2c01111}
+}
+
+@article{Ammar_2022,
+ author = {Ammar, Abdallah and Scemama, Anthony and Giner, Emmanuel},
+ title = {{Extension of selected configuration interaction for transcorrelated methods}},
+ journal = {J. Chem. Phys.},
+ volume = {157},
+ number = {13},
+ year = {2022},
+ month = oct,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0115524}
+}
+
+@article{Ammar_2022.2,
+ author = {Ammar, Abdallah and Giner, Emmanuel and Scemama, Anthony},
+ title = {{Optimization of Large Determinant Expansions in Quantum Monte Carlo}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {18},
+ number = {9},
+ pages = {5325--5336},
+ year = {2022},
+ month = sep,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.2c00556}
+}
+
+@article{Monino_2022,
+ author = {Monino, Enzo and Boggio-Pasqua, Martial and Scemama, Anthony and Jacquemin, Denis and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Reference Energies for Cyclobutadiene: Automerization and Excited States}},
+ journal = {J. Phys. Chem. A},
+ volume = {126},
+ number = {28},
+ pages = {4664--4679},
+ year = {2022},
+ month = jul,
+ issn = {1089-5639},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jpca.2c02480}
+}
+
+@article{Cuzzocrea_2022,
+ author = {Cuzzocrea, Alice and Moroni, Saverio and Scemama, Anthony and Filippi, Claudia},
+ title = {{Reference Excitation Energies of Increasingly Large Molecules: A QMC Study of Cyanine Dyes}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {18},
+ number = {2},
+ pages = {1089--1095},
+ year = {2022},
+ month = feb,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.1c01162}
+}
+
+@article{Damour_2021,
+ author = {Damour, Yann and V{\'{e}}ril, Micka{\"{e}}l and Kossoski, F{\'{a}}bris and Caffarel, Michel and Jacquemin, Denis and Scemama, Anthony and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Accurate full configuration interaction correlation energy estimates for five- and six-membered rings}},
+ journal = {J. Chem. Phys.},
+ volume = {155},
+ number = {13},
+ year = {2021},
+ month = oct,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0065314}
+}
+
+@article{Veril_2021,
+ author = {V{\'{e}}ril, Micka{\"{e}}l and Scemama, Anthony and Caffarel, Michel and Lipparini, Filippo and Boggio-Pasqua, Martial and Jacquemin, Denis and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{QUESTDB: A database of highly accurate excitation energies for the electronic structure community}},
+ journal = {WIREs Comput. Mol. Sci.},
+ volume = {11},
+ number = {5},
+ pages = {e1517},
+ year = {2021},
+ month = sep,
+ issn = {1759-0876},
+ publisher = {John Wiley {\&} Sons, Ltd},
+ doi = {10.1002/wcms.1517}
+}
+
+@article{Kossoski_2021,
+ author = {Kossoski, F{\'{a}}bris and Marie, Antoine and Scemama, Anthony and Caffarel, Michel and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Excited States from State-Specific Orbital-Optimized Pair Coupled Cluster}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {17},
+ number = {8},
+ pages = {4756--4768},
+ year = {2021},
+ month = aug,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.1c00348}
+}
+
+@article{Dash_2021,
+ author = {Dash, Monika and Moroni, Saverio and Filippi, Claudia and Scemama, Anthony},
+ title = {{Tailoring CIPSI Expansions for QMC Calculations of Electronic Excitations: The Case Study of Thiophene}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {17},
+ number = {6},
+ pages = {3426--3434},
+ year = {2021},
+ month = jun,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.1c00212}
+}
+
+@article{Loos_2020,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Lipparini, Filippo and Boggio-Pasqua, Martial and Scemama, Anthony and Jacquemin, Denis},
+ title = {{A Mountaineering Strategy to Excited States: Highly Accurate Energies and Benchmarks for Medium Sized Molecules}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {16},
+ number = {3},
+ pages = {1711--1741},
+ year = {2020},
+ month = mar,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.9b01216}
+}
+
+@article{Loos_2020.2,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Pradines, Barth{\'{e}}l{\'{e}}my and Scemama, Anthony and Giner, Emmanuel and Toulouse, Julien},
+ title = {{Density-Based Basis-Set Incompleteness Correction for GW Methods}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {16},
+ number = {2},
+ pages = {1018--1028},
+ year = {2020},
+ month = feb,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.9b01067}
+}
+
+@article{Loos_2020.3,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Scemama, Anthony and Jacquemin, Denis},
+ title = {{The Quest for Highly Accurate Excitation Energies: A Computational Perspective}},
+ journal = {J. Phys. Chem. Lett.},
+ volume = {11},
+ number = {6},
+ pages = {2374--2383},
+ year = {2020},
+ month = mar,
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jpclett.0c00014}
+}
+
+@article{Giner_2020,
+ author = {Giner, Emmanuel and Scemama, Anthony and Loos, Pierre-Fran{\c{c}}ois and Toulouse, Julien},
+ title = {{A basis-set error correction based on density-functional theory for strongly correlated molecular systems}},
+ journal = {J. Chem. Phys.},
+ volume = {152},
+ number = {17},
+ year = {2020},
+ month = may,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0002892}
+}
+
+@article{Loos_2020.4,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Scemama, Anthony and Boggio-Pasqua, Martial and Jacquemin, Denis},
+ title = {{Mountaineering Strategy to Excited States: Highly Accurate Energies and Benchmarks for Exotic Molecules and Radicals}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {16},
+ number = {6},
+ pages = {3720--3736},
+ year = {2020},
+ month = jun,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.0c00227}
+}
+
+@article{Benali_2020,
+ author = {Benali, Anouar and Gasperich, Kevin and Jordan, Kenneth D. and Applencourt, Thomas and Luo, Ye and Bennett, M. Chandler and Krogel, Jaron T. and Shulenburger, Luke and Kent, Paul R. C. and Loos, Pierre-Fran{\c{c}}ois and Scemama, Anthony and Caffarel, Michel},
+ title = {{Toward a systematic improvement of the fixed-node approximation in diffusion Monte Carlo for solids{\textemdash}A case study in diamond}},
+ journal = {J. Chem. Phys.},
+ volume = {153},
+ number = {18},
+ year = {2020},
+ month = nov,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0021036}
+}
+
+@article{Scemama_2020,
+ author = {Scemama, Anthony and Giner, Emmanuel and Benali, Anouar and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Taming the fixed-node error in diffusion Monte Carlo via range separation}},
+ journal = {J. Chem. Phys.},
+ volume = {153},
+ number = {17},
+ year = {2020},
+ month = nov,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0026324}
+}
+
+@article{Loos_2020.5,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Damour, Yann and Scemama, Anthony},
+ title = {{The performance of CIPSI on the ground state electronic energy of benzene}},
+ journal = {J. Chem. Phys.},
+ volume = {153},
+ number = {17},
+ year = {2020},
+ month = nov,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/5.0027617}
+}
+
+@article{Loos_2019,
+ author = {Loos, Pierre-Fran{\c{c}}ois and Pradines, Barth{\'{e}}l{\'{e}}my and Scemama, Anthony and Toulouse, Julien and Giner, Emmanuel},
+ title = {{A Density-Based Basis-Set Correction for Wave Function Theory}},
+ journal = {J. Phys. Chem. Lett.},
+ volume = {10},
+ number = {11},
+ pages = {2931--2937},
+ year = {2019},
+ month = jun,
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jpclett.9b01176}
+}
+
+@article{Dash_2019,
+ author = {Dash, Monika and Feldt, Jonas and Moroni, Saverio and Scemama, Anthony and Filippi, Claudia},
+ title = {{Excited States with Selected Configuration Interaction-Quantum Monte Carlo: Chemically Accurate Excitation Energies and Geometries}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {15},
+ number = {9},
+ pages = {4896--4906},
+ year = {2019},
+ month = sep,
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.9b00476}
+}
+
+@article{Burton2019May,
+ author = {Burton, Hugh G. A. and Thom, Alex J. W.},
+ title = {{A General Approach for Multireference Ground and Excited States using Non-Orthogonal Configuration Interaction}},
+ journal = {arXiv},
+ year = {2019},
+ month = {May},
+ eprint = {1905.02626},
+ url = {https://arxiv.org/abs/1905.02626}
+}
+
+
+@article{Giner_2019,
+ author = {Giner, Emmanuel and Scemama, Anthony and Toulouse, Julien and Loos, Pierre-Fran{\c{c}}ois},
+ title = {{Chemically accurate excitation energies with small basis sets}},
+ journal = {J. Chem. Phys.},
+ volume = {151},
+ number = {14},
+ year = {2019},
+ month = oct,
+ issn = {0021-9606},
+ publisher = {AIP Publishing},
+ doi = {10.1063/1.5122976}
+}
+
+
+
+@article{Garniron_2019,
+ doi = {10.1021/acs.jctc.9b00176},
+ url = {https://doi.org/10.1021%2Facs.jctc.9b00176},
+ year = 2019,
+ month = {may},
+ publisher = {American Chemical Society ({ACS})},
+ author = {Yann Garniron and Thomas Applencourt and Kevin Gasperich and Anouar Benali and Anthony Ferte and Julien Paquier and Bartélémy Pradines and Roland Assaraf and Peter Reinhardt and Julien Toulouse and Pierrette Barbaresco and Nicolas Renon and Gregoire David and Jean-Paul Malrieu and Mickael Veril and Michel Caffarel and Pierre-Francois Loos and Emmanuel Giner and Anthony Scemama},
+ title = {Quantum Package 2.0: An Open-Source Determinant-Driven Suite of Programs},
+ journal = {Journal of Chemical Theory and Computation}
+}
+
+@article{Scemama_2019,
+ doi = {10.1016/j.rechem.2019.100002},
+ url = {https://doi.org/10.1016%2Fj.rechem.2019.100002},
+ year = 2019,
+ month = {may},
+ publisher = {Elsevier {BV}},
+ pages = {100002},
+ author = {Anthony Scemama and Michel Caffarel and Anouar Benali and Denis Jacquemin and Pierre-Fran{\c{c}}ois Loos},
+ title = {Influence of pseudopotentials on excitation energies from selected configuration interaction and diffusion Monte Carlo},
+ journal = {Results in Chemistry}
+}
+
+
+@article{Applencourt2018Dec,
+ author = {Applencourt, Thomas and Gasperich, Kevin and Scemama, Anthony},
+ title = {{Spin adaptation with determinant-based selected configuration interaction}},
+ journal = {arXiv},
+ year = {2018},
+ month = {Dec},
+ eprint = {1812.06902},
+ url = {https://arxiv.org/abs/1812.06902}
+}
+
+@article{Loos2019Mar,
+ author = {Loos, Pierre-Fran\c{c}ois and Boggio-Pasqua, Martial and Scemama, Anthony and Caffarel, Michel and Jacquemin, Denis},
+ title = {{Reference Energies for Double Excitations}},
+ journal = {J. Chem. Theory Comput.},
+ volume = {15},
+ number = {3},
+ pages = {1939--1956},
+ year = {2019},
+ month = {Mar},
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.8b01205}
+}
+
+@article{PinedaFlores2019Feb,
+ author = {Pineda Flores, Sergio and Neuscamman, Eric},
+ title = {{Excited State Specific Multi-Slater Jastrow Wave Functions}},
+ journal = {J. Phys. Chem. A},
+ volume = {123},
+ number = {8},
+ pages = {1487--1497},
+ year = {2019},
+ month = {Feb},
+ issn = {1089-5639},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jpca.8b10671}
+}
+
+@phdthesis{yann_garniron_2019_2558127,
+ author = {Yann Garniron},
+ title = {{Development and parallel implementation of
+ selected configuration interaction methods}},
+ school = {Université de Toulouse},
+ year = 2019,
+ month = feb,
+ doi = {10.5281/zenodo.2558127},
+ url = {https://doi.org/10.5281/zenodo.2558127}
+}
+
+@article{Giner_2018,
+ doi = {10.1063/1.5052714},
+ url = {https://doi.org/10.1063%2F1.5052714},
+ year = 2018,
+ month = {nov},
+ publisher = {{AIP} Publishing},
+ volume = {149},
+ number = {19},
+ pages = {194301},
+ author = {Emmanuel Giner and Barth{\'{e}}lemy Pradines and Anthony Fert{\'{e}} and Roland Assaraf and Andreas Savin and Julien Toulouse},
+ title = {Curing basis-set convergence of wave-function theory using density-functional theory: A systematically improvable approach},
+ journal = {The Journal of Chemical Physics}
+}
+
+
+@article{Giner2018Oct,
+ author = {Giner, Emmanuel and Tew, David and Garniron, Yann and Alavi, Ali},
+ title = {{Interplay between electronic correlation and metal-ligand delocalization in the spectroscopy of transition metal compounds: case study on a series of planar Cu2+complexes.}},
+ journal = {J. Chem. Theory Comput.},
+ year = {2018},
+ month = {Oct},
+ issn = {1549-9618},
+ publisher = {American Chemical Society},
+ doi = {10.1021/acs.jctc.8b00591}
+}
+
+@article{Loos_2018,
+ doi = {10.1021/acs.jctc.8b00406},
+ url = {https://doi.org/10.1021%2Facs.jctc.8b00406},
+ year = 2018,
+ month = {jul},
+ publisher = {American Chemical Society ({ACS})},
+ volume = {14},
+ number = {8},
+ pages = {4360--4379},
+ author = {Pierre-Fran{\c{c}}ois Loos and Anthony Scemama and Aymeric Blondel and Yann Garniron and Michel Caffarel and Denis Jacquemin},
+ title = {A Mountaineering Strategy to Excited States: Highly Accurate Reference Energies and Benchmarks},
+ journal = {Journal of Chemical Theory and Computation}
+}
+@article{Scemama_2018,
+ doi = {10.1021/acs.jctc.7b01250},
+ url = {https://doi.org/10.1021%2Facs.jctc.7b01250},
+ year = 2018,
+ month = {jan},
+ publisher = {American Chemical Society ({ACS})},
+ volume = {14},
+ number = {3},
+ pages = {1395--1402},
+ author = {Anthony Scemama and Yann Garniron and Michel Caffarel and Pierre-Fran{\c{c}}ois Loos},
+ title = {Deterministic Construction of Nodal Surfaces within Quantum Monte Carlo: The Case of {FeS}},
+ journal = {Journal of Chemical Theory and Computation}
+}
+@article{Scemama_2018.2,
+ doi = {10.1063/1.5041327},
+ url = {https://doi.org/10.1063%2F1.5041327},
+ year = 2018,
+ month = {jul},
+ publisher = {{AIP} Publishing},
+ volume = {149},
+ number = {3},
+ pages = {034108},
+ author = {Anthony Scemama and Anouar Benali and Denis Jacquemin and Michel Caffarel and Pierre-Fran{\c{c}}ois Loos},
+ title = {Excitation energies from diffusion Monte Carlo using selected configuration interaction nodes},
+ journal = {The Journal of Chemical Physics}
+}
+@article{Dash_2018,
+ doi = {10.1021/acs.jctc.8b00393},
+ url = {https://doi.org/10.1021%2Facs.jctc.8b00393},
+ year = 2018,
+ month = {jun},
+ publisher = {American Chemical Society ({ACS})},
+ volume = {14},
+ number = {8},
+ pages = {4176--4182},
+ author = {Monika Dash and Saverio Moroni and Anthony Scemama and Claudia Filippi},
+ title = {Perturbatively Selected Configuration-Interaction Wave Functions for Efficient Geometry Optimization in Quantum Monte Carlo},
+ journal = {Journal of Chemical Theory and Computation}
+}
+@article{Garniron_2018,
+ doi = {10.1063/1.5044503},
+ url = {https://doi.org/10.1063%2F1.5044503},
+ year = 2018,
+ month = {aug},
+ publisher = {{AIP} Publishing},
+ volume = {149},
+ number = {6},
+ pages = {064103},
+ author = {Yann Garniron and Anthony Scemama and Emmanuel Giner and Michel Caffarel and Pierre-Fran{\c{c}}ois Loos},
+ title = {Selected configuration interaction dressed by perturbation},
+ journal = {The Journal of Chemical Physics}
+}
+@article{Giner_2017,
+ doi = {10.1063/1.4984616},
+ url = {https://doi.org/10.1063%2F1.4984616},
+ year = 2017,
+ month = {jun},
+ publisher = {{AIP} Publishing},
+ volume = {146},
+ number = {22},
+ pages = {224108},
+ author = {Emmanuel Giner and Celestino Angeli and Yann Garniron and Anthony Scemama and Jean-Paul Malrieu},
+ title = {A Jeziorski-Monkhorst fully uncontracted multi-reference perturbative treatment. I. Principles, second-order versions, and tests on ground state potential energy curves},
+ journal = {The Journal of Chemical Physics}
+}
+@article{Garniron_2017,
+ doi = {10.1063/1.4980034},
+ url = {https://doi.org/10.1063%2F1.4980034},
+ year = 2017,
+ month = {apr},
+ publisher = {{AIP} Publishing},
+ volume = {146},
+ number = {15},
+ pages = {154107},
+ author = {Yann Garniron and Emmanuel Giner and Jean-Paul Malrieu and Anthony Scemama},
+ title = {Alternative definition of excitation amplitudes in multi-reference state-specific coupled cluster},
+ journal = {The Journal of Chemical Physics}
+}
+@article{Garniron_2017.2,
+ 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}
+}
+@article{Giner_2017.2,
+ doi = {10.1016/j.comptc.2017.03.001},
+ url = {https://doi.org/10.1016%2Fj.comptc.2017.03.001},
+ year = 2017,
+ month = {sep},
+ publisher = {Elsevier {BV}},
+ volume = {1116},
+ pages = {134--140},
+ author = {E. Giner and C. Angeli and A. Scemama and J.-P. Malrieu},
+ title = {Orthogonal Valence Bond Hamiltonians incorporating dynamical correlation effects},
+ journal = {Computational and Theoretical Chemistry}
+}
+
+@article{Giner_2017.3,
+ author = {Giner, Emmanuel and Tenti, Lorenzo and Angeli, Celestino and Ferré, Nicolas},
+ title = {Computation of the Isotropic Hyperfine Coupling Constant: Efficiency and Insights from a New Approach Based on Wave Function Theory},
+ journal = {Journal of Chemical Theory and Computation},
+ volume = {13},
+ number = {2},
+ pages = {475-487},
+ year = {2017},
+ doi = {10.1021/acs.jctc.6b00827},
+ note ={PMID: 28094936},
+ URL = {https://doi.org/10.1021/acs.jctc.6b00827},
+ eprint = {https://doi.org/10.1021/acs.jctc.6b00827}
+}
+
+@article{Giner2016Mar,
+ author = {Giner, Emmanuel and Angeli, Celestino},
+ title = {{Spin density and orbital optimization in open shell systems: A rational and computationally efficient proposal}},
+ journal = {J. Chem. Phys.},
+ volume = {144},
+ number = {10},
+ pages = {104104},
+ year = {2016},
+ month = {Mar},
+ issn = {0021-9606},
+ publisher = {American Institute of Physics},
+ doi = {10.1063/1.4943187}
+}
+@article{Giner_2016,
+ doi = {10.1063/1.4940781},
+ url = {https://doi.org/10.1063%2F1.4940781},
+ year = 2016,
+ month = {feb},
+ publisher = {{AIP} Publishing},
+ volume = {144},
+ number = {6},
+ pages = {064101},
+ author = {E. Giner and G. David and A. Scemama and J. P. Malrieu},
+ title = {A simple approach to the state-specific {MR}-{CC} using the intermediate Hamiltonian formalism},
+ journal = {The Journal of Chemical Physics}
+}
+
+@article{Caffarel_2016,
+ doi = {10.1063/1.4947093},
+ url = {https://doi.org/10.1063%2F1.4947093},
+ year = 2016,
+ month = {apr},
+ publisher = {{AIP} Publishing},
+ volume = {144},
+ number = {15},
+ pages = {151103},
+ author = {Michel Caffarel and Thomas Applencourt and Emmanuel Giner and Anthony Scemama},
+ title = {Communication: Toward an improved control of the fixed-node error in quantum Monte Carlo: The case of the water molecule},
+ journal = {The Journal of Chemical Physics}
+}
+@incollection{Caffarel_2016.2,
+ doi = {10.1021/bk-2016-1234.ch002},
+ url = {https://doi.org/10.1021%2Fbk-2016-1234.ch002},
+ year = 2016,
+ month = {jan},
+ publisher = {American Chemical Society},
+ pages = {15--46},
+ author = {Michel Caffarel and Thomas Applencourt and Emmanuel Giner and Anthony Scemama},
+ title = {Using CIPSI Nodes in Diffusion Monte Carlo},
+ booktitle = {{ACS} Symposium Series}
+}
+@article{Giner_2015,
+ doi = {10.1063/1.4905528},
+ url = {https://doi.org/10.1063%2F1.4905528},
+ year = 2015,
+ month = {jan},
+ publisher = {{AIP} Publishing},
+ volume = {142},
+ number = {4},
+ pages = {044115},
+ author = {Emmanuel Giner and Anthony Scemama and Michel Caffarel},
+ title = {Fixed-node diffusion Monte Carlo potential energy curve of the fluorine molecule F2 using selected configuration interaction trial wavefunctions},
+ journal = {The Journal of Chemical Physics}
+}
+
+@article{Giner2015Sep,
+ author = {Giner, Emmanuel and Angeli, Celestino},
+ title = {{Metal-ligand delocalization and spin density in the CuCl2 and [CuCl4]2{-} molecules: Some insights from wave function theory}},
+ journal = {J. Chem. Phys.},
+ volume = {143},
+ number = {12},
+ pages = {124305},
+ year = {2015},
+ month = {Sep},
+ issn = {0021-9606},
+ publisher = {American Institute of Physics},
+ doi = {10.1063/1.4931639}
+}
+
+@article{Scemama_2014,
+ doi = {10.1063/1.4903985},
+ url = {https://doi.org/10.1063%2F1.4903985},
+ year = 2014,
+ month = {dec},
+ publisher = {{AIP} Publishing},
+ volume = {141},
+ number = {24},
+ pages = {244110},
+ author = {A. Scemama and T. Applencourt and E. Giner and M. Caffarel},
+ title = {Accurate nonrelativistic ground-state energies of 3d transition metal atoms},
+ journal = {The Journal of Chemical Physics}
+}
+@article{Caffarel_2014,
+ doi = {10.1021/ct5004252},
+ url = {https://doi.org/10.1021%2Fct5004252},
+ year = 2014,
+ month = {nov},
+ publisher = {American Chemical Society ({ACS})},
+ volume = {10},
+ number = {12},
+ pages = {5286--5296},
+ author = {Michel Caffarel and Emmanuel Giner and Anthony Scemama and Alejandro Ram{\'{\i}}rez-Sol{\'{\i}}s},
+ title = {Spin Density Distribution in Open-Shell Transition Metal Systems: A Comparative Post-Hartree-Fock, Density Functional Theory, and Quantum Monte Carlo Study of the CuCl2 Molecule},
+ journal = {Journal of Chemical Theory and Computation}
+}
+@article{Giner_2013,
+ doi = {10.1139/cjc-2013-0017},
+ url = {https://doi.org/10.1139%2Fcjc-2013-0017},
+ year = 2013,
+ month = {sep},
+ publisher = {Canadian Science Publishing},
+ volume = {91},
+ number = {9},
+ pages = {879--885},
+ author = {Emmanuel Giner and Anthony Scemama and Michel Caffarel},
+ title = {Using perturbatively selected configuration interaction in quantum Monte Carlo calculations},
+ journal = {Canadian Journal of Chemistry}
+}
+
+@article{Scemama2013Nov,
+ author = {Scemama, Anthony and Giner, Emmanuel},
+ title = {{An efficient implementation of Slater-Condon rules}},
+ journal = {arXiv},
+ year = {2013},
+ month = {Nov},
+ eprint = {1311.6244},
+ url = {https://arxiv.org/abs/1311.6244}
+}
+
+
+
+@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{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}
+}
+
+
+
diff --git a/external/irpf90 b/external/irpf90
index 4ab1b175..ba1a2837 160000
--- a/external/irpf90
+++ b/external/irpf90
@@ -1 +1 @@
-Subproject commit 4ab1b175fc7ed0d96c1912f13dc53579b24157a6
+Subproject commit ba1a2837aa61cb8f9892860cec544d7c6659badd
diff --git a/plugins/local/cipsi_tc_bi_ortho/selection.irp.f b/plugins/local/cipsi_tc_bi_ortho/selection.irp.f
index d41d3cdb..e0637fa5 100644
--- a/plugins/local/cipsi_tc_bi_ortho/selection.irp.f
+++ b/plugins/local/cipsi_tc_bi_ortho/selection.irp.f
@@ -795,6 +795,11 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
call apply_particles(mask, s1, p1, s2, p2, det, ok, N_int)
+ if (do_ormas) then
+ logical, external :: det_allowed_ormas
+ if (.not.det_allowed_ormas(det)) cycle
+ endif
+
if(do_only_cas) then
if( number_of_particles(det) > 0 ) cycle
if( number_of_holes(det) > 0 ) cycle
diff --git a/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f b/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f
index 31ad5756..33563102 100644
--- a/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f
+++ b/plugins/local/non_h_ints_mu/jast_deriv_utils_vect.irp.f
@@ -4,7 +4,7 @@
subroutine get_grad1_u12_withsq_r1_seq(ipoint, n_grid2, resx, resy, resz, res)
BEGIN_DOC
- !
+ !
! grad_1 u(r1,r2)
!
! we use grid for r1 and extra_grid for r2
@@ -167,9 +167,9 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
integer :: jpoint
integer :: i_nucl, p, mpA, npA, opA
double precision :: r2(3)
- double precision :: dx, dy, dz, r12, tmp
+ double precision :: dx, dy, dz, r12, tmp, r12_inv
double precision :: mu_val, mu_tmp, mu_der(3)
- double precision :: rn(3), f1A, gard1_f1A(3), f2A, gard2_f2A(3), g12, gard1_g12(3)
+ double precision :: rn(3), f1A, grad1_f1A(3), f2A, grad2_f2A(3), g12, grad1_g12(3)
double precision :: tmp1, tmp2
@@ -181,7 +181,7 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
! d/dy1 j(mu,r12) = 0.5 * [(1 - erf(mu * r12)) / r12] * (y1 - y2)
! d/dz1 j(mu,r12) = 0.5 * [(1 - erf(mu * r12)) / r12] * (z1 - z2)
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
@@ -191,15 +191,19 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
- r12 = dsqrt(dx * dx + dy * dy + dz * dz)
- if(r12 .lt. 1d-10) then
- gradx(jpoint) = 0.d0
- grady(jpoint) = 0.d0
- gradz(jpoint) = 0.d0
+ r12 = dx * dx + dy * dy + dz * dz
+
+ if(r12 .lt. 1d-20) then
+ gradx(jpoint) = 0.d0
+ grady(jpoint) = 0.d0
+ gradz(jpoint) = 0.d0
cycle
endif
- tmp = 0.5d0 * (1.d0 - derf(mu_erf * r12)) / r12
+ r12_inv = 1.d0/dsqrt(r12)
+ r12 = r12*r12_inv
+
+ tmp = 0.5d0 * (1.d0 - derf(mu_erf * r12)) * r12_inv
gradx(jpoint) = tmp * dx
grady(jpoint) = tmp * dy
@@ -208,10 +212,10 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
elseif(j2e_type .eq. "Mur") then
- ! d/dx1 j(mu(r1,r2),r12) = exp(-(mu(r1,r2)*r12)**2) /(2 *sqrt(pi) * mu(r1,r2)**2 ) d/dx1 mu(r1,r2)
+ ! d/dx1 j(mu(r1,r2),r12) = exp(-(mu(r1,r2)*r12)**2) /(2 *sqrt(pi) * mu(r1,r2)**2 ) d/dx1 mu(r1,r2)
! + 0.5 * (1 - erf(mu(r1,r2) *r12))/r12 * (x1 - x2)
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
@@ -220,23 +224,29 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
dx = r1(1) - r2(1)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
- r12 = dsqrt(dx * dx + dy * dy + dz * dz)
- call mu_r_val_and_grad(r1, r2, mu_val, mu_der)
- mu_tmp = mu_val * r12
- tmp = inv_sq_pi_2 * dexp(-mu_tmp*mu_tmp) / (mu_val * mu_val)
- gradx(jpoint) = tmp * mu_der(1)
- grady(jpoint) = tmp * mu_der(2)
- gradz(jpoint) = tmp * mu_der(3)
+ r12 = dx * dx + dy * dy + dz * dz
- if(r12 .lt. 1d-10) then
+ if(r12 .lt. 1d-20) then
gradx(jpoint) = 0.d0
grady(jpoint) = 0.d0
gradz(jpoint) = 0.d0
cycle
endif
- tmp = 0.5d0 * (1.d0 - derf(mu_tmp)) / r12
+ r12_inv = 1.d0/dsqrt(r12)
+ r12 = r12*r12_inv
+
+ call mu_r_val_and_grad(r1, r2, mu_val, mu_der)
+
+ mu_tmp = mu_val * r12
+ tmp = inv_sq_pi_2 * dexp(-mu_tmp*mu_tmp) / (mu_val * mu_val)
+
+ gradx(jpoint) = tmp * mu_der(1)
+ grady(jpoint) = tmp * mu_der(2)
+ gradz(jpoint) = tmp * mu_der(3)
+
+ tmp = 0.5d0 * (1.d0 - derf(mu_tmp)) * r12_inv
gradx(jpoint) = gradx(jpoint) + tmp * dx
grady(jpoint) = grady(jpoint) + tmp * dy
@@ -254,7 +264,7 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
PROVIDE a_boys
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
@@ -263,14 +273,17 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
dx = r1(1) - r2(1)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
- r12 = dsqrt(dx * dx + dy * dy + dz * dz)
+ r12 = dx * dx + dy * dy + dz * dz
+
if(r12 .lt. 1d-10) then
- gradx(jpoint) = 0.d0
- grady(jpoint) = 0.d0
- gradz(jpoint) = 0.d0
+ gradx(jpoint) = 0.d0
+ grady(jpoint) = 0.d0
+ gradz(jpoint) = 0.d0
cycle
endif
+ r12 = dsqrt(r12)
+
tmp = 1.d0 + a_boys * r12
tmp = 0.5d0 / (r12 * tmp * tmp)
@@ -281,24 +294,60 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
elseif(j2e_type .eq. "Boys_Handy") then
+ integer :: powmax
+ powmax = max(maxval(jBH_m),maxval(jBH_n))
+
+ double precision, allocatable :: f1A_power(:), f2A_power(:), double_p(:), g12_power(:)
+ allocate (f1A_power(-1:powmax), f2A_power(-1:powmax), g12_power(-1:powmax), double_p(0:powmax))
+
+ do p=0,powmax
+ double_p(p) = dble(p)
+ enddo
+
+ f1A_power(-1) = 0.d0
+ f2A_power(-1) = 0.d0
+ g12_power(-1) = 0.d0
+
+ f1A_power(0) = 1.d0
+ f2A_power(0) = 1.d0
+ g12_power(0) = 1.d0
+
do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
r2(3) = final_grid_points_extra(3,jpoint)
- gradx(jpoint) = 0.d0
- grady(jpoint) = 0.d0
- gradz(jpoint) = 0.d0
- do i_nucl = 1, nucl_num
+ gradx(jpoint) = 0.d0
+ grady(jpoint) = 0.d0
+ gradz(jpoint) = 0.d0
+
+ do i_nucl = 1, nucl_num
rn(1) = nucl_coord(i_nucl,1)
rn(2) = nucl_coord(i_nucl,2)
rn(3) = nucl_coord(i_nucl,3)
- call jBH_elem_fct_grad(jBH_en(i_nucl), r1, rn, f1A, gard1_f1A)
- call jBH_elem_fct_grad(jBH_en(i_nucl), r2, rn, f2A, gard2_f2A)
- call jBH_elem_fct_grad(jBH_ee(i_nucl), r1, r2, g12, gard1_g12)
+ call jBH_elem_fct_grad(jBH_en(i_nucl), r1, rn, f1A, grad1_f1A)
+ call jBH_elem_fct_grad(jBH_en(i_nucl), r2, rn, f2A, grad2_f2A)
+ call jBH_elem_fct_grad(jBH_ee(i_nucl), r1, r2, g12, grad1_g12)
+
+
+ ! Compute powers of f1A and f2A
+
+ do p = 1, maxval(jBH_m(:,i_nucl))
+ f1A_power(p) = f1A_power(p-1) * f1A
+ enddo
+
+ do p = 1, maxval(jBH_n(:,i_nucl))
+ f2A_power(p) = f2A_power(p-1) * f2A
+ enddo
+
+ do p = 1, maxval(jBH_o(:,i_nucl))
+ g12_power(p) = g12_power(p-1) * g12
+ enddo
+
+
do p = 1, jBH_size
mpA = jBH_m(p,i_nucl)
@@ -309,23 +358,31 @@ subroutine grad1_j12_r1_seq(r1, n_grid2, gradx, grady, gradz)
tmp = tmp * 0.5d0
endif
- tmp1 = 0.d0
- if(mpA .gt. 0) then
- tmp1 = tmp1 + dble(mpA) * f1A**dble(mpA-1) * f2A**dble(npA)
- endif
- if(npA .gt. 0) then
- tmp1 = tmp1 + dble(npA) * f1A**dble(npA-1) * f2A**dble(mpA)
- endif
- tmp1 = tmp1 * g12**dble(opA)
+!TODO : Powers to optimize here
- tmp2 = 0.d0
- if(opA .gt. 0) then
- tmp2 = tmp2 + dble(opA) * g12**dble(opA-1) * (f1A**dble(mpA) * f2A**dble(npA) + f1A**dble(npA) * f2A**dble(mpA))
- endif
+! tmp1 = 0.d0
+! if(mpA .gt. 0) then
+! tmp1 = tmp1 + dble(mpA) * f1A**(mpA-1) * f2A**npA
+! endif
+! if(npA .gt. 0) then
+! tmp1 = tmp1 + dble(npA) * f1A**(npA-1) * f2A**mpA
+! endif
+! tmp1 = tmp1 * g12**(opA)
+!
+! tmp2 = 0.d0
+! if(opA .gt. 0) then
+! tmp2 = tmp2 + dble(opA) * g12**(opA-1) * (f1A**(mpA) * f2A**(npA) + f1A**(npA) * f2A**(mpA))
+! endif
- gradx(jpoint) = gradx(jpoint) + tmp * (tmp1 * gard1_f1A(1) + tmp2 * gard1_g12(1))
- grady(jpoint) = grady(jpoint) + tmp * (tmp1 * gard1_f1A(2) + tmp2 * gard1_g12(2))
- gradz(jpoint) = gradz(jpoint) + tmp * (tmp1 * gard1_f1A(3) + tmp2 * gard1_g12(3))
+ tmp1 = double_p(mpA) * f1A_power(mpA-1) * f2A_power(npA) + double_p(npA) * f1A_power(npA-1) * f2A_power(mpA)
+ tmp1 = tmp1 * g12_power(opA)
+
+ tmp2 = double_p(opA) * g12_power(opA-1) * (f1A_power(mpA) * f2A_power(npA) + f1A_power(npA) * f2A_power(mpA))
+
+
+ gradx(jpoint) = gradx(jpoint) + tmp * (tmp1 * grad1_f1A(1) + tmp2 * grad1_g12(1))
+ grady(jpoint) = grady(jpoint) + tmp * (tmp1 * grad1_f1A(2) + tmp2 * grad1_g12(2))
+ gradz(jpoint) = gradz(jpoint) + tmp * (tmp1 * grad1_f1A(3) + tmp2 * grad1_g12(3))
enddo ! p
enddo ! i_nucl
enddo ! jpoint
@@ -361,10 +418,10 @@ subroutine grad1_jmu_r1_seq(mu, r1, n_grid2, gradx, grady, gradz)
integer :: jpoint
double precision :: r2(3)
- double precision :: dx, dy, dz, r12, tmp
+ double precision :: dx, dy, dz, r12, r12_inv, tmp
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
@@ -374,15 +431,19 @@ subroutine grad1_jmu_r1_seq(mu, r1, n_grid2, gradx, grady, gradz)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
- r12 = dsqrt(dx * dx + dy * dy + dz * dz)
- if(r12 .lt. 1d-10) then
- gradx(jpoint) = 0.d0
- grady(jpoint) = 0.d0
- gradz(jpoint) = 0.d0
+ r12 = dx * dx + dy * dy + dz * dz
+
+ if(r12 .lt. 1d-20) then
+ gradx(jpoint) = 0.d0
+ grady(jpoint) = 0.d0
+ gradz(jpoint) = 0.d0
cycle
endif
- tmp = 0.5d0 * (1.d0 - derf(mu * r12)) / r12
+ r12_inv = 1.d0 / dsqrt(r12)
+ r12 = r12 * r12_inv
+
+ tmp = 0.5d0 * (1.d0 - derf(mu * r12)) * r12_inv
gradx(jpoint) = tmp * dx
grady(jpoint) = tmp * dy
@@ -406,7 +467,7 @@ subroutine j12_r1_seq(r1, n_grid2, res)
integer :: jpoint
double precision :: r2(3)
double precision :: dx, dy, dz
- double precision :: mu_tmp, r12
+ double precision :: mu_tmp, r12, mu_erf_inv
PROVIDE final_grid_points_extra
@@ -414,20 +475,21 @@ subroutine j12_r1_seq(r1, n_grid2, res)
PROVIDE mu_erf
- do jpoint = 1, n_points_extra_final_grid ! r2
-
+ mu_erf_inv = 1.d0 / mu_erf
+ do jpoint = 1, n_points_extra_final_grid ! r2
+
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
r2(3) = final_grid_points_extra(3,jpoint)
-
+
dx = r1(1) - r2(1)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
r12 = dsqrt(dx * dx + dy * dy + dz * dz)
mu_tmp = mu_erf * r12
-
- res(jpoint) = 0.5d0 * r12 * (1.d0 - derf(mu_tmp)) - inv_sq_pi_2 * dexp(-mu_tmp*mu_tmp) / mu_erf
+
+ res(jpoint) = 0.5d0 * r12 * (1.d0 - derf(mu_tmp)) - inv_sq_pi_2 * dexp(-mu_tmp*mu_tmp) * mu_erf_inv
enddo
elseif(j2e_type .eq. "Boys") then
@@ -436,7 +498,7 @@ subroutine j12_r1_seq(r1, n_grid2, res)
PROVIDE a_boys
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
@@ -478,19 +540,19 @@ subroutine jmu_r1_seq(mu, r1, n_grid2, res)
tmp1 = inv_sq_pi_2 / mu
- do jpoint = 1, n_points_extra_final_grid ! r2
-
+ do jpoint = 1, n_points_extra_final_grid ! r2
+
r2(1) = final_grid_points_extra(1,jpoint)
r2(2) = final_grid_points_extra(2,jpoint)
r2(3) = final_grid_points_extra(3,jpoint)
-
+
dx = r1(1) - r2(1)
dy = r1(2) - r2(2)
dz = r1(3) - r2(3)
r12 = dsqrt(dx * dx + dy * dy + dz * dz)
tmp2 = mu * r12
-
+
res(jpoint) = 0.5d0 * r12 * (1.d0 - derf(tmp2)) - tmp1 * dexp(-tmp2*tmp2)
enddo
@@ -517,7 +579,7 @@ subroutine env_nucl_r1_seq(n_grid2, res)
res = 1.d0
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r(1) = final_grid_points_extra(1,jpoint)
r(2) = final_grid_points_extra(2,jpoint)
r(3) = final_grid_points_extra(3,jpoint)
@@ -536,7 +598,7 @@ subroutine env_nucl_r1_seq(n_grid2, res)
res = 1.d0
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r(1) = final_grid_points_extra(1,jpoint)
r(2) = final_grid_points_extra(2,jpoint)
r(3) = final_grid_points_extra(3,jpoint)
@@ -556,7 +618,7 @@ subroutine env_nucl_r1_seq(n_grid2, res)
res = 1.d0
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r(1) = final_grid_points_extra(1,jpoint)
r(2) = final_grid_points_extra(2,jpoint)
r(3) = final_grid_points_extra(3,jpoint)
@@ -574,7 +636,7 @@ subroutine env_nucl_r1_seq(n_grid2, res)
res = 1.d0
- do jpoint = 1, n_points_extra_final_grid ! r2
+ do jpoint = 1, n_points_extra_final_grid ! r2
r(1) = final_grid_points_extra(1,jpoint)
r(2) = final_grid_points_extra(2,jpoint)
r(3) = final_grid_points_extra(3,jpoint)
@@ -604,7 +666,7 @@ end
subroutine get_grad1_u12_2e_r1_seq(ipoint, n_grid2, resx, resy, resz)
BEGIN_DOC
- !
+ !
! grad_1 u_2e(r1,r2)
!
! we use grid for r1 and extra_grid for r2
@@ -724,7 +786,7 @@ end
subroutine get_u12_2e_r1_seq(ipoint, n_grid2, res)
BEGIN_DOC
- !
+ !
! u_2e(r1,r2)
!
! we use grid for r1 and extra_grid for r2
@@ -820,11 +882,11 @@ end
! ---
-subroutine jBH_elem_fct_grad(alpha, r1, r2, fct, gard1_fct)
+subroutine jBH_elem_fct_grad(alpha, r1, r2, fct, grad1_fct)
implicit none
double precision, intent(in) :: alpha, r1(3), r2(3)
- double precision, intent(out) :: fct, gard1_fct(3)
+ double precision, intent(out) :: fct, grad1_fct(3)
double precision :: dist, tmp1, tmp2
dist = dsqrt( (r1(1) - r2(1)) * (r1(1) - r2(1)) &
@@ -836,18 +898,18 @@ subroutine jBH_elem_fct_grad(alpha, r1, r2, fct, gard1_fct)
fct = alpha * dist * tmp1
if(dist .lt. 1d-10) then
- gard1_fct(1) = 0.d0
- gard1_fct(2) = 0.d0
- gard1_fct(3) = 0.d0
+ grad1_fct(1) = 0.d0
+ grad1_fct(2) = 0.d0
+ grad1_fct(3) = 0.d0
else
tmp2 = alpha * tmp1 * tmp1 / dist
- gard1_fct(1) = tmp2 * (r1(1) - r2(1))
- gard1_fct(2) = tmp2 * (r1(2) - r2(2))
- gard1_fct(3) = tmp2 * (r1(3) - r2(3))
+ grad1_fct(1) = tmp2 * (r1(1) - r2(1))
+ grad1_fct(2) = tmp2 * (r1(2) - r2(2))
+ grad1_fct(3) = tmp2 * (r1(3) - r2(3))
endif
return
-end
+end
! ---
diff --git a/scripts/ezfio_interface/qp_edit_template b/scripts/ezfio_interface/qp_edit_template
index fe718a50..2380660e 100644
--- a/scripts/ezfio_interface/qp_edit_template
+++ b/scripts/ezfio_interface/qp_edit_template
@@ -8,14 +8,14 @@ open Sexplib.Std
(** Interactive editing of the input.
-WARNING
+WARNING
This file is automatically generated by
`${{QP_ROOT}}/scripts/ezfio_interface/ei_handler.py`
*)
(** Keywords used to define input sections *)
-type keyword =
+type keyword =
| Ao_basis
| Determinants_by_hand
| Electrons
@@ -37,7 +37,7 @@ let keyword_to_string = function
(** Create the header of the temporary file *)
-let file_header filename =
+let file_header filename =
Printf.sprintf "
==================================================================
Quantum Package
@@ -47,7 +47,7 @@ Editing file `%s`
" filename
-
+
(** Creates the header of a section *)
let make_header kw =
@@ -58,14 +58,14 @@ let make_header kw =
(** Returns the rst string of section [s] *)
-let get s =
+let get s =
let header = (make_header s) in
- let f (read,to_rst) =
+ let f (read,to_rst) =
match read () with
| Some text -> header ^ (Rst_string.to_string (to_rst text))
| None -> ""
in
- let rst =
+ let rst =
try
begin
let open Input in
@@ -84,27 +84,27 @@ let get s =
end
with
| Sys_error msg -> (Printf.eprintf "Info: %s\n%!" msg ; "")
- in
+ in
rst
(** Applies the changes from the string [str] corresponding to section [s] *)
-let set str s =
+let set str s =
let header = (make_header s) in
match String_ext.substr_index ~pos:0 ~pattern:header str with
| None -> ()
- | Some idx ->
+ | Some idx ->
begin
let index_begin = idx + (String.length header) in
- let index_end =
+ let index_end =
match ( String_ext.substr_index ~pos:(index_begin+(String.length header)+1)
~pattern:"==" str) with
| Some i -> i
| None -> String.length str
in
let l = index_end - index_begin in
- let str = String.sub str index_begin l
+ let str = String.sub str index_begin l
|> Rst_string.of_string
in
let write (of_rst,w) s =
@@ -129,29 +129,37 @@ let set str s =
(** Creates the temporary file for interactive editing *)
-let create_temp_file ezfio_filename fields =
- let temp_filename = Filename.temp_file "qp_edit_" ".rst" in
+let create_temp_file ?filename ezfio_filename fields =
+ let temp_filename =
+ match filename with
+ | None -> Filename.temp_file "qp_edit_" ".rst"
+ | Some f -> f
+ in
+ let () =
+ match filename with
+ | None -> at_exit (fun () -> Sys.remove temp_filename)
+ | _ -> ()
+ in
begin
let oc = open_out temp_filename in
- (file_header ezfio_filename) :: (List.map get fields)
- |> String.concat "\n"
+ (file_header ezfio_filename) :: (List.map get fields)
+ |> String.concat "\n"
|> Printf.fprintf oc "%s";
close_out oc;
- at_exit (fun () -> Sys.remove temp_filename);
temp_filename
end
-
-let run check_only ?ndet ?state ezfio_filename =
+
+let run check_only ?ndet ?state ?read ?write ezfio_filename =
(* Set check_only if the arguments are not empty *)
- let check_only =
- match ndet, state with
- | None, None -> check_only
- | _ -> true
+ let open_editor =
+ match ndet, state, read, write with
+ | None, None, None, None -> not check_only
+ | _ -> false
in
(* Open EZFIO *)
@@ -163,7 +171,7 @@ let run check_only ?ndet ?state ezfio_filename =
(* Clean qp_stop status *)
[ "qpstop" ; "qpkill" ]
|> List.iter (fun f ->
- let stopfile =
+ let stopfile =
Filename.concat (Qpackage.ezfio_work ezfio_filename) f
in
if Sys.file_exists stopfile then
@@ -173,7 +181,7 @@ let run check_only ?ndet ?state ezfio_filename =
(* Reorder basis set *)
begin
match Input.Ao_basis.read() with
- | Some aos ->
+ | Some aos ->
let ordering = Input.Ao_basis.ordering aos in
let test = Array.copy ordering in
Array.sort compare test ;
@@ -184,7 +192,7 @@ let run check_only ?ndet ?state ezfio_filename =
Input.Ao_basis.write new_aos;
match Input.Mo_basis.read() with
| None -> ()
- | Some mos ->
+ | Some mos ->
let new_mos = Input.Mo_basis.reorder mos ordering in
Input.Mo_basis.write new_mos
end
@@ -200,7 +208,7 @@ let run check_only ?ndet ?state ezfio_filename =
begin
match state with
| None -> ()
- | Some range ->
+ | Some range ->
begin
Input.Determinants_by_hand.extract_states range
end
@@ -210,14 +218,14 @@ let run check_only ?ndet ?state ezfio_filename =
(*
let output = (file_header ezfio_filename) :: (
List.map get [
- Ao_basis ;
- Mo_basis ;
+ Ao_basis ;
+ Mo_basis ;
])
in
String.concat output
|> print_string
*)
-
+
let tasks = [
Nuclei_by_hand ;
Ao_basis;
@@ -230,33 +238,37 @@ let run check_only ?ndet ?state ezfio_filename =
(* Create the temp file *)
let temp_filename =
- create_temp_file ezfio_filename tasks
+ match read, write with
+ | None, None -> create_temp_file ezfio_filename tasks
+ | Some filename, None -> filename
+ | None, filename -> create_temp_file ?filename ezfio_filename tasks
+ | x, y -> failwith "read and write options are incompatible"
in
- (* Open the temp file with external editor *)
- let editor =
- try Sys.getenv "EDITOR"
- with Not_found -> "vi"
- in
- match check_only with
- | true -> ()
- | false ->
- Printf.sprintf "%s %s" editor temp_filename
- |> Sys.command |> ignore
- ;
+ if open_editor then
+ begin
+ (* Open the temp file with external editor *)
+ let editor =
+ try Sys.getenv "EDITOR"
+ with Not_found -> "vi"
+ in
+ Printf.sprintf "%s %s" editor temp_filename
+ |> Sys.command |> ignore
+ end;
- (* Re-read the temp file *)
- let temp_string =
- let ic = open_in temp_filename in
- let result =
- input_lines ic
- |> String.concat "\n"
+ if write = None then
+ (* Re-read the temp file *)
+ let temp_string =
+ let ic = open_in temp_filename in
+ let result =
+ input_lines ic
+ |> String.concat "\n"
+ in
+ close_in ic;
+ result
in
- close_in ic;
- result
- in
- List.iter (fun x -> set temp_string x) tasks
+ List.iter (fun x -> set temp_string x) tasks
@@ -264,7 +276,7 @@ let run check_only ?ndet ?state ezfio_filename =
(** Remove the backup file *)
let remove_backup ezfio_filename =
- let backup_filename =
+ let backup_filename =
Printf.sprintf "%s/work/backup.tar" ezfio_filename
in
try Sys.remove backup_filename
@@ -273,7 +285,7 @@ let remove_backup ezfio_filename =
(** Create a backup file in case of an exception *)
let create_backup ezfio_filename =
remove_backup ezfio_filename;
- let backup_filename =
+ let backup_filename =
Printf.sprintf "%s/work/backup.tar" ezfio_filename
in
try
@@ -289,7 +301,7 @@ let create_backup ezfio_filename =
(** Restore the backup file when an exception occuprs *)
let restore_backup ezfio_filename =
- let filename =
+ let filename =
Printf.sprintf "%s/work/backup.tar" ezfio_filename
in
if Sys.file_exists filename then
@@ -312,6 +324,16 @@ let () =
doc="Checks the input data";
arg=Without_arg; }};
+ {{
+ short='w'; long="write"; opt=Optional;
+ doc="Writes the qp_edit file to a file\"";
+ arg=With_arg ""; }};
+
+ {{
+ short='r'; long="read"; opt=Optional;
+ doc="Reads the file and applies it to the EZFIO\"";
+ arg=With_arg ""; }};
+
{{ short='n'; long="ndet"; opt=Optional;
doc="Truncates the wavefunction to the target number of determinants";
arg=With_arg ""; }};
@@ -328,6 +350,12 @@ let () =
end;
(* Handle options *)
+ let write =
+ Command_line.get "write"
+ in
+ let read =
+ Command_line.get "read"
+ in
let ndet =
match Command_line.get "ndet" with
| None -> None
@@ -353,7 +381,7 @@ let () =
(* Run the program *)
try
if (not c) then create_backup ezfio_filename;
- run c ?ndet ?state ezfio_filename
+ run c ?ndet ?state ?read ?write ezfio_filename
with
| Failure exc
| Invalid_argument exc ->
diff --git a/src/ao_two_e_ints/cholesky.irp.f b/src/ao_two_e_ints/cholesky.irp.f
index 2977f0f4..33304026 100644
--- a/src/ao_two_e_ints/cholesky.irp.f
+++ b/src/ao_two_e_ints/cholesky.irp.f
@@ -66,7 +66,8 @@ END_PROVIDER
else
- PROVIDE nucl_coord
+ PROVIDE nucl_coord ao_two_e_integral_schwartz
+ call set_multiple_levels_omp(.False.)
if (do_direct_integrals) then
if (ao_two_e_integral(1,1,1,1) < huge(1.d0)) then
diff --git a/src/bitmask/EZFIO.cfg b/src/bitmask/EZFIO.cfg
index 9d713304..13007509 100644
--- a/src/bitmask/EZFIO.cfg
+++ b/src/bitmask/EZFIO.cfg
@@ -3,3 +3,36 @@ type: integer
doc: Number of active |MOs|
interface: ezfio
+[do_ormas]
+type: logical
+doc: if |true| restrict selection based on ORMAS rules
+interface: ezfio, provider, ocaml
+default: false
+
+[ormas_n_space]
+type: integer
+doc: Number of active spaces
+interface: ezfio, provider, ocaml
+default: 1
+
+[ormas_mstart]
+type: integer
+doc: starting orb for each ORMAS space
+size: (bitmask.ormas_n_space)
+interface: ezfio
+#default: (1)
+
+[ormas_min_e]
+type: integer
+doc: min number of electrons in each ORMAS space
+size: (bitmask.ormas_n_space)
+interface: ezfio
+#default: (0)
+
+[ormas_max_e]
+type: integer
+doc: max number of electrons in each ORMAS space
+size: (bitmask.ormas_n_space)
+interface: ezfio
+#default: (electrons.elec_num)
+
diff --git a/src/bitmask/bitmasks_ormas.irp.f b/src/bitmask/bitmasks_ormas.irp.f
new file mode 100644
index 00000000..336022e5
--- /dev/null
+++ b/src/bitmask/bitmasks_ormas.irp.f
@@ -0,0 +1,206 @@
+use bitmasks
+
+BEGIN_PROVIDER [integer, ormas_mstart, (ormas_n_space) ]
+ implicit none
+ BEGIN_DOC
+! first orbital idx in each active space
+ END_DOC
+
+ logical :: has
+ PROVIDE ezfio_filename
+ if (mpi_master) then
+
+ call ezfio_has_bitmask_ormas_mstart(has)
+ if (has) then
+! write(6,'(A)') '.. >>>>> [ IO READ: ormas_mstart ] <<<<< ..'
+ call ezfio_get_bitmask_ormas_mstart(ormas_mstart)
+ ASSERT (ormas_mstart(1).eq.1)
+ else if (ormas_n_space.eq.1) then
+ ormas_mstart = 1
+ else
+ print *, 'bitmask/ormas_mstart not found in EZFIO file'
+ stop 1
+ endif
+ endif
+ IRP_IF MPI_DEBUG
+ print *, irp_here, mpi_rank
+ call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+ IRP_ENDIF
+ IRP_IF MPI
+ include 'mpif.h'
+ integer :: ierr
+ call MPI_BCAST( ormas_mstart, ormas_n_space, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
+ if (ierr /= MPI_SUCCESS) then
+ stop 'Unable to read ormas_mstart with MPI'
+ endif
+ IRP_ENDIF
+
+! call write_time(6)
+
+
+END_PROVIDER
+
+BEGIN_PROVIDER [integer, ormas_min_e, (ormas_n_space) ]
+ implicit none
+ BEGIN_DOC
+! min nelec in each active space
+ END_DOC
+
+ logical :: has
+ PROVIDE ezfio_filename
+ if (mpi_master) then
+
+ call ezfio_has_bitmask_ormas_min_e(has)
+ if (has) then
+! write(6,'(A)') '.. >>>>> [ IO READ: ormas_min_e ] <<<<< ..'
+ call ezfio_get_bitmask_ormas_min_e(ormas_min_e)
+ else if (ormas_n_space.eq.1) then
+ ormas_min_e = 0
+ else
+ print *, 'bitmask/ormas_min_e not found in EZFIO file'
+ stop 1
+ endif
+ endif
+ IRP_IF MPI_DEBUG
+ print *, irp_here, mpi_rank
+ call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+ IRP_ENDIF
+ IRP_IF MPI
+ include 'mpif.h'
+ integer :: ierr
+ call MPI_BCAST( ormas_min_e, ormas_n_space, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
+ if (ierr /= MPI_SUCCESS) then
+ stop 'Unable to read ormas_min_e with MPI'
+ endif
+ IRP_ENDIF
+
+! call write_time(6)
+
+END_PROVIDER
+
+BEGIN_PROVIDER [integer, ormas_max_e, (ormas_n_space) ]
+ implicit none
+ BEGIN_DOC
+! max nelec in each active space
+ END_DOC
+
+ logical :: has
+ PROVIDE ezfio_filename
+ if (mpi_master) then
+
+ call ezfio_has_bitmask_ormas_max_e(has)
+ if (has) then
+! write(6,'(A)') '.. >>>>> [ IO READ: ormas_max_e ] <<<<< ..'
+ call ezfio_get_bitmask_ormas_max_e(ormas_max_e)
+ else if (ormas_n_space.eq.1) then
+ ormas_max_e = elec_num
+ else
+ print *, 'bitmask/ormas_max_e not found in EZFIO file'
+ stop 1
+ endif
+ endif
+ IRP_IF MPI_DEBUG
+ print *, irp_here, mpi_rank
+ call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+ IRP_ENDIF
+ IRP_IF MPI
+ include 'mpif.h'
+ integer :: ierr
+ call MPI_BCAST( ormas_max_e, ormas_n_space, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
+ if (ierr /= MPI_SUCCESS) then
+ stop 'Unable to read ormas_max_e with MPI'
+ endif
+ IRP_ENDIF
+
+! call write_time(6)
+
+END_PROVIDER
+
+ BEGIN_PROVIDER [ integer, ormas_n_orb, (ormas_n_space) ]
+&BEGIN_PROVIDER [ integer, ormas_max_n_orb ]
+ implicit none
+ BEGIN_DOC
+ ! number of orbitals in each ormas space
+ END_DOC
+ integer :: i
+ ormas_n_orb = 0
+ ormas_n_orb(ormas_n_space) = mo_num + 1 - ormas_mstart(ormas_n_space)
+ do i = ormas_n_space-1, 1, -1
+ ormas_n_orb(i) = ormas_mstart(i+1) - ormas_mstart(i)
+ ASSERT (ormas_n_orb(i).ge.1)
+ enddo
+ ormas_max_n_orb = maxval(ormas_n_orb)
+END_PROVIDER
+
+BEGIN_PROVIDER [ integer, ormas_list_orb, (ormas_max_n_orb, ormas_n_space) ]
+ implicit none
+ BEGIN_DOC
+ ! list of orbitals in each ormas space
+ END_DOC
+ integer :: i,j,k
+ ormas_list_orb = 0
+ i = 1
+ do j = 1, ormas_n_space
+ do k = 1, ormas_n_orb(j)
+ ormas_list_orb(k,j) = i
+ i += 1
+ enddo
+ enddo
+END_PROVIDER
+
+BEGIN_PROVIDER [ integer(bit_kind), ormas_bitmask, (N_int, ormas_n_space) ]
+ implicit none
+ BEGIN_DOC
+ ! bitmask for each ormas space
+ END_DOC
+ integer :: j
+ ormas_bitmask = 0_bit_kind
+ do j = 1, ormas_n_space
+ call list_to_bitstring(ormas_bitmask(1,j), ormas_list_orb(:,j), ormas_n_orb(j), N_int)
+ enddo
+END_PROVIDER
+
+subroutine ormas_occ(key_in, occupancies)
+ implicit none
+ BEGIN_DOC
+ ! number of electrons in each ormas space
+ END_DOC
+ integer(bit_kind), intent(in) :: key_in(N_int,2)
+ integer, intent(out) :: occupancies(ormas_n_space)
+ integer :: i,ispin,ispace
+
+ occupancies = 0
+ ! TODO: get start/end of each space within N_int
+ do ispace=1,ormas_n_space
+ do ispin=1,2
+ do i=1,N_int
+ occupancies(ispace) += popcnt(iand(ormas_bitmask(i,ispace),key_in(i,ispin)))
+ enddo
+ enddo
+ enddo
+end
+
+logical function det_allowed_ormas(key_in)
+ implicit none
+ BEGIN_DOC
+ ! return true if det has allowable ormas occupations
+ END_DOC
+ integer(bit_kind), intent(in) :: key_in(N_int,2)
+ integer :: i,ispin,ispace,occ
+
+ det_allowed_ormas = .True.
+ if (ormas_n_space.eq.1) return
+ det_allowed_ormas = .False.
+ ! TODO: get start/end of each space within N_int
+ do ispace=1,ormas_n_space
+ occ = 0
+ do ispin=1,2
+ do i=1,N_int
+ occ += popcnt(iand(ormas_bitmask(i,ispace),key_in(i,ispin)))
+ enddo
+ enddo
+ if ((occ.lt.ormas_min_e(ispace)).or.(occ.gt.ormas_max_e(ispace))) return
+ enddo
+ det_allowed_ormas = .True.
+end
+
diff --git a/src/cipsi/README.rst b/src/cipsi/README.rst
index 054f938f..7385de5b 100644
--- a/src/cipsi/README.rst
+++ b/src/cipsi/README.rst
@@ -15,18 +15,18 @@ The :c:func:`run_cipsi` subroutine iteratively:
* 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`
+* Computes the |PT2| contribution to the energy stochastically :cite:`Garniron_2017b`
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
+of the stochastic |PT2| :cite:`Garniron_2017b`. 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`.
+ presented in :cite:`Garniron_2017b`.
* 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
diff --git a/src/cipsi/selection.irp.f b/src/cipsi/selection.irp.f
index 50749272..0281a1d4 100644
--- a/src/cipsi/selection.irp.f
+++ b/src/cipsi/selection.irp.f
@@ -627,6 +627,11 @@ subroutine fill_buffer_$DOUBLE(i_generator, sp, h1, h2, bannedOrb, banned, fock_
call apply_particle(mask, s1, p1, det, ok, N_int)
endif
+ if (do_ormas) then
+ logical, external :: det_allowed_ormas
+ if (.not.det_allowed_ormas(det)) cycle
+ endif
+
if (do_only_cas) then
integer, external :: number_of_holes, number_of_particles
if (number_of_particles(det)>0) then
diff --git a/src/cipsi_utils/pt2_stoch_routines.irp.f b/src/cipsi_utils/pt2_stoch_routines.irp.f
index f067d0be..c33dcfe7 100644
--- a/src/cipsi_utils/pt2_stoch_routines.irp.f
+++ b/src/cipsi_utils/pt2_stoch_routines.irp.f
@@ -117,6 +117,9 @@ subroutine ZMQ_pt2(E, pt2_data, pt2_data_err, relative_error, N_in)
use selection_types
implicit none
+ BEGIN_DOC
+! Computes the PT2 energy using ZMQ
+ END_DOC
integer(ZMQ_PTR) :: zmq_to_qp_run_socket, zmq_socket_pull
integer, intent(in) :: N_in
diff --git a/src/cipsi_utils/zmq_selection.irp.f b/src/cipsi_utils/zmq_selection.irp.f
index 1bfe87c0..5c2f8fc8 100644
--- a/src/cipsi_utils/zmq_selection.irp.f
+++ b/src/cipsi_utils/zmq_selection.irp.f
@@ -3,6 +3,9 @@ subroutine ZMQ_selection(N_in, pt2_data)
use selection_types
implicit none
+ BEGIN_DOC
+! Performs the determinant selection using ZeroMQ
+ END_DOC
integer(ZMQ_PTR) :: zmq_to_qp_run_socket , zmq_socket_pull
integer, intent(in) :: N_in
diff --git a/src/scf_utils/fock_matrix.irp.f b/src/scf_utils/fock_matrix.irp.f
index c8fa8333..269a441b 100644
--- a/src/scf_utils/fock_matrix.irp.f
+++ b/src/scf_utils/fock_matrix.irp.f
@@ -11,13 +11,13 @@
! |-----------------------|
! | Fcv | F^a | Rvv |
!
- ! C: Core, O: Open, V: Virtual
- !
+ ! C: Core, O: Open, V: Virtual
+ !
! Rcc = Acc Fcc^a + Bcc Fcc^b
! Roo = Aoo Foo^a + Boo Foo^b
! Rvv = Avv Fvv^a + Bvv Fvv^b
! Fcv = (F^a + F^b)/2
- !
+ !
! F^a: Fock matrix alpha (MO), F^b: Fock matrix beta (MO)
! A,B: Coupling parameters
!
@@ -26,10 +26,10 @@
! cc oo vv
! A -0.5 0.5 1.5
! B 1.5 0.5 -0.5
- !
+ !
END_DOC
integer :: i,j,n
- if (elec_alpha_num == elec_beta_num) then
+ if (all_shells_closed) then
Fock_matrix_mo = Fock_matrix_mo_alpha
else
! Core
@@ -102,7 +102,7 @@
!
! END_DOC
!integer :: i,j,n
- !if (elec_alpha_num == elec_beta_num) then
+ !if (all_shells_closed) then
! Fock_matrix_mo = Fock_matrix_mo_alpha
!else
@@ -196,7 +196,7 @@
do j = 1, n_core_orb
jorb = list_core(j)
Fock_matrix_mo(iorb,jorb) = 0.d0
- Fock_matrix_mo(jorb,iorb) = 0.d0
+ Fock_matrix_mo(jorb,iorb) = 0.d0
enddo
enddo
endif
@@ -233,9 +233,7 @@ BEGIN_PROVIDER [ double precision, Fock_matrix_ao, (ao_num, ao_num) ]
call mo_to_ao(Fock_matrix_mo,size(Fock_matrix_mo,1), &
Fock_matrix_ao,size(Fock_matrix_ao,1))
else
- if ( (elec_alpha_num == elec_beta_num).and. &
- (level_shift == 0.) ) &
- then
+ if (all_shells_closed.and. (level_shift == 0.)) then
integer :: i,j
do j=1,ao_num
do i=1,ao_num
diff --git a/src/scf_utils/scf_density_matrix_ao.irp.f b/src/scf_utils/scf_density_matrix_ao.irp.f
index 55fa8e7c..3813aa61 100644
--- a/src/scf_utils/scf_density_matrix_ao.irp.f
+++ b/src/scf_utils/scf_density_matrix_ao.irp.f
@@ -1,3 +1,11 @@
+BEGIN_PROVIDER [ logical, all_shells_closed ]
+ implicit none
+ BEGIN_DOC
+ !
+ END_DOC
+ all_shells_closed = (elec_alpha_num == elec_beta_num)
+END_PROVIDER
+
BEGIN_PROVIDER [double precision, SCF_density_matrix_ao_alpha, (ao_num,ao_num) ]
implicit none
BEGIN_DOC
@@ -30,7 +38,7 @@ BEGIN_PROVIDER [ double precision, SCF_density_matrix_ao, (ao_num,ao_num) ]
! Sum of $\alpha$ and $\beta$ density matrices
END_DOC
ASSERT (size(SCF_density_matrix_ao,1) == size(SCF_density_matrix_ao_alpha,1))
- if (elec_alpha_num== elec_beta_num) then
+ if (all_shells_closed) then
SCF_density_matrix_ao = SCF_density_matrix_ao_alpha + SCF_density_matrix_ao_alpha
else
ASSERT (size(SCF_density_matrix_ao,1) == size(SCF_density_matrix_ao_beta ,1))
diff --git a/src/trexio/import_trexio_determinants.irp.f b/src/trexio/import_trexio_determinants.irp.f
index 1759bb94..7be576c6 100644
--- a/src/trexio/import_trexio_determinants.irp.f
+++ b/src/trexio/import_trexio_determinants.irp.f
@@ -1,4 +1,4 @@
-program import_determinants_ao
+program import_trexio_determinants
call run
end