From 01699dd0c1febac824d58fb79fdc62708a645b2c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 28 Jul 2015 18:57:43 +0200 Subject: [PATCH] i_H_j_phase_out missing in previous commit --- configure | 2 +- ocaml/.gitignore | 8 +- plugins/CAS_SD/.gitignore | 1 - plugins/CAS_SD/README.rst | 2 +- plugins/CIS/README.rst | 4 +- plugins/CISD/README.rst | 4 +- plugins/CISD_selected/README.rst | 127 +++++++++--------- plugins/MRCC_CASSD/.gitignore | 5 +- plugins/MRCC_CASSD/NEEDED_CHILDREN_MODULES | 2 +- plugins/MRCC_CASSD/README.rst | 2 +- plugins/MRCC_Utils/README.rst | 8 ++ plugins/MRCC_Utils_new/README.rst | 146 +++++++++++++++++++++ plugins/Perturbation/README.rst | 28 ++-- plugins/Psiref_CAS/README.rst | 19 +++ plugins/Psiref_Utils/README.rst | 30 ++--- src/Bitmask/README.rst | 22 ++-- src/Determinants/.gitignore | 4 - src/Determinants/README.rst | 46 +++---- src/Determinants/slater_rules.irp.f | 135 +++++++++++++++++++ src/Ezfio_files/README.rst | 74 ++++++----- src/Nuclei/README.rst | 6 +- src/Pseudo/README.rst | 6 +- 22 files changed, 489 insertions(+), 192 deletions(-) diff --git a/configure b/configure index 90f52769..1f55de58 100755 --- a/configure +++ b/configure @@ -497,7 +497,7 @@ def recommendation(): print "Now :" print " source {0}".format(path) print " ninja" - print " cd ocaml; make " + print " make -C ocaml" print "" print "PS : For more info on compiling the code, read the COMPILE_RUN.md file." diff --git a/ocaml/.gitignore b/ocaml/.gitignore index 0319c135..cbd77939 100644 --- a/ocaml/.gitignore +++ b/ocaml/.gitignore @@ -38,12 +38,12 @@ qp_print qp_run qp_set_ddci qp_set_mo_class -Input_integrals_bielec.ml -Input_pseudo.ml -Input_perturbation.ml -Input_properties.ml Input_determinants.ml Input_hartree_fock.ml +Input_integrals_bielec.ml +Input_perturbation.ml +Input_properties.ml +Input_pseudo.ml qp_edit.ml qp_edit qp_edit.native diff --git a/plugins/CAS_SD/.gitignore b/plugins/CAS_SD/.gitignore index 9b54df80..b8827b3b 100644 --- a/plugins/CAS_SD/.gitignore +++ b/plugins/CAS_SD/.gitignore @@ -24,7 +24,6 @@ Selectors_full Utils cas_sd cas_sd_selected -cas_sd_selected_no_skip ezfio_interface.irp.f irpf90.make irpf90_entities diff --git a/plugins/CAS_SD/README.rst b/plugins/CAS_SD/README.rst index 058ec971..63836195 100644 --- a/plugins/CAS_SD/README.rst +++ b/plugins/CAS_SD/README.rst @@ -13,7 +13,7 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`full_ci `_ +`full_ci `_ Undocumented diff --git a/plugins/CIS/README.rst b/plugins/CIS/README.rst index e35aa940..008675e0 100644 --- a/plugins/CIS/README.rst +++ b/plugins/CIS/README.rst @@ -17,7 +17,7 @@ Documentation Undocumented -`h_apply_cis `_ +`h_apply_cis `_ 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. @@ -28,7 +28,7 @@ Documentation Assume N_int is already provided. -`h_apply_cis_monoexc `_ +`h_apply_cis_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 a8300e6d..2ba297fb 100644 --- a/plugins/CISD/README.rst +++ b/plugins/CISD/README.rst @@ -26,7 +26,7 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`h_apply_cisd `_ +`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. @@ -37,7 +37,7 @@ Documentation Assume N_int is already provided. -`h_apply_cisd_monoexc `_ +`h_apply_cisd_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 57a8a196..e7a3c5cb 100644 --- a/plugins/CISD_selected/README.rst +++ b/plugins/CISD_selected/README.rst @@ -16,125 +16,126 @@ Documentation 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 `_ - 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 `_ +`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_epstein_nesbet_2x2_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_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 `_ +`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_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 `_ +`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_sc2_no_projected_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_sc2_no_projected_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_sc2_projected `_ +`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_projected_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_projected_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_h_core `_ +`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. @@ -145,24 +146,24 @@ Documentation 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/MRCC_CASSD/.gitignore b/plugins/MRCC_CASSD/.gitignore index 11ad4321..4f0460a1 100644 --- a/plugins/MRCC_CASSD/.gitignore +++ b/plugins/MRCC_CASSD/.gitignore @@ -14,7 +14,7 @@ Integrals_Bielec Integrals_Monoelec MOGuess MO_Basis -MRCC_Utils +MRCC_Utils_new Makefile Makefile.depend Nuclei @@ -28,5 +28,4 @@ Utils ezfio_interface.irp.f irpf90.make irpf90_entities -mrcc_cassd -tags +tags \ No newline at end of file diff --git a/plugins/MRCC_CASSD/NEEDED_CHILDREN_MODULES b/plugins/MRCC_CASSD/NEEDED_CHILDREN_MODULES index a8404d62..5ed6004b 100644 --- a/plugins/MRCC_CASSD/NEEDED_CHILDREN_MODULES +++ b/plugins/MRCC_CASSD/NEEDED_CHILDREN_MODULES @@ -1 +1 @@ -Perturbation Selectors_full Generators_full Psiref_CAS MRCC_Utils +Perturbation Selectors_full Generators_full Psiref_CAS MRCC_Utils_new diff --git a/plugins/MRCC_CASSD/README.rst b/plugins/MRCC_CASSD/README.rst index 5ef5db62..3812e0b0 100644 --- a/plugins/MRCC_CASSD/README.rst +++ b/plugins/MRCC_CASSD/README.rst @@ -16,7 +16,7 @@ Needed Modules * `Selectors_full `_ * `Generators_full `_ * `Psiref_CAS `_ -* `MRCC_Utils `_ +* `MRCC_Utils_new `_ Documentation ============= diff --git a/plugins/MRCC_Utils/README.rst b/plugins/MRCC_Utils/README.rst index 7c26f9f7..5c1b0844 100644 --- a/plugins/MRCC_Utils/README.rst +++ b/plugins/MRCC_Utils/README.rst @@ -139,6 +139,10 @@ Documentation Undocumented +`mrcc_iterations `_ + Undocumented + + `psi_ref_lock `_ Locks on ref determinants to fill delta_ij @@ -146,3 +150,7 @@ Documentation `run_mrcc `_ Undocumented + +`set_generators_bitmasks_as_holes_and_particles `_ + Undocumented + diff --git a/plugins/MRCC_Utils_new/README.rst b/plugins/MRCC_Utils_new/README.rst index fb70f7ca..c3c8a85f 100644 --- a/plugins/MRCC_Utils_new/README.rst +++ b/plugins/MRCC_Utils_new/README.rst @@ -20,3 +20,149 @@ Needed Modules Documentation ============= +.. Do not edit this section. It was auto-generated from the +.. by the `update_README.py` script. + +`apply_excitation_operator `_ + Undocumented + + +`ci_eigenvectors_dressed `_ + Eigenvectors/values of the CI matrix + + +`ci_eigenvectors_s2_dressed `_ + Eigenvectors/values of the CI matrix + + +`ci_electronic_energy_dressed `_ + Eigenvectors/values of the CI matrix + + +`ci_energy_dressed `_ + N_states lowest eigenvalues of the dressed CI matrix + + +`davidson_diag_hjj_mrcc `_ + Davidson diagonalization with specific diagonal elements of the H matrix + .br + H_jj : specific diagonal H matrix elements to diagonalize de Davidson + .br + dets_in : bitmasks corresponding to determinants + .br + u_in : guess coefficients on the various states. Overwritten + on exit + .br + dim_in : leftmost dimension of u_in + .br + sze : Number of determinants + .br + N_st : Number of eigenstates + .br + iunit : Unit for the I/O + .br + Initial guess vectors are not necessarily orthonormal + + +`davidson_diag_mrcc `_ + Davidson diagonalization. + .br + dets_in : bitmasks corresponding to determinants + .br + u_in : guess coefficients on the various states. Overwritten + on exit + .br + dim_in : leftmost dimension of u_in + .br + sze : Number of determinants + .br + N_st : Number of eigenstates + .br + iunit : Unit number for the I/O + .br + Initial guess vectors are not necessarily orthonormal + + +`delta_ii `_ + Dressing matrix in N_det basis + + +`delta_ij `_ + Dressing matrix in N_det basis + + +`diagonalize_ci_dressed `_ + Replace the coefficients of the CI states by the coefficients of the + eigenstates of the CI matrix + + +`get_excitation_operators_for_one_ref `_ + This subroutine provides all the amplitudes and excitation operators + that one needs to go from the reference to the non reference wave function + you enter with det_ref that is a reference determinant + .br + N_connect_ref is the number of determinants belonging to psi_non_ref + that are connected to det_ref. + .br + amplitudes_phase_less(i) = amplitude phase less t_{I->i} = * lambda_mrcc(i) * phase(I->i) + .br + excitation_operators(:,i) represents the holes and particles that + link the ith connected determinant to det_ref + if :: + excitation_operators(5,i) = 2 :: double excitation alpha + excitation_operators(5,i) = -2 :: double excitation beta + !! excitation_operators(1,i) :: hole 1 + !! excitation_operators(2,i) :: particle 1 + !! excitation_operators(3,i) :: hole 2 + !! excitation_operators(4,i) :: particle 2 + else if :: + excitation_operators(5,i) = 1 :: single excitation alpha + !! excitation_operators(1,i) :: hole 1 + !! excitation_operators(2,i) :: particle 1 + else if :: + excitation_operators(5,i) = -1 :: single excitation beta + !! excitation_operators(3,i) :: hole 1 + !! excitation_operators(4,i) :: particle 1 + else if :: + !! excitation_operators(5,i) = 0 :: double excitation alpha/beta + !! excitation_operators(1,i) :: hole 1 alpha + !! excitation_operators(2,i) :: particle 1 alpha + !! excitation_operators(3,i) :: hole 2 beta + !! excitation_operators(4,i) :: particle 2 beta + + +`h_matrix_dressed `_ + Dressed H with Delta_ij + + +`h_u_0_mrcc `_ + Computes v_0 = H|u_0> + .br + n : number of determinants + .br + H_jj : array of + + +`lambda_mrcc `_ + cm/ or perturbative 1/Delta_E(m) + + +`lambda_pert `_ + cm/ or perturbative 1/Delta_E(m) + + +`mrcc_dress `_ + Undocumented + + +`mrcc_iterations `_ + Undocumented + + +`run_mrcc `_ + Undocumented + + +`set_generators_bitmasks_as_holes_and_particles `_ + Undocumented + diff --git a/plugins/Perturbation/README.rst b/plugins/Perturbation/README.rst index aad453e8..7be62489 100644 --- a/plugins/Perturbation/README.rst +++ b/plugins/Perturbation/README.rst @@ -90,32 +90,32 @@ Documentation routine. -`perturb_buffer_by_mono_dipole_moment_z `_ +`perturb_buffer_by_mono_dipole_moment_z `_ Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply 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. -`perturb_buffer_by_mono_epstein_nesbet_sc2 `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2 `_ Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected `_ Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_by_mono_epstein_nesbet_sc2_projected `_ +`perturb_buffer_by_mono_epstein_nesbet_sc2_projected `_ Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. @@ -125,7 +125,7 @@ Documentation 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. @@ -135,32 +135,32 @@ Documentation routine. -`perturb_buffer_dipole_moment_z `_ +`perturb_buffer_dipole_moment_z `_ Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply 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. -`perturb_buffer_epstein_nesbet_sc2 `_ +`perturb_buffer_epstein_nesbet_sc2 `_ Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_sc2_no_projected `_ +`perturb_buffer_epstein_nesbet_sc2_no_projected `_ Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply routine. -`perturb_buffer_epstein_nesbet_sc2_projected `_ +`perturb_buffer_epstein_nesbet_sc2_projected `_ Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply routine. @@ -170,7 +170,7 @@ Documentation 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/plugins/Psiref_CAS/README.rst b/plugins/Psiref_CAS/README.rst index 3d4726e1..83d74753 100644 --- a/plugins/Psiref_CAS/README.rst +++ b/plugins/Psiref_CAS/README.rst @@ -12,6 +12,25 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. +`idx_ref `_ + 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. + + +`n_det_ref `_ + 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. + + +`psi_ref `_ + 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. + + +`psi_ref_coef `_ + 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. + Needed Modules ============== diff --git a/plugins/Psiref_Utils/README.rst b/plugins/Psiref_Utils/README.rst index 167725a3..26c2e87d 100644 --- a/plugins/Psiref_Utils/README.rst +++ b/plugins/Psiref_Utils/README.rst @@ -17,26 +17,30 @@ Documentation Undocumented +`holes_operators `_ + 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 + + `idx_non_ref `_ 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_ref `_ - Reference wave function, defined as determinants with coefficients > 0.05 - idx_ref gives the indice of the ref determinant in psi_det. - - `n_det_non_ref `_ 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. -`n_det_ref `_ - Reference wave function, defined as determinants with coefficients > 0.05 - idx_ref gives the indice of the ref determinant in psi_det. +`particles_operators `_ + 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 `psi_coef_ref_diagonalized `_ @@ -65,16 +69,6 @@ Documentation function. -`psi_ref `_ - Reference wave function, defined as determinants with coefficients > 0.05 - idx_ref gives the indice of the ref determinant in psi_det. - - -`psi_ref_coef `_ - Reference wave function, defined as determinants with coefficients > 0.05 - idx_ref gives the indice of the ref determinant in psi_det. - - `psi_ref_coef_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. diff --git a/src/Bitmask/README.rst b/src/Bitmask/README.rst index 258419e8..53ece385 100644 --- a/src/Bitmask/README.rst +++ b/src/Bitmask/README.rst @@ -70,7 +70,7 @@ Documentation Bitmask to include all possible single excitations from Hartree-Fock -`core_bitmask `_ +`core_bitmask `_ Reunion of the inactive, active and virtual bitmasks @@ -132,15 +132,15 @@ Documentation Hartree Fock bit mask -`i_bitmask_gen `_ +`i_bitmask_gen `_ Current bitmask for the generators -`inact_bitmask `_ +`inact_bitmask `_ Bitmasks for the inactive orbitals that are excited in post CAS method -`inact_virt_bitmask `_ +`inact_virt_bitmask `_ Reunion of the inactive and virtual bitmasks @@ -148,7 +148,7 @@ Documentation Undocumented -`list_inact `_ +`list_inact `_ Undocumented @@ -157,7 +157,7 @@ Documentation occupations "list(N_int*bit_kind_size,2) -`list_virt `_ +`list_virt `_ Undocumented @@ -169,7 +169,7 @@ Documentation Number of bitmasks for generators -`n_inact_orb `_ +`n_inact_orb `_ Bitmasks for the inactive orbitals that are excited in post CAS method @@ -177,7 +177,7 @@ Documentation Number of 64-bit integers needed to represent determinants as binary strings -`n_virt_orb `_ +`n_virt_orb `_ Bitmasks for the inactive orbitals that are excited in post CAS method @@ -209,14 +209,14 @@ Documentation Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask -`reunion_of_bitmask `_ +`reunion_of_bitmask `_ Reunion of the inactive, active and virtual bitmasks -`unpaired_alpha_electrons `_ +`unpaired_alpha_electrons `_ Bitmask reprenting the unpaired alpha electrons in the HF_bitmask -`virt_bitmask `_ +`virt_bitmask `_ Bitmasks for the inactive orbitals that are excited in post CAS method diff --git a/src/Determinants/.gitignore b/src/Determinants/.gitignore index 6190b425..516d3a70 100644 --- a/src/Determinants/.gitignore +++ b/src/Determinants/.gitignore @@ -16,17 +16,13 @@ Nuclei Pseudo Utils det_svd -diag_and_save ezfio_interface.irp.f guess_doublet guess_singlet guess_triplet irpf90.make irpf90_entities -print_cas_energy -print_s2 program_initial_determinants save_natorb -save_wf_only_monos tags truncate_wf \ No newline at end of file diff --git a/src/Determinants/README.rst b/src/Determinants/README.rst index 9529a268..1e5751ef 100644 --- a/src/Determinants/README.rst +++ b/src/Determinants/README.rst @@ -43,7 +43,7 @@ Documentation .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. -`a_operator `_ +`a_operator `_ Needed for diag_H_mat_elem @@ -55,7 +55,7 @@ Documentation Max and min values of the coefficients -`ac_operator `_ +`ac_operator `_ Needed for diag_H_mat_elem @@ -217,11 +217,11 @@ Documentation det_coef -`det_connections `_ +`det_connections `_ Build connection proxy between determinants -`det_num `_ +`det_num `_ det_num @@ -245,7 +245,7 @@ Documentation Diagonalization algorithm (Davidson or Lapack) -`diag_h_mat_elem `_ +`diag_h_mat_elem `_ Computes @@ -363,7 +363,7 @@ Documentation Returns the excitation degree between two determinants -`get_excitation_degree_vector `_ +`get_excitation_degree_vector `_ Applies get_excitation_degree to an array of determinants @@ -383,7 +383,7 @@ Documentation Returns the excitation operator between two singly excited determinants and the phase -`get_occ_from_key `_ +`get_occ_from_key `_ Returns a list of occupation numbers from a bitstring @@ -417,7 +417,7 @@ Documentation Undocumented -`h_u_0 `_ +`h_u_0 `_ Computes v_0 = H|u_0> .br n : number of determinants @@ -429,15 +429,19 @@ Documentation Returns where i and j are determinants -`i_h_j_verbose `_ +`i_h_j_phase_out `_ Returns where i and j are determinants -`i_h_psi `_ +`i_h_j_verbose `_ + Returns where i and j are determinants + + +`i_h_psi `_ for the various Nstates -`i_h_psi_sc2 `_ +`i_h_psi_sc2 `_ for the various Nstate .br returns in addition @@ -451,7 +455,7 @@ Documentation to repeat the excitations -`i_h_psi_sc2_verbose `_ +`i_h_psi_sc2_verbose `_ for the various Nstate .br returns in addition @@ -465,7 +469,7 @@ Documentation to repeat the excitations -`i_h_psi_sec_ord `_ +`i_h_psi_sec_ord `_ for the various Nstates @@ -512,7 +516,7 @@ Documentation Energy of the reference bitmask used in Slater rules -`n_con_int `_ +`n_con_int `_ Number of integers to represent the connections between determinants @@ -621,10 +625,6 @@ Documentation Undocumented -`print_psi_cas `_ - Undocumented - - `psi_average_norm_contrib `_ Contribution of determinants to the state-averaged density @@ -835,11 +835,7 @@ Documentation Undocumented -`routine_count_mono_save_mono `_ - Undocumented - - -`s2_eig `_ +`s2_eig `_ Force the wave function to be an eigenfunction of S^2 @@ -879,10 +875,6 @@ Documentation Save the wave function into the EZFIO file -`save_wf `_ - Undocumented - - `set_bite_to_integer `_ Undocumented diff --git a/src/Determinants/slater_rules.irp.f b/src/Determinants/slater_rules.irp.f index faf2e704..b836d7c9 100644 --- a/src/Determinants/slater_rules.irp.f +++ b/src/Determinants/slater_rules.irp.f @@ -488,6 +488,141 @@ end +subroutine i_H_j_phase_out(key_i,key_j,Nint,hij,phase,exc,degree) + use bitmasks + implicit none + BEGIN_DOC + ! Returns where i and j are determinants + END_DOC + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2) + double precision, intent(out) :: hij, phase + + integer,intent(out) :: exc(0:2,2,2) + integer,intent(out) :: degree + double precision :: get_mo_bielec_integral + integer :: m,n,p,q + integer :: i,j,k + integer :: occ(Nint*bit_kind_size,2) + double precision :: diag_H_mat_elem + integer :: n_occ_alpha, n_occ_beta + logical :: has_mipi(Nint*bit_kind_size) + double precision :: mipi(Nint*bit_kind_size), miip(Nint*bit_kind_size) + PROVIDE mo_bielec_integrals_in_map mo_integrals_map + + ASSERT (Nint > 0) + ASSERT (Nint == N_int) + ASSERT (sum(popcnt(key_i(:,1))) == elec_alpha_num) + ASSERT (sum(popcnt(key_i(:,2))) == elec_beta_num) + ASSERT (sum(popcnt(key_j(:,1))) == elec_alpha_num) + ASSERT (sum(popcnt(key_j(:,2))) == elec_beta_num) + + hij = 0.d0 + !DEC$ 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,Nint) + if (exc(0,1,1) == 1) then + ! Mono alpha, mono beta + hij = phase*get_mo_bielec_integral( & + exc(1,1,1), & + exc(1,1,2), & + exc(1,2,1), & + exc(1,2,2) ,mo_integrals_map) + else if (exc(0,1,1) == 2) then + ! Double alpha + hij = phase*(get_mo_bielec_integral( & + exc(1,1,1), & + exc(2,1,1), & + exc(1,2,1), & + exc(2,2,1) ,mo_integrals_map) - & + get_mo_bielec_integral( & + exc(1,1,1), & + exc(2,1,1), & + exc(2,2,1), & + exc(1,2,1) ,mo_integrals_map) ) + else if (exc(0,1,2) == 2) then + ! Double beta + hij = phase*(get_mo_bielec_integral( & + exc(1,1,2), & + exc(2,1,2), & + exc(1,2,2), & + exc(2,2,2) ,mo_integrals_map) - & + get_mo_bielec_integral( & + exc(1,1,2), & + exc(2,1,2), & + exc(2,2,2), & + exc(1,2,2) ,mo_integrals_map) ) + endif + case (1) + call get_mono_excitation(key_i,key_j,exc,phase,Nint) + call bitstring_to_list(key_i(1,1), occ(1,1), n_occ_alpha, Nint) + call bitstring_to_list(key_i(1,2), occ(1,2), n_occ_beta, Nint) + has_mipi = .False. + if (exc(0,1,1) == 1) then + ! Mono alpha + m = exc(1,1,1) + p = exc(1,2,1) + do k = 1, elec_alpha_num + i = occ(k,1) + if (.not.has_mipi(i)) then + mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map) + miip(i) = get_mo_bielec_integral(m,i,i,p,mo_integrals_map) + has_mipi(i) = .True. + endif + enddo + do k = 1, elec_beta_num + i = occ(k,2) + if (.not.has_mipi(i)) then + mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map) + has_mipi(i) = .True. + endif + enddo + + do k = 1, elec_alpha_num + hij = hij + mipi(occ(k,1)) - miip(occ(k,1)) + enddo + do k = 1, elec_beta_num + hij = hij + mipi(occ(k,2)) + enddo + + else + ! Mono beta + m = exc(1,1,2) + p = exc(1,2,2) + do k = 1, elec_beta_num + i = occ(k,2) + if (.not.has_mipi(i)) then + mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map) + miip(i) = get_mo_bielec_integral(m,i,i,p,mo_integrals_map) + has_mipi(i) = .True. + endif + enddo + do k = 1, elec_alpha_num + i = occ(k,1) + if (.not.has_mipi(i)) then + mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map) + has_mipi(i) = .True. + endif + enddo + + do k = 1, elec_alpha_num + hij = hij + mipi(occ(k,1)) + enddo + do k = 1, elec_beta_num + hij = hij + mipi(occ(k,2)) - miip(occ(k,2)) + enddo + + endif + hij = phase*(hij + mo_mono_elec_integral(m,p)) + + case (0) + hij = diag_H_mat_elem(key_i,Nint) + end select +end + + subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble) use bitmasks diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index f880b144..0d825518 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -42,14 +42,14 @@ Documentation Output file for CAS_SD -`output_cisd `_ +`output_cis `_ + Output file for CIS + + +`output_cisd `_ Output file for CISD -`output_cisd_sc2_selected `_ - Output file for CISD_SC2_selected - - `output_cisd_selected `_ Output file for CISD_selected @@ -58,87 +58,95 @@ Documentation Initial CPU and wall times when printing in the output files -`output_ddci_selected `_ - Output file for DDCI_selected - - -`output_determinants `_ +`output_determinants `_ Output file for Determinants -`output_electrons `_ +`output_electrons `_ Output file for Electrons -`output_ezfio_files `_ +`output_ezfio_files `_ Output file for Ezfio_files -`output_full_ci `_ +`output_full_ci `_ Output file for Full_CI -`output_generators_cas `_ +`output_generators_cas `_ Output file for Generators_CAS -`output_generators_full `_ +`output_generators_full `_ Output file for Generators_full -`output_hartree_fock `_ +`output_hartree_fock `_ Output file for Hartree_Fock -`output_integrals_bielec `_ +`output_integrals_bielec `_ Output file for Integrals_Bielec -`output_integrals_monoelec `_ +`output_integrals_monoelec `_ Output file for Integrals_Monoelec -`output_loc_cele `_ - Output file for loc_cele - - -`output_mo_basis `_ +`output_mo_basis `_ Output file for MO_Basis -`output_moguess `_ +`output_moguess `_ Output file for MOGuess -`output_molden `_ - Output file for Molden +`output_mrcc_cassd `_ + Output file for MRCC_CASSD -`output_nuclei `_ +`output_mrcc_utils `_ + Output file for MRCC_Utils + + +`output_nuclei `_ Output file for Nuclei -`output_perturbation `_ +`output_perturbation `_ Output file for Perturbation -`output_properties `_ +`output_properties `_ Output file for Properties -`output_pseudo `_ +`output_pseudo `_ Output file for Pseudo -`output_selectors_full `_ +`output_psiref_cas `_ + Output file for Psiref_CAS + + +`output_psiref_utils `_ + Output file for Psiref_Utils + + +`output_qmcchem `_ + Output file for QmcChem + + +`output_selectors_full `_ Output file for Selectors_full -`output_singlerefmethod `_ +`output_singlerefmethod `_ Output file for SingleRefMethod -`output_utils `_ +`output_utils `_ Output file for Utils diff --git a/src/Nuclei/README.rst b/src/Nuclei/README.rst index 63e6c6ae..9f0b15d9 100644 --- a/src/Nuclei/README.rst +++ b/src/Nuclei/README.rst @@ -27,7 +27,7 @@ Documentation Array of the name of element, sorted by nuclear charge (integer) -`nucl_charge `_ +`nucl_charge `_ Nuclear charges @@ -69,11 +69,11 @@ Documentation nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_label `_ +`nucl_label `_ Nuclear labels -`nucl_num `_ +`nucl_num `_ Number of nuclei diff --git a/src/Pseudo/README.rst b/src/Pseudo/README.rst index 5aa338ea..84a555da 100644 --- a/src/Pseudo/README.rst +++ b/src/Pseudo/README.rst @@ -26,7 +26,7 @@ Documentation test -`pseudo_dz_kl `_ +`pseudo_dz_kl `_ test @@ -42,7 +42,7 @@ Documentation test -`pseudo_kmax `_ +`pseudo_kmax `_ test @@ -50,7 +50,7 @@ Documentation test -`pseudo_n_k `_ +`pseudo_n_k `_ test