From e7833cafd82ae87320fa3a12cabca559dc07c8ab Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 1 Jan 2019 18:31:19 +0100 Subject: [PATCH 1/6] Tests for CIS OK --- src/cis/30.cis.bats | 30 ++++++++++++++++------------ src/cisd/30.cisd.bats | 36 ---------------------------------- src/ezfio_files/00.create.bats | 2 +- src/hartree_fock/20.hf.bats | 1 + 4 files changed, 20 insertions(+), 49 deletions(-) delete mode 100644 src/cisd/30.cisd.bats diff --git a/src/cis/30.cis.bats b/src/cis/30.cis.bats index d9b5a65d..58a031bd 100644 --- a/src/cis/30.cis.bats +++ b/src/cis/30.cis.bats @@ -3,13 +3,19 @@ source $QP_ROOT/tests/bats/common.bats.sh function run() { - thresh=5.e-7 + if [[ -z $5 ]] ; then + S2=1 + else + S2=0 + fi + thresh=1.e-6 test_exe cis || skip qp_edit -c $1 ezfio set_file $1 ezfio set determinants n_states 3 + ezfio set determinants s2_eig $S2 ezfio set davidson threshold_davidson 1.e-12 -# echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals + echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals qp_set_frozen_core $1 qp_run cis $1 energy1="$(ezfio get cis energy | tr '[]' ' ' | cut -d ',' -f 1)" @@ -23,11 +29,11 @@ function run() { @test "HBO" { - run hbo.ezfio -100.018582307658 -99.6982685747284 -99.6982685747283 + run hbo.ezfio -100.018582307658 -99.77695116779833 -99.74105601962573 x } @test "H2O" { - run h2o.ezfio -76.0270218681105 -75.6854407469221 -75.6196755733432 + run h2o.ezfio -76.02702187043107 -75.68543937698746 -75.61967438667698 } @test "[Cu(NH3)4]2+" { @@ -35,7 +41,7 @@ function run() { } @test "C2H2" { - run c2h2.ezfio -12.1214401949631 -11.86823108084437 -11.86823108084389 + run c2h2.ezfio -12.1214401949631 -11.95227840126497 -11.91537223579299 x } @test "ClO" { @@ -43,7 +49,7 @@ function run() { } @test "DHNO" { - run dhno.ezfio -130.447228845699 -130.357180876975 -130.219625729558 + run dhno.ezfio -130.4472288288198 -130.3571812907640 -130.2196267726907 } @test "H3COH" { @@ -51,11 +57,11 @@ function run() { } @test "HCN" { - run hcn.ezfio -92.8871750003801 -92.6089719727410 -92.6089719727409 + run hcn.ezfio -92.88717500038086 -92.69765690338815 -92.66095614790936 x } @test "N2" { - run n2.ezfio -108.9834897853049 -108.6496539410780 -108.6496539410771 + run n2.ezfio -108.9834897853052 -108.7538426008862 -108.7142633124650 x } @test "SiH2_3B1" { @@ -71,7 +77,7 @@ function run() { } @test "CO2" { - run co2.ezfio -187.650710886151 -187.291641391714 -187.291641391713 + run co2.ezfio -187.6507108861505 -187.3564970712329 -187.3277981565893 x } @test "F2" { @@ -79,11 +85,11 @@ function run() { } @test "HCO" { - run hco.ezfio -113.094024225042 -113.002362525915 -112.894730863318 + run hco.ezfio -113.0940242141341 -113.0023623703527 -112.8947302999338 } @test "NH3" { - run nh3.ezfio -56.2178342898186 -55.9199930723028 -55.8475617160862 + run nh3.ezfio -56.21783428981829 -55.91997684191139 -55.84753645754046 } @test "SiH3" { @@ -111,6 +117,6 @@ function run() { } @test "SO2" { - run so2.ezfio -41.5580019075504 -41.3823293845389 -41.3551232664878 + run so2.ezfio -41.55800190756020 -41.38232949315986 -41.35512395629023 } diff --git a/src/cisd/30.cisd.bats b/src/cisd/30.cisd.bats deleted file mode 100644 index cafb04fe..00000000 --- a/src/cisd/30.cisd.bats +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bats - -source $QP_ROOT/tests/bats/common.bats.sh - -function run_CISD() { - thresh=5.e-9 - test_exe cisd || skip - qp_edit -c $1 - ezfio set_file $1 - ezfio set determinants n_states 2 - ezfio set davidson threshold_davidson 1.e-10 - - qp_run cisd $1 - energy1="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)" - energy2="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)" - eq $energy1 $2 $thresh - eq $energy2 $3 $thresh -} - - - -#=== H2O - -@test "qp_set_mo_class H2O cc-pVDZ" { - qp_set_mo_class h2o.ezfio -core "[1]" -act "[2-12]" -del "[13-24]" -} - -@test "CISD H2O cc-pVDZ" { - run_CISD h2o.ezfio -76.1220030371248 -75.7704139046496 -} - -@test "CISD H2O VDZ pseudo" { - qp_set_frozen_core h2o_pseudo.ezfio - run_CISD h2o_pseudo.ezfio -17.1526088241466 -16.6975854682481 -} - diff --git a/src/ezfio_files/00.create.bats b/src/ezfio_files/00.create.bats index 11853f71..a9852fd7 100644 --- a/src/ezfio_files/00.create.bats +++ b/src/ezfio_files/00.create.bats @@ -17,7 +17,7 @@ function run { qp_create_ezfio_from_xyz \ $INPUT -b "$BASIS" -m $MULT -c $CHARGE $PSEUDO -o $EZ qp_edit -c $EZ -# echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals + echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals } diff --git a/src/hartree_fock/20.hf.bats b/src/hartree_fock/20.hf.bats index fe662503..fe760036 100644 --- a/src/hartree_fock/20.hf.bats +++ b/src/hartree_fock/20.hf.bats @@ -5,6 +5,7 @@ source $QP_ROOT/tests/bats/common.bats.sh function run() { thresh=1.e-8 + test_exe scf || skip qp_edit -c $1 ezfio set_file $1 ezfio set scf_utils thresh_scf 1.e-10 From 3ca45776cbde2e2ab9edf91c79b63d72fdc803a0 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 2 Jan 2019 21:40:18 +0100 Subject: [PATCH 2/6] irpf90 v1.7.3 --- .travis.yml | 2 +- configure | 2 +- src/cis/30.cis.bats | 4 ++-- src/cis/cis.irp.f | 4 ++-- src/cisd/cisd.irp.f | 4 ++-- src/hartree_fock/20.hf.bats | 4 +++- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 408feff4..0847b3d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,4 +36,4 @@ python: script: - ./configure --install all --config ./config/travis.cfg - source ./quantum_package.rc ; ninja -j 1 -v - - source ./quantum_package.rc ; qp_test -a + - source ./quantum_package.rc ; qp_test -a -v diff --git a/configure b/configure index b3a9e96a..76be2e20 100755 --- a/configure +++ b/configure @@ -148,7 +148,7 @@ for PACKAGE in ${PACKAGES} ; do elif [[ ${PACKAGE} = irpf90 ]] ; then download \ - "https://github.com/scemama/irpf90/archive/v1.7.2.tar.gz" \ + "https://gitlab.com/scemama/irpf90/-/archive/v1.7.3/irpf90-v1.7.3.tar.gz" \ "${QP_ROOT}"/external/irpf90.tar.gz ( cd "${QP_ROOT}"/external diff --git a/src/cis/30.cis.bats b/src/cis/30.cis.bats index 58a031bd..8f8b2d24 100644 --- a/src/cis/30.cis.bats +++ b/src/cis/30.cis.bats @@ -33,7 +33,7 @@ function run() { } @test "H2O" { - run h2o.ezfio -76.02702187043107 -75.68543937698746 -75.61967438667698 + run h2o.ezfio -76.02702187043107 -75.6854407466997 -75.61967556334928 } @test "[Cu(NH3)4]2+" { @@ -49,7 +49,7 @@ function run() { } @test "DHNO" { - run dhno.ezfio -130.4472288288198 -130.3571812907640 -130.2196267726907 + run dhno.ezfio -130.4472288472718 -130.3571808164850 -130.2196257046987 } @test "H3COH" { diff --git a/src/cis/cis.irp.f b/src/cis/cis.irp.f index fab81736..7238357e 100644 --- a/src/cis/cis.irp.f +++ b/src/cis/cis.irp.f @@ -14,9 +14,9 @@ subroutine run call H_apply_cis print *, 'N_det = ', N_det + print *, 'Energies of the states:' do i = 1,N_states - print *, 'energy = ',CI_energy(i) - print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy + print *, i, CI_energy(i) enddo call ezfio_set_cis_energy(CI_energy) psi_coef = ci_eigenvectors diff --git a/src/cisd/cisd.irp.f b/src/cisd/cisd.irp.f index ce21b194..8256e436 100644 --- a/src/cisd/cisd.irp.f +++ b/src/cisd/cisd.irp.f @@ -15,8 +15,8 @@ subroutine run call H_apply_cisd print *, 'N_det = ', N_det do i = 1,N_states - print *, 'energy = ',CI_energy(i) - print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy + print *, 'energy = ',CI_energy(i), & + 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy enddo psi_coef = ci_eigenvectors SOFT_TOUCH psi_coef diff --git a/src/hartree_fock/20.hf.bats b/src/hartree_fock/20.hf.bats index fe760036..48b68331 100644 --- a/src/hartree_fock/20.hf.bats +++ b/src/hartree_fock/20.hf.bats @@ -8,7 +8,7 @@ function run() { test_exe scf || skip qp_edit -c $1 ezfio set_file $1 - ezfio set scf_utils thresh_scf 1.e-10 + ezfio set scf_utils thresh_scf 1.e-12 qp_run scf $1 qp_set_frozen_core $1 energy="$(ezfio get hartree_fock energy)" @@ -26,6 +26,8 @@ function run() { } @test "[Cu(NH3)4]2+" { + ezfio set_file cu_nh3_4_2plus.ezfio + ezfio set scf_utils thresh_scf 1.e-10 run cu_nh3_4_2plus.ezfio -1862.97590388214 } From 590a0d5e41bc01b2cbea549e207f8bee3d5f6556 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 2 Jan 2019 21:41:38 +0100 Subject: [PATCH 3/6] Fixed tests in CIS --- src/cis/30.cis.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cis/30.cis.bats b/src/cis/30.cis.bats index 8f8b2d24..7f79efe2 100644 --- a/src/cis/30.cis.bats +++ b/src/cis/30.cis.bats @@ -117,6 +117,6 @@ function run() { } @test "SO2" { - run so2.ezfio -41.55800190756020 -41.38232949315986 -41.35512395629023 + run so2.ezfio -41.5580019075645 -41.38232986913486 -41.35512503680323 } From c7894e34193fd0fdd6db6491f1728096f7691b62 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 2 Jan 2019 21:48:54 +0100 Subject: [PATCH 4/6] Toto (#84) * minor changes in README.rst of many src files * added ROHF_b2.gms.out * modified some scripts * modified README.rst * modifs in docs/intro * added qp_e_conv_fci * changed the doc * added some README.rst * modifs in docs * introduced the sgn grids * added 21.rsks.bats --- TODO | 4 +- docs/source/_static/links.rst | 4 +- docs/source/intro/intro.rst | 22 +- docs/source/intro/selected_ci.rst | 2 + docs/source/modules/ao_one_e_integrals.rst | 9 +- docs/source/modules/aux_quantities.rst | 2 +- docs/source/modules/becke_numerical_grid.rst | 118 ++++-- docs/source/modules/davidson.rst | 2 +- docs/source/modules/density_for_dft.rst | 4 +- docs/source/modules/determinants.rst | 20 +- docs/source/modules/dft_keywords.rst | 8 +- docs/source/modules/dft_utils_one_e.rst | 17 +- docs/source/modules/generators_full.rst | 67 ---- docs/source/modules/hartree_fock.rst | 102 ++++- docs/source/modules/kohn_sham.rst | 104 +---- docs/source/modules/mo_one_e_integrals.rst | 6 +- docs/source/modules/perturbation.rst | 15 - docs/source/modules/psiref_cas.rst | 163 -------- docs/source/modules/psiref_utils.rst | 366 ------------------ docs/source/modules/scf_utils.rst | 9 +- docs/source/modules/single_ref_method.rst | 71 ++++ docs/source/modules/tools.rst | 14 + .../programmers_guide/index_providers.rst | 186 +-------- docs/source/research.bib | 14 + docs/source/users_guide/quickstart.rst | 107 ++++- .../mrcepa0/{mrcepa0.bats => test_mrcepa0} | 0 scripts/qp_e_conv_fci | 67 ++++ src/ao_one_e_integrals/README.rst | 7 +- src/ao_two_e_erf_integrals/README.rst | 19 + src/ao_two_e_integrals/README.rst | 17 + src/aux_quantities/README.rst | 2 +- src/becke_numerical_grid/EZFIO.cfg | 17 +- src/becke_numerical_grid/README.rst | 16 +- src/becke_numerical_grid/grid_becke.irp.f | 40 +- .../grid_becke_vector.irp.f | 2 +- src/cis/cis.irp.f | 6 + src/density_for_dft/README.rst | 4 +- src/determinants/EZFIO.cfg | 6 + src/determinants/README.rst | 14 +- src/dft_keywords/README.rst | 8 +- src/dft_utils_in_r/README.rst | 14 + src/dft_utils_one_e/README.rst | 17 +- src/dft_utils_one_e/sr_pot_ao.irp.f | 1 - src/hartree_fock/README.rst | 2 + src/hartree_fock/scf.irp.f | 5 + src/hartree_fock/scf_old.irp.f | 5 + src/kohn_sham/README.rst | 5 +- src/kohn_sham/ks_scf.irp.f | 5 + src/kohn_sham_rs/21.rsks.bats | 37 ++ src/kohn_sham_rs/rs_ks_scf.irp.f | 10 +- src/mo_one_e_integrals/README.rst | 6 +- src/scf_utils/README.rst | 7 +- src/scf_utils/roothaan_hall_scf.irp.f | 4 +- src/tools/print_wf.irp.f | 2 +- 54 files changed, 743 insertions(+), 1038 deletions(-) rename plugins/garniron/mrcepa0/{mrcepa0.bats => test_mrcepa0} (100%) create mode 100755 scripts/qp_e_conv_fci create mode 100644 src/ao_two_e_erf_integrals/README.rst create mode 100644 src/ao_two_e_integrals/README.rst create mode 100644 src/dft_utils_in_r/README.rst create mode 100644 src/kohn_sham_rs/21.rsks.bats diff --git a/TODO b/TODO index f81453e9..e629a12e 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ +!!!!!!!!!! ENLEVER CETTE SALOPERIE DE TRUC DANS VI !!!!!!!!!!!!!!!!!!!!!!!!!!!!! # qp_module * Mettre le fichier LIB @@ -5,8 +6,7 @@ # Web/doc * Creer une page web pas trop degueu et la mettre ici : http://lcpq.github.io/quantum_package -* Manu : README - * dm_for_dft +* Pour les README.rst des modules, mettre un deuxième saut à la ligne pour la doc en ligne. * prendre des bouts du src/README.rst et en mettre partout diff --git a/docs/source/_static/links.rst b/docs/source/_static/links.rst index f1a3a27d..147ad7b6 100644 --- a/docs/source/_static/links.rst +++ b/docs/source/_static/links.rst @@ -68,9 +68,11 @@ .. |QMC| replace:: :abbr:`QMC (Quantum Monte Carlo)` .. |rst| replace:: :abbr:`RST (ReStructured Text)` .. |SCF| replace:: :abbr:`SCF (Self Consistent Field)` -.. |RSH| replace:: :abbr:`RSH (Range-Separated-Hybrids)` +.. |RSH| replace:: :abbr:`RSH (Range Separated Hybrids)` +.. |RSDFT| replace:: :abbr:`RSDFT (Range Separated Density Functional Theory)` .. |KS-DFT| replace:: :abbr:`KS-DFT (Kohn-Sham Density Functional Theory)` .. |sCI| replace:: :abbr:`sCI (Selected-CI)` +.. |WFT| replace:: :abbr:`WFT (Wave Function Theory)` .. |CASSCF| replace:: |CAS| - |SCF| .. |FCIQMC| replace:: |FCI| - |QMC| diff --git a/docs/source/intro/intro.rst b/docs/source/intro/intro.rst index 45b2db2e..b5872309 100644 --- a/docs/source/intro/intro.rst +++ b/docs/source/intro/intro.rst @@ -12,15 +12,16 @@ What it is ========== The |qp| is an open-source programming environment for quantum chemistry, -especially for `wave function theory `_ (WFT). +especially for `wave function theory `_ (|WFT|). 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|. -Regarding the The determinant-driven framework allows the programmer to include any arbitrary set of +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 basics of RSH together with the WFT framework also allow a simple coupling between DFT and WFT calculations (see the plugins of ``_) -All the programs are developed with the `IRPF90`_ code generator, which simplifies +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. @@ -29,13 +30,13 @@ What it is not ============== The |qp| is *not* a general purpose quantum chemistry program. -First of all, it is a library. The users of the |qp| should develop -their own programs. +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 +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. +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 @@ -54,14 +55,17 @@ Multiple programs were developed with the |qp|, such as: - Selected Full-CI + Epstein-Nesbet PT2 (CIPSI) :cite:`Caffarel_2016,Caffarel_2016.2,Loos_2018,Scemama_2018,Dash_2018` - Hybrid stochastic/deterministic MR-PT2 :cite:`Garniron_2017.2,Loos_2018` +- Orbital optimization for open-shell systems :cite:`Giner2016Mar,Giner_2017.3` - CIS, CISD, MP2 - Selected CISD - Jeziorsky-Monkhorst MR-PT2 :cite:`Giner_2017` +- Effective Hamiltonian for variational MR wave functions :cite:`Giner_2017.2` - Selected CAS+SD - Selected difference-dedicated CI (DD-CI) - Multi-Reference Coupled Cluster (MR-CCSD) :cite:`Giner_2016,Garniron_2017` - Shifted-Bk with CIPSI :cite:`Garniron_2018` -- CIPSI with range-separated DFT +- CIPSI with range-separated DFT (plugins at ``_) +- DFT for basis set corrections :cite:`Giner_2018` All these programs can generate ground and excited states, and spin pure wave functions (eigenstates of |S^2|). diff --git a/docs/source/intro/selected_ci.rst b/docs/source/intro/selected_ci.rst index c77fb967..41ba8820 100644 --- a/docs/source/intro/selected_ci.rst +++ b/docs/source/intro/selected_ci.rst @@ -102,6 +102,8 @@ The determinants in |SetDI| will be characterized as **internal**. the wave function, low |EPT|, ...). +Of course, such a procedure can be applied on any state and therefore can allow to treat both ground and excited states. + Approximations to accelerate the selection ------------------------------------------ diff --git a/docs/source/modules/ao_one_e_integrals.rst b/docs/source/modules/ao_one_e_integrals.rst index 4b4d764a..92d34d1a 100644 --- a/docs/source/modules/ao_one_e_integrals.rst +++ b/docs/source/modules/ao_one_e_integrals.rst @@ -12,9 +12,10 @@ All the one-electron integrals in the |AO| basis are here. The most important providers for usual quantum-chemistry calculation are: -# `ao_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_ao_ints.irp.f`) -# `ao_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_ao_ints.irp.f`) -# `ao_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`ao_mono_ints.irp.f`) +* `ao_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_ao_ints.irp.f`) +* `ao_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_ao_ints.irp.f`) +* `ao_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`ao_mono_ints.irp.f`) + Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_ao.irp.f`. @@ -896,7 +897,7 @@ Subroutines / functions File: :file:`spread_dipole_ao.irp.f` - + Computes the following integral : int [-infty ; +infty] of [(x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) * x ] needed for the dipole and those things diff --git a/docs/source/modules/aux_quantities.rst b/docs/source/modules/aux_quantities.rst index 4e6fde73..e87fa4ce 100644 --- a/docs/source/modules/aux_quantities.rst +++ b/docs/source/modules/aux_quantities.rst @@ -13,7 +13,7 @@ This module contains some global variables (such as densities and energies) whic The main providers of that module are: -# `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. +* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. Thanks to these providers you can use any density matrix that does not necessary corresponds to that of the current wave function. diff --git a/docs/source/modules/becke_numerical_grid.rst b/docs/source/modules/becke_numerical_grid.rst index eb934238..f842c0ca 100644 --- a/docs/source/modules/becke_numerical_grid.rst +++ b/docs/source/modules/becke_numerical_grid.rst @@ -10,14 +10,20 @@ becke_numerical_grid This module contains all quantities needed to build the Becke's grid used in general for DFT integration. Note that it can be used for whatever integration in R^3 as long as the functions to be integrated are mostly concentrated near the atomic regions. -This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains a certain number of radial and angular points. +This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains +a certain number of radial and angular points. No pruning is done on the angular part of the grid. + +The main keyword for that modue is: + +* :option:`becke_numerical_grid grid_type_sgn` which controls the precision of the grid according the standard **SG-n** grids. This keyword controls the two providers `n_points_integration_angular` `n_points_radial_grid`. The main providers of that module are: -# :option:`becke_numerical_grid n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details. -# :option:`becke_numerical_grid n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary. -# `final_grid_points` which are the (x,y,z) coordinates of the grid points. -# `final_weight_at_r_vector` which are the weights at each grid point +* `n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 170 | 194 | 266 | 302 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details. +* `n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary. +* `final_grid_points` which are the (x,y,z) coordinates of the grid points. +* `final_weight_at_r_vector` which are the weights at each grid point + For a simple example of how to use the grid, see :file:`example.irp.f`. @@ -76,17 +82,11 @@ See next section for explanations and citation policies. EZFIO parameters ---------------- -.. option:: n_points_integration_angular +.. option:: grid_type_sgn - Number of angular points per atom for 3d numerical integration, needed for DFT for example [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ] + Type of grid used for the Becke's numerical grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ] - Default: 590 - -.. option:: n_points_radial_grid - - Number of radial points per atom for 3d numerical integration, needed for DFT for example - - Default: 60 + Default: 2 Providers @@ -139,44 +139,25 @@ Providers .. code:: text double precision, allocatable :: final_grid_points (3,n_points_final_grid) - double precision, allocatable :: final_weight_functions_at_final_grid_points (n_points_final_grid) + double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid) integer, allocatable :: index_final_points (3,n_points_final_grid) integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point - final_weight_functions_at_final_grid_points(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices -.. c:var:: final_weight_functions_at_final_grid_points +.. c:var:: final_weight_at_r .. code:: text - double precision, allocatable :: final_grid_points (3,n_points_final_grid) - double precision, allocatable :: final_weight_functions_at_final_grid_points (n_points_final_grid) - integer, allocatable :: index_final_points (3,n_points_final_grid) - integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) - - File: :file:`grid_becke_vector.irp.f` - - final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point - final_weight_functions_at_final_grid_points(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions - index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point - index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices - - - - -.. c:var:: final_weight_functions_at_grid_points - - .. code:: text - - double precision, allocatable :: final_weight_functions_at_grid_points (n_points_integration_angular,n_points_radial_grid,nucl_num) + double precision, allocatable :: final_weight_at_r (n_points_integration_angular,n_points_radial_grid,nucl_num) File: :file:`grid_becke.irp.f` @@ -185,6 +166,25 @@ Providers +.. c:var:: final_weight_at_r_vector + + .. code:: text + + double precision, allocatable :: final_grid_points (3,n_points_final_grid) + double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid) + integer, allocatable :: index_final_points (3,n_points_final_grid) + integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) + + File: :file:`grid_becke_vector.irp.f` + + final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices + + + + .. c:var:: grid_points_per_atom .. code:: text @@ -217,14 +217,14 @@ Providers .. code:: text double precision, allocatable :: final_grid_points (3,n_points_final_grid) - double precision, allocatable :: final_weight_functions_at_final_grid_points (n_points_final_grid) + double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid) integer, allocatable :: index_final_points (3,n_points_final_grid) integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point - final_weight_functions_at_final_grid_points(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices @@ -236,14 +236,14 @@ Providers .. code:: text double precision, allocatable :: final_grid_points (3,n_points_final_grid) - double precision, allocatable :: final_weight_functions_at_final_grid_points (n_points_final_grid) + double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid) integer, allocatable :: index_final_points (3,n_points_final_grid) integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point - final_weight_functions_at_final_grid_points(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices @@ -289,11 +289,43 @@ Providers -.. c:var:: weight_functions_at_grid_points +.. c:var:: n_points_integration_angular .. code:: text - double precision, allocatable :: weight_functions_at_grid_points (n_points_integration_angular,n_points_radial_grid,nucl_num) + integer :: n_points_radial_grid + integer :: n_points_integration_angular + + File: :file:`grid_becke.irp.f` + + n_points_radial_grid = number of radial grid points per atom + n_points_integration_angular = number of angular grid points per atom + These numbers are automatically set by setting the grid_type_sgn parameter + + + + +.. c:var:: n_points_radial_grid + + .. code:: text + + integer :: n_points_radial_grid + integer :: n_points_integration_angular + + File: :file:`grid_becke.irp.f` + + n_points_radial_grid = number of radial grid points per atom + n_points_integration_angular = number of angular grid points per atom + These numbers are automatically set by setting the grid_type_sgn parameter + + + + +.. c:var:: weight_at_r + + .. code:: text + + double precision, allocatable :: weight_at_r (n_points_integration_angular,n_points_radial_grid,nucl_num) File: :file:`grid_becke.irp.f` diff --git a/docs/source/modules/davidson.rst b/docs/source/modules/davidson.rst index b398a920..4a3755ea 100644 --- a/docs/source/modules/davidson.rst +++ b/docs/source/modules/davidson.rst @@ -189,7 +189,7 @@ Providers File: :file:`u0_h_u0.irp.f` - Energy of the current wave function + Electronic energy of the current wave function diff --git a/docs/source/modules/density_for_dft.rst b/docs/source/modules/density_for_dft.rst index d8d3e1fe..a6791b77 100644 --- a/docs/source/modules/density_for_dft.rst +++ b/docs/source/modules/density_for_dft.rst @@ -13,8 +13,8 @@ This module defines the *provider* of the density used for the DFT related calcu This definition is done through the keyword :option:`density_for_dft density_for_dft`. The density can be: -# WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``) -# damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft` +* WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``) +* damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft` diff --git a/docs/source/modules/determinants.rst b/docs/source/modules/determinants.rst index 5c2ff86f..78587531 100644 --- a/docs/source/modules/determinants.rst +++ b/docs/source/modules/determinants.rst @@ -12,16 +12,16 @@ Contains everything for the computation of the Hamiltonian matrix elements in th The main providers for this module are: -# :option:`determinants n_states`: number of states to be computed -# `psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|. -# `psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants. +* :option:`determinants n_states`: number of states to be computed +* `psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|. +* `psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants. The main routines for this module are: -# `i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants. -# `i_H_j_s2`: computes the Hamiltonian and (:math:`S^2`) matrix element between two arbitrary Slater determinants. -# `i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor. -# `i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants. +* `i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants. +* `i_H_j_s2`: computes the Hamiltonian and (:math:`S^2`) matrix element between two arbitrary Slater determinants. +* `i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor. +* `i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants. For an example of how to use these routines and providers, take a look at :file:`example.irp.f`. @@ -37,6 +37,12 @@ EZFIO parameters Default: 1000000 +.. option:: n_det_print_wf + + Maximum number of determinants to be printed with the program print_wf + + Default: 10000 + .. option:: n_det_max_full Maximum number of determinants where |H| is fully diagonalized diff --git a/docs/source/modules/dft_keywords.rst b/docs/source/modules/dft_keywords.rst index ed7f87d2..d4614cad 100644 --- a/docs/source/modules/dft_keywords.rst +++ b/docs/source/modules/dft_keywords.rst @@ -10,11 +10,11 @@ dft_keywords This module contains the main keywords related to a DFT calculation or RS-DFT calculation, such as: -# :option:`dft_keywords exchange_functional` -# :option:`dft_keywords correlation_functional` -# :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program +* :option:`dft_keywords exchange_functional` +* :option:`dft_keywords correlation_functional` +* :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program -The keyword for the range separation parameter :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. +The keyword for the **range separation parameter** :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. The keyword for the type of density used in RS-DFT calculation with a multi-configurational wave function is the :option:`density_for_dft density_for_dft` keyword. diff --git a/docs/source/modules/dft_utils_one_e.rst b/docs/source/modules/dft_utils_one_e.rst index dadd433e..bb3def97 100644 --- a/docs/source/modules/dft_utils_one_e.rst +++ b/docs/source/modules/dft_utils_one_e.rst @@ -12,17 +12,20 @@ This module contains all the one-body related quantities needed to perform DFT o Therefore, it contains most of the properties which depends on the one-body density and density matrix. The most important files and variables are: -# The general *providers* for the x/c energies in :file:`e_xc_general.irp.f` -# The general *providers* for the x/c potentials in :file:`pot_general.irp.f` -# The short-range hartree operator and all related quantities in :file:`sr_coulomb.irp.f` + +* The general *providers* for the x/c energies in :file:`e_xc_general.irp.f` +* The general *providers* for the x/c potentials in :file:`pot_general.irp.f` +* The short-range hartree operator and all related quantities in :file:`sr_coulomb.irp.f` + These *providers* will be used in many DFT-related programs, such as :file:`ks_scf.irp.f` or :file:`rs_ks_scf.irp.f`. It is also needed to compute the effective one-body operator needed in multi-determinant RS-DFT (see plugins by eginer). Some other interesting quantities: -# The LDA and PBE *providers* for the x/c energies in :file:`e_xc.irp.f` and :file:`sr_exc.irp.f` -# The LDA and PBE *providers* for the x/c potentials on the AO basis in :file:`pot_ao.irp.f` and :file:`sr_pot_ao.irp.f` -# The :math:`h_{core}` energy computed directly with the one-body density matrix in :file:`one_e_energy_dft.irp.f` -# LDA and PBE short-range functionals *subroutines* in :file:`exc_sr_lda.irp.f` and :file:`exc_sr_pbe.irp.f` + +* The LDA and PBE *providers* for the x/c energies in :file:`e_xc.irp.f` and :file:`sr_exc.irp.f` +* The LDA and PBE *providers* for the x/c potentials on the AO basis in :file:`pot_ao.irp.f` and :file:`sr_pot_ao.irp.f` +* The :math:`h_{core}` energy computed directly with the one-body density matrix in :file:`one_e_energy_dft.irp.f` +* LDA and PBE short-range functionals *subroutines* in :file:`exc_sr_lda.irp.f` and :file:`exc_sr_pbe.irp.f` diff --git a/docs/source/modules/generators_full.rst b/docs/source/modules/generators_full.rst index 90b32a98..012457c0 100644 --- a/docs/source/modules/generators_full.rst +++ b/docs/source/modules/generators_full.rst @@ -33,33 +33,6 @@ Providers -.. c:var:: n_det_generators - - .. code:: text - - integer :: n_det_generators - - File: :file:`generators.irp.f` - - For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant - - - - -.. c:var:: psi_coef_generators - - .. code:: text - - integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) - double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) - - File: :file:`generators.irp.f` - - For Single reference wave functions, the generator is the Hartree-Fock determinant - - - - .. c:var:: psi_coef_sorted_gen .. code:: text @@ -75,20 +48,6 @@ Providers -.. c:var:: psi_det_generators - - .. code:: text - - integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) - double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) - - File: :file:`generators.irp.f` - - For Single reference wave functions, the generator is the Hartree-Fock determinant - - - - .. c:var:: psi_det_sorted_gen .. code:: text @@ -117,29 +76,3 @@ Providers For Single reference wave functions, the generator is the Hartree-Fock determinant - - -.. c:var:: select_max - - .. code:: text - - double precision, allocatable :: select_max (size_select_max) - - File: :file:`generators.irp.f` - - Memo to skip useless selectors - - - - -.. c:var:: size_select_max - - .. code:: text - - integer :: size_select_max - - File: :file:`generators.irp.f` - - Size of the select_max array - - diff --git a/docs/source/modules/hartree_fock.rst b/docs/source/modules/hartree_fock.rst index 52bf2ed5..e09b1705 100644 --- a/docs/source/modules/hartree_fock.rst +++ b/docs/source/modules/hartree_fock.rst @@ -16,6 +16,7 @@ The Hartree-Fock in an SCF and therefore is based on the ``scf_utils`` structure It performs the following actions: #. Compute/Read all the one- and two-electron integrals, and store them in memory + #. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it will read them as initial guess. Otherwise, it will create a guess. #. Perform the |SCF| iterations @@ -25,6 +26,7 @@ For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory The main are: # :option:`scf_utils thresh_scf` + # :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation @@ -55,13 +57,83 @@ EZFIO parameters Energy HF - Default: 0. Providers --------- +.. c:var:: ao_bi_elec_integral_alpha + + .. code:: text + + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) + + File: :file:`fock_matrix_hf.irp.f` + + Alpha Fock matrix in AO basis set + + + + +.. c:var:: ao_bi_elec_integral_beta + + .. code:: text + + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) + + File: :file:`fock_matrix_hf.irp.f` + + Alpha Fock matrix in AO basis set + + + + +.. c:var:: extra_e_contrib_density + + .. code:: text + + double precision :: extra_e_contrib_density + + File: :file:`hf_energy.irp.f` + + Extra contribution to the SCF energy coming from the density. + For a Hartree-Fock calculation: extra_e_contrib_density = 0 + For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - trace of the V_xc potential + + + + +.. c:var:: fock_matrix_ao_alpha + + .. code:: text + + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) + + File: :file:`fock_matrix_hf.irp.f` + + Alpha Fock matrix in AO basis set + + + + +.. c:var:: fock_matrix_ao_beta + + .. code:: text + + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) + + File: :file:`fock_matrix_hf.irp.f` + + Alpha Fock matrix in AO basis set + + + + .. c:var:: hf_energy .. code:: text @@ -112,6 +184,34 @@ Subroutines / functions +.. c:function:: create_guess + + .. code:: text + + subroutine create_guess + + File: :file:`scf_old.irp.f` + + Create a MO guess if no MOs are present in the EZFIO directory + + + + + +.. c:function:: run + + .. code:: text + + subroutine run + + File: :file:`scf_old.irp.f` + + Run SCF calculation + + + + + .. c:function:: scf .. code:: text diff --git a/docs/source/modules/kohn_sham.rst b/docs/source/modules/kohn_sham.rst index 3967e021..822f2291 100644 --- a/docs/source/modules/kohn_sham.rst +++ b/docs/source/modules/kohn_sham.rst @@ -23,8 +23,9 @@ It performs the following actions: The definition of the Fock matrix is in :file:`kohn_sham fock_matrix_ks.irp.f` For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory where you will find all options. The main are: -# :option:`scf_utils thresh_scf` -# :option:`scf_utils level_shift` + +#. :option:`scf_utils thresh_scf` +#. :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation crashes for any unexpected reason, the calculation can be restarted by running again @@ -51,34 +52,6 @@ Providers --------- -.. c:var:: ao_bi_elec_integral_alpha - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: :file:`fock_matrix_ks.irp.f` - - Alpha Fock matrix in ao basis set - - - - -.. c:var:: ao_bi_elec_integral_beta - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: :file:`fock_matrix_ks.irp.f` - - Alpha Fock matrix in ao basis set - - - - .. c:var:: ao_potential_alpha_xc .. code:: text @@ -133,21 +106,6 @@ Providers -.. c:var:: extra_e_contrib_density - - .. code:: text - - double precision :: extra_e_contrib_density - - File: :file:`ks_enery.irp.f` - - Extra contribution to the SCF energy coming from the density. - For a Hartree-Fock calculation: extra_e_contrib_density = 0 - For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - 1/2 trace of the V_xc potential - - - - .. c:var:: fock_matrix_alpha_no_xc_ao .. code:: text @@ -162,34 +120,6 @@ Providers -.. c:var:: fock_matrix_ao_alpha - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: :file:`fock_matrix_ks.irp.f` - - Alpha Fock matrix in ao basis set - - - - -.. c:var:: fock_matrix_ao_beta - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: :file:`fock_matrix_ks.irp.f` - - Alpha Fock matrix in ao basis set - - - - .. c:var:: fock_matrix_beta_no_xc_ao .. code:: text @@ -308,34 +238,6 @@ Subroutines / functions -.. c:function:: create_guess - - .. code:: text - - subroutine create_guess - - File: :file:`ks_scf.irp.f` - - Create a MO guess if no MOs are present in the EZFIO directory - - - - - -.. c:function:: run - - .. code:: text - - subroutine run - - File: :file:`ks_scf.irp.f` - - Run SCF calculation - - - - - .. c:function:: srs_ks_cf .. code:: text diff --git a/docs/source/modules/mo_one_e_integrals.rst b/docs/source/modules/mo_one_e_integrals.rst index d4e14b41..37f2cea4 100644 --- a/docs/source/modules/mo_one_e_integrals.rst +++ b/docs/source/modules/mo_one_e_integrals.rst @@ -12,9 +12,9 @@ All the one-electron integrals in |MO| basis are defined here. The most important providers for usual quantum-chemistry calculation are: -# `mo_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_mo_ints.irp.f`) -# `mo_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_mo_ints.irp.f`) -# `mo_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`mo_mono_ints.irp.f`) +* `mo_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_mo_ints.irp.f`) +* `mo_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_mo_ints.irp.f`) +* `mo_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`mo_mono_ints.irp.f`) Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_mo.irp.f`. diff --git a/docs/source/modules/perturbation.rst b/docs/source/modules/perturbation.rst index 09bcc0e8..cf12baf7 100644 --- a/docs/source/modules/perturbation.rst +++ b/docs/source/modules/perturbation.rst @@ -203,21 +203,6 @@ Subroutines / functions -.. c:function:: i_h_psi_pert_new_minilist - - .. code:: text - - subroutine i_H_psi_pert_new_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,coef_pert) - - File: :file:`pt2_new.irp.f` - - Computes = \sum_J c_J . - Uses filter_connected_i_H_psi0 to get all the |J> to which |i> is connected. The |J> are searched in short pre-computed lists. - - - - - .. c:function:: perturb_buffer_by_mono_decontracted .. code:: text diff --git a/docs/source/modules/psiref_cas.rst b/docs/source/modules/psiref_cas.rst index cf1c5c64..fe4e38ae 100644 --- a/docs/source/modules/psiref_cas.rst +++ b/docs/source/modules/psiref_cas.rst @@ -12,166 +12,3 @@ Reference wave function is defined as a |CAS| wave function. This module is required for |CAS-SD|, |MRPT| or |MRCC|. - - -Providers ---------- - - -.. c:var:: idx_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_ref (psi_det_size) - integer :: n_det_ref - - File: :file:`psi_ref.irp.f` - - CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - - - -.. c:var:: inv_norm_psi_ref - - .. code:: text - - double precision, allocatable :: norm_psi_ref (N_states) - double precision, allocatable :: inv_norm_psi_ref (N_states) - - File: :file:`psi_ref.irp.f` - - - - - - -.. c:var:: n_det_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_ref (psi_det_size) - integer :: n_det_ref - - File: :file:`psi_ref.irp.f` - - CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - - - -.. c:var:: norm_psi_ref - - .. code:: text - - double precision, allocatable :: norm_psi_ref (N_states) - double precision, allocatable :: inv_norm_psi_ref (N_states) - - File: :file:`psi_ref.irp.f` - - - - - - -.. c:var:: psi_non_ref_coef_interm_norm - - .. code:: text - - double precision, allocatable :: psi_non_ref_coef_interm_norm (N_det_non_ref,N_states) - - File: :file:`psi_ref.irp.f` - - - - - - -.. c:var:: psi_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_ref (psi_det_size) - integer :: n_det_ref - - File: :file:`psi_ref.irp.f` - - CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - - - -.. c:var:: psi_ref_coef - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_ref (psi_det_size) - integer :: n_det_ref - - File: :file:`psi_ref.irp.f` - - CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. - - - - -.. c:var:: psi_ref_coef_interm_norm - - .. code:: text - - double precision, allocatable :: psi_ref_coef_interm_norm (N_det_ref,N_states) - - File: :file:`psi_ref.irp.f` - - - - - - -.. c:var:: psi_ref_coef_inv - - .. code:: text - - double precision, allocatable :: psi_ref_coef_inv (psi_det_size,n_states) - - File: :file:`psi_ref.irp.f` - - 1/psi_ref_coef - - - - -.. c:var:: psi_ref_coef_restart - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) - - File: :file:`psi_ref.irp.f` - - Projection of the CAS wave function on the restart wave function. - - - - -.. c:var:: psi_ref_restart - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) - - File: :file:`psi_ref.irp.f` - - Projection of the CAS wave function on the restart wave function. - - diff --git a/docs/source/modules/psiref_utils.rst b/docs/source/modules/psiref_utils.rst index 62c778f0..634ecb61 100644 --- a/docs/source/modules/psiref_utils.rst +++ b/docs/source/modules/psiref_utils.rst @@ -14,369 +14,3 @@ needs to be loaded with any `psi_ref_*` module. - - -Providers ---------- - - -.. c:var:: h_matrix_ref - - .. code:: text - - double precision, allocatable :: h_matrix_ref (N_det_ref,N_det_ref) - - File: :file:`psi_ref_utils.irp.f` - - - - - - -.. c:var:: holes_operators - - .. code:: text - - integer(bit_kind), allocatable :: holes_operators (N_int,2) - integer(bit_kind), allocatable :: particles_operators (N_int,2) - - File: :file:`psi_ref_excitations_operators.irp.f` - - holes_operators represents an array of integers where all the holes have been done going from psi_ref to psi_non_ref particles_operators represents an array of integers where all the particles have been done going from psi_ref to psi_non_ref - - - - -.. c:var:: idx_non_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_non_ref (psi_det_size) - integer, allocatable :: idx_non_ref_rev (psi_det_size) - integer :: n_det_non_ref - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. - - - - -.. c:var:: idx_non_ref_from_sorted - - .. code:: text - - integer, allocatable :: idx_non_ref_from_sorted (N_det) - - File: :file:`psi_ref_utils.irp.f` - - - - - - -.. c:var:: idx_non_ref_rev - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_non_ref (psi_det_size) - integer, allocatable :: idx_non_ref_rev (psi_det_size) - integer :: n_det_non_ref - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. - - - - -.. c:var:: n_det_non_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_non_ref (psi_det_size) - integer, allocatable :: idx_non_ref_rev (psi_det_size) - integer :: n_det_non_ref - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. - - - - -.. c:var:: particles_operators - - .. code:: text - - integer(bit_kind), allocatable :: holes_operators (N_int,2) - integer(bit_kind), allocatable :: particles_operators (N_int,2) - - File: :file:`psi_ref_excitations_operators.irp.f` - - holes_operators represents an array of integers where all the holes have been done going from psi_ref to psi_non_ref particles_operators represents an array of integers where all the particles have been done going from psi_ref to psi_non_ref - - - - -.. c:var:: psi_non_ref - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_non_ref (psi_det_size) - integer, allocatable :: idx_non_ref_rev (psi_det_size) - integer :: n_det_non_ref - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. - - - - -.. c:var:: psi_non_ref_coef - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) - integer, allocatable :: idx_non_ref (psi_det_size) - integer, allocatable :: idx_non_ref_rev (psi_det_size) - integer :: n_det_non_ref - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. - - - - -.. c:var:: psi_non_ref_coef_restart - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. - - - - -.. c:var:: psi_non_ref_coef_sorted_bit - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) - - File: :file:`psi_ref_utils.irp.f` - - Reference determinants sorted to accelerate the search of a random determinant in the wave function. - - - - -.. c:var:: psi_non_ref_coef_transp - - .. code:: text - - double precision, allocatable :: psi_non_ref_coef_transp (n_states,psi_det_size) - - File: :file:`psi_ref_utils.irp.f` - - Transposed psi_non_ref_coef - - - - -.. c:var:: psi_non_ref_restart - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) - - File: :file:`psi_ref_utils.irp.f` - - Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. - - - - -.. c:var:: psi_non_ref_sorted_bit - - .. code:: text - - integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) - double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) - - File: :file:`psi_ref_utils.irp.f` - - Reference determinants sorted to accelerate the search of a random determinant in the wave function. - - - - -.. c:var:: psi_ref_coef_diagonalized - - .. code:: text - - double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) - double precision, allocatable :: psi_ref_energy_diagonalized (N_states) - - File: :file:`psi_ref_utils.irp.f` - - - - - - -.. c:var:: psi_ref_coef_normalized - - .. code:: text - - double precision, allocatable :: psi_ref_coef_normalized (psi_det_size,n_states) - - File: :file:`psi_ref_utils.irp.f` - - Normalized coefficients of the reference - - - - -.. c:var:: psi_ref_coef_sorted_bit - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) - - File: :file:`psi_ref_utils.irp.f` - - Reference determinants sorted to accelerate the search of a random determinant in the wave function. - - - - -.. c:var:: psi_ref_coef_transp - - .. code:: text - - double precision, allocatable :: psi_ref_coef_transp (n_states,psi_det_size) - - File: :file:`psi_ref_utils.irp.f` - - Transposed psi_ref_coef - - - - -.. c:var:: psi_ref_energy - - .. code:: text - - double precision, allocatable :: psi_ref_energy (N_states) - - File: :file:`psi_ref_utils.irp.f` - - - - - - -.. c:var:: psi_ref_energy_diagonalized - - .. code:: text - - double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) - double precision, allocatable :: psi_ref_energy_diagonalized (N_states) - - File: :file:`psi_ref_utils.irp.f` - - - - - - -.. c:var:: psi_ref_sorted_bit - - .. code:: text - - integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) - double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) - - File: :file:`psi_ref_utils.irp.f` - - Reference determinants sorted to accelerate the search of a random determinant in the wave function. - - - - -.. c:var:: ref_hamiltonian_matrix - - .. code:: text - - double precision, allocatable :: ref_hamiltonian_matrix (n_det_ref,n_det_ref) - - File: :file:`psi_ref_utils.irp.f` - - H matrix in the Reference space - - - - -Subroutines / functions ------------------------ - - - -.. c:function:: extract_ref - - .. code:: text - - subroutine extract_ref - - File: :file:`extract_ref.irp.f` - - Replaces the total wave function by the normalized projection on the reference - - - - - -.. c:function:: get_index_in_psi_ref_sorted_bit - - .. code:: text - - integer function get_index_in_psi_ref_sorted_bit(key,Nint) - - File: :file:`psi_ref_utils.irp.f` - - Returns the index of the determinant in the ``psi_ref_sorted_bit`` array - - - - - -.. c:function:: is_in_psi_ref - - .. code:: text - - logical function is_in_psi_ref(key,Nint) - - File: :file:`psi_ref_utils.irp.f` - - True if the determinant ``det`` is in the wave function - - diff --git a/docs/source/modules/scf_utils.rst b/docs/source/modules/scf_utils.rst index a5aaeb73..2180c249 100644 --- a/docs/source/modules/scf_utils.rst +++ b/docs/source/modules/scf_utils.rst @@ -18,15 +18,18 @@ The ``scf_utils`` module is meant to be included in the :file:`NEED` of the vari All SCF programs perform the following actions: + #. Compute/Read all the one- and two-electron integrals, and store them in memory + #. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it will read them as initial guess. Otherwise, it will create a guess. #. Perform the |SCF| iterations based on the definition of the Fock matrix The main keywords/options are: -# :option:`scf_utils thresh_scf` -# :option:`scf_utils level_shift` + +* :option:`scf_utils thresh_scf` +* :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation crashes for any unexpected reason, the calculation can be restarted by running again @@ -75,7 +78,7 @@ EZFIO parameters Energy shift on the virtual MOs to improve SCF convergence - Default: 0.1 + Default: 0. .. option:: scf_algorithm diff --git a/docs/source/modules/single_ref_method.rst b/docs/source/modules/single_ref_method.rst index ae80a401..c0a6f43e 100644 --- a/docs/source/modules/single_ref_method.rst +++ b/docs/source/modules/single_ref_method.rst @@ -12,3 +12,74 @@ Include this module for single reference methods. Using this module, the only generator determinant is the Hartree-Fock determinant. + + +Providers +--------- + + +.. c:var:: n_det_generators + + .. code:: text + + integer :: n_det_generators + + File: :file:`generators.irp.f` + + For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant + + + + +.. c:var:: psi_coef_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: psi_det_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + +.. c:var:: select_max + + .. code:: text + + double precision, allocatable :: select_max (1) + + File: :file:`generators.irp.f` + + Memo to skip useless selectors + + + + +.. c:var:: size_select_max + + .. code:: text + + integer :: size_select_max + + File: :file:`generators.irp.f` + + Size of select_max + + diff --git a/docs/source/modules/tools.rst b/docs/source/modules/tools.rst index d9eb8f11..a482ae31 100644 --- a/docs/source/modules/tools.rst +++ b/docs/source/modules/tools.rst @@ -73,6 +73,20 @@ Subroutines / functions +.. c:function:: print_r2 + + .. code:: text + + subroutine print_r2 + + File: :file:`print_r2.irp.f` + + + + + + + .. c:function:: print_wf .. code:: text diff --git a/docs/source/programmers_guide/index_providers.rst b/docs/source/programmers_guide/index_providers.rst index 446cc193..9712c9d7 100644 --- a/docs/source/programmers_guide/index_providers.rst +++ b/docs/source/programmers_guide/index_providers.rst @@ -112,7 +112,6 @@ Index of Providers * :c:data:`aos_vx_alpha_pbe_w` * :c:data:`aos_vx_beta_lda_w` * :c:data:`aos_vx_beta_pbe_w` -* :c:data:`apply_exc_to_psi` * :c:data:`barycentric_electronic_energy` * :c:data:`bi_elec_ref_bitmask_energy` * :c:data:`big_array_coulomb_integrals` @@ -134,12 +133,8 @@ Index of Providers * :c:data:`cart_to_sphe_9` * :c:data:`cas_bitmask` * :c:data:`center_of_mass` -* :c:data:`ci_dressed_pt2_new_eigenvectors` -* :c:data:`ci_dressed_pt2_new_eigenvectors_s2` -* :c:data:`ci_dressed_pt2_new_energy` * :c:data:`ci_eigenvectors` * :c:data:`ci_eigenvectors_s2` -* :c:data:`ci_electronic_dressed_pt2_new_energy` * :c:data:`ci_electronic_energy` * :c:data:`ci_energy` * :c:data:`closed_shell_ref_bitmask` @@ -151,7 +146,6 @@ Index of Providers * :c:data:`core_fock_operator_erf` * :c:data:`core_inact_act_bitmask_4` * :c:data:`core_inact_virt_bitmask` -* :c:data:`corr_e_from_1h1p` * :c:data:`correlation_energy_ratio_max` * :c:data:`correlation_functional` * :c:data:`damping_for_rs_dft` @@ -164,7 +158,6 @@ Index of Providers * :c:data:`degree_max_generators` * :c:data:`degree_max_integration_lebedev` * :c:data:`delta_e_per_selector` -* :c:data:`delta_ij_mrpt` * :c:data:`density_for_dft` * :c:data:`det_alpha_norm` * :c:data:`det_beta_norm` @@ -184,7 +177,6 @@ Index of Providers * :c:data:`do_direct_integrals` * :c:data:`do_pseudo` * :c:data:`do_pt2` -* :c:data:`do_third_order_1h1p` * :c:data:`double_exc_bitmask` * :c:data:`double_index_selectors` * :c:data:`dr_radial_integral` @@ -211,8 +203,6 @@ Index of Providers * :c:data:`energy_c` * :c:data:`energy_c_lda` * :c:data:`energy_c_pbe` -* :c:data:`energy_cas_dyall` -* :c:data:`energy_cas_dyall_no_exchange` * :c:data:`energy_iterations` * :c:data:`energy_sr_c_lda` * :c:data:`energy_sr_c_pbe` @@ -232,12 +222,8 @@ Index of Providers * :c:data:`fact_inv` * :c:data:`fill_h_apply_buffer_selection` * :c:data:`final_grid_points` -* :c:data:`final_weight_functions_at_final_grid_points` -* :c:data:`final_weight_functions_at_grid_points` -* :c:data:`fock_core_inactive` -* :c:data:`fock_core_inactive_from_act` -* :c:data:`fock_core_inactive_total` -* :c:data:`fock_core_inactive_total_spin_trace` +* :c:data:`final_weight_at_r` +* :c:data:`final_weight_at_r_vector` * :c:data:`fock_matrix_alpha_no_xc_ao` * :c:data:`fock_matrix_ao` * :c:data:`fock_matrix_ao_alpha` @@ -248,12 +234,7 @@ Index of Providers * :c:data:`fock_matrix_mo` * :c:data:`fock_matrix_mo_alpha` * :c:data:`fock_matrix_mo_beta` -* :c:data:`fock_operator_active_from_core_inact` * :c:data:`fock_operator_closed_shell_ref_bitmask` -* :c:data:`fock_virt_from_act` -* :c:data:`fock_virt_from_core_inact` -* :c:data:`fock_virt_total` -* :c:data:`fock_virt_total_spin_trace` * :c:data:`fock_wee_closed_shell` * :c:data:`fps_spf_matrix_ao` * :c:data:`fps_spf_matrix_mo` @@ -261,17 +242,12 @@ Index of Providers * :c:data:`full_ijkl_bitmask_4` * :c:data:`gauleg_t2` * :c:data:`gauleg_w` -* :c:data:`gen_det_ref_idx` -* :c:data:`gen_det_ref_shortcut` -* :c:data:`gen_det_ref_sorted` -* :c:data:`gen_det_ref_version` * :c:data:`general_primitive_integral` * :c:data:`general_primitive_integral_erf` * :c:data:`generators_bitmask` * :c:data:`generators_bitmask_restart` * :c:data:`gga_sr_type_functionals` * :c:data:`gga_type_functionals` -* :c:data:`give_holes_and_particles_in_active_space` * :c:data:`grad_aos_dsr_vc_alpha_pbe_w` * :c:data:`grad_aos_dsr_vc_beta_pbe_w` * :c:data:`grad_aos_dsr_vx_alpha_pbe_w` @@ -282,20 +258,17 @@ Index of Providers * :c:data:`grad_aos_dvx_beta_pbe_w` * :c:data:`grid_points_per_atom` * :c:data:`grid_points_radial` +* :c:data:`grid_type_sgn` * :c:data:`h0_type` * :c:data:`h_apply_buffer_allocated` * :c:data:`h_apply_buffer_lock` * :c:data:`h_matrix_all_dets` * :c:data:`h_matrix_cas` -* :c:data:`h_matrix_ref` * :c:data:`hf_bitmask` * :c:data:`hf_energy` * :c:data:`hf_exchange` * :c:data:`hf_one_electron_energy` * :c:data:`hf_two_electron_energy` -* :c:data:`hmatrix_dressed_pt2_new` -* :c:data:`hmatrix_dressed_pt2_new_symmetrized` -* :c:data:`holes_operators` * :c:data:`i2radix_sort` * :c:data:`i8radix_sort` * :c:data:`i8radix_sort_big` @@ -311,10 +284,6 @@ Index of Providers * :c:data:`i_x2_pol_mult_mono_elec` * :c:data:`idx_cas` * :c:data:`idx_non_cas` -* :c:data:`idx_non_ref` -* :c:data:`idx_non_ref_from_sorted` -* :c:data:`idx_non_ref_rev` -* :c:data:`idx_ref` * :c:data:`inact_bitmask` * :c:data:`inact_virt_bitmask` * :c:data:`index_final_points` @@ -329,10 +298,7 @@ Index of Providers * :c:data:`insert_into_mo_integrals_map` * :c:data:`int_erf_3_index` * :c:data:`int_erf_3_index_exc` -* :c:data:`integral_density_alpha_knowles_becke_per_atom` -* :c:data:`integral_density_beta_knowles_becke_per_atom` * :c:data:`inv_int` -* :c:data:`inv_norm_psi_ref` * :c:data:`inv_selectors_coef_hf` * :c:data:`inv_selectors_coef_hf_squared` * :c:data:`iradix_sort` @@ -437,8 +403,7 @@ Index of Providers * :c:data:`n_det_max` * :c:data:`n_det_max_full` * :c:data:`n_det_non_cas` -* :c:data:`n_det_non_ref` -* :c:data:`n_det_ref` +* :c:data:`n_det_print_wf` * :c:data:`n_det_selectors` * :c:data:`n_double_exc_bitmasks` * :c:data:`n_double_selectors` @@ -466,7 +431,6 @@ Index of Providers * :c:data:`no_oa_or_av_opt` * :c:data:`no_vvv_integrals` * :c:data:`no_vvvv_integrals` -* :c:data:`norm_psi_ref` * :c:data:`nproc` * :c:data:`nthreads_davidson` * :c:data:`nucl_aos` @@ -488,31 +452,19 @@ Index of Providers * :c:data:`nucl_num` * :c:data:`nucl_num_shell_aos` * :c:data:`nuclear_repulsion` -* :c:data:`one_anhil` -* :c:data:`one_anhil_inact` -* :c:data:`one_anhil_one_creat` -* :c:data:`one_anhil_one_creat_inact_virt` -* :c:data:`one_anhil_one_creat_inact_virt_bis` -* :c:data:`one_anhil_one_creat_inact_virt_norm` -* :c:data:`one_body_dm_alpha_and_grad_at_r` * :c:data:`one_body_dm_alpha_ao_for_dft` * :c:data:`one_body_dm_alpha_at_r` * :c:data:`one_body_dm_ao_alpha` * :c:data:`one_body_dm_ao_beta` * :c:data:`one_body_dm_average_mo_for_dft` -* :c:data:`one_body_dm_beta_and_grad_at_r` * :c:data:`one_body_dm_beta_ao_for_dft` * :c:data:`one_body_dm_beta_at_r` * :c:data:`one_body_dm_dagger_mo_spin_index` * :c:data:`one_body_dm_mo` * :c:data:`one_body_dm_mo_alpha` -* :c:data:`one_body_dm_mo_alpha_and_grad_at_grid_points` -* :c:data:`one_body_dm_mo_alpha_at_grid_points` * :c:data:`one_body_dm_mo_alpha_average` * :c:data:`one_body_dm_mo_alpha_for_dft` * :c:data:`one_body_dm_mo_beta` -* :c:data:`one_body_dm_mo_beta_and_grad_at_grid_points` -* :c:data:`one_body_dm_mo_beta_at_grid_points` * :c:data:`one_body_dm_mo_beta_average` * :c:data:`one_body_dm_mo_beta_for_dft` * :c:data:`one_body_dm_mo_diff` @@ -524,14 +476,15 @@ Index of Providers * :c:data:`one_body_single_double_dm_mo_beta` * :c:data:`one_body_spin_density_ao` * :c:data:`one_body_spin_density_mo` -* :c:data:`one_creat` -* :c:data:`one_creat_virt` +* :c:data:`one_dm_alpha_in_r` +* :c:data:`one_dm_and_grad_alpha_in_r` +* :c:data:`one_dm_and_grad_beta_in_r` +* :c:data:`one_dm_beta_in_r` * :c:data:`one_electron_energy` * :c:data:`only_expected_s2` * :c:data:`output_cpu_time_0` * :c:data:`output_wall_time_0` * :c:data:`overlap_gaussian_xyz` -* :c:data:`particles_operators` * :c:data:`phi_angular_integration_lebedev` * :c:data:`potential_c_alpha_ao` * :c:data:`potential_c_alpha_ao_lda` @@ -574,7 +527,6 @@ Index of Providers * :c:data:`pseudo_v_k_transp` * :c:data:`pseudo_v_kl` * :c:data:`pseudo_v_kl_transp` -* :c:data:`psi_active` * :c:data:`psi_average_norm_contrib` * :c:data:`psi_average_norm_contrib_sorted` * :c:data:`psi_bilinear_matrix` @@ -628,30 +580,8 @@ Index of Providers * :c:data:`psi_non_cas_coef` * :c:data:`psi_non_cas_coef_sorted_bit` * :c:data:`psi_non_cas_sorted_bit` -* :c:data:`psi_non_ref` -* :c:data:`psi_non_ref_coef` -* :c:data:`psi_non_ref_coef_interm_norm` -* :c:data:`psi_non_ref_coef_restart` -* :c:data:`psi_non_ref_coef_sorted_bit` -* :c:data:`psi_non_ref_coef_transp` -* :c:data:`psi_non_ref_restart` -* :c:data:`psi_non_ref_sorted_bit` * :c:data:`psi_occ_pattern` * :c:data:`psi_occ_pattern_hii` -* :c:data:`psi_ref` -* :c:data:`psi_ref_bis_lock` -* :c:data:`psi_ref_coef` -* :c:data:`psi_ref_coef_diagonalized` -* :c:data:`psi_ref_coef_interm_norm` -* :c:data:`psi_ref_coef_inv` -* :c:data:`psi_ref_coef_normalized` -* :c:data:`psi_ref_coef_restart` -* :c:data:`psi_ref_coef_sorted_bit` -* :c:data:`psi_ref_coef_transp` -* :c:data:`psi_ref_energy` -* :c:data:`psi_ref_energy_diagonalized` -* :c:data:`psi_ref_restart` -* :c:data:`psi_ref_sorted_bit` * :c:data:`psi_selectors` * :c:data:`psi_selectors_coef` * :c:data:`psi_selectors_coef_transp` @@ -692,7 +622,6 @@ Index of Providers * :c:data:`ref_bitmask` * :c:data:`ref_bitmask_energy` * :c:data:`ref_closed_shell_bitmask` -* :c:data:`ref_hamiltonian_matrix` * :c:data:`reunion_of_bitmask` * :c:data:`reunion_of_cas_inact_bitmask` * :c:data:`reunion_of_core_inact_act_bitmask` @@ -711,15 +640,6 @@ Index of Providers * :c:data:`scf_density_matrix_ao_alpha` * :c:data:`scf_density_matrix_ao_beta` * :c:data:`scf_energy` -* :c:data:`second_order_pt_new` -* :c:data:`second_order_pt_new_1h` -* :c:data:`second_order_pt_new_1h1p` -* :c:data:`second_order_pt_new_1h2p` -* :c:data:`second_order_pt_new_1p` -* :c:data:`second_order_pt_new_2h` -* :c:data:`second_order_pt_new_2h1p` -* :c:data:`second_order_pt_new_2h2p` -* :c:data:`second_order_pt_new_2p` * :c:data:`select_max` * :c:data:`selection_criterion` * :c:data:`selection_criterion_factor` @@ -743,8 +663,6 @@ Index of Providers * :c:data:`state_following` * :c:data:`target_energy` * :c:data:`theta_angular_integration_lebedev` -* :c:data:`three_anhil` -* :c:data:`three_creat` * :c:data:`thresh_scf` * :c:data:`threshold_davidson` * :c:data:`threshold_diis` @@ -756,17 +674,13 @@ Index of Providers * :c:data:`trace_v_hxc` * :c:data:`trace_v_xc` * :c:data:`transpose` -* :c:data:`two_anhil` -* :c:data:`two_anhil_one_creat` -* :c:data:`two_creat` -* :c:data:`two_creat_one_anhil` * :c:data:`two_electron_energy` * :c:data:`unpaired_alpha_electrons` * :c:data:`used_weight` * :c:data:`var_pt2_ratio` * :c:data:`virt_bitmask` * :c:data:`virt_bitmask_4` -* :c:data:`weight_functions_at_grid_points` +* :c:data:`weight_at_r` * :c:data:`weight_occ_pattern` * :c:data:`weights_angular_integration_lebedev` * :c:data:`weights_angular_points` @@ -860,11 +774,8 @@ Index of Subroutines/Functions * :c:func:`connect_to_taskserver` * :c:func:`connected_to_ref` * :c:func:`connected_to_ref_by_mono` -* :c:func:`contrib_1h2p_dm_based` -* :c:func:`contrib_2h1p_dm_based` * :c:func:`copy_h_apply_buffer_to_wf` * :c:func:`copy_psi_bilinear_to_psi` -* :c:func:`coulomb_value_no_check` * :c:func:`create_guess` * :c:func:`create_microlist` * :c:func:`create_minilist` @@ -903,8 +814,6 @@ Index of Subroutines/Functions * :c:func:`diag_h_mat_elem_au0_h_au0` * :c:func:`diag_h_mat_elem_fock` * :c:func:`diag_h_mat_elem_monoelec` -* :c:func:`diag_h_mat_elem_no_elec_check` -* :c:func:`diag_h_mat_elem_no_elec_check_no_exchange` * :c:func:`diag_s_mat_elem` * :c:func:`diag_wee_mat_elem` * :c:func:`diagonalize_ci` @@ -947,7 +856,6 @@ Index of Subroutines/Functions * :c:func:`example_bitmask` * :c:func:`example_determinants` * :c:func:`example_determinants_psi_det` -* :c:func:`extract_ref` * :c:func:`extrapolate_data` * :c:func:`f_function_becke` * :c:func:`f_integral` @@ -959,7 +867,6 @@ Index of Subroutines/Functions * :c:func:`filter_connected` * :c:func:`filter_connected_i_h_psi0` * :c:func:`filter_not_connected` -* :c:func:`find_connections_previous` * :c:func:`find_rotation` * :c:func:`four_idx_transform` * :c:func:`g0d` @@ -1001,8 +908,6 @@ Index of Subroutines/Functions * :c:func:`get_d0` * :c:func:`get_d1` * :c:func:`get_d2` -* :c:func:`get_delta_e_dyall` -* :c:func:`get_delta_e_dyall_general_mp` * :c:func:`get_double_excitation` * :c:func:`get_double_excitation_spin` * :c:func:`get_excitation` @@ -1017,7 +922,6 @@ Index of Subroutines/Functions * :c:func:`get_index_in_psi_det_alpha_unique` * :c:func:`get_index_in_psi_det_beta_unique` * :c:func:`get_index_in_psi_det_sorted_bit` -* :c:func:`get_index_in_psi_ref_sorted_bit` * :c:func:`get_inverse` * :c:func:`get_m0` * :c:func:`get_m1` @@ -1050,19 +954,6 @@ Index of Subroutines/Functions * :c:func:`get_uj_s2_ui` * :c:func:`getmobiles` * :c:func:`getunitandopen` -* :c:func:`give_1h1p_contrib` -* :c:func:`give_1h1p_only_doubles_spin_cross` -* :c:func:`give_1h1p_sec_order_singles_contrib` -* :c:func:`give_1h2p_contrib` -* :c:func:`give_1h2p_contrib_sec_order` -* :c:func:`give_1h2p_new` -* :c:func:`give_1p_sec_order_singles_contrib` -* :c:func:`give_2h1p_contrib` -* :c:func:`give_2h1p_contrib_sec_order` -* :c:func:`give_2h1p_new` -* :c:func:`give_2h2p` -* :c:func:`give_2p_new` -* :c:func:`give_active_part_determinant` * :c:func:`give_all_aos_and_grad_and_lapl_at_r` * :c:func:`give_all_aos_and_grad_at_r` * :c:func:`give_all_aos_at_r` @@ -1071,18 +962,13 @@ Index of Subroutines/Functions * :c:func:`give_all_mos_and_grad_and_lapl_at_r` * :c:func:`give_all_mos_and_grad_at_r` * :c:func:`give_all_mos_at_r` -* :c:func:`give_core_inactive_part_determinant` * :c:func:`give_explicit_poly_and_gaussian` * :c:func:`give_explicit_poly_and_gaussian_double` * :c:func:`give_explicit_poly_and_gaussian_x` -* :c:func:`give_holes_in_inactive_space` -* :c:func:`give_particles_in_virt_space` * :c:func:`give_polynom_mult_center_mono_elec` * :c:func:`give_polynom_mult_center_mono_elec_erf` * :c:func:`give_polynom_mult_center_mono_elec_erf_opt` * :c:func:`give_polynom_mult_center_x` -* :c:func:`give_singles_and_partial_doubles_1h1p_contrib` -* :c:func:`give_virt_part_determinant` * :c:func:`gpw` * :c:func:`grad_rho_ab_to_grad_rho_oc` * :c:func:`gser` @@ -1096,51 +982,6 @@ Index of Subroutines/Functions * :c:func:`h_apply_cisd_diexcorg` * :c:func:`h_apply_cisd_diexcp` * :c:func:`h_apply_cisd_monoexc` -* :c:func:`h_apply_mrpt` -* :c:func:`h_apply_mrpt_1h` -* :c:func:`h_apply_mrpt_1h1p` -* :c:func:`h_apply_mrpt_1h1p_diexc` -* :c:func:`h_apply_mrpt_1h1p_diexcorg` -* :c:func:`h_apply_mrpt_1h1p_diexcp` -* :c:func:`h_apply_mrpt_1h1p_monoexc` -* :c:func:`h_apply_mrpt_1h2p` -* :c:func:`h_apply_mrpt_1h2p_diexc` -* :c:func:`h_apply_mrpt_1h2p_diexcorg` -* :c:func:`h_apply_mrpt_1h2p_diexcp` -* :c:func:`h_apply_mrpt_1h2p_monoexc` -* :c:func:`h_apply_mrpt_1h_diexc` -* :c:func:`h_apply_mrpt_1h_diexcorg` -* :c:func:`h_apply_mrpt_1h_diexcp` -* :c:func:`h_apply_mrpt_1h_monoexc` -* :c:func:`h_apply_mrpt_1p` -* :c:func:`h_apply_mrpt_1p_diexc` -* :c:func:`h_apply_mrpt_1p_diexcorg` -* :c:func:`h_apply_mrpt_1p_diexcp` -* :c:func:`h_apply_mrpt_1p_monoexc` -* :c:func:`h_apply_mrpt_2h` -* :c:func:`h_apply_mrpt_2h1p` -* :c:func:`h_apply_mrpt_2h1p_diexc` -* :c:func:`h_apply_mrpt_2h1p_diexcorg` -* :c:func:`h_apply_mrpt_2h1p_diexcp` -* :c:func:`h_apply_mrpt_2h1p_monoexc` -* :c:func:`h_apply_mrpt_2h2p` -* :c:func:`h_apply_mrpt_2h2p_diexc` -* :c:func:`h_apply_mrpt_2h2p_diexcorg` -* :c:func:`h_apply_mrpt_2h2p_diexcp` -* :c:func:`h_apply_mrpt_2h2p_monoexc` -* :c:func:`h_apply_mrpt_2h_diexc` -* :c:func:`h_apply_mrpt_2h_diexcorg` -* :c:func:`h_apply_mrpt_2h_diexcp` -* :c:func:`h_apply_mrpt_2h_monoexc` -* :c:func:`h_apply_mrpt_2p` -* :c:func:`h_apply_mrpt_2p_diexc` -* :c:func:`h_apply_mrpt_2p_diexcorg` -* :c:func:`h_apply_mrpt_2p_diexcp` -* :c:func:`h_apply_mrpt_2p_monoexc` -* :c:func:`h_apply_mrpt_diexc` -* :c:func:`h_apply_mrpt_diexcorg` -* :c:func:`h_apply_mrpt_diexcp` -* :c:func:`h_apply_mrpt_monoexc` * :c:func:`h_s2_u_0_bielec_nstates_openmp` * :c:func:`h_s2_u_0_bielec_nstates_openmp_work` * :c:func:`h_s2_u_0_bielec_nstates_openmp_work_1` @@ -1179,8 +1020,6 @@ Index of Subroutines/Functions * :c:func:`i_h_j_bielec` * :c:func:`i_h_j_double_alpha_beta` * :c:func:`i_h_j_double_spin` -* :c:func:`i_h_j_dyall` -* :c:func:`i_h_j_dyall_no_exchange` * :c:func:`i_h_j_mono_spin` * :c:func:`i_h_j_mono_spin_monoelec` * :c:func:`i_h_j_monoelec` @@ -1188,7 +1027,6 @@ Index of Subroutines/Functions * :c:func:`i_h_j_verbose` * :c:func:`i_h_psi` * :c:func:`i_h_psi_minilist` -* :c:func:`i_h_psi_pert_new_minilist` * :c:func:`i_s2_psi_minilist` * :c:func:`i_wee_j_mono` * :c:func:`i_x1_pol_mult` @@ -1221,7 +1059,6 @@ Index of Subroutines/Functions * :c:func:`is_connected_to_by_mono` * :c:func:`is_generable_cassd` * :c:func:`is_i_in_virtual` -* :c:func:`is_in_psi_ref` * :c:func:`is_in_wavefunction` * :c:func:`is_spin_flip_possible` * :c:func:`is_the_hole_in_det` @@ -1261,7 +1098,6 @@ Index of Subroutines/Functions * :c:func:`molden` * :c:func:`mono_excitation_wee` * :c:func:`mpi_print` -* :c:func:`mrpt_dress` * :c:func:`multiply_poly` * :c:func:`n_pt_sup` * :c:func:`nai_pol_mult` @@ -1321,6 +1157,7 @@ Index of Subroutines/Functions * :c:func:`print_generators_bitmasks_particles` * :c:func:`print_generators_bitmasks_particles_for_one_generator` * :c:func:`print_memory_usage` +* :c:func:`print_r2` * :c:func:`print_spindet` * :c:func:`print_summary` * :c:func:`print_wf` @@ -1408,7 +1245,6 @@ Index of Subroutines/Functions * :c:func:`set_bit_to_integer` * :c:func:`set_bitmask_hole_as_input` * :c:func:`set_bitmask_particl_as_input` -* :c:func:`set_generators_bitmasks_as_holes_and_particles` * :c:func:`set_natural_mos` * :c:func:`set_order` * :c:func:`set_order_big` @@ -1436,8 +1272,6 @@ Index of Subroutines/Functions * :c:func:`tasks_done_to_taskserver` * :c:func:`testteethbuilding` * :c:func:`total_memory` -* :c:func:`u0_h_dyall_u0` -* :c:func:`u0_h_dyall_u0_no_exchange` * :c:func:`u_0_h_u_0` * :c:func:`u_0_h_u_0_bielec` * :c:func:`u_0_s2_u_0` diff --git a/docs/source/research.bib b/docs/source/research.bib index 28b072a9..1676cf24 100644 --- a/docs/source/research.bib +++ b/docs/source/research.bib @@ -177,6 +177,20 @@ 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}}, diff --git a/docs/source/users_guide/quickstart.rst b/docs/source/users_guide/quickstart.rst index afc0136e..02e0f51c 100644 --- a/docs/source/users_guide/quickstart.rst +++ b/docs/source/users_guide/quickstart.rst @@ -75,19 +75,30 @@ The expected energy is ``-92.827856698`` au. The documentation of the :ref:`hartree_fock` module. +This creates the |MOs| in the |EZFIO| database that will be used to perform any other post-SCF method. +The |qp| does not handle symmetry and the |MOs| are stored by increasing order of Fock energies. Choose the target |MO| space ---------------------------- Now, modify to |EZFIO| database to make |CIPSI| calculation in the full set of valence |MOs|, keeping the core |MOs| frozen. The simple -command :command:`qp_set_frozen_core` does this automatically: +command :ref:`qp_set_frozen_core` does this automatically: .. code:: bash qp_set_frozen_core hcn +The general command to specify core and active orbitals is :ref:`qp_set_mo_class`. +In the case of HCN molecule in the 631G basis, one has 20 |MOs| in total and the two first orbitals are frozen: + +.. code:: + + qp_set_mo_class -core "[1-2]" -act "[3-20]" hcn + + + Run the |CIPSI| calculation ---------------------------- @@ -95,7 +106,7 @@ We will now use the |CIPSI| algorithm to estimate the |FCI| energy. .. code:: - qp_run fci hcn + qp_run fci hcn | tee hcn.fci.out The program will start with a single determinant and will iteratively: @@ -112,18 +123,108 @@ The program will start with a single determinant and will iteratively: By default, the program will stop when more than one million determinants have entered in the internal space, or when the |PT2| energy is below :math:`10^{-4}`. +To have a pictural illustration of the convergence of the |CIPSI| algorithm, just run + +.. code:: + + qp_e_conv_fci hcn.fci.out + +This will create the files "hcn.fci.out.conv" containing the data of the convergence of the energy that can be plotted, together with the file "hcn.fci.out.conv.eps" which is obtained from the gnuplot plot file "hcn.fci.out.conv.plt". + + The estimated |FCI| energy of HCN is ``-93.0501`` au. .. seealso:: The documentation of the :ref:`fci` module. +Extracting natural orbitals +--------------------------- + +Once obtained the near |FCI| wave function, one can obtain many quantities related to it. +One of these quantities are the natural orbitals which have the properties of diagonalizing the one-body density matrix: + + .. math:: + + \rho_{ij} = \delta_{ij} + +where the element of the one-body density matrix :math:`\rho_{ij}` is define as: + + + .. math:: + + \rho_{ij} = \langle \Psi | \left( a^{\dagger}_{j,\alpha} a_{i,\alpha} + a^{\dagger}_{j,\beta} a_{i,\beta} \right) | \Psi \rangle + + +These orbitals are in general known to be better than the usual |HF| |MOs| as they are obtained from a correlated wave function. To use these orbitals for future calculations, one has to replace the current |MOs| by the natural orbitals. To do so, just run: + +.. code:: + + qp_run save_natorb hcn + + +Hands on +======== + +.. important:: + + As the |MOs| are changed, for the sake of coherence of future calculations, the save_natorb program + *automatically removes the current wave function* stored in the |EZFIO| database and replace + it by a single Slater determinant. + + +Then, you can run another |CIPSI| calculation to see how the use of natural orbital affect the convergence of the algorithm. For instance: + +.. code:: + + qp_run fci hcn | tee hcn.fci_natorb.out + +and then + +.. code:: + + qp_e_conv_fci hcn.fci_natorb.out + + +Printing the near |FCI| wave function +------------------------------------- + +Once obtained the near |FCI| energy, one can also take a closer look at the wave function stored in the |EZFIO| database. +If the wave function contains less than :math:`10^4` determinants, you can directly read it with the +:ref:`qp_edit` command. Just run + +.. code:: + + qp_edit hcn + + +.. important:: + + The :ref:`qp_edit` mode virtually makes human-friendly the architecture of the |EZFIO| database + through *vim*-like editor. + + +Then, look for "hand" when you are in the :ref:`qp_edit` mode. If the research is negative, +then it means that the wave function stored in the |EZFIO| database is too large to be edited in :ref:`qp_edit` mode. +An alternative is to use the :command:`print_wf` command: + +.. code:: + + qp_run print_wf hcn | tee hcn.fci_natorb.wf + +This program will, by default, print out the first :math:`10^4` determinants whatever the size of the wave function stored in the |EZFIO| folder. If you want to change the number of printed Slater determinants, just change the :option:`determinants n_det_print_wf` keyword using the :ref:`qp_edit` tool. + + +The Range Separated Hybrids +--------------------------- + +TODO + .. important:: TODO .. include:: /work.rst - * Natural orbitals * Parameters for Hartree-Fock * Parameters for Davidson * Running in parallel diff --git a/plugins/garniron/mrcepa0/mrcepa0.bats b/plugins/garniron/mrcepa0/test_mrcepa0 similarity index 100% rename from plugins/garniron/mrcepa0/mrcepa0.bats rename to plugins/garniron/mrcepa0/test_mrcepa0 diff --git a/scripts/qp_e_conv_fci b/scripts/qp_e_conv_fci new file mode 100755 index 00000000..fd1cc74f --- /dev/null +++ b/scripts/qp_e_conv_fci @@ -0,0 +1,67 @@ +#!/bin/bash +file=$1 +out=${file}.conv + + Ndet=`grep "N_det =" $file | cut -d "=" -f 2` + Evar=`grep "E =" $file | cut -d "=" -f 2` + EPT2=`grep "E+rPT2 =" $file | cut -d "=" -f 2 | cut -d "+" -f 1` + err=`grep "E+rPT2 =" $file | cut -d "=" -f 2 | cut -d "+" -f 2 | cut -d "/" -f 2 | cut -d " " -f 5` + +Ndetarray=[] +j=0 +for i in $Ndet + do + Ndetarray[$j]=$i + let "j=j+1" +done +Nmax=${#Ndetarray[*]} +let "Nmax-=1" + + +Evararray=[] +j=0 +for i in $Evar + do + Evararray[$j]=$i + let "j=j+1" +done + + +EPT2array=[] +j=0 +for i in $EPT2 + do + EPT2array[$j]=$i + let "j=j+1" +done + + +errarray=[] +j=0 +for i in $err + do + errarray[$j]=$i + let "j=j+1" +done + + + + +echo "#Ndet E_var E+PT2 statistical error " > $out +for i in `seq 0 $Nmax` +do + echo ${Ndetarray[$i]} ${Evararray[$i]} ${EPT2array[$i]} ${errarray[$i]} >> $out +done + +cat << EOF > ${out}.plt +set term eps +set output "$out.eps" +set log x +set xlabel "Number of determinants" +set ylabel "Total Energy (a.u.)" + +plot "$out" w lp title "E_{var}", "$out" u 1:3:4 w errorlines title "E_{var} + PT2" + +EOF + +gnuplot ${out}.plt diff --git a/src/ao_one_e_integrals/README.rst b/src/ao_one_e_integrals/README.rst index 2d4c9660..8f9f5497 100644 --- a/src/ao_one_e_integrals/README.rst +++ b/src/ao_one_e_integrals/README.rst @@ -6,8 +6,9 @@ All the one-electron integrals in the |AO| basis are here. The most important providers for usual quantum-chemistry calculation are: -# `ao_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_ao_ints.irp.f`) -# `ao_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_ao_ints.irp.f`) -# `ao_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`ao_mono_ints.irp.f`) +* `ao_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_ao_ints.irp.f`) +* `ao_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_ao_ints.irp.f`) +* `ao_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`ao_mono_ints.irp.f`) + Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_ao.irp.f`. diff --git a/src/ao_two_e_erf_integrals/README.rst b/src/ao_two_e_erf_integrals/README.rst new file mode 100644 index 00000000..cf50e17b --- /dev/null +++ b/src/ao_two_e_erf_integrals/README.rst @@ -0,0 +1,19 @@ +====================== +ao_two_e_erf_integrals +====================== + +Here, all two-electron integrals (:math:`erf(\mu r_{12})/r_{12}`) are computed. +As they have 4 indices and many are zero, they are stored in a map, as defined +in :file:`utils/map_module.f90`. + +The main parameter of this module is :option:`ao_two_e_erf_integrals mu_erf` which is the range-separation parameter. + +To fetch an |AO| integral, use the +`get_ao_bielec_integral_erf(i,j,k,l,ao_integrals_erf_map)` function. + + +The conventions are: +* For |AO| integrals : (ij|kl) = (11|22) = = <12|12> + + + diff --git a/src/ao_two_e_integrals/README.rst b/src/ao_two_e_integrals/README.rst new file mode 100644 index 00000000..7c870e2b --- /dev/null +++ b/src/ao_two_e_integrals/README.rst @@ -0,0 +1,17 @@ +================== +ao_two_e_integrals +================== + +Here, all two-electron integrals (:math:`1/r_{12}`) are computed. +As they have 4 indices and many are zero, they are stored in a map, as defined +in :file:`utils/map_module.f90`. + +To fetch an |AO| integral, use the +`get_ao_bielec_integral(i,j,k,l,ao_integrals_map)` function. + + +The conventions are: +* For |AO| integrals : (ij|kl) = (11|22) = = <12|12> + + + diff --git a/src/aux_quantities/README.rst b/src/aux_quantities/README.rst index 7b7154fe..4ff4d296 100644 --- a/src/aux_quantities/README.rst +++ b/src/aux_quantities/README.rst @@ -7,7 +7,7 @@ This module contains some global variables (such as densities and energies) whic The main providers of that module are: -# `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. +* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. Thanks to these providers you can use any density matrix that does not necessary corresponds to that of the current wave function. diff --git a/src/becke_numerical_grid/EZFIO.cfg b/src/becke_numerical_grid/EZFIO.cfg index ac76c70f..3b2c2625 100644 --- a/src/becke_numerical_grid/EZFIO.cfg +++ b/src/becke_numerical_grid/EZFIO.cfg @@ -1,16 +1,5 @@ -[n_points_integration_angular] +[grid_type_sgn] type: integer -doc: Number of angular points per atom for 3d numerical integration, needed for DFT for example [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ] +doc: Type of grid used for the Becke's numerical grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ] interface: ezfio,provider,ocaml -default: 590 - - -[n_points_radial_grid] -type: integer -doc: Number of radial points per atom for 3d numerical integration, needed for DFT for example -interface: ezfio,provider,ocaml -default: 60 - - - - +default: 2 diff --git a/src/becke_numerical_grid/README.rst b/src/becke_numerical_grid/README.rst index b5019036..f739b059 100644 --- a/src/becke_numerical_grid/README.rst +++ b/src/becke_numerical_grid/README.rst @@ -4,14 +4,20 @@ becke_numerical_grid This module contains all quantities needed to build the Becke's grid used in general for DFT integration. Note that it can be used for whatever integration in R^3 as long as the functions to be integrated are mostly concentrated near the atomic regions. -This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains a certain number of radial and angular points. +This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains +a certain number of radial and angular points. No pruning is done on the angular part of the grid. + +The main keyword for that modue is: + +* :option:`becke_numerical_grid grid_type_sgn` which controls the precision of the grid according the standard **SG-n** grids. This keyword controls the two providers `n_points_integration_angular` `n_points_radial_grid`. The main providers of that module are: -# :option:`becke_numerical_grid n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details. -# :option:`becke_numerical_grid n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary. -# `final_grid_points` which are the (x,y,z) coordinates of the grid points. -# `final_weight_at_r_vector` which are the weights at each grid point +* `n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 170 | 194 | 266 | 302 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details. +* `n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary. +* `final_grid_points` which are the (x,y,z) coordinates of the grid points. +* `final_weight_at_r_vector` which are the weights at each grid point + For a simple example of how to use the grid, see :file:`example.irp.f`. diff --git a/src/becke_numerical_grid/grid_becke.irp.f b/src/becke_numerical_grid/grid_becke.irp.f index b2be30e7..ee66d835 100644 --- a/src/becke_numerical_grid/grid_becke.irp.f +++ b/src/becke_numerical_grid/grid_becke.irp.f @@ -1,3 +1,32 @@ + BEGIN_PROVIDER [integer, n_points_radial_grid] +&BEGIN_PROVIDER [integer, n_points_integration_angular] + implicit none + BEGIN_DOC + ! n_points_radial_grid = number of radial grid points per atom + ! + ! n_points_integration_angular = number of angular grid points per atom + ! + ! These numbers are automatically set by setting the grid_type_sgn parameter + END_DOC +select case (grid_type_sgn) + case(0) + n_points_radial_grid = 23 + n_points_integration_angular = 170 + case(1) + n_points_radial_grid = 50 + n_points_integration_angular = 194 + case(2) + n_points_radial_grid = 75 + n_points_integration_angular = 302 + case(3) + n_points_radial_grid = 99 + n_points_integration_angular = 590 + case default + write(*,*) '!!! Quadrature grid not available !!!' + stop + end select +END_PROVIDER + BEGIN_PROVIDER [integer, n_points_grid_per_atom] implicit none BEGIN_DOC @@ -42,9 +71,18 @@ END_PROVIDER case (0590) call LD0590(X,Y,Z,W,n_points_integration_angular) + case (302) + call LD0302(X,Y,Z,W,n_points_integration_angular) + case (266) call LD0266(X,Y,Z,W,n_points_integration_angular) + case (194) + call LD0194(X,Y,Z,W,n_points_integration_angular) + + case (170) + call LD0170(X,Y,Z,W,n_points_integration_angular) + case (74) call LD0074(X,Y,Z,W,n_points_integration_angular) @@ -53,7 +91,7 @@ END_PROVIDER case default print *, irp_here//': wrong n_points_integration_angular. Expected:' - print *, '[ 50 | 74 | 266 | 590 | 1202 | 2030 | 5810 ]' + print *, '[ 50 | 74 | 170 | 194 | 266 | 302 | 590 | 1202 | 2030 | 5810 ]' stop -1 end select diff --git a/src/becke_numerical_grid/grid_becke_vector.irp.f b/src/becke_numerical_grid/grid_becke_vector.irp.f index cf86121a..2655c100 100644 --- a/src/becke_numerical_grid/grid_becke_vector.irp.f +++ b/src/becke_numerical_grid/grid_becke_vector.irp.f @@ -20,7 +20,7 @@ BEGIN_PROVIDER [integer, n_points_final_grid] enddo enddo print*,'n_points_final_grid = ',n_points_final_grid - print*,'n max point = ',n_points_integration_angular*n_points_radial_grid*nucl_num + print*,'n max point = ',n_points_integration_angular*(n_points_radial_grid*nucl_num - 1) END_PROVIDER BEGIN_PROVIDER [double precision, final_grid_points, (3,n_points_final_grid)] diff --git a/src/cis/cis.irp.f b/src/cis/cis.irp.f index 7238357e..6e2b069d 100644 --- a/src/cis/cis.irp.f +++ b/src/cis/cis.irp.f @@ -18,6 +18,12 @@ subroutine run do i = 1,N_states print *, i, CI_energy(i) enddo + print*,'******************************' + print*,'Excitation energy ' + do i = 2, N_states + print*, i ,CI_energy(i) - CI_energy(1) + enddo + call ezfio_set_cis_energy(CI_energy) psi_coef = ci_eigenvectors SOFT_TOUCH psi_coef diff --git a/src/density_for_dft/README.rst b/src/density_for_dft/README.rst index 24166855..962863ce 100644 --- a/src/density_for_dft/README.rst +++ b/src/density_for_dft/README.rst @@ -7,6 +7,6 @@ This module defines the *provider* of the density used for the DFT related calcu This definition is done through the keyword :option:`density_for_dft density_for_dft`. The density can be: -# WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``) -# damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft` +* WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``) +* damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft` diff --git a/src/determinants/EZFIO.cfg b/src/determinants/EZFIO.cfg index 118b8a5d..5ae04227 100644 --- a/src/determinants/EZFIO.cfg +++ b/src/determinants/EZFIO.cfg @@ -4,6 +4,12 @@ doc: Maximum number of determinants in the wave function interface: ezfio,provider,ocaml default: 1000000 +[n_det_print_wf] +type: Det_number_max +doc: Maximum number of determinants to be printed with the program print_wf +interface: ezfio,provider,ocaml +default: 10000 + [n_det_max_full] type: Det_number_max doc: Maximum number of determinants where |H| is fully diagonalized diff --git a/src/determinants/README.rst b/src/determinants/README.rst index 537464b7..9da056ff 100644 --- a/src/determinants/README.rst +++ b/src/determinants/README.rst @@ -6,16 +6,16 @@ Contains everything for the computation of the Hamiltonian matrix elements in th The main providers for this module are: -# :option:`determinants n_states`: number of states to be computed -# `psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|. -# `psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants. +* :option:`determinants n_states`: number of states to be computed +* `psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|. +* `psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants. The main routines for this module are: -# `i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants. -# `i_H_j_s2`: computes the Hamiltonian and (:math:`S^2`) matrix element between two arbitrary Slater determinants. -# `i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor. -# `i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants. +* `i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants. +* `i_H_j_s2`: computes the Hamiltonian and (:math:`S^2`) matrix element between two arbitrary Slater determinants. +* `i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor. +* `i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants. For an example of how to use these routines and providers, take a look at :file:`example.irp.f`. diff --git a/src/dft_keywords/README.rst b/src/dft_keywords/README.rst index 89980d79..34fa874f 100644 --- a/src/dft_keywords/README.rst +++ b/src/dft_keywords/README.rst @@ -4,10 +4,10 @@ dft_keywords This module contains the main keywords related to a DFT calculation or RS-DFT calculation, such as: -# :option:`dft_keywords exchange_functional` -# :option:`dft_keywords correlation_functional` -# :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program +* :option:`dft_keywords exchange_functional` +* :option:`dft_keywords correlation_functional` +* :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program -The keyword for the range separation parameter :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. +The keyword for the **range separation parameter** :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. The keyword for the type of density used in RS-DFT calculation with a multi-configurational wave function is the :option:`density_for_dft density_for_dft` keyword. diff --git a/src/dft_utils_in_r/README.rst b/src/dft_utils_in_r/README.rst new file mode 100644 index 00000000..d4c4a178 --- /dev/null +++ b/src/dft_utils_in_r/README.rst @@ -0,0 +1,14 @@ +============== +dft_utils_in_r +============== + +This module contains most of the fundamental quantities (AOs, MOs or density derivatives) evaluated in real-space representation that are needed for the various DFT modules. + +As these quantities might be used and re-used, the values at each point of the grid are stored (see ``becke_numerical_grid`` for more information on the grid). + +The main providers for this module are: + +* `aos_in_r_array`: values of the |AO| basis on the grid point. +* `mos_in_r_array`: values of the |MO| basis on the grid point. +* `one_dm_and_grad_alpha_in_r`: values of the density and its gradienst on the grid points. + diff --git a/src/dft_utils_one_e/README.rst b/src/dft_utils_one_e/README.rst index 96bbd211..723719b9 100644 --- a/src/dft_utils_one_e/README.rst +++ b/src/dft_utils_one_e/README.rst @@ -6,16 +6,19 @@ This module contains all the one-body related quantities needed to perform DFT o Therefore, it contains most of the properties which depends on the one-body density and density matrix. The most important files and variables are: -# The general *providers* for the x/c energies in :file:`e_xc_general.irp.f` -# The general *providers* for the x/c potentials in :file:`pot_general.irp.f` -# The short-range hartree operator and all related quantities in :file:`sr_coulomb.irp.f` + +* The general *providers* for the x/c energies in :file:`e_xc_general.irp.f` +* The general *providers* for the x/c potentials in :file:`pot_general.irp.f` +* The short-range hartree operator and all related quantities in :file:`sr_coulomb.irp.f` + These *providers* will be used in many DFT-related programs, such as :file:`ks_scf.irp.f` or :file:`rs_ks_scf.irp.f`. It is also needed to compute the effective one-body operator needed in multi-determinant RS-DFT (see plugins by eginer). Some other interesting quantities: -# The LDA and PBE *providers* for the x/c energies in :file:`e_xc.irp.f` and :file:`sr_exc.irp.f` -# The LDA and PBE *providers* for the x/c potentials on the AO basis in :file:`pot_ao.irp.f` and :file:`sr_pot_ao.irp.f` -# The :math:`h_{core}` energy computed directly with the one-body density matrix in :file:`one_e_energy_dft.irp.f` -# LDA and PBE short-range functionals *subroutines* in :file:`exc_sr_lda.irp.f` and :file:`exc_sr_pbe.irp.f` + +* The LDA and PBE *providers* for the x/c energies in :file:`e_xc.irp.f` and :file:`sr_exc.irp.f` +* The LDA and PBE *providers* for the x/c potentials on the AO basis in :file:`pot_ao.irp.f` and :file:`sr_pot_ao.irp.f` +* The :math:`h_{core}` energy computed directly with the one-body density matrix in :file:`one_e_energy_dft.irp.f` +* LDA and PBE short-range functionals *subroutines* in :file:`exc_sr_lda.irp.f` and :file:`exc_sr_pbe.irp.f` diff --git a/src/dft_utils_one_e/sr_pot_ao.irp.f b/src/dft_utils_one_e/sr_pot_ao.irp.f index 1b786cac..36fa3f47 100644 --- a/src/dft_utils_one_e/sr_pot_ao.irp.f +++ b/src/dft_utils_one_e/sr_pot_ao.irp.f @@ -52,7 +52,6 @@ call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_sr_vx_beta_LDA_w(1,1,istate) ,n_points_final_grid,0.d0,potential_sr_x_beta_ao_LDA(1,1,istate),ao_num) enddo call wall_time(wall_2) - print*,'time to provide potential_sr_x/c_alpha/beta_ao_LDA = ',wall_2 - wall_1 END_PROVIDER diff --git a/src/hartree_fock/README.rst b/src/hartree_fock/README.rst index 9cc6ad30..0fcb3ca0 100644 --- a/src/hartree_fock/README.rst +++ b/src/hartree_fock/README.rst @@ -10,6 +10,7 @@ The Hartree-Fock in an SCF and therefore is based on the ``scf_utils`` structure It performs the following actions: #. Compute/Read all the one- and two-electron integrals, and store them in memory + #. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it will read them as initial guess. Otherwise, it will create a guess. #. Perform the |SCF| iterations @@ -19,6 +20,7 @@ For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory The main are: # :option:`scf_utils thresh_scf` + # :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation diff --git a/src/hartree_fock/scf.irp.f b/src/hartree_fock/scf.irp.f index c8e474c0..d735bb89 100644 --- a/src/hartree_fock/scf.irp.f +++ b/src/hartree_fock/scf.irp.f @@ -5,6 +5,10 @@ program scf ! output: hartree_fock.energy ! optional: mo_basis.mo_coef END_DOC + disk_access_mo_one_integrals = "None" + touch disk_access_mo_one_integrals + disk_access_ao_one_integrals = "None" + touch disk_access_ao_one_integrals call create_guess call orthonormalize_mos call run @@ -54,6 +58,7 @@ subroutine run ! Choose SCF algorithm call Roothaan_Hall_SCF + call ezfio_set_hartree_fock_energy(SCF_energy) end diff --git a/src/hartree_fock/scf_old.irp.f b/src/hartree_fock/scf_old.irp.f index c6f69191..1f828154 100644 --- a/src/hartree_fock/scf_old.irp.f +++ b/src/hartree_fock/scf_old.irp.f @@ -5,6 +5,11 @@ program scf ! output: hartree_fock.energy ! optional: mo_basis.mo_coef END_DOC + disk_access_mo_one_integrals = "None" + touch disk_access_mo_one_integrals + disk_access_ao_one_integrals = "None" + touch disk_access_ao_one_integrals + call create_guess call orthonormalize_mos call run diff --git a/src/kohn_sham/README.rst b/src/kohn_sham/README.rst index 2b6bd7bc..83e8d1f8 100644 --- a/src/kohn_sham/README.rst +++ b/src/kohn_sham/README.rst @@ -17,8 +17,9 @@ It performs the following actions: The definition of the Fock matrix is in :file:`kohn_sham fock_matrix_ks.irp.f` For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory where you will find all options. The main are: -# :option:`scf_utils thresh_scf` -# :option:`scf_utils level_shift` + +#. :option:`scf_utils thresh_scf` +#. :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation crashes for any unexpected reason, the calculation can be restarted by running again diff --git a/src/kohn_sham/ks_scf.irp.f b/src/kohn_sham/ks_scf.irp.f index aad5527e..47dc2e73 100644 --- a/src/kohn_sham/ks_scf.irp.f +++ b/src/kohn_sham/ks_scf.irp.f @@ -5,6 +5,11 @@ program srs_ks_cf ! output: kohn_sham.energy ! optional: mo_basis.mo_coef END_DOC + + disk_access_mo_one_integrals = "None" + touch disk_access_mo_one_integrals + disk_access_ao_one_integrals = "None" + touch disk_access_ao_one_integrals read_wf = .False. density_for_dft ="WFT" touch density_for_dft diff --git a/src/kohn_sham_rs/21.rsks.bats b/src/kohn_sham_rs/21.rsks.bats new file mode 100644 index 00000000..e0d62d10 --- /dev/null +++ b/src/kohn_sham_rs/21.rsks.bats @@ -0,0 +1,37 @@ +#!/usr/bin/env bats + +source $QP_ROOT/tests/bats/common.bats.sh + + +function run() { + thresh=1.e-8 + qp_edit -c $1 + ezfio set_file $1 + ezfio set scf_utils thresh_scf 1.e-10 + echo "short_range_PBE" > $1/dft_keywords/exchange_functional + echo "short_range_PBE" > $1/dft_keywords/correlation_functional + echo "0.5" > $1/ao_two_e_erf_integrals/mu_erf + echo "1" > $1/becke_numerical_grid/grid_type_sgn + qp_run rs_ks_scf $1 + energy="$(ezfio get kohn_sham_rs energy)" + eq $energy $2 $thresh +} + + + +@test "H3COH" { + run h3coh.ezfio -115.50238225208 +} + +@test "HCN" { + run hcn.ezfio -93.26674673761752 +} + +@test "N2" { + run n2.ezfio -109.404692225719 +} + +@test "SiH2_3B1" { + run sih2_3b1.ezfio -290.371745382958 +} + diff --git a/src/kohn_sham_rs/rs_ks_scf.irp.f b/src/kohn_sham_rs/rs_ks_scf.irp.f index afa5d9bc..1305a2f8 100644 --- a/src/kohn_sham_rs/rs_ks_scf.irp.f +++ b/src/kohn_sham_rs/rs_ks_scf.irp.f @@ -5,6 +5,12 @@ program srs_ks_cf ! output: kohn_sham.energy ! optional: mo_basis.mo_coef END_DOC + + disk_access_mo_one_integrals = "None" + touch disk_access_mo_one_integrals + disk_access_ao_one_integrals = "None" + touch disk_access_ao_one_integrals + read_wf = .False. density_for_dft ="WFT" touch density_for_dft @@ -86,10 +92,8 @@ subroutine run mo_label = "Canonical" -! Choose SCF algorithm - -! call damping_SCF ! Deprecated routine call Roothaan_Hall_SCF + call ezfio_set_kohn_sham_rs_energy(SCF_energy) write(*, '(A22,X,F16.10)') 'one_electron_energy = ',one_electron_energy write(*, '(A22,X,F16.10)') 'two_electron_energy = ',two_electron_energy diff --git a/src/mo_one_e_integrals/README.rst b/src/mo_one_e_integrals/README.rst index 15faedf7..f947de06 100644 --- a/src/mo_one_e_integrals/README.rst +++ b/src/mo_one_e_integrals/README.rst @@ -6,8 +6,8 @@ All the one-electron integrals in |MO| basis are defined here. The most important providers for usual quantum-chemistry calculation are: -# `mo_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_mo_ints.irp.f`) -# `mo_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_mo_ints.irp.f`) -# `mo_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`mo_mono_ints.irp.f`) +* `mo_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_mo_ints.irp.f`) +* `mo_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_mo_ints.irp.f`) +* `mo_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`mo_mono_ints.irp.f`) Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_mo.irp.f`. diff --git a/src/scf_utils/README.rst b/src/scf_utils/README.rst index a62e26b4..6d02021f 100644 --- a/src/scf_utils/README.rst +++ b/src/scf_utils/README.rst @@ -12,15 +12,18 @@ The ``scf_utils`` module is meant to be included in the :file:`NEED` of the vari All SCF programs perform the following actions: + #. Compute/Read all the one- and two-electron integrals, and store them in memory + #. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it will read them as initial guess. Otherwise, it will create a guess. #. Perform the |SCF| iterations based on the definition of the Fock matrix The main keywords/options are: -# :option:`scf_utils thresh_scf` -# :option:`scf_utils level_shift` + +* :option:`scf_utils thresh_scf` +* :option:`scf_utils level_shift` At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation crashes for any unexpected reason, the calculation can be restarted by running again diff --git a/src/scf_utils/roothaan_hall_scf.irp.f b/src/scf_utils/roothaan_hall_scf.irp.f index 460ebcf6..3b217b7e 100644 --- a/src/scf_utils/roothaan_hall_scf.irp.f +++ b/src/scf_utils/roothaan_hall_scf.irp.f @@ -158,8 +158,8 @@ END_DOC call save_mos endif - call write_double(6, Energy_SCF, 'Hartree-Fock energy') - call ezfio_set_hartree_fock_energy(Energy_SCF) + call write_double(6, Energy_SCF, 'SCF energy ') +! call ezfio_set_hartree_fock_energy(Energy_SCF) call write_time(6) diff --git a/src/tools/print_wf.irp.f b/src/tools/print_wf.irp.f index 5c0743dd..f709bb8a 100644 --- a/src/tools/print_wf.irp.f +++ b/src/tools/print_wf.irp.f @@ -39,7 +39,7 @@ subroutine routine norm_mono_b_pert = 0.d0 norm_mono_a_pert_2 = 0.d0 norm_mono_b_pert_2 = 0.d0 - do i = 1, min(10000,N_det) + do i = 1, min(N_det_print_wf,N_det) print*,'' print*,'i = ',i call debug_det(psi_det(1,1,i),N_int) From a9191d23b2bd54d06bfacb70efdfc88852d56659 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 2 Jan 2019 23:04:13 +0100 Subject: [PATCH 5/6] Documentation --- TODO | 2 + docs/source/auto_generate.py | 4 +- docs/source/modules/ao_basis.rst | 5 +- docs/source/modules/ao_one_e_integrals.rst | 54 ++- docs/source/modules/aux_quantities.rst | 14 +- docs/source/modules/becke_numerical_grid.rst | 67 ++++ docs/source/modules/bitmask.rst | 18 + docs/source/modules/davidson.rst | 40 +- docs/source/modules/determinants.rst | 98 +++++ docs/source/modules/dft_keywords.rst | 2 +- docs/source/modules/dft_utils_one_e.rst | 31 +- docs/source/modules/ezfio_files.rst | 2 + docs/source/modules/fci.rst | 2 +- docs/source/modules/generators_full.rst | 67 ++++ docs/source/modules/hartree_fock.rst | 99 ----- docs/source/modules/kohn_sham.rst | 101 +++++ docs/source/modules/kohn_sham_rs.rst | 27 ++ docs/source/modules/mo_basis.rst | 8 + docs/source/modules/mo_one_e_integrals.rst | 1 + .../source/modules/mo_two_e_erf_integrals.rst | 4 +- docs/source/modules/mo_two_e_integrals.rst | 4 +- docs/source/modules/perturbation.rst | 45 ++- docs/source/modules/psiref_cas.rst | 163 ++++++++ docs/source/modules/psiref_utils.rst | 366 ++++++++++++++++++ docs/source/modules/read_integral.rst | 38 -- docs/source/modules/scf_utils.rst | 22 +- docs/source/modules/selectors_utils.rst | 79 ++-- docs/source/modules/single_ref_method.rst | 71 ---- docs/source/modules/tools.rst | 19 +- docs/source/modules/utils.rst | 48 ++- docs/source/programmers_guide/index.rst | 1 + .../programmers_guide/index_providers.rst | 178 ++++++++- docs/source/users_guide/dft.rst | 47 --- src/ao_basis/aos.irp.f | 4 +- .../ao_ortho_canonical.irp.f | 2 +- src/ao_one_e_integrals/kin_ao_ints.irp.f | 2 +- src/ao_one_e_integrals/pot_ao_erf_ints.irp.f | 4 +- src/aux_quantities/README.rst | 14 +- src/davidson/README.rst | 2 +- src/dft_keywords/README.rst | 2 +- src/fci/README.rst | 2 +- src/kohn_sham_rs/rs_ks_scf.irp.f | 2 +- src/scf_utils/fock_matrix.irp.f | 13 +- src/selectors_utils/e_corr_selectors.irp.f | 12 +- 44 files changed, 1431 insertions(+), 355 deletions(-) delete mode 100644 docs/source/modules/read_integral.rst delete mode 100644 docs/source/users_guide/dft.rst diff --git a/TODO b/TODO index e629a12e..574e9b33 100644 --- a/TODO +++ b/TODO @@ -51,3 +51,5 @@ # EZFIO sans fork +/home/scemama/quantum_package/docs/source/modules/perturbation.rst:216: WARNING +: script pour mettre des :math: dans les commentaires diff --git a/docs/source/auto_generate.py b/docs/source/auto_generate.py index f83bbc39..433cf544 100755 --- a/docs/source/auto_generate.py +++ b/docs/source/auto_generate.py @@ -124,7 +124,7 @@ def generate_providers(abs_module): entity = { "decl": [], "doc": [] , "name": name , "module": module } for line in f.readlines(): - line = line.strip() + line = line.rstrip() if line.startswith(".SH Declaration"): state = 1 continue @@ -157,7 +157,7 @@ def generate_providers(abs_module): entity["type"] = 'p' elif state == 2: if line.startswith(".br"): - line = "\n" + line = "\n\n" entity["doc"] += [ line ] elif state == 3: if line.startswith(".br"): diff --git a/docs/source/modules/ao_basis.rst b/docs/source/modules/ao_basis.rst index f7954784..863e9eec 100644 --- a/docs/source/modules/ao_basis.rst +++ b/docs/source/modules/ao_basis.rst @@ -158,7 +158,7 @@ Providers File: :file:`aos.irp.f` - Transposed :c:var:`ao_coef_normalized_ordered` + Transposed :c:data:`ao_coef_normalized_ordered` @@ -198,7 +198,7 @@ Providers File: :file:`aos.irp.f` - Transposed :c:var:`ao_expo_ordered` + Transposed :c:data:`ao_expo_ordered` @@ -567,6 +567,7 @@ Subroutines / functions File: :file:`aos.irp.f` Unique index given to a triplet of powers: + :math:`\frac{1}{2} (l-n_x) (l-n_x+1) + n_z + 1` diff --git a/docs/source/modules/ao_one_e_integrals.rst b/docs/source/modules/ao_one_e_integrals.rst index 92d34d1a..aa1c19ed 100644 --- a/docs/source/modules/ao_one_e_integrals.rst +++ b/docs/source/modules/ao_one_e_integrals.rst @@ -77,7 +77,7 @@ Providers File: :file:`ao_ortho_canonical.irp.f` - Inverse of :c:var:`ao_cart_to_sphe_coef` + Inverse of :c:data:`ao_cart_to_sphe_coef` @@ -120,7 +120,9 @@ Providers File: :file:`kin_ao_ints.irp.f` Second derivative matrix elements in the |AO| basis. - :math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + :math:`{\tt ao\_deriv2\_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + @@ -137,7 +139,9 @@ Providers File: :file:`kin_ao_ints.irp.f` Second derivative matrix elements in the |AO| basis. - :math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + :math:`{\tt ao\_deriv2\_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + @@ -154,7 +158,9 @@ Providers File: :file:`kin_ao_ints.irp.f` Second derivative matrix elements in the |AO| basis. - :math:`{\tt ao_deriv2_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + + :math:`{\tt ao\_deriv2\_x} = \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` + @@ -171,7 +177,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * d/dx AO_j + * array of the integrals of AO_i * d/dy AO_j + * array of the integrals of AO_i * d/dz AO_j @@ -188,7 +196,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * d/dx AO_j + * array of the integrals of AO_i * d/dy AO_j + * array of the integrals of AO_i * d/dz AO_j @@ -205,7 +215,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * d/dx AO_j + * array of the integrals of AO_i * d/dy AO_j + * array of the integrals of AO_i * d/dz AO_j @@ -222,7 +234,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x AO_j + * array of the integrals of AO_i * y AO_j + * array of the integrals of AO_i * z AO_j @@ -239,7 +253,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x AO_j + * array of the integrals of AO_i * y AO_j + * array of the integrals of AO_i * z AO_j @@ -256,7 +272,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x AO_j + * array of the integrals of AO_i * y AO_j + * array of the integrals of AO_i * z AO_j @@ -271,6 +289,7 @@ Providers File: :file:`kin_ao_ints.irp.f` Kinetic energy integrals in the |AO| basis. + :math:`\langle \chi_i |\hat{T}| \chi_j \rangle` @@ -313,6 +332,7 @@ Providers File: :file:`pot_ao_ints.irp.f` Nucleus-electron interaction, in the |AO| basis set. + :math:`\langle \chi_i | -\sum_A \frac{1}{|r-R_A|} | \chi_j \rangle` @@ -327,6 +347,7 @@ Providers File: :file:`pot_ao_ints.irp.f` Nucleus-electron interaction in the |AO| basis set, per atom A. + :math:`\langle \chi_i | -\frac{1}{|r-R_A|} | \chi_j \rangle` @@ -398,6 +419,7 @@ Providers File: :file:`ao_overlap.irp.f` Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr` @@ -412,6 +434,7 @@ Providers File: :file:`ao_overlap.irp.f` Overlap between absolute values of atomic basis functions: + :math:`\int |\chi_i(r)| |\chi_j(r)| dr` @@ -429,6 +452,7 @@ Providers File: :file:`ao_overlap.irp.f` Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr` @@ -446,6 +470,7 @@ Providers File: :file:`ao_overlap.irp.f` Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr` @@ -463,6 +488,7 @@ Providers File: :file:`ao_overlap.irp.f` Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr` @@ -518,7 +544,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x^2 AO_j + * array of the integrals of AO_i * y^2 AO_j + * array of the integrals of AO_i * z^2 AO_j @@ -535,7 +563,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x^2 AO_j + * array of the integrals of AO_i * y^2 AO_j + * array of the integrals of AO_i * z^2 AO_j @@ -552,7 +582,9 @@ Providers File: :file:`spread_dipole_ao.irp.f` * array of the integrals of AO_i * x^2 AO_j + * array of the integrals of AO_i * y^2 AO_j + * array of the integrals of AO_i * z^2 AO_j @@ -754,7 +786,7 @@ Subroutines / functions File: :file:`pot_ao_erf_ints.irp.f` - subroutine that returs all integrals over r of type erf(mu_in * |r-C_center|)/|r-C_center| + subroutine that returs all integrals over r of type erf(mu_in * | r-C_center |)/| r-C_center | @@ -769,6 +801,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Returns the explicit polynomial in terms of the "t" variable of the following + :math:`I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)` @@ -812,6 +845,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Computes the integral: + :math:`\int_{-\infty}^{\infty} x^n \exp(-\alpha x^2) dx` @@ -827,6 +861,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Computes the electron-nucleus attraction with two primitves. + :math:`\langle g_i | \frac{1}{|r-R_c|} | g_j \rangle` @@ -855,7 +890,7 @@ Subroutines / functions File: :file:`pot_ao_erf_ints.irp.f` - computes the following integral : int[-infty;+infty] dr AO_i_ao (r) AO_j_ao(r) erf(mu_in * |r-C_center|)/|r-C_center| + computes the following integral : int[-infty;+infty] dr AO_i_ao (r) AO_j_ao(r) erf(mu_in * | r-C_center |)/| r-C_center | @@ -926,7 +961,9 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Primitve nuclear attraction between the two primitves centered on the same atom. + primitive_1 = x**(a_x) y**(a_y) z**(a_z) exp(-alpha * r**2) + primitive_2 = x**(b_x) y**(b_y) z**(b_z) exp(- beta * r**2) @@ -942,6 +979,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Computes the angular "phi" part of the nuclear attraction integral: + :math:`\int_{0}^{2 \pi} \cos(\phi)^n \sin(\phi)^m d\phi` @@ -957,6 +995,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Computes the radial part of the nuclear attraction integral: + :math:`\int_{0}^{\infty} r^n \exp(-\alpha r^2) dr` @@ -964,6 +1003,7 @@ Subroutines / functions + .. c:function:: v_theta .. code:: text @@ -973,6 +1013,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Computes the angular "theta" part of the nuclear attraction integral: + :math:`\int_{0}^{\pi} \cos(\theta)^n \sin(\theta)^m d\theta` @@ -988,6 +1029,7 @@ Subroutines / functions File: :file:`pot_ao_ints.irp.f` Wallis integral: + :math:`\int_{0}^{\pi} \cos(\theta)^n d\theta` diff --git a/docs/source/modules/aux_quantities.rst b/docs/source/modules/aux_quantities.rst index e87fa4ce..ba56eac3 100644 --- a/docs/source/modules/aux_quantities.rst +++ b/docs/source/modules/aux_quantities.rst @@ -9,14 +9,22 @@ aux_quantities ============== -This module contains some global variables (such as densities and energies) which are stored in the EZFIO folder in a different place than determinants. This is used in practice to store density matrices which can be obtained from any methods, as long as they are stored in the same MO basis which is used for the calculations. In |RS-DFT| calculations, this can be done to perform damping on the density in order to speed up convergence. +This module contains some global variables (such as densities and energies) +which are stored in the EZFIO folder in a different place than determinants. +This is used in practice to store density matrices which can be obtained from +any methods, as long as they are stored in the same MO basis which is used for +the calculations. In |RSDFT| calculations, this can be done to perform damping +on the density in order to speed up convergence. The main providers of that module are: -* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. +* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the + one-body alpha and beta densities which are necessary read from the EZFIO + folder. -Thanks to these providers you can use any density matrix that does not necessary corresponds to that of the current wave function. +Thanks to these providers you can use any density matrix that does not +necessary corresponds to that of the current wave function. diff --git a/docs/source/modules/becke_numerical_grid.rst b/docs/source/modules/becke_numerical_grid.rst index f842c0ca..d9eb72d5 100644 --- a/docs/source/modules/becke_numerical_grid.rst +++ b/docs/source/modules/becke_numerical_grid.rst @@ -146,8 +146,11 @@ Providers File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices @@ -178,13 +181,51 @@ Providers File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices +.. c:var:: final_weight_functions_at_final_grid_points + + .. code:: text + + double precision, allocatable :: final_grid_points (3,n_points_final_grid) + double precision, allocatable :: final_weight_functions_at_final_grid_points (n_points_final_grid) + integer, allocatable :: index_final_points (3,n_points_final_grid) + integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num) + + File: :file:`grid_becke_vector.irp.f` + + final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + + final_weight_functions_at_final_grid_points(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices + + + + +.. c:var:: final_weight_functions_at_grid_points + + .. code:: text + + double precision, allocatable :: final_weight_functions_at_grid_points (n_points_integration_angular,n_points_radial_grid,nucl_num) + + File: :file:`grid_becke.irp.f` + + Total weight on each grid point which takes into account all Lebedev, Voronoi and radial weights. + + + + .. c:var:: grid_points_per_atom .. code:: text @@ -224,8 +265,11 @@ Providers File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices @@ -243,8 +287,11 @@ Providers File: :file:`grid_becke_vector.irp.f` final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point + final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions + index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point + index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices @@ -299,7 +346,9 @@ Providers File: :file:`grid_becke.irp.f` n_points_radial_grid = number of radial grid points per atom + n_points_integration_angular = number of angular grid points per atom + These numbers are automatically set by setting the grid_type_sgn parameter @@ -315,7 +364,9 @@ Providers File: :file:`grid_becke.irp.f` n_points_radial_grid = number of radial grid points per atom + n_points_integration_angular = number of angular grid points per atom + These numbers are automatically set by setting the grid_type_sgn parameter @@ -330,6 +381,22 @@ Providers File: :file:`grid_becke.irp.f` Weight function at grid points : 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 are labelled by the other dimensions. + + + + +.. c:var:: weight_functions_at_grid_points + + .. code:: text + + double precision, allocatable :: weight_functions_at_grid_points (n_points_integration_angular,n_points_radial_grid,nucl_num) + + File: :file:`grid_becke.irp.f` + + Weight function at grid points : 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 are labelled by the other dimensions. diff --git a/docs/source/modules/bitmask.rst b/docs/source/modules/bitmask.rst index 11e99b89..fe1bc99b 100644 --- a/docs/source/modules/bitmask.rst +++ b/docs/source/modules/bitmask.rst @@ -141,18 +141,26 @@ Providers File: :file:`bitmasks.irp.f` Bitmasks for generator determinants. (N_int, alpha/beta, hole/particle, generator). + 3rd index is : + * 1 : hole for single exc + * 2 : particle for single exc + * 3 : hole for 1st exc of double + * 4 : particle for 1st exc of double + * 5 : hole for 2nd exc of double + * 6 : particle for 2nd exc of double + .. c:var:: generators_bitmask_restart .. code:: text @@ -162,18 +170,26 @@ Providers File: :file:`bitmasks.irp.f` Bitmasks for generator determinants. (N_int, alpha/beta, hole/particle, generator). + 3rd index is : + * 1 : hole for single exc + * 2 : particle for single exc + * 3 : hole for 1st exc of double + * 4 : particle for 1st exc of double + * 5 : hole for 2nd exc of double + * 6 : particle for 2nd exc of double + .. c:var:: hf_bitmask .. code:: text @@ -266,6 +282,7 @@ Providers File: :file:`bitmasks.irp.f` list_act(i) = index of the ith active orbital + list_act_reverse : reverse list of active orbitals list_act_reverse(i) = 0 ::> not an active list_act_reverse(i) = k ::> IS the kth active orbital @@ -281,6 +298,7 @@ Providers File: :file:`bitmasks.irp.f` list_act(i) = index of the ith active orbital + list_act_reverse : reverse list of active orbitals list_act_reverse(i) = 0 ::> not an active list_act_reverse(i) = k ::> IS the kth active orbital diff --git a/docs/source/modules/davidson.rst b/docs/source/modules/davidson.rst index 4a3755ea..b970cb4e 100644 --- a/docs/source/modules/davidson.rst +++ b/docs/source/modules/davidson.rst @@ -11,7 +11,7 @@ davidson Abstract module for Davidson's diagonalization. It contains everything required for the Davidson algorithm, dressed or not. If a dressing is used, the dressing column should be defined and the -:ref:`davidsondressed` module should be used. If no dressing is required, +:ref:`davidson_dressed` module should be used. If no dressing is required, the :ref:`davidson` module should be used, and it has a default zero dressing vector. The important providers for that module are: @@ -262,14 +262,23 @@ Subroutines / functions File: :file:`diagonalization_hs2_dressed.irp.f` Davidson diagonalization with specific diagonal elements of the H matrix + H_jj : specific diagonal H matrix elements to diagonalize de Davidson + S2_out : Output : s^2 + dets_in : bitmasks corresponding to determinants + u_in : guess coefficients on the various states. Overwritten on exit + dim_in : leftmost dimension of u_in + sze : Number of determinants + N_st : Number of eigenstates + N_st_diag : Number of states in which H is diagonalized. Assumed > sze + Initial guess vectors are not necessarily orthonormal @@ -285,11 +294,17 @@ Subroutines / functions File: :file:`diagonalization_hs2_dressed.irp.f` Davidson diagonalization. + dets_in : bitmasks corresponding to determinants + u_in : guess coefficients on the various states. Overwritten on exit + dim_in : leftmost dimension of u_in + sze : Number of determinants + N_st : Number of eigenstates + Initial guess vectors are not necessarily orthonormal @@ -403,7 +418,9 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f` Computes v_0 = H|u_0> and s_0 = S^2 |u_0> + Assumes that the determinants are in psi_det + istart, iend, ishift, istep are used in ZMQ parallelization. @@ -419,6 +436,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -434,6 +452,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f_template_457` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -449,6 +468,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f_template_457` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -464,6 +484,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f_template_457` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -479,6 +500,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f_template_457` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -494,6 +516,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f_template_457` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -509,7 +532,9 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f` Computes v_0 = H|u_0> and s_0 = S^2 |u_0> + Assumes that the determinants are in psi_det + istart, iend, ishift, istep are used in ZMQ parallelization. @@ -525,6 +550,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -540,6 +566,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f_template_468` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -555,6 +582,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f_template_468` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -570,6 +598,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f_template_468` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -585,6 +614,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f_template_468` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -600,6 +630,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f_template_468` Computes v_t = H|u_t> and s_t = S^2 |u_t> + Default should be 1,N_det,0,1 @@ -615,8 +646,11 @@ Subroutines / functions File: :file:`davidson_parallel.irp.f` Computes v_0 = H|u_0> and s_0 = S^2 |u_0> + n : number of determinants + H_jj : array of + S2_jj : array of @@ -632,6 +666,7 @@ Subroutines / functions File: :file:`u0_h_u0.irp.f` Computes e_0 = / + n : number of determinants @@ -639,6 +674,7 @@ Subroutines / functions + .. c:function:: u_0_h_u_0_bielec .. code:: text @@ -648,6 +684,7 @@ Subroutines / functions File: :file:`u0_wee_u0.irp.f` Computes e_0 = / + n : number of determinants @@ -655,6 +692,7 @@ Subroutines / functions + .. c:function:: zmq_get_n_states_diag .. code:: text diff --git a/docs/source/modules/determinants.rst b/docs/source/modules/determinants.rst index 78587531..74188998 100644 --- a/docs/source/modules/determinants.rst +++ b/docs/source/modules/determinants.rst @@ -215,6 +215,7 @@ Providers File: :file:`spindeterminants.irp.f` Norm of the alpha and beta spin determinants in the wave function: + ||Da||_i \sum_j C_{ij}**2 @@ -230,6 +231,7 @@ Providers File: :file:`spindeterminants.irp.f` Norm of the alpha and beta spin determinants in the wave function: + ||Da||_i \sum_j C_{ij}**2 @@ -830,6 +832,7 @@ Providers File: :file:`determinants.irp.f` Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det @@ -860,7 +863,9 @@ Providers File: :file:`spindeterminants.irp.f` Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det @@ -875,7 +880,9 @@ Providers File: :file:`spindeterminants.irp.f` Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det @@ -893,7 +900,9 @@ Providers File: :file:`spindeterminants.irp.f` Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det @@ -937,7 +946,9 @@ Providers File: :file:`spindeterminants.irp.f` Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det @@ -955,6 +966,7 @@ Providers File: :file:`spindeterminants.irp.f` Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format @@ -972,6 +984,7 @@ Providers File: :file:`spindeterminants.irp.f` Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format @@ -989,6 +1002,7 @@ Providers File: :file:`spindeterminants.irp.f` Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format @@ -1019,6 +1033,7 @@ Providers File: :file:`spindeterminants.irp.f` Transpose of psi_bilinear_matrix D_b^t C^t D_a + Rows are Alpha determinants and columns are beta, but the matrix is stored in row major format @@ -1036,7 +1051,9 @@ Providers File: :file:`spindeterminants.irp.f` Sparse coefficient matrix if the wave function is expressed in a bilinear form : D_a^t C D_b + Rows are alpha determinants and columns are beta. + Order refers to psi_det @@ -1200,6 +1217,7 @@ Providers File: :file:`determinants.irp.f` Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det @@ -1324,6 +1342,7 @@ Providers File: :file:`determinants.irp.f` Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det @@ -1355,6 +1374,7 @@ Providers File: :file:`determinants.irp.f` Wave function sorted by determinants contribution to the norm (state-averaged) + psi_det_sorted_order(i) -> k : index in psi_det @@ -1806,11 +1826,17 @@ Subroutines / functions File: :file:`connected_to_ref.irp.f` input : key : a given Slater determinant + : keys: a list of Slater determinants + : Ndet: the number of Slater determinants in keys + : N_past_in the number of Slater determinants for the connectivity research + output : 0 : key not connected to the N_past_in first Slater determinants in keys + i : key is connected to determinant i of keys + -i : key is the ith determinant of the reference wf keys @@ -1826,11 +1852,17 @@ Subroutines / functions File: :file:`connected_to_ref.irp.f` input : key : a given Slater determinant + : keys: a list of Slater determinants + : Ndet: the number of Slater determinants in keys + : N_past_in the number of Slater determinants for the connectivity research + output : 0 : key not connected by a MONO EXCITATION to the N_past_in first Slater determinants in keys + i : key is connected by a MONO EXCITATION to determinant i of keys + -i : key is the ith determinant of the reference wf keys @@ -2154,9 +2186,13 @@ Subroutines / functions File: :file:`filter_connected.irp.f` Filters out the determinants that are not connected by H + returns the array idx which contains the index of the + determinants in the array key1 that interact + via the H operator with key2. + idx(0) is the number of determinants that interact with key1 @@ -2172,8 +2208,11 @@ Subroutines / functions File: :file:`filter_connected.irp.f` returns the array idx which contains the index of the + determinants in the array key1 that interact + via the H operator with key2. + idx(0) is the number of determinants that interact with key1 @@ -2189,8 +2228,11 @@ Subroutines / functions File: :file:`filter_connected.irp.f` Returns the array idx which contains the index of the + determinants in the array key1 that DO NOT interact + via the H operator with key2. + idx(0) is the number of determinants that DO NOT interact with key1 @@ -2220,6 +2262,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2227,6 +2270,7 @@ Subroutines / functions + .. c:function:: get_all_spin_doubles_1 .. code:: text @@ -2236,6 +2280,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2243,6 +2288,7 @@ Subroutines / functions + .. c:function:: get_all_spin_doubles_2 .. code:: text @@ -2252,6 +2298,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2259,6 +2306,7 @@ Subroutines / functions + .. c:function:: get_all_spin_doubles_3 .. code:: text @@ -2268,6 +2316,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2275,6 +2324,7 @@ Subroutines / functions + .. c:function:: get_all_spin_doubles_4 .. code:: text @@ -2284,6 +2334,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2291,6 +2342,7 @@ Subroutines / functions + .. c:function:: get_all_spin_doubles_n_int .. code:: text @@ -2300,6 +2352,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the double excitations in the list of unique alpha determinants. @@ -2307,6 +2360,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles .. code:: text @@ -2316,6 +2370,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2323,6 +2378,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_1 .. code:: text @@ -2332,6 +2388,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2339,6 +2396,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_2 .. code:: text @@ -2348,6 +2406,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2355,6 +2414,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_3 .. code:: text @@ -2364,6 +2424,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2371,6 +2432,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_4 .. code:: text @@ -2380,6 +2442,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2387,6 +2450,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles .. code:: text @@ -2396,7 +2460,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2404,6 +2470,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles_1 .. code:: text @@ -2413,7 +2480,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2421,6 +2490,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles_2 .. code:: text @@ -2430,7 +2500,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2438,6 +2510,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles_3 .. code:: text @@ -2447,7 +2520,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2455,6 +2530,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles_4 .. code:: text @@ -2464,7 +2540,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2472,6 +2550,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_and_doubles_n_int .. code:: text @@ -2481,7 +2560,9 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single and double excitations in the list of unique alpha determinants. + /!\ : The buffer is transposed ! @@ -2489,6 +2570,7 @@ Subroutines / functions + .. c:function:: get_all_spin_singles_n_int .. code:: text @@ -2498,6 +2580,7 @@ Subroutines / functions File: :file:`spindeterminants.irp.f_template_1215` + Returns the indices of all the single excitations in the list of unique alpha determinants. @@ -2505,6 +2588,7 @@ Subroutines / functions + .. c:function:: get_double_excitation .. code:: text @@ -2948,6 +3032,7 @@ Subroutines / functions File: :file:`slater_rules.irp.f` Computes = :math:`\sum_J c_J \langle i | H | J \rangle`. + Uses filter_connected_i_H_psi0 to get all the |J> to which |i> is connected. The i_H_psi_minilist is much faster but requires to build the minilists @@ -2963,6 +3048,7 @@ Subroutines / functions File: :file:`slater_rules.irp.f` Computes = \sum_J c_J . + Uses filter_connected_i_H_psi0 to get all the |J> to which |i> is connected. The |J> are searched in short pre-computed lists. @@ -2978,6 +3064,7 @@ Subroutines / functions File: :file:`s2.irp.f` Computes = \sum_J c_J . + Uses filter_connected_i_H_psi0 to get all the |J> to which |i> is connected. The |J> are searched in short pre-computed lists. @@ -3105,7 +3192,9 @@ Subroutines / functions File: :file:`occ_pattern.irp.f` Transforms a determinant to an occupation pattern + occ(:,1) : Single occupations + occ(:,2) : Double occupations @@ -3113,6 +3202,7 @@ Subroutines / functions + .. c:function:: occ_pattern_search_key .. code:: text @@ -3248,6 +3338,7 @@ Subroutines / functions File: :file:`s2.irp.f` Computes v_0 = S^2|u_0> + n : number of determinants @@ -3255,6 +3346,7 @@ Subroutines / functions + .. c:function:: s2_u_0_nstates .. code:: text @@ -3264,6 +3356,7 @@ Subroutines / functions File: :file:`s2.irp.f` Computes v_0 = S^2|u_0> + n : number of determinants @@ -3271,6 +3364,7 @@ Subroutines / functions + .. c:function:: save_natural_mos .. code:: text @@ -3434,6 +3528,7 @@ Subroutines / functions File: :file:`determinants.irp.f` Determinants are sorted are sorted according to their det_search_key. Useful to accelerate the search of a random determinant in the wave function. + /!\ The first dimension of coef_out and coef_in need to be psi_det_size @@ -3441,6 +3536,7 @@ Subroutines / functions + .. c:function:: spin_det_search_key .. code:: text @@ -3478,6 +3574,7 @@ Subroutines / functions File: :file:`s2.irp.f` Computes e_0 = / + n : number of determinants @@ -3485,6 +3582,7 @@ Subroutines / functions + .. c:function:: wf_of_psi_bilinear_matrix .. code:: text diff --git a/docs/source/modules/dft_keywords.rst b/docs/source/modules/dft_keywords.rst index d4614cad..3463819b 100644 --- a/docs/source/modules/dft_keywords.rst +++ b/docs/source/modules/dft_keywords.rst @@ -12,7 +12,7 @@ This module contains the main keywords related to a DFT calculation or RS-DFT ca * :option:`dft_keywords exchange_functional` * :option:`dft_keywords correlation_functional` -* :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program +* :option:`dft_keywords HF_exchange` : only relevent for the :c:func:`rs_ks_scf` program The keyword for the **range separation parameter** :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. diff --git a/docs/source/modules/dft_utils_one_e.rst b/docs/source/modules/dft_utils_one_e.rst index bb3def97..53d94d26 100644 --- a/docs/source/modules/dft_utils_one_e.rst +++ b/docs/source/modules/dft_utils_one_e.rst @@ -720,8 +720,8 @@ Providers .. code:: text subroutine GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & - ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & - ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b ) + ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & + ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b ) File: :file:`utils.irp.f` @@ -735,8 +735,8 @@ Providers .. code:: text subroutine GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & - ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & - ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b ) + ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & + ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b ) File: :file:`utils.irp.f` @@ -1591,13 +1591,21 @@ Subroutines / functions File: :file:`exc_sr_pbe.irp.f` Short-range PBE correlation energy functional for erf interaction + input : ========== + mu = range separated parameter + rhoc, rhoo = total density and spin density + sigmacc = square of the gradient of the total density + sigmaco = square of the gradient of the spin density + sigmaoo = scalar product between the gradient of the total density and the one of the spin density + output: ========== + ec = correlation energy @@ -1605,6 +1613,7 @@ Subroutines / functions + .. c:function:: ec_pbe_sr .. code:: text @@ -1614,19 +1623,33 @@ Subroutines / functions File: :file:`exc_sr_pbe.irp.f` Short-range PBE correlation energy functional for erf interaction + input : ========== + mu = range separated parameter + rhoc, rhoo = total density and spin density + sigmacc = square of the gradient of the total density + sigmaco = square of the gradient of the spin density + sigmaoo = scalar product between the gradient of the total density and the one of the spin density + output: ========== + ec = correlation energy + all variables v** are energy derivatives with respect to components of the density + vrhoc = derivative with respect to the total density + vrhoo = derivative with respect to spin density + vsigmacc = derivative with respect to the square of the gradient of the total density + vsigmaco = derivative with respect to scalar product between the gradients of total and spin densities + vsigmaoo = derivative with respect to the square of the gradient of the psin density diff --git a/docs/source/modules/ezfio_files.rst b/docs/source/modules/ezfio_files.rst index 3562fd0e..7bfdc840 100644 --- a/docs/source/modules/ezfio_files.rst +++ b/docs/source/modules/ezfio_files.rst @@ -87,6 +87,7 @@ Subroutines / functions File: :file:`get_unit_and_open.irp.f` :f: file name + :mode: 'R' : READ, UNFORMATTED 'W' : WRITE, UNFORMATTED 'r' : READ, FORMATTED 'w' : WRITE, FORMATTED 'a' : APPEND, FORMATTED 'x' : READ/WRITE, FORMATTED @@ -94,6 +95,7 @@ Subroutines / functions + .. c:function:: write_bool .. code:: text diff --git a/docs/source/modules/fci.rst b/docs/source/modules/fci.rst index 98b1f8f1..09c58e2d 100644 --- a/docs/source/modules/fci.rst +++ b/docs/source/modules/fci.rst @@ -33,7 +33,7 @@ By default, the program will stop when more than one million determinants have been selected, or when the |PT2| energy is below :math:`10^{-4}`. The variational and |PT2| energies of the iterations are stored in the -|EZFIO| database, in the :ref:`IterativeSave` module. +|EZFIO| database, in the :ref:`iterations` module. diff --git a/docs/source/modules/generators_full.rst b/docs/source/modules/generators_full.rst index 012457c0..90b32a98 100644 --- a/docs/source/modules/generators_full.rst +++ b/docs/source/modules/generators_full.rst @@ -33,6 +33,33 @@ Providers +.. c:var:: n_det_generators + + .. code:: text + + integer :: n_det_generators + + File: :file:`generators.irp.f` + + For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant + + + + +.. c:var:: psi_coef_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + .. c:var:: psi_coef_sorted_gen .. code:: text @@ -48,6 +75,20 @@ Providers +.. c:var:: psi_det_generators + + .. code:: text + + integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) + double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) + + File: :file:`generators.irp.f` + + For Single reference wave functions, the generator is the Hartree-Fock determinant + + + + .. c:var:: psi_det_sorted_gen .. code:: text @@ -76,3 +117,29 @@ Providers For Single reference wave functions, the generator is the Hartree-Fock determinant + + +.. c:var:: select_max + + .. code:: text + + double precision, allocatable :: select_max (size_select_max) + + File: :file:`generators.irp.f` + + Memo to skip useless selectors + + + + +.. c:var:: size_select_max + + .. code:: text + + integer :: size_select_max + + File: :file:`generators.irp.f` + + Size of the select_max array + + diff --git a/docs/source/modules/hartree_fock.rst b/docs/source/modules/hartree_fock.rst index e09b1705..d76db1b9 100644 --- a/docs/source/modules/hartree_fock.rst +++ b/docs/source/modules/hartree_fock.rst @@ -63,77 +63,6 @@ Providers --------- -.. c:var:: ao_bi_elec_integral_alpha - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: :file:`fock_matrix_hf.irp.f` - - Alpha Fock matrix in AO basis set - - - - -.. c:var:: ao_bi_elec_integral_beta - - .. code:: text - - double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) - double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) - - File: :file:`fock_matrix_hf.irp.f` - - Alpha Fock matrix in AO basis set - - - - -.. c:var:: extra_e_contrib_density - - .. code:: text - - double precision :: extra_e_contrib_density - - File: :file:`hf_energy.irp.f` - - Extra contribution to the SCF energy coming from the density. - For a Hartree-Fock calculation: extra_e_contrib_density = 0 - For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - trace of the V_xc potential - - - - -.. c:var:: fock_matrix_ao_alpha - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: :file:`fock_matrix_hf.irp.f` - - Alpha Fock matrix in AO basis set - - - - -.. c:var:: fock_matrix_ao_beta - - .. code:: text - - double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) - double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) - - File: :file:`fock_matrix_hf.irp.f` - - Alpha Fock matrix in AO basis set - - - - .. c:var:: hf_energy .. code:: text @@ -184,34 +113,6 @@ Subroutines / functions -.. c:function:: create_guess - - .. code:: text - - subroutine create_guess - - File: :file:`scf_old.irp.f` - - Create a MO guess if no MOs are present in the EZFIO directory - - - - - -.. c:function:: run - - .. code:: text - - subroutine run - - File: :file:`scf_old.irp.f` - - Run SCF calculation - - - - - .. c:function:: scf .. code:: text diff --git a/docs/source/modules/kohn_sham.rst b/docs/source/modules/kohn_sham.rst index 822f2291..97f5c164 100644 --- a/docs/source/modules/kohn_sham.rst +++ b/docs/source/modules/kohn_sham.rst @@ -52,6 +52,34 @@ Providers --------- +.. c:var:: ao_bi_elec_integral_alpha + + .. code:: text + + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) + + File: :file:`fock_matrix_ks.irp.f` + + Alpha Fock matrix in ao basis set + + + + +.. c:var:: ao_bi_elec_integral_beta + + .. code:: text + + double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num) + double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num) + + File: :file:`fock_matrix_ks.irp.f` + + Alpha Fock matrix in ao basis set + + + + .. c:var:: ao_potential_alpha_xc .. code:: text @@ -106,6 +134,23 @@ Providers +.. c:var:: extra_e_contrib_density + + .. code:: text + + double precision :: extra_e_contrib_density + + File: :file:`ks_enery.irp.f` + + Extra contribution to the SCF energy coming from the density. + + For a Hartree-Fock calculation: extra_e_contrib_density = 0 + + For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - 1/2 trace of the V_xc potential + + + + .. c:var:: fock_matrix_alpha_no_xc_ao .. code:: text @@ -120,6 +165,34 @@ Providers +.. c:var:: fock_matrix_ao_alpha + + .. code:: text + + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) + + File: :file:`fock_matrix_ks.irp.f` + + Alpha Fock matrix in ao basis set + + + + +.. c:var:: fock_matrix_ao_beta + + .. code:: text + + double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num) + double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num) + + File: :file:`fock_matrix_ks.irp.f` + + Alpha Fock matrix in ao basis set + + + + .. c:var:: fock_matrix_beta_no_xc_ao .. code:: text @@ -238,6 +311,34 @@ Subroutines / functions +.. c:function:: create_guess + + .. code:: text + + subroutine create_guess + + File: :file:`ks_scf.irp.f` + + Create a MO guess if no MOs are present in the EZFIO directory + + + + + +.. c:function:: run + + .. code:: text + + subroutine run + + File: :file:`ks_scf.irp.f` + + Run SCF calculation + + + + + .. c:function:: srs_ks_cf .. code:: text diff --git a/docs/source/modules/kohn_sham_rs.rst b/docs/source/modules/kohn_sham_rs.rst index 7eb3ec6e..247d057b 100644 --- a/docs/source/modules/kohn_sham_rs.rst +++ b/docs/source/modules/kohn_sham_rs.rst @@ -47,6 +47,15 @@ To start a calculation from scratch, the simplest way is to remove the +EZFIO parameters +---------------- + +.. option:: energy + + SCF energy + + + Providers --------- @@ -66,3 +75,21 @@ Providers Range-separated Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity. + + +Subroutines / functions +----------------------- + + + +.. c:function:: rs_ks_scf + + .. code:: text + + subroutine rs_ks_scf + + File: :file:`rs_ks_scf.irp.f` + + Produce `Range_separated_Kohn_Sham` MO orbital output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ output: kohn_sham.energy optional: mo_basis.mo_coef + + diff --git a/docs/source/modules/mo_basis.rst b/docs/source/modules/mo_basis.rst index 440060b7..01bf091a 100644 --- a/docs/source/modules/mo_basis.rst +++ b/docs/source/modules/mo_basis.rst @@ -91,6 +91,7 @@ Providers File: :file:`track_orb.irp.f` Void provider to store the coefficients of the |MO| basis at the beginning of the SCF iteration + Usefull to track some orbitals @@ -105,6 +106,7 @@ Providers File: :file:`mos.irp.f` MO coefficients in orthogonalized AO basis + C^(-1).C_mo @@ -189,6 +191,7 @@ Subroutines / functions File: :file:`mos.irp.f` Transform A from the AO basis to the orthogonal AO basis + C^(-1).A_ao.Ct^(-1) @@ -204,6 +207,7 @@ Subroutines / functions File: :file:`mos.irp.f` Transform A from the AO basis to the MO basis + Ct.A_ao.C @@ -261,6 +265,7 @@ Subroutines / functions File: :file:`track_orb.irp.f` + Initialize :c:data:`mo_coef_begin_iteration` to the current :c:data:`mo_coef` @@ -276,8 +281,11 @@ Subroutines / functions File: :file:`mos.irp.f` Rotates the jth MO with the kth MO to give two new MO's that are + '+' = 1/sqrt(2) (|j> + |k>) + '-' = 1/sqrt(2) (|j> - |k>) + by convention, the '+' MO is in the lower index (min(j,k)) by convention, the '-' MO is in the larger index (max(j,k)) diff --git a/docs/source/modules/mo_one_e_integrals.rst b/docs/source/modules/mo_one_e_integrals.rst index 37f2cea4..452b829b 100644 --- a/docs/source/modules/mo_one_e_integrals.rst +++ b/docs/source/modules/mo_one_e_integrals.rst @@ -272,6 +272,7 @@ Subroutines / functions File: :file:`ao_to_mo.irp.f` Transform A from the MO basis to the AO basis + (S.C).A_mo.(S.C)t diff --git a/docs/source/modules/mo_two_e_erf_integrals.rst b/docs/source/modules/mo_two_e_erf_integrals.rst index 6760ca53..8c506dcb 100644 --- a/docs/source/modules/mo_two_e_erf_integrals.rst +++ b/docs/source/modules/mo_two_e_erf_integrals.rst @@ -72,7 +72,7 @@ Providers .. code:: text subroutine insert_into_mo_integrals_erf_map(n_integrals, & - buffer_i, buffer_values, thr) + buffer_i, buffer_values, thr) File: :file:`map_integrals_erf.irp.f` @@ -91,6 +91,7 @@ Providers File: :file:`ints_erf_3_index.irp.f` int_erf_3_index(i,j) = = (ii|jj) with the erf interaction + int_erf_3_index_exc(i,j) = = (ij|ij) with the erf interaction @@ -106,6 +107,7 @@ Providers File: :file:`ints_erf_3_index.irp.f` int_erf_3_index(i,j) = = (ii|jj) with the erf interaction + int_erf_3_index_exc(i,j) = = (ij|ij) with the erf interaction diff --git a/docs/source/modules/mo_two_e_integrals.rst b/docs/source/modules/mo_two_e_integrals.rst index 5d159068..92c377eb 100644 --- a/docs/source/modules/mo_two_e_integrals.rst +++ b/docs/source/modules/mo_two_e_integrals.rst @@ -76,6 +76,7 @@ Providers File: :file:`integrals_3_index.irp.f` big_array_coulomb_integrals(i,j) = = (ii|jj) + big_array_exchange_integrals(i,j) = = (ij|ij) @@ -91,6 +92,7 @@ Providers File: :file:`integrals_3_index.irp.f` big_array_coulomb_integrals(i,j) = = (ii|jj) + big_array_exchange_integrals(i,j) = = (ij|ij) @@ -127,7 +129,7 @@ Providers .. code:: text subroutine insert_into_mo_integrals_map(n_integrals, & - buffer_i, buffer_values, thr) + buffer_i, buffer_values, thr) File: :file:`map_integrals.irp.f` diff --git a/docs/source/modules/perturbation.rst b/docs/source/modules/perturbation.rst index cf12baf7..e1ca908e 100644 --- a/docs/source/modules/perturbation.rst +++ b/docs/source/modules/perturbation.rst @@ -118,7 +118,7 @@ Providers .. code:: text subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,coef_pert_buffer, & - N_st,Nint,iproc,select_max_out) + N_st,Nint,iproc,select_max_out) File: :file:`selection.irp.f` @@ -203,6 +203,22 @@ Subroutines / functions +.. c:function:: i_h_psi_pert_new_minilist + + .. code:: text + + subroutine i_H_psi_pert_new_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array,coef_pert) + + File: :file:`pt2_new.irp.f` + + Computes = \sum_J c_J . + + Uses filter_connected_i_H_psi0 to get all the |J> to which |i> is connected. The |J> are searched in short pre-computed lists. + + + + + .. c:function:: perturb_buffer_by_mono_decontracted .. code:: text @@ -492,8 +508,11 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( E(i) - ) + e_2_pert(i) = ^2/( E(i) - ) @@ -501,6 +520,7 @@ Subroutines / functions + .. c:function:: pt2_epstein_nesbet_2x2 .. code:: text @@ -510,8 +530,11 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution + for the various N_st states. + e_2_pert(i) = 0.5 * (( - E(i) ) - sqrt( ( - E(i)) ^2 + 4 ^2 ) + c_pert(i) = e_2_pert(i)/ @@ -519,6 +542,7 @@ Subroutines / functions + .. c:function:: pt2_epstein_nesbet_2x2_no_ci_diag .. code:: text @@ -528,8 +552,11 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution + for the various N_st states. + e_2_pert(i) = 0.5 * (( - E(i) ) - sqrt( ( - E(i)) ^2 + 4 ^2 ) + c_pert(i) = e_2_pert(i)/ @@ -537,6 +564,7 @@ Subroutines / functions + .. c:function:: pt2_h_core .. code:: text @@ -546,8 +574,11 @@ Subroutines / functions File: :file:`pert_single.irp.f` compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( E(i) - ) + e_2_pert(i) = ^2/( E(i) - ) @@ -555,6 +586,7 @@ Subroutines / functions + .. c:function:: pt2_moller_plesset .. code:: text @@ -564,8 +596,11 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution + for the various n_st states. + c_pert(i) = /(difference of orbital energies) + e_2_pert(i) = ^2/(difference of orbital energies) @@ -573,6 +608,7 @@ Subroutines / functions + .. c:function:: pt2_moller_plesset_general .. code:: text @@ -582,8 +618,11 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the general Moller-Plesset perturbative first order coefficient and second order energetic contribution + for the various n_st states. + c_pert(i) = /(difference of orbital energies) + e_2_pert(i) = ^2/(difference of orbital energies) @@ -591,6 +630,7 @@ Subroutines / functions + .. c:function:: pt2_qdpt .. code:: text @@ -600,7 +640,9 @@ Subroutines / functions File: :file:`pt2_equations.irp.f_template_412` compute the QDPT first order coefficient and second order energetic contribution + for the various N_st states. + c_pert(i) = /( - ) @@ -608,6 +650,7 @@ Subroutines / functions + .. c:function:: remove_small_contributions .. code:: text diff --git a/docs/source/modules/psiref_cas.rst b/docs/source/modules/psiref_cas.rst index fe4e38ae..cf1c5c64 100644 --- a/docs/source/modules/psiref_cas.rst +++ b/docs/source/modules/psiref_cas.rst @@ -12,3 +12,166 @@ Reference wave function is defined as a |CAS| wave function. This module is required for |CAS-SD|, |MRPT| or |MRCC|. + + +Providers +--------- + + +.. c:var:: idx_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. + + + + +.. c:var:: inv_norm_psi_ref + + .. code:: text + + double precision, allocatable :: norm_psi_ref (N_states) + double precision, allocatable :: inv_norm_psi_ref (N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: n_det_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. + + + + +.. c:var:: norm_psi_ref + + .. code:: text + + double precision, allocatable :: norm_psi_ref (N_states) + double precision, allocatable :: inv_norm_psi_ref (N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_non_ref_coef_interm_norm + + .. code:: text + + double precision, allocatable :: psi_non_ref_coef_interm_norm (N_det_non_ref,N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. + + + + +.. c:var:: psi_ref_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_ref (psi_det_size) + integer :: n_det_ref + + File: :file:`psi_ref.irp.f` + + CAS wave function, defined from the application of the CAS bitmask on the determinants. idx_cas gives the indice of the CAS determinant in psi_det. + + + + +.. c:var:: psi_ref_coef_interm_norm + + .. code:: text + + double precision, allocatable :: psi_ref_coef_interm_norm (N_det_ref,N_states) + + File: :file:`psi_ref.irp.f` + + + + + + +.. c:var:: psi_ref_coef_inv + + .. code:: text + + double precision, allocatable :: psi_ref_coef_inv (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + 1/psi_ref_coef + + + + +.. c:var:: psi_ref_coef_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + Projection of the CAS wave function on the restart wave function. + + + + +.. c:var:: psi_ref_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref.irp.f` + + Projection of the CAS wave function on the restart wave function. + + diff --git a/docs/source/modules/psiref_utils.rst b/docs/source/modules/psiref_utils.rst index 634ecb61..62c778f0 100644 --- a/docs/source/modules/psiref_utils.rst +++ b/docs/source/modules/psiref_utils.rst @@ -14,3 +14,369 @@ needs to be loaded with any `psi_ref_*` module. + + +Providers +--------- + + +.. c:var:: h_matrix_ref + + .. code:: text + + double precision, allocatable :: h_matrix_ref (N_det_ref,N_det_ref) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: holes_operators + + .. code:: text + + integer(bit_kind), allocatable :: holes_operators (N_int,2) + integer(bit_kind), allocatable :: particles_operators (N_int,2) + + File: :file:`psi_ref_excitations_operators.irp.f` + + holes_operators represents an array of integers where all the holes have been done going from psi_ref to psi_non_ref particles_operators represents an array of integers where all the particles have been done going from psi_ref to psi_non_ref + + + + +.. c:var:: idx_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. + + + + +.. c:var:: idx_non_ref_from_sorted + + .. code:: text + + integer, allocatable :: idx_non_ref_from_sorted (N_det) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: idx_non_ref_rev + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. + + + + +.. c:var:: n_det_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. + + + + +.. c:var:: particles_operators + + .. code:: text + + integer(bit_kind), allocatable :: holes_operators (N_int,2) + integer(bit_kind), allocatable :: particles_operators (N_int,2) + + File: :file:`psi_ref_excitations_operators.irp.f` + + holes_operators represents an array of integers where all the holes have been done going from psi_ref to psi_non_ref particles_operators represents an array of integers where all the particles have been done going from psi_ref to psi_non_ref + + + + +.. c:var:: psi_non_ref + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. + + + + +.. c:var:: psi_non_ref_coef + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef (psi_det_size,n_states) + integer, allocatable :: idx_non_ref (psi_det_size) + integer, allocatable :: idx_non_ref_rev (psi_det_size) + integer :: n_det_non_ref + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. + + + + +.. c:var:: psi_non_ref_coef_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. + + + + +.. c:var:: psi_non_ref_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_non_ref_coef_transp + + .. code:: text + + double precision, allocatable :: psi_non_ref_coef_transp (n_states,psi_det_size) + + File: :file:`psi_ref_utils.irp.f` + + Transposed psi_non_ref_coef + + + + +.. c:var:: psi_non_ref_restart + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_restart (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_restart (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. + + + + +.. c:var:: psi_non_ref_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_non_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_non_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_ref_coef_diagonalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) + double precision, allocatable :: psi_ref_energy_diagonalized (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_coef_normalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_normalized (psi_det_size,n_states) + + File: :file:`psi_ref_utils.irp.f` + + Normalized coefficients of the reference + + + + +.. c:var:: psi_ref_coef_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: psi_ref_coef_transp + + .. code:: text + + double precision, allocatable :: psi_ref_coef_transp (n_states,psi_det_size) + + File: :file:`psi_ref_utils.irp.f` + + Transposed psi_ref_coef + + + + +.. c:var:: psi_ref_energy + + .. code:: text + + double precision, allocatable :: psi_ref_energy (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_energy_diagonalized + + .. code:: text + + double precision, allocatable :: psi_ref_coef_diagonalized (N_det_ref,N_states) + double precision, allocatable :: psi_ref_energy_diagonalized (N_states) + + File: :file:`psi_ref_utils.irp.f` + + + + + + +.. c:var:: psi_ref_sorted_bit + + .. code:: text + + integer(bit_kind), allocatable :: psi_ref_sorted_bit (N_int,2,psi_det_size) + double precision, allocatable :: psi_ref_coef_sorted_bit (psi_det_size,N_states) + + File: :file:`psi_ref_utils.irp.f` + + Reference determinants sorted to accelerate the search of a random determinant in the wave function. + + + + +.. c:var:: ref_hamiltonian_matrix + + .. code:: text + + double precision, allocatable :: ref_hamiltonian_matrix (n_det_ref,n_det_ref) + + File: :file:`psi_ref_utils.irp.f` + + H matrix in the Reference space + + + + +Subroutines / functions +----------------------- + + + +.. c:function:: extract_ref + + .. code:: text + + subroutine extract_ref + + File: :file:`extract_ref.irp.f` + + Replaces the total wave function by the normalized projection on the reference + + + + + +.. c:function:: get_index_in_psi_ref_sorted_bit + + .. code:: text + + integer function get_index_in_psi_ref_sorted_bit(key,Nint) + + File: :file:`psi_ref_utils.irp.f` + + Returns the index of the determinant in the ``psi_ref_sorted_bit`` array + + + + + +.. c:function:: is_in_psi_ref + + .. code:: text + + logical function is_in_psi_ref(key,Nint) + + File: :file:`psi_ref_utils.irp.f` + + True if the determinant ``det`` is in the wave function + + diff --git a/docs/source/modules/read_integral.rst b/docs/source/modules/read_integral.rst deleted file mode 100644 index 1489bd22..00000000 --- a/docs/source/modules/read_integral.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _read_integral: - -.. program:: read_integral - -.. default-role:: option - -============= -read_integral -============= - -Warning: CAN NOT CHANGE THE NUMBER OF MO ! -Scripts to read integrals and metadata and generates fake ezfio - -Needed Modules -============== -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -.. image:: tree_dependency.png - -* `Integrals_Monoelec `_ -* `Integrals_Bielec `_ - -Documentation -============= -.. Do not edit this section It was auto-generated -.. by the `update_README.py` script. - - -`print_integrals `_ - Undocumented - - -`run `_ - Undocumented - - diff --git a/docs/source/modules/scf_utils.rst b/docs/source/modules/scf_utils.rst index 2180c249..97efb7bb 100644 --- a/docs/source/modules/scf_utils.rst +++ b/docs/source/modules/scf_utils.rst @@ -154,9 +154,9 @@ Providers .. code:: text subroutine extrapolate_Fock_matrix( & - error_matrix_DIIS,Fock_matrix_DIIS, & - Fock_matrix_AO_,size_Fock_matrix_AO, & - iteration_SCF,dim_DIIS & + error_matrix_DIIS,Fock_matrix_DIIS, & + Fock_matrix_AO_,size_Fock_matrix_AO, & + iteration_SCF,dim_DIIS & ) File: :file:`roothaan_hall_scf.irp.f` @@ -188,15 +188,21 @@ Providers File: :file:`fock_matrix.irp.f` - Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is + Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is :: + | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | + + + F = 1/2 (Fa + Fb) + K = Fb - Fa + .. c:var:: fock_matrix_mo .. code:: text @@ -206,15 +212,21 @@ Providers File: :file:`fock_matrix.irp.f` - Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is + Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is :: + | F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K | + + + F = 1/2 (Fa + Fb) + K = Fb - Fa + .. c:var:: fock_matrix_mo_alpha .. code:: text diff --git a/docs/source/modules/selectors_utils.rst b/docs/source/modules/selectors_utils.rst index c183641c..959d2930 100644 --- a/docs/source/modules/selectors_utils.rst +++ b/docs/source/modules/selectors_utils.rst @@ -32,10 +32,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -56,10 +58,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -75,9 +79,10 @@ Providers File: :file:`e_corr_selectors.irp.f` - degree of excitation respect to Hartree Fock for the wave function - for the all the selectors determinants + Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants. + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants @@ -98,10 +103,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -122,10 +129,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -146,10 +155,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -165,9 +176,10 @@ Providers File: :file:`e_corr_selectors.irp.f` - degree of excitation respect to Hartree Fock for the wave function - for the all the selectors determinants + Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants. + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants @@ -188,10 +200,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -212,10 +226,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -236,10 +252,12 @@ Providers File: :file:`e_corr_selectors.irp.f` - energy of correlation per determinant respect to the Hartree Fock determinant - for the all the double excitations in the selectors determinants - E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants. + + E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. + E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation + coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants @@ -255,9 +273,10 @@ Providers File: :file:`e_corr_selectors.irp.f` - degree of excitation respect to Hartree Fock for the wave function - for the all the selectors determinants + Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants. + double_index_selectors = list of the index of the double excitations + n_double_selectors = number of double excitations in the selectors determinants diff --git a/docs/source/modules/single_ref_method.rst b/docs/source/modules/single_ref_method.rst index c0a6f43e..ae80a401 100644 --- a/docs/source/modules/single_ref_method.rst +++ b/docs/source/modules/single_ref_method.rst @@ -12,74 +12,3 @@ Include this module for single reference methods. Using this module, the only generator determinant is the Hartree-Fock determinant. - - -Providers ---------- - - -.. c:var:: n_det_generators - - .. code:: text - - integer :: n_det_generators - - File: :file:`generators.irp.f` - - For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant - - - - -.. c:var:: psi_coef_generators - - .. code:: text - - integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) - double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) - - File: :file:`generators.irp.f` - - For Single reference wave functions, the generator is the Hartree-Fock determinant - - - - -.. c:var:: psi_det_generators - - .. code:: text - - integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size) - double precision, allocatable :: psi_coef_generators (psi_det_size,N_states) - - File: :file:`generators.irp.f` - - For Single reference wave functions, the generator is the Hartree-Fock determinant - - - - -.. c:var:: select_max - - .. code:: text - - double precision, allocatable :: select_max (1) - - File: :file:`generators.irp.f` - - Memo to skip useless selectors - - - - -.. c:var:: size_select_max - - .. code:: text - - integer :: size_select_max - - File: :file:`generators.irp.f` - - Size of select_max - - diff --git a/docs/source/modules/tools.rst b/docs/source/modules/tools.rst index a482ae31..5d4ad00b 100644 --- a/docs/source/modules/tools.rst +++ b/docs/source/modules/tools.rst @@ -73,20 +73,6 @@ Subroutines / functions -.. c:function:: print_r2 - - .. code:: text - - subroutine print_r2 - - File: :file:`print_r2.irp.f` - - - - - - - .. c:function:: print_wf .. code:: text @@ -96,8 +82,11 @@ Subroutines / functions File: :file:`print_wf.irp.f` print the wave function stored in the EZFIO folder in the intermediate normalization + it also prints a lot of information regarding the excitation operators from the reference determinant + and a first-order perturbative analysis of the wave function. + If the wave function strongly deviates from the first-order analysis, something funny is going on :) @@ -141,7 +130,9 @@ Subroutines / functions File: :file:`save_one_body_dm.irp.f` programs that computes the one body density on the mo basis for alpha and beta electrons from the wave function stored in the EZFIO folder, and then save it into the EZFIO folder aux_quantities. + Then, the global variable data_one_body_alpha_dm_mo and data_one_body_beta_dm_mo will automatically read the density in a further calculation. + This can be used to perform dampin on the density in RS-DFT calculation (see the density_for_dft module). diff --git a/docs/source/modules/utils.rst b/docs/source/modules/utils.rst index 448851ac..6437de1f 100644 --- a/docs/source/modules/utils.rst +++ b/docs/source/modules/utils.rst @@ -221,17 +221,19 @@ Providers .. code:: text subroutine overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,& - power_B,overlap_x,overlap_y,overlap_z,overlap,dim) + power_B,overlap_x,overlap_y,overlap_z,overlap,dim) File: :file:`one_e_integration.irp.f` .. math:: + S_x = \int (x-A_x)^{a_x} exp(-\alpha(x-A_x)^2) (x-B_x)^{b_x} exp(-beta(x-B_x)^2) dx \\ S = S_x S_y S_z + .. c:var:: phi_angular_integration_lebedev .. code:: text @@ -466,6 +468,7 @@ Subroutines / functions File: :file:`util.irp.f` .. math :: + \frac{i!}{j!(i-j)!} @@ -473,6 +476,7 @@ Subroutines / functions + .. c:function:: check_mem .. code:: text @@ -790,6 +794,7 @@ Subroutines / functions File: :file:`integration.irp.f` Transforms the product of (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) exp(-(r-Nucl_center)^2 gama + into fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) @@ -1253,8 +1258,11 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Diagonalize matrix H + H is untouched between input and ouptut + eigevalues(i) = ith lowest eigenvalue of the H matrix + eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector @@ -1262,6 +1270,7 @@ Subroutines / functions + .. c:function:: lapack_diagd .. code:: text @@ -1271,8 +1280,11 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Diagonalize matrix H + H is untouched between input and ouptut + eigevalues(i) = ith lowest eigenvalue of the H matrix + eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector @@ -1280,6 +1292,7 @@ Subroutines / functions + .. c:function:: logfact .. code:: text @@ -1401,11 +1414,17 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Compute C_new=C_old.U.s^-1/2 canonical orthogonalization. + overlap : overlap matrix + LDA : leftmost dimension of overlap array + N : Overlap matrix is NxN (array is (LDA,N) ) + C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors + LDC : leftmost dimension of C + m : Coefficients matrix is MxN, ( array is (LDC,N) ) @@ -1413,6 +1432,7 @@ Subroutines / functions + .. c:function:: ortho_lowdin .. code:: text @@ -1422,11 +1442,17 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Compute C_new=C_old.S^-1/2 orthogonalization. + overlap : overlap matrix + LDA : leftmost dimension of overlap array + N : Overlap matrix is NxN (array is (LDA,N) ) + C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors + LDC : leftmost dimension of C + M : Coefficients matrix is MxN, ( array is (LDC,N) ) @@ -1434,6 +1460,7 @@ Subroutines / functions + .. c:function:: ortho_qr .. code:: text @@ -1443,9 +1470,13 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Orthogonalization using Q.R factorization + A : matrix to orthogonalize + LDA : leftmost dimension of A + n : Number of rows of A + m : Number of columns of A @@ -1453,6 +1484,7 @@ Subroutines / functions + .. c:function:: ortho_qr_unblocked .. code:: text @@ -1462,9 +1494,13 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Orthogonalization using Q.R factorization + A : matrix to orthogonalize + LDA : leftmost dimension of A + n : Number of rows of A + m : Number of columns of A @@ -1472,6 +1508,7 @@ Subroutines / functions + .. c:function:: overlap_gaussian_x .. code:: text @@ -1481,6 +1518,7 @@ Subroutines / functions File: :file:`one_e_integration.irp.f` .. math:: + \sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx @@ -1488,6 +1526,7 @@ Subroutines / functions + .. c:function:: overlap_x_abs .. code:: text @@ -1497,6 +1536,7 @@ Subroutines / functions File: :file:`one_e_integration.irp.f` .. math :: + \int_{-infty}^{+infty} (x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) dx @@ -1504,6 +1544,7 @@ Subroutines / functions + .. c:function:: print_memory_usage .. code:: text @@ -1625,6 +1666,7 @@ Subroutines / functions File: :file:`integration.irp.f` .. math:: + \int_0^1 dx \exp(-p x^2) x^n @@ -1632,6 +1674,7 @@ Subroutines / functions + .. c:function:: rint1 .. code:: text @@ -1837,7 +1880,9 @@ Subroutines / functions File: :file:`linear_algebra.irp.f` Compute A = U.D.Vt + LDx : leftmost dimension of x + Dimsneion of A is m x n @@ -1845,6 +1890,7 @@ Subroutines / functions + .. c:function:: total_memory .. code:: text diff --git a/docs/source/programmers_guide/index.rst b/docs/source/programmers_guide/index.rst index b7011b23..b0049ea4 100644 --- a/docs/source/programmers_guide/index.rst +++ b/docs/source/programmers_guide/index.rst @@ -10,6 +10,7 @@ Index of Modules :glob: /modules/* + /programmers_guide/plugins .. Auto-generated file diff --git a/docs/source/programmers_guide/index_providers.rst b/docs/source/programmers_guide/index_providers.rst index 9712c9d7..60a17be0 100644 --- a/docs/source/programmers_guide/index_providers.rst +++ b/docs/source/programmers_guide/index_providers.rst @@ -112,6 +112,7 @@ Index of Providers * :c:data:`aos_vx_alpha_pbe_w` * :c:data:`aos_vx_beta_lda_w` * :c:data:`aos_vx_beta_pbe_w` +* :c:data:`apply_exc_to_psi` * :c:data:`barycentric_electronic_energy` * :c:data:`bi_elec_ref_bitmask_energy` * :c:data:`big_array_coulomb_integrals` @@ -133,8 +134,12 @@ Index of Providers * :c:data:`cart_to_sphe_9` * :c:data:`cas_bitmask` * :c:data:`center_of_mass` +* :c:data:`ci_dressed_pt2_new_eigenvectors` +* :c:data:`ci_dressed_pt2_new_eigenvectors_s2` +* :c:data:`ci_dressed_pt2_new_energy` * :c:data:`ci_eigenvectors` * :c:data:`ci_eigenvectors_s2` +* :c:data:`ci_electronic_dressed_pt2_new_energy` * :c:data:`ci_electronic_energy` * :c:data:`ci_energy` * :c:data:`closed_shell_ref_bitmask` @@ -146,6 +151,7 @@ Index of Providers * :c:data:`core_fock_operator_erf` * :c:data:`core_inact_act_bitmask_4` * :c:data:`core_inact_virt_bitmask` +* :c:data:`corr_e_from_1h1p` * :c:data:`correlation_energy_ratio_max` * :c:data:`correlation_functional` * :c:data:`damping_for_rs_dft` @@ -158,6 +164,7 @@ Index of Providers * :c:data:`degree_max_generators` * :c:data:`degree_max_integration_lebedev` * :c:data:`delta_e_per_selector` +* :c:data:`delta_ij_mrpt` * :c:data:`density_for_dft` * :c:data:`det_alpha_norm` * :c:data:`det_beta_norm` @@ -177,6 +184,7 @@ Index of Providers * :c:data:`do_direct_integrals` * :c:data:`do_pseudo` * :c:data:`do_pt2` +* :c:data:`do_third_order_1h1p` * :c:data:`double_exc_bitmask` * :c:data:`double_index_selectors` * :c:data:`dr_radial_integral` @@ -203,6 +211,8 @@ Index of Providers * :c:data:`energy_c` * :c:data:`energy_c_lda` * :c:data:`energy_c_pbe` +* :c:data:`energy_cas_dyall` +* :c:data:`energy_cas_dyall_no_exchange` * :c:data:`energy_iterations` * :c:data:`energy_sr_c_lda` * :c:data:`energy_sr_c_pbe` @@ -224,6 +234,12 @@ Index of Providers * :c:data:`final_grid_points` * :c:data:`final_weight_at_r` * :c:data:`final_weight_at_r_vector` +* :c:data:`final_weight_functions_at_final_grid_points` +* :c:data:`final_weight_functions_at_grid_points` +* :c:data:`fock_core_inactive` +* :c:data:`fock_core_inactive_from_act` +* :c:data:`fock_core_inactive_total` +* :c:data:`fock_core_inactive_total_spin_trace` * :c:data:`fock_matrix_alpha_no_xc_ao` * :c:data:`fock_matrix_ao` * :c:data:`fock_matrix_ao_alpha` @@ -234,7 +250,12 @@ Index of Providers * :c:data:`fock_matrix_mo` * :c:data:`fock_matrix_mo_alpha` * :c:data:`fock_matrix_mo_beta` +* :c:data:`fock_operator_active_from_core_inact` * :c:data:`fock_operator_closed_shell_ref_bitmask` +* :c:data:`fock_virt_from_act` +* :c:data:`fock_virt_from_core_inact` +* :c:data:`fock_virt_total` +* :c:data:`fock_virt_total_spin_trace` * :c:data:`fock_wee_closed_shell` * :c:data:`fps_spf_matrix_ao` * :c:data:`fps_spf_matrix_mo` @@ -242,12 +263,17 @@ Index of Providers * :c:data:`full_ijkl_bitmask_4` * :c:data:`gauleg_t2` * :c:data:`gauleg_w` +* :c:data:`gen_det_ref_idx` +* :c:data:`gen_det_ref_shortcut` +* :c:data:`gen_det_ref_sorted` +* :c:data:`gen_det_ref_version` * :c:data:`general_primitive_integral` * :c:data:`general_primitive_integral_erf` * :c:data:`generators_bitmask` * :c:data:`generators_bitmask_restart` * :c:data:`gga_sr_type_functionals` * :c:data:`gga_type_functionals` +* :c:data:`give_holes_and_particles_in_active_space` * :c:data:`grad_aos_dsr_vc_alpha_pbe_w` * :c:data:`grad_aos_dsr_vc_beta_pbe_w` * :c:data:`grad_aos_dsr_vx_alpha_pbe_w` @@ -264,11 +290,15 @@ Index of Providers * :c:data:`h_apply_buffer_lock` * :c:data:`h_matrix_all_dets` * :c:data:`h_matrix_cas` +* :c:data:`h_matrix_ref` * :c:data:`hf_bitmask` * :c:data:`hf_energy` * :c:data:`hf_exchange` * :c:data:`hf_one_electron_energy` * :c:data:`hf_two_electron_energy` +* :c:data:`hmatrix_dressed_pt2_new` +* :c:data:`hmatrix_dressed_pt2_new_symmetrized` +* :c:data:`holes_operators` * :c:data:`i2radix_sort` * :c:data:`i8radix_sort` * :c:data:`i8radix_sort_big` @@ -284,6 +314,10 @@ Index of Providers * :c:data:`i_x2_pol_mult_mono_elec` * :c:data:`idx_cas` * :c:data:`idx_non_cas` +* :c:data:`idx_non_ref` +* :c:data:`idx_non_ref_from_sorted` +* :c:data:`idx_non_ref_rev` +* :c:data:`idx_ref` * :c:data:`inact_bitmask` * :c:data:`inact_virt_bitmask` * :c:data:`index_final_points` @@ -298,7 +332,10 @@ Index of Providers * :c:data:`insert_into_mo_integrals_map` * :c:data:`int_erf_3_index` * :c:data:`int_erf_3_index_exc` +* :c:data:`integral_density_alpha_knowles_becke_per_atom` +* :c:data:`integral_density_beta_knowles_becke_per_atom` * :c:data:`inv_int` +* :c:data:`inv_norm_psi_ref` * :c:data:`inv_selectors_coef_hf` * :c:data:`inv_selectors_coef_hf_squared` * :c:data:`iradix_sort` @@ -403,7 +440,9 @@ Index of Providers * :c:data:`n_det_max` * :c:data:`n_det_max_full` * :c:data:`n_det_non_cas` +* :c:data:`n_det_non_ref` * :c:data:`n_det_print_wf` +* :c:data:`n_det_ref` * :c:data:`n_det_selectors` * :c:data:`n_double_exc_bitmasks` * :c:data:`n_double_selectors` @@ -431,6 +470,7 @@ Index of Providers * :c:data:`no_oa_or_av_opt` * :c:data:`no_vvv_integrals` * :c:data:`no_vvvv_integrals` +* :c:data:`norm_psi_ref` * :c:data:`nproc` * :c:data:`nthreads_davidson` * :c:data:`nucl_aos` @@ -452,19 +492,31 @@ Index of Providers * :c:data:`nucl_num` * :c:data:`nucl_num_shell_aos` * :c:data:`nuclear_repulsion` +* :c:data:`one_anhil` +* :c:data:`one_anhil_inact` +* :c:data:`one_anhil_one_creat` +* :c:data:`one_anhil_one_creat_inact_virt` +* :c:data:`one_anhil_one_creat_inact_virt_bis` +* :c:data:`one_anhil_one_creat_inact_virt_norm` +* :c:data:`one_body_dm_alpha_and_grad_at_r` * :c:data:`one_body_dm_alpha_ao_for_dft` * :c:data:`one_body_dm_alpha_at_r` * :c:data:`one_body_dm_ao_alpha` * :c:data:`one_body_dm_ao_beta` * :c:data:`one_body_dm_average_mo_for_dft` +* :c:data:`one_body_dm_beta_and_grad_at_r` * :c:data:`one_body_dm_beta_ao_for_dft` * :c:data:`one_body_dm_beta_at_r` * :c:data:`one_body_dm_dagger_mo_spin_index` * :c:data:`one_body_dm_mo` * :c:data:`one_body_dm_mo_alpha` +* :c:data:`one_body_dm_mo_alpha_and_grad_at_grid_points` +* :c:data:`one_body_dm_mo_alpha_at_grid_points` * :c:data:`one_body_dm_mo_alpha_average` * :c:data:`one_body_dm_mo_alpha_for_dft` * :c:data:`one_body_dm_mo_beta` +* :c:data:`one_body_dm_mo_beta_and_grad_at_grid_points` +* :c:data:`one_body_dm_mo_beta_at_grid_points` * :c:data:`one_body_dm_mo_beta_average` * :c:data:`one_body_dm_mo_beta_for_dft` * :c:data:`one_body_dm_mo_diff` @@ -476,6 +528,8 @@ Index of Providers * :c:data:`one_body_single_double_dm_mo_beta` * :c:data:`one_body_spin_density_ao` * :c:data:`one_body_spin_density_mo` +* :c:data:`one_creat` +* :c:data:`one_creat_virt` * :c:data:`one_dm_alpha_in_r` * :c:data:`one_dm_and_grad_alpha_in_r` * :c:data:`one_dm_and_grad_beta_in_r` @@ -485,6 +539,7 @@ Index of Providers * :c:data:`output_cpu_time_0` * :c:data:`output_wall_time_0` * :c:data:`overlap_gaussian_xyz` +* :c:data:`particles_operators` * :c:data:`phi_angular_integration_lebedev` * :c:data:`potential_c_alpha_ao` * :c:data:`potential_c_alpha_ao_lda` @@ -527,6 +582,7 @@ Index of Providers * :c:data:`pseudo_v_k_transp` * :c:data:`pseudo_v_kl` * :c:data:`pseudo_v_kl_transp` +* :c:data:`psi_active` * :c:data:`psi_average_norm_contrib` * :c:data:`psi_average_norm_contrib_sorted` * :c:data:`psi_bilinear_matrix` @@ -580,8 +636,30 @@ Index of Providers * :c:data:`psi_non_cas_coef` * :c:data:`psi_non_cas_coef_sorted_bit` * :c:data:`psi_non_cas_sorted_bit` +* :c:data:`psi_non_ref` +* :c:data:`psi_non_ref_coef` +* :c:data:`psi_non_ref_coef_interm_norm` +* :c:data:`psi_non_ref_coef_restart` +* :c:data:`psi_non_ref_coef_sorted_bit` +* :c:data:`psi_non_ref_coef_transp` +* :c:data:`psi_non_ref_restart` +* :c:data:`psi_non_ref_sorted_bit` * :c:data:`psi_occ_pattern` * :c:data:`psi_occ_pattern_hii` +* :c:data:`psi_ref` +* :c:data:`psi_ref_bis_lock` +* :c:data:`psi_ref_coef` +* :c:data:`psi_ref_coef_diagonalized` +* :c:data:`psi_ref_coef_interm_norm` +* :c:data:`psi_ref_coef_inv` +* :c:data:`psi_ref_coef_normalized` +* :c:data:`psi_ref_coef_restart` +* :c:data:`psi_ref_coef_sorted_bit` +* :c:data:`psi_ref_coef_transp` +* :c:data:`psi_ref_energy` +* :c:data:`psi_ref_energy_diagonalized` +* :c:data:`psi_ref_restart` +* :c:data:`psi_ref_sorted_bit` * :c:data:`psi_selectors` * :c:data:`psi_selectors_coef` * :c:data:`psi_selectors_coef_transp` @@ -622,6 +700,7 @@ Index of Providers * :c:data:`ref_bitmask` * :c:data:`ref_bitmask_energy` * :c:data:`ref_closed_shell_bitmask` +* :c:data:`ref_hamiltonian_matrix` * :c:data:`reunion_of_bitmask` * :c:data:`reunion_of_cas_inact_bitmask` * :c:data:`reunion_of_core_inact_act_bitmask` @@ -640,6 +719,15 @@ Index of Providers * :c:data:`scf_density_matrix_ao_alpha` * :c:data:`scf_density_matrix_ao_beta` * :c:data:`scf_energy` +* :c:data:`second_order_pt_new` +* :c:data:`second_order_pt_new_1h` +* :c:data:`second_order_pt_new_1h1p` +* :c:data:`second_order_pt_new_1h2p` +* :c:data:`second_order_pt_new_1p` +* :c:data:`second_order_pt_new_2h` +* :c:data:`second_order_pt_new_2h1p` +* :c:data:`second_order_pt_new_2h2p` +* :c:data:`second_order_pt_new_2p` * :c:data:`select_max` * :c:data:`selection_criterion` * :c:data:`selection_criterion_factor` @@ -663,6 +751,8 @@ Index of Providers * :c:data:`state_following` * :c:data:`target_energy` * :c:data:`theta_angular_integration_lebedev` +* :c:data:`three_anhil` +* :c:data:`three_creat` * :c:data:`thresh_scf` * :c:data:`threshold_davidson` * :c:data:`threshold_diis` @@ -674,6 +764,10 @@ Index of Providers * :c:data:`trace_v_hxc` * :c:data:`trace_v_xc` * :c:data:`transpose` +* :c:data:`two_anhil` +* :c:data:`two_anhil_one_creat` +* :c:data:`two_creat` +* :c:data:`two_creat_one_anhil` * :c:data:`two_electron_energy` * :c:data:`unpaired_alpha_electrons` * :c:data:`used_weight` @@ -681,6 +775,7 @@ Index of Providers * :c:data:`virt_bitmask` * :c:data:`virt_bitmask_4` * :c:data:`weight_at_r` +* :c:data:`weight_functions_at_grid_points` * :c:data:`weight_occ_pattern` * :c:data:`weights_angular_integration_lebedev` * :c:data:`weights_angular_points` @@ -774,8 +869,11 @@ Index of Subroutines/Functions * :c:func:`connect_to_taskserver` * :c:func:`connected_to_ref` * :c:func:`connected_to_ref_by_mono` +* :c:func:`contrib_1h2p_dm_based` +* :c:func:`contrib_2h1p_dm_based` * :c:func:`copy_h_apply_buffer_to_wf` * :c:func:`copy_psi_bilinear_to_psi` +* :c:func:`coulomb_value_no_check` * :c:func:`create_guess` * :c:func:`create_microlist` * :c:func:`create_minilist` @@ -814,6 +912,8 @@ Index of Subroutines/Functions * :c:func:`diag_h_mat_elem_au0_h_au0` * :c:func:`diag_h_mat_elem_fock` * :c:func:`diag_h_mat_elem_monoelec` +* :c:func:`diag_h_mat_elem_no_elec_check` +* :c:func:`diag_h_mat_elem_no_elec_check_no_exchange` * :c:func:`diag_s_mat_elem` * :c:func:`diag_wee_mat_elem` * :c:func:`diagonalize_ci` @@ -856,6 +956,7 @@ Index of Subroutines/Functions * :c:func:`example_bitmask` * :c:func:`example_determinants` * :c:func:`example_determinants_psi_det` +* :c:func:`extract_ref` * :c:func:`extrapolate_data` * :c:func:`f_function_becke` * :c:func:`f_integral` @@ -867,6 +968,7 @@ Index of Subroutines/Functions * :c:func:`filter_connected` * :c:func:`filter_connected_i_h_psi0` * :c:func:`filter_not_connected` +* :c:func:`find_connections_previous` * :c:func:`find_rotation` * :c:func:`four_idx_transform` * :c:func:`g0d` @@ -908,6 +1010,8 @@ Index of Subroutines/Functions * :c:func:`get_d0` * :c:func:`get_d1` * :c:func:`get_d2` +* :c:func:`get_delta_e_dyall` +* :c:func:`get_delta_e_dyall_general_mp` * :c:func:`get_double_excitation` * :c:func:`get_double_excitation_spin` * :c:func:`get_excitation` @@ -922,6 +1026,7 @@ Index of Subroutines/Functions * :c:func:`get_index_in_psi_det_alpha_unique` * :c:func:`get_index_in_psi_det_beta_unique` * :c:func:`get_index_in_psi_det_sorted_bit` +* :c:func:`get_index_in_psi_ref_sorted_bit` * :c:func:`get_inverse` * :c:func:`get_m0` * :c:func:`get_m1` @@ -954,6 +1059,19 @@ Index of Subroutines/Functions * :c:func:`get_uj_s2_ui` * :c:func:`getmobiles` * :c:func:`getunitandopen` +* :c:func:`give_1h1p_contrib` +* :c:func:`give_1h1p_only_doubles_spin_cross` +* :c:func:`give_1h1p_sec_order_singles_contrib` +* :c:func:`give_1h2p_contrib` +* :c:func:`give_1h2p_contrib_sec_order` +* :c:func:`give_1h2p_new` +* :c:func:`give_1p_sec_order_singles_contrib` +* :c:func:`give_2h1p_contrib` +* :c:func:`give_2h1p_contrib_sec_order` +* :c:func:`give_2h1p_new` +* :c:func:`give_2h2p` +* :c:func:`give_2p_new` +* :c:func:`give_active_part_determinant` * :c:func:`give_all_aos_and_grad_and_lapl_at_r` * :c:func:`give_all_aos_and_grad_at_r` * :c:func:`give_all_aos_at_r` @@ -962,13 +1080,18 @@ Index of Subroutines/Functions * :c:func:`give_all_mos_and_grad_and_lapl_at_r` * :c:func:`give_all_mos_and_grad_at_r` * :c:func:`give_all_mos_at_r` +* :c:func:`give_core_inactive_part_determinant` * :c:func:`give_explicit_poly_and_gaussian` * :c:func:`give_explicit_poly_and_gaussian_double` * :c:func:`give_explicit_poly_and_gaussian_x` +* :c:func:`give_holes_in_inactive_space` +* :c:func:`give_particles_in_virt_space` * :c:func:`give_polynom_mult_center_mono_elec` * :c:func:`give_polynom_mult_center_mono_elec_erf` * :c:func:`give_polynom_mult_center_mono_elec_erf_opt` * :c:func:`give_polynom_mult_center_x` +* :c:func:`give_singles_and_partial_doubles_1h1p_contrib` +* :c:func:`give_virt_part_determinant` * :c:func:`gpw` * :c:func:`grad_rho_ab_to_grad_rho_oc` * :c:func:`gser` @@ -982,6 +1105,51 @@ Index of Subroutines/Functions * :c:func:`h_apply_cisd_diexcorg` * :c:func:`h_apply_cisd_diexcp` * :c:func:`h_apply_cisd_monoexc` +* :c:func:`h_apply_mrpt` +* :c:func:`h_apply_mrpt_1h` +* :c:func:`h_apply_mrpt_1h1p` +* :c:func:`h_apply_mrpt_1h1p_diexc` +* :c:func:`h_apply_mrpt_1h1p_diexcorg` +* :c:func:`h_apply_mrpt_1h1p_diexcp` +* :c:func:`h_apply_mrpt_1h1p_monoexc` +* :c:func:`h_apply_mrpt_1h2p` +* :c:func:`h_apply_mrpt_1h2p_diexc` +* :c:func:`h_apply_mrpt_1h2p_diexcorg` +* :c:func:`h_apply_mrpt_1h2p_diexcp` +* :c:func:`h_apply_mrpt_1h2p_monoexc` +* :c:func:`h_apply_mrpt_1h_diexc` +* :c:func:`h_apply_mrpt_1h_diexcorg` +* :c:func:`h_apply_mrpt_1h_diexcp` +* :c:func:`h_apply_mrpt_1h_monoexc` +* :c:func:`h_apply_mrpt_1p` +* :c:func:`h_apply_mrpt_1p_diexc` +* :c:func:`h_apply_mrpt_1p_diexcorg` +* :c:func:`h_apply_mrpt_1p_diexcp` +* :c:func:`h_apply_mrpt_1p_monoexc` +* :c:func:`h_apply_mrpt_2h` +* :c:func:`h_apply_mrpt_2h1p` +* :c:func:`h_apply_mrpt_2h1p_diexc` +* :c:func:`h_apply_mrpt_2h1p_diexcorg` +* :c:func:`h_apply_mrpt_2h1p_diexcp` +* :c:func:`h_apply_mrpt_2h1p_monoexc` +* :c:func:`h_apply_mrpt_2h2p` +* :c:func:`h_apply_mrpt_2h2p_diexc` +* :c:func:`h_apply_mrpt_2h2p_diexcorg` +* :c:func:`h_apply_mrpt_2h2p_diexcp` +* :c:func:`h_apply_mrpt_2h2p_monoexc` +* :c:func:`h_apply_mrpt_2h_diexc` +* :c:func:`h_apply_mrpt_2h_diexcorg` +* :c:func:`h_apply_mrpt_2h_diexcp` +* :c:func:`h_apply_mrpt_2h_monoexc` +* :c:func:`h_apply_mrpt_2p` +* :c:func:`h_apply_mrpt_2p_diexc` +* :c:func:`h_apply_mrpt_2p_diexcorg` +* :c:func:`h_apply_mrpt_2p_diexcp` +* :c:func:`h_apply_mrpt_2p_monoexc` +* :c:func:`h_apply_mrpt_diexc` +* :c:func:`h_apply_mrpt_diexcorg` +* :c:func:`h_apply_mrpt_diexcp` +* :c:func:`h_apply_mrpt_monoexc` * :c:func:`h_s2_u_0_bielec_nstates_openmp` * :c:func:`h_s2_u_0_bielec_nstates_openmp_work` * :c:func:`h_s2_u_0_bielec_nstates_openmp_work_1` @@ -1020,6 +1188,8 @@ Index of Subroutines/Functions * :c:func:`i_h_j_bielec` * :c:func:`i_h_j_double_alpha_beta` * :c:func:`i_h_j_double_spin` +* :c:func:`i_h_j_dyall` +* :c:func:`i_h_j_dyall_no_exchange` * :c:func:`i_h_j_mono_spin` * :c:func:`i_h_j_mono_spin_monoelec` * :c:func:`i_h_j_monoelec` @@ -1027,6 +1197,7 @@ Index of Subroutines/Functions * :c:func:`i_h_j_verbose` * :c:func:`i_h_psi` * :c:func:`i_h_psi_minilist` +* :c:func:`i_h_psi_pert_new_minilist` * :c:func:`i_s2_psi_minilist` * :c:func:`i_wee_j_mono` * :c:func:`i_x1_pol_mult` @@ -1059,6 +1230,7 @@ Index of Subroutines/Functions * :c:func:`is_connected_to_by_mono` * :c:func:`is_generable_cassd` * :c:func:`is_i_in_virtual` +* :c:func:`is_in_psi_ref` * :c:func:`is_in_wavefunction` * :c:func:`is_spin_flip_possible` * :c:func:`is_the_hole_in_det` @@ -1098,6 +1270,7 @@ Index of Subroutines/Functions * :c:func:`molden` * :c:func:`mono_excitation_wee` * :c:func:`mpi_print` +* :c:func:`mrpt_dress` * :c:func:`multiply_poly` * :c:func:`n_pt_sup` * :c:func:`nai_pol_mult` @@ -1157,7 +1330,6 @@ Index of Subroutines/Functions * :c:func:`print_generators_bitmasks_particles` * :c:func:`print_generators_bitmasks_particles_for_one_generator` * :c:func:`print_memory_usage` -* :c:func:`print_r2` * :c:func:`print_spindet` * :c:func:`print_summary` * :c:func:`print_wf` @@ -1213,6 +1385,7 @@ Index of Subroutines/Functions * :c:func:`roothaan_hall_scf` * :c:func:`routine` * :c:func:`routine_example_psi_det` +* :c:func:`rs_ks_scf` * :c:func:`run` * :c:func:`run_pt2_slave` * :c:func:`run_selection_slave` @@ -1245,6 +1418,7 @@ Index of Subroutines/Functions * :c:func:`set_bit_to_integer` * :c:func:`set_bitmask_hole_as_input` * :c:func:`set_bitmask_particl_as_input` +* :c:func:`set_generators_bitmasks_as_holes_and_particles` * :c:func:`set_natural_mos` * :c:func:`set_order` * :c:func:`set_order_big` @@ -1272,6 +1446,8 @@ Index of Subroutines/Functions * :c:func:`tasks_done_to_taskserver` * :c:func:`testteethbuilding` * :c:func:`total_memory` +* :c:func:`u0_h_dyall_u0` +* :c:func:`u0_h_dyall_u0_no_exchange` * :c:func:`u_0_h_u_0` * :c:func:`u_0_h_u_0_bielec` * :c:func:`u_0_s2_u_0` diff --git a/docs/source/users_guide/dft.rst b/docs/source/users_guide/dft.rst deleted file mode 100644 index 0106f387..00000000 --- a/docs/source/users_guide/dft.rst +++ /dev/null @@ -1,47 +0,0 @@ -The DFT module uses Lebedev-Laikov grids, using the code distributed through CCL (http://www.ccl.net/). - -.. code-block:: text - - This subroutine is part of a set of subroutines that generate - Lebedev grids [1-6] for integration on a sphere. The original - C-code [1] was kindly provided by Dr. Dmitri N. Laikov and - translated into fortran by Dr. Christoph van Wuellen. - This subroutine was translated using a C to fortran77 conversion - tool written by Dr. Christoph van Wuellen. - - Users of this code are asked to include reference [1] in their - publications, and in the user- and programmers-manuals - describing their codes. - - This code was distributed through CCL (http://www.ccl.net/). - - [1] V.I. Lebedev, and D.N. Laikov - "A quadrature formula for the sphere of the 131st - algebraic order of accuracy" - Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481. - - [2] V.I. Lebedev - "A quadrature formula for the sphere of 59th algebraic - order of accuracy" - Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286. - - [3] V.I. Lebedev, and A.L. Skorokhodov - "Quadrature formulas of orders 41, 47, and 53 for the sphere" - Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592. - - [4] V.I. Lebedev - "Spherical quadrature formulas exact to orders 25-29" - Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107. - - [5] V.I. Lebedev - "Quadratures on a sphere" - Computational Mathematics and Mathematical Physics, Vol. 16, - 1976, pp. 10-24. - - [6] V.I. Lebedev - "Values of the nodes and weights of ninth to seventeenth - order Gauss-Markov quadrature formulae invariant under the - octahedron group with inversion" - Computational Mathematics and Mathematical Physics, Vol. 15, - 1975, pp. 44-51. - diff --git a/src/ao_basis/aos.irp.f b/src/ao_basis/aos.irp.f index 130fd24d..b55005a7 100644 --- a/src/ao_basis/aos.irp.f +++ b/src/ao_basis/aos.irp.f @@ -105,7 +105,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_coef_normalized_ordered_transp, (ao_prim_num_max,ao_num) ] implicit none BEGIN_DOC - ! Transposed :c:var:`ao_coef_normalized_ordered` + ! Transposed :c:data:`ao_coef_normalized_ordered` END_DOC integer :: i,j do j=1, ao_num @@ -119,7 +119,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_expo_ordered_transp, (ao_prim_num_max,ao_num) ] implicit none BEGIN_DOC - ! Transposed :c:var:`ao_expo_ordered` + ! Transposed :c:data:`ao_expo_ordered` END_DOC integer :: i,j do j=1, ao_num diff --git a/src/ao_one_e_integrals/ao_ortho_canonical.irp.f b/src/ao_one_e_integrals/ao_ortho_canonical.irp.f index 963b041c..3ceab59a 100644 --- a/src/ao_one_e_integrals/ao_ortho_canonical.irp.f +++ b/src/ao_one_e_integrals/ao_ortho_canonical.irp.f @@ -72,7 +72,7 @@ END_PROVIDER BEGIN_PROVIDER [ double precision, ao_cart_to_sphe_inv, (ao_cart_to_sphe_num,ao_num) ] implicit none BEGIN_DOC - ! Inverse of :c:var:`ao_cart_to_sphe_coef` + ! Inverse of :c:data:`ao_cart_to_sphe_coef` END_DOC call get_pseudo_inverse(ao_cart_to_sphe_coef,size(ao_cart_to_sphe_coef,1),& diff --git a/src/ao_one_e_integrals/kin_ao_ints.irp.f b/src/ao_one_e_integrals/kin_ao_ints.irp.f index 994b1ab4..d48d0f95 100644 --- a/src/ao_one_e_integrals/kin_ao_ints.irp.f +++ b/src/ao_one_e_integrals/kin_ao_ints.irp.f @@ -5,7 +5,7 @@ BEGIN_DOC ! Second derivative matrix elements in the |AO| basis. ! - ! :math:`{\tt ao_deriv2_x} = + ! :math:`{\tt ao\_deriv2\_x} = ! \langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle` ! END_DOC diff --git a/src/ao_one_e_integrals/pot_ao_erf_ints.irp.f b/src/ao_one_e_integrals/pot_ao_erf_ints.irp.f index a5eb0bda..85921dbc 100644 --- a/src/ao_one_e_integrals/pot_ao_erf_ints.irp.f +++ b/src/ao_one_e_integrals/pot_ao_erf_ints.irp.f @@ -1,7 +1,7 @@ subroutine give_all_erf_kl_ao(integrals_ao,mu_in,C_center) implicit none BEGIN_DOC -! subroutine that returs all integrals over r of type erf(mu_in * |r-C_center|)/|r-C_center| +! subroutine that returs all integrals over r of type erf(mu_in * | r-C_center |)/| r-C_center | END_DOC double precision, intent(in) :: mu_in,C_center(3) double precision, intent(out) :: integrals_ao(ao_num,ao_num) @@ -19,7 +19,7 @@ double precision function NAI_pol_mult_erf_ao(i_ao,j_ao,mu_in,C_center) implicit none BEGIN_DOC ! computes the following integral : - ! int[-infty;+infty] dr AO_i_ao (r) AO_j_ao(r) erf(mu_in * |r-C_center|)/|r-C_center| + ! int[-infty;+infty] dr AO_i_ao (r) AO_j_ao(r) erf(mu_in * | r-C_center |)/| r-C_center | END_DOC integer, intent(in) :: i_ao,j_ao double precision, intent(in) :: mu_in, C_center(3) diff --git a/src/aux_quantities/README.rst b/src/aux_quantities/README.rst index 4ff4d296..333bca52 100644 --- a/src/aux_quantities/README.rst +++ b/src/aux_quantities/README.rst @@ -3,11 +3,19 @@ aux_quantities ============== -This module contains some global variables (such as densities and energies) which are stored in the EZFIO folder in a different place than determinants. This is used in practice to store density matrices which can be obtained from any methods, as long as they are stored in the same MO basis which is used for the calculations. In |RS-DFT| calculations, this can be done to perform damping on the density in order to speed up convergence. +This module contains some global variables (such as densities and energies) +which are stored in the EZFIO folder in a different place than determinants. +This is used in practice to store density matrices which can be obtained from +any methods, as long as they are stored in the same MO basis which is used for +the calculations. In |RSDFT| calculations, this can be done to perform damping +on the density in order to speed up convergence. The main providers of that module are: -* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the one-body alpha and beta densities which are necessary read from the EZFIO folder. +* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the + one-body alpha and beta densities which are necessary read from the EZFIO + folder. -Thanks to these providers you can use any density matrix that does not necessary corresponds to that of the current wave function. +Thanks to these providers you can use any density matrix that does not +necessary corresponds to that of the current wave function. diff --git a/src/davidson/README.rst b/src/davidson/README.rst index b7c15356..8df06db6 100644 --- a/src/davidson/README.rst +++ b/src/davidson/README.rst @@ -5,7 +5,7 @@ davidson Abstract module for Davidson's diagonalization. It contains everything required for the Davidson algorithm, dressed or not. If a dressing is used, the dressing column should be defined and the -:ref:`davidsondressed` module should be used. If no dressing is required, +:ref:`davidson_dressed` module should be used. If no dressing is required, the :ref:`davidson` module should be used, and it has a default zero dressing vector. The important providers for that module are: diff --git a/src/dft_keywords/README.rst b/src/dft_keywords/README.rst index 34fa874f..a5dae423 100644 --- a/src/dft_keywords/README.rst +++ b/src/dft_keywords/README.rst @@ -6,7 +6,7 @@ This module contains the main keywords related to a DFT calculation or RS-DFT ca * :option:`dft_keywords exchange_functional` * :option:`dft_keywords correlation_functional` -* :option:`dft_keywords HF_exchange` : only relevent for the :ref:`ks_scf` program +* :option:`dft_keywords HF_exchange` : only relevent for the :c:func:`rs_ks_scf` program The keyword for the **range separation parameter** :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword. diff --git a/src/fci/README.rst b/src/fci/README.rst index 2257d528..8398c521 100644 --- a/src/fci/README.rst +++ b/src/fci/README.rst @@ -27,7 +27,7 @@ By default, the program will stop when more than one million determinants have been selected, or when the |PT2| energy is below :math:`10^{-4}`. The variational and |PT2| energies of the iterations are stored in the -|EZFIO| database, in the :ref:`IterativeSave` module. +|EZFIO| database, in the :ref:`iterations` module. diff --git a/src/kohn_sham_rs/rs_ks_scf.irp.f b/src/kohn_sham_rs/rs_ks_scf.irp.f index 1305a2f8..eb8806c9 100644 --- a/src/kohn_sham_rs/rs_ks_scf.irp.f +++ b/src/kohn_sham_rs/rs_ks_scf.irp.f @@ -1,4 +1,4 @@ -program srs_ks_cf +program rs_ks_scf BEGIN_DOC ! Produce `Range_separated_Kohn_Sham` MO orbital ! output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ diff --git a/src/scf_utils/fock_matrix.irp.f b/src/scf_utils/fock_matrix.irp.f index ef7725e9..178fec85 100644 --- a/src/scf_utils/fock_matrix.irp.f +++ b/src/scf_utils/fock_matrix.irp.f @@ -3,13 +3,14 @@ implicit none BEGIN_DOC ! Fock matrix on the MO basis. - ! For open shells, the ROHF Fock Matrix is + ! For open shells, the ROHF Fock Matrix is :: + ! + ! | F-K | F + K/2 | F | + ! |---------------------------------| + ! | F + K/2 | F | F - K/2 | + ! |---------------------------------| + ! | F | F - K/2 | F + K | ! - ! | F-K | F + K/2 | F | - ! |---------------------------------| - ! | F + K/2 | F | F - K/2 | - ! |---------------------------------| - ! | F | F - K/2 | F + K | ! ! F = 1/2 (Fa + Fb) ! diff --git a/src/selectors_utils/e_corr_selectors.irp.f b/src/selectors_utils/e_corr_selectors.irp.f index 6be8ce6e..8da8fbbc 100644 --- a/src/selectors_utils/e_corr_selectors.irp.f +++ b/src/selectors_utils/e_corr_selectors.irp.f @@ -4,9 +4,8 @@ use bitmasks &BEGIN_PROVIDER [integer, n_double_selectors] implicit none BEGIN_DOC - ! degree of excitation respect to Hartree Fock for the wave function - ! - ! for the all the selectors determinants + ! Degree of excitation respect to Hartree Fock for the wave function + ! for the all the selectors determinants. ! ! double_index_selectors = list of the index of the double excitations ! @@ -34,11 +33,10 @@ END_PROVIDER &BEGIN_PROVIDER[double precision, E_corr_second_order ] implicit none BEGIN_DOC - ! energy of correlation per determinant respect to the Hartree Fock determinant + ! Correlation energy per determinant with respect to the Hartree-Fock determinant + ! for the all the double excitations in the selectors determinants. ! - ! for the all the double excitations in the selectors determinants - ! - ! E_corr_per_selectors(i) = * c(D_i)/c(HF) if |D_i> is a double excitation + ! E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation. ! ! E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation ! From 36234f0822384b0bce01530d210522e7975b759b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 2 Jan 2019 23:22:46 +0100 Subject: [PATCH 6/6] TODO --- TODO | 22 ++++++++-------------- docs/source/users_guide/qp_edit.rst | 4 ++++ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/TODO b/TODO index 574e9b33..d1af2c20 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ -!!!!!!!!!! ENLEVER CETTE SALOPERIE DE TRUC DANS VI !!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# qp_module +# qp_plugins * Mettre le fichier LIB @@ -7,8 +6,7 @@ * Creer une page web pas trop degueu et la mettre ici : http://lcpq.github.io/quantum_package * Pour les README.rst des modules, mettre un deuxième saut à la ligne pour la doc en ligne. -* prendre des bouts du src/README.rst et en mettre partout - +* Changer irpf90 pour creer de la doc en format rst # Exterieur @@ -20,27 +18,21 @@ # Tests: - * >1000 dets - * Davidson - * Lapack * Extrapolation * DFT # User doc: - * qp_create_ezfio_from_xyz - * qp_set_frozen_core - * qp_set_mo_class - * qp_edit - * qp_convert + * Renvoyer a la doc des modules : c'est pour les programmeurs au depart! + * Mettre le mp2 comme exercice + * Interfaces : molden/fcidump * Natural orbitals - * Excited states * Parameters for Hartree-Fock * Parameters for Davidson * Running in parallel - * Parameters for selection (Generators/selectors) + * Parameters for selection (Generators) # Programmers doc: @@ -53,3 +45,5 @@ /home/scemama/quantum_package/docs/source/modules/perturbation.rst:216: WARNING : script pour mettre des :math: dans les commentaires + +# Selection stochastique diff --git a/docs/source/users_guide/qp_edit.rst b/docs/source/users_guide/qp_edit.rst index e6f84f24..3a1a5d84 100644 --- a/docs/source/users_guide/qp_edit.rst +++ b/docs/source/users_guide/qp_edit.rst @@ -12,6 +12,10 @@ document, where each section corresponds to the corresponding |qp| module. The content of the file can be modified to change the input parameters. When the text editor is closed, the updated data is saved into the |EZFIO| directory. +.. note:: + The text editor which will be opened is defined by the :envvar:`EDITOR` + environment variable. + .. warning:: When the wave function is too large (more than 10 000 determinants), the determinants are not displayed.