From ee81a80368c2805062997bc592f5f811a3b60c7c Mon Sep 17 00:00:00 2001 From: Manu Date: Mon, 29 Jun 2015 10:35:29 +0200 Subject: [PATCH] Beginning the merge with qp old --- config/ifort.cfg | 2 +- plugins/All_singles/ASSUMPTIONS.rst | 0 plugins/All_singles/README.rst | 4 + plugins/CAS_SD/README.rst | 10 +- plugins/CISD/README.rst | 161 ++++++++++++++++++++- plugins/CISD_SC2_selected/README.rst | 16 +- plugins/CISD_selected/README.rst | 58 ++++---- plugins/DDCI_selected/README.rst | 10 +- plugins/Full_CI/README.rst | 46 +++--- plugins/Full_CI/full_ci.irp.f | 13 +- plugins/Full_CI/full_ci_no_skip.irp.f | 5 +- plugins/Generators_restart/ASSUMPTIONS.rst | 0 plugins/Generators_restart/README.rst | 37 ----- plugins/MRCC/mrcc_utils.irp.f | 27 +++- plugins/Molden/README.rst | 2 +- plugins/Perturbation/README.rst | 20 +-- scripts/ezfio_interface/ei_handler.py | 2 +- scripts/generate_h_apply.py | 45 +++--- src/Determinants/diagonalize_CI.irp.f | 7 +- src/Determinants/s2.irp.f | 36 +++-- 20 files changed, 333 insertions(+), 168 deletions(-) create mode 100644 plugins/All_singles/ASSUMPTIONS.rst create mode 100644 plugins/All_singles/README.rst create mode 100644 plugins/Generators_restart/ASSUMPTIONS.rst diff --git a/config/ifort.cfg b/config/ifort.cfg index e1a0dadf..647ec77e 100644 --- a/config/ifort.cfg +++ b/config/ifort.cfg @@ -57,6 +57,6 @@ FCFLAGS : -xSSE2 -C -fpe0 ################# # [OPENMP] -FC : -fopenmp +FC : -openmp IRPF90_FLAGS : --openmp diff --git a/plugins/All_singles/ASSUMPTIONS.rst b/plugins/All_singles/ASSUMPTIONS.rst new file mode 100644 index 00000000..e69de29b diff --git a/plugins/All_singles/README.rst b/plugins/All_singles/README.rst new file mode 100644 index 00000000..24abb1ae --- /dev/null +++ b/plugins/All_singles/README.rst @@ -0,0 +1,4 @@ +================== +All_singles Module +================== + diff --git a/plugins/CAS_SD/README.rst b/plugins/CAS_SD/README.rst index f0fbbd17..92a4572b 100644 --- a/plugins/CAS_SD/README.rst +++ b/plugins/CAS_SD/README.rst @@ -34,24 +34,24 @@ Documentation Assume N_int is already provided. -`h_apply_cas_sd_pt2 `_ +`h_apply_cas_sd_pt2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cas_sd_pt2_diexc `_ +`h_apply_cas_sd_pt2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cas_sd_pt2_monoexc `_ +`h_apply_cas_sd_pt2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cas_sd_selected `_ +`h_apply_cas_sd_selected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. @@ -62,7 +62,7 @@ Documentation Assume N_int is already provided. -`h_apply_cas_sd_selected_monoexc `_ +`h_apply_cas_sd_selected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/plugins/CISD/README.rst b/plugins/CISD/README.rst index 412f0aad..881509a3 100644 --- a/plugins/CISD/README.rst +++ b/plugins/CISD/README.rst @@ -26,10 +26,6 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`cisd `_ - Undocumented - - `h_apply_cisd `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. @@ -46,3 +42,160 @@ Documentation particles. Assume N_int is already provided. + +`h_apply_cisd_selection `_ + Undocumented + + +`h_apply_cisd_selection_delta_rho_one_point `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_delta_rho_one_point_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_delta_rho_one_point_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_dipole_moment_z `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_dipole_moment_z_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_h_core `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_h_core_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_h_core_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_moller_plesset `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. + + +`h_apply_cisd_selection_moller_plesset_diexc `_ + Generate all double excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + + +`h_apply_cisd_selection_moller_plesset_monoexc `_ + Generate all single excitations of key_in using the bit masks of holes and + particles. + Assume N_int is already provided. + diff --git a/plugins/CISD_SC2_selected/README.rst b/plugins/CISD_SC2_selected/README.rst index 307063a6..a9edfd18 100644 --- a/plugins/CISD_SC2_selected/README.rst +++ b/plugins/CISD_SC2_selected/README.rst @@ -12,41 +12,41 @@ Documentation Undocumented -`h_apply_pt2 `_ +`h_apply_pt2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_pt2_diexc `_ +`h_apply_pt2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_en_sc2 `_ +`h_apply_pt2_en_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_pt2_en_sc2_diexc `_ +`h_apply_pt2_en_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_en_sc2_monoexc `_ +`h_apply_pt2_en_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_monoexc `_ +`h_apply_pt2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_sc2_selected `_ +`h_apply_sc2_selected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. @@ -57,7 +57,7 @@ Documentation Assume N_int is already provided. -`h_apply_sc2_selected_monoexc `_ +`h_apply_sc2_selected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/plugins/CISD_selected/README.rst b/plugins/CISD_selected/README.rst index 230df80c..3dc6c637 100644 --- a/plugins/CISD_selected/README.rst +++ b/plugins/CISD_selected/README.rst @@ -8,162 +8,158 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`cisd `_ - Undocumented - - `h_apply_cisd_selection `_ Undocumented -`h_apply_cisd_selection_delta_rho_one_point `_ +`h_apply_cisd_selection_delta_rho_one_point `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_delta_rho_one_point_diexc `_ +`h_apply_cisd_selection_delta_rho_one_point_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_delta_rho_one_point_monoexc `_ +`h_apply_cisd_selection_delta_rho_one_point_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z `_ +`h_apply_cisd_selection_dipole_moment_z `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_dipole_moment_z_diexc `_ +`h_apply_cisd_selection_dipole_moment_z_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z_monoexc `_ +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet `_ +`h_apply_cisd_selection_epstein_nesbet `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2 `_ +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2 `_ +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core `_ +`h_apply_cisd_selection_h_core `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_h_core_diexc `_ +`h_apply_cisd_selection_h_core_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core_monoexc `_ +`h_apply_cisd_selection_h_core_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_moller_plesset `_ +`h_apply_cisd_selection_moller_plesset `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_moller_plesset_diexc `_ +`h_apply_cisd_selection_moller_plesset_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_moller_plesset_monoexc `_ +`h_apply_cisd_selection_moller_plesset_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/plugins/DDCI_selected/README.rst b/plugins/DDCI_selected/README.rst index 471ebd21..0e5b3be1 100644 --- a/plugins/DDCI_selected/README.rst +++ b/plugins/DDCI_selected/README.rst @@ -12,24 +12,24 @@ Documentation Undocumented -`h_apply_ddci_pt2 `_ +`h_apply_ddci_pt2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_ddci_pt2_diexc `_ +`h_apply_ddci_pt2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_ddci_pt2_monoexc `_ +`h_apply_ddci_pt2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_ddci_selection `_ +`h_apply_ddci_selection `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. @@ -40,7 +40,7 @@ Documentation Assume N_int is already provided. -`h_apply_ddci_selection_monoexc `_ +`h_apply_ddci_selection_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/plugins/Full_CI/README.rst b/plugins/Full_CI/README.rst index 396fbcd6..64e44609 100644 --- a/plugins/Full_CI/README.rst +++ b/plugins/Full_CI/README.rst @@ -14,7 +14,7 @@ Documentation Undocumented -`h_apply_fci `_ +`h_apply_fci `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. @@ -25,126 +25,126 @@ Documentation Assume N_int is already provided. -`h_apply_fci_mono `_ +`h_apply_fci_mono `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_fci_mono_diexc `_ +`h_apply_fci_mono_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_mono_monoexc `_ +`h_apply_fci_mono_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_monoexc `_ +`h_apply_fci_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_no_skip `_ +`h_apply_fci_no_skip `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_fci_no_skip_diexc `_ +`h_apply_fci_no_skip_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_no_skip_monoexc `_ +`h_apply_fci_no_skip_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_pt2 `_ +`h_apply_fci_pt2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_fci_pt2_diexc `_ +`h_apply_fci_pt2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_fci_pt2_monoexc `_ +`h_apply_fci_pt2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_delta_rho `_ +`h_apply_pt2_mono_delta_rho `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_pt2_mono_delta_rho_diexc `_ +`h_apply_pt2_mono_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_delta_rho_monoexc `_ +`h_apply_pt2_mono_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_di_delta_rho `_ +`h_apply_pt2_mono_di_delta_rho `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_pt2_mono_di_delta_rho_diexc `_ +`h_apply_pt2_mono_di_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_pt2_mono_di_delta_rho_monoexc `_ +`h_apply_pt2_mono_di_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_delta_rho `_ +`h_apply_select_mono_delta_rho `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_select_mono_delta_rho_diexc `_ +`h_apply_select_mono_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_delta_rho_monoexc `_ +`h_apply_select_mono_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_di_delta_rho `_ +`h_apply_select_mono_di_delta_rho `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_select_mono_di_delta_rho_diexc `_ +`h_apply_select_mono_di_delta_rho_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_select_mono_di_delta_rho_monoexc `_ +`h_apply_select_mono_di_delta_rho_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/plugins/Full_CI/full_ci.irp.f b/plugins/Full_CI/full_ci.irp.f index e2a9700e..c7b8452d 100644 --- a/plugins/Full_CI/full_ci.irp.f +++ b/plugins/Full_CI/full_ci.irp.f @@ -28,6 +28,7 @@ program full_ci print *, '-----' endif double precision :: i_H_psi_array(N_states),diag_H_mat_elem,h,i_O1_psi_array(N_states) + double precision :: E_CI_before(N_states) if(read_wf)then call i_H_psi(psi_det(1,1,N_det),psi_det,psi_coef,N_int,N_det,psi_det_size,N_states,i_H_psi_array) h = diag_H_mat_elem(psi_det(1,1,N_det),N_int) @@ -38,6 +39,7 @@ program full_ci integer :: n_det_before print*,'Beginning the selection ...' + E_CI_before = CI_energy do while (N_det < N_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max) n_det_before = N_det call H_apply_FCI(pt2, norm_pert, H_pert_diag, N_st) @@ -57,12 +59,13 @@ program full_ci if(n_det_before == N_det)then selection_criterion = selection_criterion * 0.5d0 endif - print *, 'N_det = ', N_det - print *, 'N_states = ', N_states - print *, 'PT2 = ', pt2 - print *, 'E = ', CI_energy - print *, 'E+PT2 = ', CI_energy+pt2 + print *, 'N_det = ', N_det + print *, 'N_states = ', N_states + print *, 'PT2 = ', pt2 + print *, 'E = ', CI_energy + print *, 'E(before)+PT2 = ', E_CI_before+pt2 print *, '-----' + E_CI_before = CI_energy call ezfio_set_full_ci_energy(CI_energy) if (abort_all) then exit diff --git a/plugins/Full_CI/full_ci_no_skip.irp.f b/plugins/Full_CI/full_ci_no_skip.irp.f index 73958bf9..fd85d2c0 100644 --- a/plugins/Full_CI/full_ci_no_skip.irp.f +++ b/plugins/Full_CI/full_ci_no_skip.irp.f @@ -28,6 +28,7 @@ program full_ci print *, '-----' endif double precision :: i_H_psi_array(N_states),diag_H_mat_elem,h,i_O1_psi_array(N_states) + double precision :: E_CI_before(N_states) if(read_wf)then call i_H_psi(psi_det(1,1,N_det),psi_det,psi_coef,N_int,N_det,psi_det_size,N_states,i_H_psi_array) h = diag_H_mat_elem(psi_det(1,1,N_det),N_int) @@ -38,6 +39,7 @@ program full_ci integer :: n_det_before print*,'Beginning the selection ...' + E_CI_before = CI_energy do while (N_det < N_det_max.and.maxval(abs(pt2(1:N_st))) > pt2_max) n_det_before = N_det call H_apply_FCI_no_skip(pt2, norm_pert, H_pert_diag, N_st) @@ -61,8 +63,9 @@ program full_ci print *, 'N_states = ', N_states print *, 'PT2 = ', pt2 print *, 'E = ', CI_energy - print *, 'E+PT2 = ', CI_energy+pt2 + print *, 'E+PT2 = ', E_CI_before+pt2 print *, '-----' + E_CI_before = CI_energy call ezfio_set_full_ci_energy(CI_energy) if (abort_all) then exit diff --git a/plugins/Generators_restart/ASSUMPTIONS.rst b/plugins/Generators_restart/ASSUMPTIONS.rst new file mode 100644 index 00000000..e69de29b diff --git a/plugins/Generators_restart/README.rst b/plugins/Generators_restart/README.rst index 2a476a1a..e7ab7045 100644 --- a/plugins/Generators_restart/README.rst +++ b/plugins/Generators_restart/README.rst @@ -2,40 +2,3 @@ Generators_restart Module ========================= -Documentation -============= - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -`n_det_generators `_ - Read the wave function - - -`psi_coef_generators `_ - read wf - .br - - -`psi_det_generators `_ - read wf - .br - - -`select_max `_ - Memo to skip useless selectors - - -`size_select_max `_ - Size of the select_max array - -Needed Modules -============== - -.. Do not edit this section. It was auto-generated from the -.. by the `update_README.py` script. - -.. image:: tree_dependency.png - -* `Determinants `_ - diff --git a/plugins/MRCC/mrcc_utils.irp.f b/plugins/MRCC/mrcc_utils.irp.f index 872588cf..716d5ffc 100644 --- a/plugins/MRCC/mrcc_utils.irp.f +++ b/plugins/MRCC/mrcc_utils.irp.f @@ -1,21 +1,32 @@ BEGIN_PROVIDER [ double precision, lambda_mrcc, (N_states,psi_det_size) ] +&BEGIN_PROVIDER [ double precision, lambda_pert, (N_states,psi_det_size) ] implicit none BEGIN_DOC ! cm/ END_DOC integer :: i,k - double precision :: ihpsi(N_states) - do i=1,N_det_non_cas + double precision :: ihpsi(N_states), hij(N_states) + +do i=1,N_det_non_cas call i_h_psi(psi_non_cas(1,1,i), psi_cas, psi_cas_coef, N_int, N_det_cas, & size(psi_cas_coef,1), n_states, ihpsi) - double precision :: hij + call i_h_j(psi_non_cas(1,1,i),psi_non_cas(1,1,i),N_int,hij) do k=1,N_states - if (dabs(ihpsi(k)) > 1.d-5) then - lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k) - lambda_mrcc(k,i) = min( lambda_mrcc (k,i),0.d0 ) + lambda_pert(k,i) = 1d0 / (CI_electronic_energy(k)-hij(k)) + lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k) + if ((lambda_mrcc(k,i)/lambda_pert(k,i))<0.d0 .or. (lambda_mrcc(k,i)/lambda_pert(k,i))>4.d0) then + lambda_mrcc(k,i) = lambda_pert(k,i) else - lambda_mrcc(k,i) = 0.d0 + if ((lambda_mrcc(k,i)/lambda_pert(k,i))<0.1d0 .or. (lambda_mrcc(k,i)/lambda_pert(k,i))>=0d0) then + lambda_mrcc(k,i) = lambda_mrcc(k,i)*((cos((lambda_mrcc(k,i)/lambda_pert(k,i))*3.141592653589793d0/0.1d0+3.141592653589793d0)+1d0)/2.d0) & + + lambda_pert(k,i)*(1.d0-((cos((lambda_mrcc(k,i)/lambda_pert(k,i))*3.141592653589793d0/0.1d0+3.141592653589793d0)+1.d0)/2.d0)) + elseif ((lambda_mrcc(k,i)/lambda_pert(k,i))<=4.0d0 .or. (lambda_mrcc(k,i)/lambda_pert(k,i))>2.0d0) then + lambda_mrcc(k,i) = lambda_mrcc(k,i)*(1.d0-(cos(abs(2.d0-(lambda_mrcc(k,i)/lambda_pert(k,i)))*3.141592653589793d0/2.0d0+3.141592653589793d0)+1.d0)/2d0) & + + lambda_pert(k,i)*((cos(abs(2.d0-(lambda_mrcc(k,i)/lambda_pert(k,i)))*3.141592653589793d0/2.0d0+3.141592653589793d0)+1.d0)/2.d0) + else + lambda_mrcc(k,i) = lambda_mrcc(k,i) + endif endif enddo enddo @@ -23,6 +34,8 @@ END_PROVIDER + + BEGIN_PROVIDER [ character*(32), dressing_type ] implicit none BEGIN_DOC diff --git a/plugins/Molden/README.rst b/plugins/Molden/README.rst index c97e6319..71639cad 100644 --- a/plugins/Molden/README.rst +++ b/plugins/Molden/README.rst @@ -35,6 +35,6 @@ Needed Modules .. image:: tree_dependency.png -* `MOs `_ +* `MO_Basis `_ * `Utils `_ diff --git a/plugins/Perturbation/README.rst b/plugins/Perturbation/README.rst index 9162e94b..aad453e8 100644 --- a/plugins/Perturbation/README.rst +++ b/plugins/Perturbation/README.rst @@ -85,7 +85,7 @@ Documentation Undocumented -`perturb_buffer_by_mono_delta_rho_one_point `_ +`perturb_buffer_by_mono_delta_rho_one_point `_ Applly pertubration ``delta_rho_one_point`` to the buffer of determinants generated in the H_apply routine. @@ -95,12 +95,12 @@ Documentation routine. -`perturb_buffer_by_mono_epstein_nesbet `_ +`perturb_buffer_by_mono_epstein_nesbet `_ Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_2x2 `_ +`perturb_buffer_by_mono_epstein_nesbet_2x2 `_ Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. @@ -120,17 +120,17 @@ Documentation routine. -`perturb_buffer_by_mono_h_core `_ +`perturb_buffer_by_mono_h_core `_ Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_moller_plesset `_ +`perturb_buffer_by_mono_moller_plesset `_ Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_delta_rho_one_point `_ +`perturb_buffer_delta_rho_one_point `_ Applly pertubration ``delta_rho_one_point`` to the buffer of determinants generated in the H_apply routine. @@ -140,12 +140,12 @@ Documentation routine. -`perturb_buffer_epstein_nesbet `_ +`perturb_buffer_epstein_nesbet `_ Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_2x2 `_ +`perturb_buffer_epstein_nesbet_2x2 `_ Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine. @@ -165,12 +165,12 @@ Documentation routine. -`perturb_buffer_h_core `_ +`perturb_buffer_h_core `_ Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_moller_plesset `_ +`perturb_buffer_moller_plesset `_ Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine. diff --git a/scripts/ezfio_interface/ei_handler.py b/scripts/ezfio_interface/ei_handler.py index 855758c6..688898f5 100755 --- a/scripts/ezfio_interface/ei_handler.py +++ b/scripts/ezfio_interface/ei_handler.py @@ -133,7 +133,7 @@ def get_type_dict(): fancy_type['bool'] = Type(None, "bool", "logical") fancy_type['character*(32)'] = Type(None, "string", "character*(32)") - fancy_type['character*(64)'] = Type(None, "string", "character*(68)") + fancy_type['character*(64)'] = Type(None, "string", "character*(64)") fancy_type['character*(256)'] = Type(None, "string", "character*(256)") # ~#~#~#~#~#~#~#~ # diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py index 563a7a56..57637b43 100755 --- a/scripts/generate_h_apply.py +++ b/scripts/generate_h_apply.py @@ -2,6 +2,7 @@ import os file = open(os.environ["QP_ROOT"]+'/src/Determinants/H_apply.template.f','r') + template = file.read() file.close() @@ -13,6 +14,8 @@ initialization declarations decls_main keys_work +do_double_excitations +check_double_excitation copy_buffer finalization generate_psi_guess @@ -54,6 +57,7 @@ class H_apply(object): !$OMP SHARED(key_in,N_int,elec_num_tab,mo_tot_num, & !$OMP hole_1, particl_1, hole_2, particl_2, & !$OMP elec_alpha_num,i_generator) FIRSTPRIVATE(iproc)""" + s["omp_end_parallel"] = "!$OMP END PARALLEL" s["omp_master"] = "!$OMP MASTER" s["omp_end_master"] = "!$OMP END MASTER" @@ -104,7 +108,7 @@ class H_apply(object): endif SOFT_TOUCH psi_det psi_coef N_det """ - s["printout_now"] = """write(output_determinants,*) & + s["printout_now"] = """write(output_Determinants,*) & 100.*float(i_generator)/float(N_det_generators), '% in ', wall_1-wall_0, 's'""" self.data = s @@ -127,21 +131,23 @@ class H_apply(object): """ def set_filter_holes(self): self["filterhole"] = """ - if(iand(ibset(0_bit_kind,j),hole(k,other_spin)).eq.0_bit_kind )cycle + if(iand(ibset(0_bit_kind,j),key(k,other_spin)).eq.0_bit_kind )cycle """ def set_filter_particl(self): self["filterparticle"] = """ - if(iand(ibset(0_bit_kind,j_a),hole(k_a,other_spin)).eq.0_bit_kind )cycle + if(iand(ibset(0_bit_kind,j_a),key(k_a,other_spin)).eq.0_bit_kind )cycle """ def unset_skip(self): self["skip"] = """ """ - - def set_filter_2h_2p(self): self["filter2h2p"] = """ ! ! DIR$ FORCEINLINE - if (is_a_two_holes_two_particles(key)) cycle +! call get_excitation_degree(ref_bitmask,key,degree,N_int) +! if(degree==1)then +! print*,'degree = ',degree +! endif + if(is_a_two_holes_two_particles(key))cycle """ @@ -187,9 +193,14 @@ class H_apply(object): PROVIDE CI_electronic_energy psi_selectors_coef psi_selectors E_corr_per_selectors psi_det_sorted_bit """ self.data["keys_work"] = """ - call perturb_buffer_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & - sum_norm_pert,sum_H_pert_diag,N_st,N_int) - """%(pert,) + if(check_double_excitation)then + call perturb_buffer_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & + sum_norm_pert,sum_H_pert_diag,N_st,N_int) + else + call perturb_buffer_by_mono_%s(i_generator,keys_out,key_idx,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert, & + sum_norm_pert,sum_H_pert_diag,N_st,N_int) + endif + """%(pert,pert) self.data["finalization"] = """ """ self.data["copy_buffer"] = "" @@ -211,9 +222,9 @@ class H_apply(object): delta_pt2(k) = 0.d0 pt2_old(k) = 0.d0 enddo - write(output_determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & + write(output_Determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & 'N_generators', 'Norm', 'Delta PT2', 'PT2', 'Est. PT2', 'secs' - write(output_determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & + write(output_Determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & '============', '========', '=========', '=========', '=========', & '=========' """ @@ -226,7 +237,7 @@ class H_apply(object): """ self.data["printout_now"] = """ do k=1,N_st - write(output_determinants,'(I10, 4(2X, F9.6), 2X, F8.1)') & + write(output_Determinants,'(I10, 4(2X, F9.6), 2X, F8.1)') & i_generator, norm_psi(k), delta_pt2(k), pt2(k), & pt2(k)/(norm_psi(k)*norm_psi(k)), & wall_1-wall_0 @@ -258,7 +269,7 @@ class H_apply(object): ! SOFT_TOUCH psi_det psi_coef N_det selection_criterion_min = min(selection_criterion_min, maxval(select_max))*0.1d0 selection_criterion = selection_criterion_min - call write_double(output_determinants,selection_criterion,'Selection criterion') + call write_double(output_Determinants,selection_criterion,'Selection criterion') """ self.data["keys_work"] = """ e_2_pert_buffer = 0.d0 @@ -275,10 +286,10 @@ class H_apply(object): if (select_max(i_generator) < selection_criterion_min*selection_criterion_factor) then !$ call omp_set_lock(lck) do k=1,N_st - norm_psi(k) = norm_psi(k) + psi_coef_generators(i_generator,k)*psi_coef_generators(i_generator,k) -! delta_pt2(k) = 0.d0 -! pt2_old(k) = 0.d0 -! pt2(k) = select_max(i_generator) + norm_psi(k) = norm_psi(k) + psi_coef_generators(i_generator,k)*psi_coef_generators(i_generator,k) + delta_pt2(k) = 0.d0 + pt2_old(k) = 0.d0 + pt2(k) = select_max(i_generator) enddo !$ call omp_unset_lock(lck) cycle diff --git a/src/Determinants/diagonalize_CI.irp.f b/src/Determinants/diagonalize_CI.irp.f index 7c017956..9af8d413 100644 --- a/src/Determinants/diagonalize_CI.irp.f +++ b/src/Determinants/diagonalize_CI.irp.f @@ -52,6 +52,10 @@ END_PROVIDER call davidson_diag(psi_det,CI_eigenvectors,CI_electronic_energy, & size(CI_eigenvectors,1),N_det,N_states_diag,N_int,output_determinants) + do j=1,N_states_diag + call get_s2_u0(psi_det,CI_eigenvectors(1,j),N_det,size(CI_eigenvectors,1),CI_eigenvectors_s2(j)) + enddo + else if (diag_algorithm == "Lapack") then @@ -69,7 +73,8 @@ END_PROVIDER if (s2_eig) then i_state = 0 do j=1,N_det - call get_s2_u0(psi_det,eigenvectors(1,j),N_det,N_det,s2) + call get_s2_u0(psi_det,eigenvectors(1,j),N_det,size(eigenvectors,1),s2) + print*,'s2 = ',s2 if(dabs(s2-expected_s2).le.0.3d0)then i_state += 1 do i=1,N_det diff --git a/src/Determinants/s2.irp.f b/src/Determinants/s2.irp.f index 760893e0..fd42fe51 100644 --- a/src/Determinants/s2.irp.f +++ b/src/Determinants/s2.irp.f @@ -1,4 +1,4 @@ -subroutine get_s2(key_i,key_j,phase,Nint) +subroutine get_s2(key_i,key_j,s2,Nint) implicit none use bitmasks BEGIN_DOC @@ -7,21 +7,21 @@ subroutine get_s2(key_i,key_j,phase,Nint) integer, intent(in) :: Nint integer(bit_kind), intent(in) :: key_i(Nint,2) integer(bit_kind), intent(in) :: key_j(Nint,2) - double precision, intent(out) :: phase + double precision, intent(out) :: s2 integer :: exc(0:2,2,2) integer :: degree double precision :: phase_spsm integer :: nup, i - phase = 0.d0 + s2 = 0.d0 !$FORCEINLINE call get_excitation_degree(key_i,key_j,degree,Nint) select case (degree) case(2) - call get_double_excitation(key_i,key_j,exc,phase_spsm,Nint) + call get_double_excitation(key_j,key_i,exc,phase_spsm,Nint) if (exc(0,1,1) == 1) then ! Mono alpha + mono-beta if ( (exc(1,1,1) == exc(1,2,2)).and.(exc(1,1,2) == exc(1,2,1)) ) then - phase = -phase_spsm + s2 = -phase_spsm endif endif case(0) @@ -29,7 +29,7 @@ subroutine get_s2(key_i,key_j,phase,Nint) do i=1,Nint nup += popcnt(iand(xor(key_i(i,1),key_i(i,2)),key_i(i,1))) enddo - phase = dble(nup) + s2 = dble(nup) end select end @@ -72,7 +72,7 @@ BEGIN_PROVIDER [ double precision, s2_values, (N_states) ] integer :: i double precision :: s2 do i = 1, N_states - call get_s2_u0(psi_det,psi_coef(1,i),n_det,psi_det_size,s2) + call get_s2_u0(psi_det,psi_coef(1,i),n_det,size(psi_coef,1),s2) s2_values(i) = s2 enddo @@ -89,18 +89,32 @@ subroutine get_s2_u0(psi_keys_tmp,psi_coefs_tmp,n,nmax,s2) integer :: i,j,l double precision :: s2_tmp s2 = 0.d0 +!print*,'IN get_s2_u0' +!print*,'n,nmax = ',n,nmax + double precision :: accu + accu = 0.d0 + do i = 1,n + accu += psi_coefs_tmp(i) * psi_coefs_tmp(i) +! print*,'psi_coef = ',psi_coefs_tmp(i) + enddo +!print*,'accu = ',accu +!print*,'' !$OMP PARALLEL DO DEFAULT(NONE) & - !$OMP PRIVATE(i,j,s2_tmp) SHARED(n,psi_coefs_tmp,psi_keys_tmp,N_int) & - !$OMP REDUCTION(+:s2) SCHEDULE(dynamic) + !$OMP PRIVATE(i,j,s2_tmp) SHARED(n,psi_coefs_tmp,psi_keys_tmp,N_int) REDUCTION(+:s2) SCHEDULE(dynamic) do i=1,n - call get_s2(psi_keys_tmp(1,1,i),psi_keys_tmp(1,1,i),s2_tmp,N_int) - s2 += psi_coefs_tmp(i)*psi_coefs_tmp(i)*s2_tmp do j=i+1,n call get_s2(psi_keys_tmp(1,1,i),psi_keys_tmp(1,1,j),s2_tmp,N_int) s2 += (psi_coefs_tmp(i)+psi_coefs_tmp(i))*psi_coefs_tmp(j)*s2_tmp +! s2 = s2 + 2.d0 * psi_coefs_tmp(i)*psi_coefs_tmp(j)*s2_tmp enddo enddo !$OMP END PARALLEL DO + do i=1,n + call get_s2(psi_keys_tmp(1,1,i),psi_keys_tmp(1,1,i),s2_tmp,N_int) + s2 += psi_coefs_tmp(i)*psi_coefs_tmp(i)*s2_tmp + enddo s2 += S_z2_Sz +!print*,'s2 = ',s2 +!print*,'' end