From afbdda0dab0adb306732a92c46394882fd31cba7 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 25 Nov 2015 03:05:49 +0100 Subject: [PATCH 1/2] README --- plugins/Hartree_Fock/README.rst | 26 ++-- plugins/MRCC_Utils/README.rst | 16 +-- plugins/Perturbation/README.rst | 14 +- src/Determinants/README.rst | 216 +++++++++++++++++------------- src/Ezfio_files/README.rst | 52 ------- src/Integrals_Bielec/.gitignore | 32 ++--- src/Integrals_Bielec/README.rst | 58 ++++---- src/Integrals_Monoelec/README.rst | 4 +- 8 files changed, 204 insertions(+), 214 deletions(-) diff --git a/plugins/Hartree_Fock/README.rst b/plugins/Hartree_Fock/README.rst index ffe80c75..26976226 100644 --- a/plugins/Hartree_Fock/README.rst +++ b/plugins/Hartree_Fock/README.rst @@ -32,11 +32,11 @@ Documentation .. by the `update_README.py` script. -`ao_bi_elec_integral_alpha `_ +`ao_bi_elec_integral_alpha `_ Alpha Fock matrix in AO basis set -`ao_bi_elec_integral_beta `_ +`ao_bi_elec_integral_beta `_ Alpha Fock matrix in AO basis set @@ -62,23 +62,23 @@ Documentation Diagonal Fock matrix in the MO basis -`fock_matrix_alpha_ao `_ +`fock_matrix_alpha_ao `_ Alpha Fock matrix in AO basis set -`fock_matrix_alpha_mo `_ +`fock_matrix_alpha_mo `_ Fock matrix on the MO basis -`fock_matrix_ao `_ +`fock_matrix_ao `_ Fock matrix in AO basis set -`fock_matrix_beta_ao `_ +`fock_matrix_beta_ao `_ Alpha Fock matrix in AO basis set -`fock_matrix_beta_mo `_ +`fock_matrix_beta_mo `_ Fock matrix on the MO basis @@ -114,7 +114,7 @@ Documentation .br -`fock_mo_to_ao `_ +`fock_mo_to_ao `_ Undocumented @@ -134,7 +134,7 @@ Documentation S^-1 Beta density matrix in the AO basis x S^-1 -`hf_energy `_ +`hf_energy `_ Hartree-Fock energy @@ -142,7 +142,11 @@ Documentation Build the MOs using the extended Huckel model -`mo_guess_type `_ +`level_shift `_ + Energy shift on the virtual MOs to improve SCF convergence + + +`mo_guess_type `_ Initial MO guess. Can be [ Huckel | HCore ] @@ -161,6 +165,6 @@ Documentation optional: mo_basis.mo_coef -`thresh_scf `_ +`thresh_scf `_ Threshold on the convergence of the Hartree Fock energy diff --git a/plugins/MRCC_Utils/README.rst b/plugins/MRCC_Utils/README.rst index 7db472a6..8b97bfbe 100644 --- a/plugins/MRCC_Utils/README.rst +++ b/plugins/MRCC_Utils/README.rst @@ -90,10 +90,6 @@ Documentation N_states lowest eigenvalues of the dressed CI matrix -`create_minilist `_ - Undocumented - - `davidson_diag_hjj_mrcc `_ Davidson diagonalization with specific diagonal elements of the H matrix .br @@ -206,7 +202,7 @@ Documentation Find A.C = B -`find_triples_and_quadruples `_ +`find_triples_and_quadruples `_ Undocumented @@ -232,19 +228,19 @@ Documentation Undocumented -`gen_det_idx `_ +`gen_det_idx `_ Undocumented -`gen_det_shortcut `_ +`gen_det_shortcut `_ Undocumented -`gen_det_sorted `_ +`gen_det_sorted `_ Undocumented -`gen_det_version `_ +`gen_det_version `_ Undocumented @@ -312,7 +308,7 @@ h_apply_mrcc_monoexc Dressed H with Delta_ij -`h_u_0_mrcc `_ +`h_u_0_mrcc `_ Computes v_0 = H|u_0> .br n : number of determinants diff --git a/plugins/Perturbation/README.rst b/plugins/Perturbation/README.rst index 55f2077e..4bf62a2a 100644 --- a/plugins/Perturbation/README.rst +++ b/plugins/Perturbation/README.rst @@ -239,7 +239,7 @@ perturb_buffer_moller_plesset .br -`pt2_epstein_nesbet `_ +`pt2_epstein_nesbet `_ compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution .br for the various N_st states. @@ -250,7 +250,7 @@ perturb_buffer_moller_plesset .br -`pt2_epstein_nesbet_2x2 `_ +`pt2_epstein_nesbet_2x2 `_ compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution .br for the various N_st states. @@ -261,7 +261,7 @@ perturb_buffer_moller_plesset .br -`pt2_epstein_nesbet_sc2 `_ +`pt2_epstein_nesbet_sc2 `_ compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution .br for the various N_st states, but with the CISD_SC2 energies and coefficients @@ -272,7 +272,7 @@ perturb_buffer_moller_plesset .br -`pt2_epstein_nesbet_sc2_no_projected `_ +`pt2_epstein_nesbet_sc2_no_projected `_ compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution .br for the various N_st states, @@ -296,7 +296,7 @@ perturb_buffer_moller_plesset H_pert_diag = c_pert -`pt2_epstein_nesbet_sc2_projected `_ +`pt2_epstein_nesbet_sc2_projected `_ compute the Epstein-Nesbet perturbative first order coefficient and second order energetic contribution .br for the various N_st states, @@ -336,7 +336,7 @@ perturb_buffer_moller_plesset than pt2_max in absolute value -`pt2_moller_plesset `_ +`pt2_moller_plesset `_ compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution .br for the various n_st states. @@ -352,7 +352,7 @@ perturb_buffer_moller_plesset provided. -`repeat_all_e_corr `_ +`repeat_all_e_corr `_ Undocumented diff --git a/src/Determinants/README.rst b/src/Determinants/README.rst index 735a8d63..19eec306 100644 --- a/src/Determinants/README.rst +++ b/src/Determinants/README.rst @@ -15,19 +15,19 @@ Documentation .. by the `update_README.py` script. -`a_operator `_ +`a_operator `_ Needed for diag_H_mat_elem -`abs_psi_coef_max `_ +`abs_psi_coef_max `_ Max and min values of the coefficients -`abs_psi_coef_min `_ +`abs_psi_coef_min `_ Max and min values of the coefficients -`ac_operator `_ +`ac_operator `_ Needed for diag_H_mat_elem @@ -39,6 +39,21 @@ Documentation Energy of the reference bitmask used in Slater rules +`bitstring_to_list_ab `_ + Gives the inidices(+1) of the bits set to 1 in the bit string + For alpha/beta determinants + + +`bitstring_to_list_ab_old `_ + Gives the inidices(+1) of the bits set to 1 in the bit string + For alpha/beta determinants + + +`build_fock_tmp `_ + Build the diagonal of the Fock matrix corresponding to a generator + determinant. F_00 is = E0. + + `ci_eigenvectors `_ Eigenvectors/values of the CI matrix @@ -100,29 +115,37 @@ Documentation Initial guess vectors are not necessarily orthonormal -`connected_to_ref `_ +`connected_to_ref `_ Undocumented -`connected_to_ref_by_mono `_ +`connected_to_ref_by_mono `_ Undocumented -`copy_h_apply_buffer_to_wf `_ +`copy_h_apply_buffer_to_wf `_ Copies the H_apply buffer to psi_coef. After calling this subroutine, N_det, psi_det and psi_coef need to be touched +`create_minilist `_ + Undocumented + + +`create_minilist_find_previous `_ + Undocumented + + `create_wf_of_psi_bilinear_matrix `_ Generate a wave function containing all possible products of alpha and beta determinants -`davidson_converged `_ +`davidson_converged `_ True if the Davidson algorithm is converged -`davidson_criterion `_ +`davidson_criterion `_ Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] @@ -145,7 +168,7 @@ Documentation Initial guess vectors are not necessarily orthonormal -`davidson_diag_hjj `_ +`davidson_diag_hjj `_ Davidson diagonalization with specific diagonal elements of the H matrix .br H_jj : specific diagonal H matrix elements to diagonalize de Davidson @@ -174,10 +197,6 @@ Documentation Max number of Davidson sizes -`davidson_threshold `_ - Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] - - `decode_exc `_ Decodes the exc arrays returned by get_excitation. h1,h2 : Holes @@ -206,7 +225,7 @@ Documentation Undocumented -`det_occ `_ +`det_occ `_ det_occ @@ -222,10 +241,15 @@ Documentation Diagonalization algorithm (Davidson or Lapack) -`diag_h_mat_elem `_ +`diag_h_mat_elem `_ Computes +`diag_h_mat_elem_fock `_ + Computes when i is at most a double excitation from + a reference. + + `diagonalize_ci `_ Replace the coefficients of the CI states by the coefficients of the eigenstates of the CI matrix @@ -262,11 +286,11 @@ Documentation Expected value of S2 : S*(S+1) -`fill_h_apply_buffer_no_selection `_ +`fill_h_apply_buffer_no_selection `_ Fill the H_apply buffer with determiants for CISD -`filter_3_highest_electrons `_ +`filter_3_highest_electrons `_ Returns a determinant with only the 3 highest electrons @@ -282,17 +306,7 @@ Documentation idx(0) is the number of determinants that interact with key1 -`filter_connected_davidson_warp `_ - 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. - .br - idx(0) is the number of determinants that interact with key1 - key1 should come from psi_det_sorted_ab. - - -`filter_connected_i_h_psi0 `_ +`filter_connected_i_h_psi0 `_ returns the array idx which contains the index of the .br determinants in the array key1 that interact @@ -302,7 +316,7 @@ Documentation idx(0) is the number of determinants that interact with key1 -`filter_connected_i_h_psi0_sc2 `_ +`filter_connected_i_h_psi0_sc2 `_ standard filter_connected_i_H_psi but returns in addition .br the array of the index of the non connected determinants to key1 @@ -314,7 +328,11 @@ Documentation to repeat the excitations -`generate_all_alpha_beta_det_products `_ +`first_guess `_ + Select all the determinants with the lowest energy as a starting point. + + +`generate_all_alpha_beta_det_products `_ Create a wave function from all possible alpha x beta determinants @@ -330,7 +348,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 @@ -350,7 +368,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 @@ -384,7 +402,7 @@ Documentation Undocumented -`h_u_0 `_ +`h_u_0 `_ Computes v_0 = H|u_0> .br n : number of determinants @@ -392,23 +410,35 @@ Documentation H_jj : array of -`i_h_j `_ +`i_h_j `_ Returns where i and j are determinants -`i_h_j_phase_out `_ +`i_h_j_phase_out `_ Returns where i and j are determinants -`i_h_j_verbose `_ +`i_h_j_verbose `_ Returns where i and j are determinants -`i_h_psi `_ - for the various Nstates +`i_h_psi `_ + Computes = \sum_J c_J . + .br + 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 -`i_h_psi_sc2 `_ +`i_h_psi_minilist `_ + Computes = \sum_J c_J . + .br + 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. + + +`i_h_psi_sc2 `_ for the various Nstate .br returns in addition @@ -422,7 +452,7 @@ Documentation to repeat the excitations -`i_h_psi_sc2_verbose `_ +`i_h_psi_sc2_verbose `_ for the various Nstate .br returns in addition @@ -436,7 +466,7 @@ Documentation to repeat the excitations -`i_h_psi_sec_ord `_ +`i_h_psi_sec_ord `_ for the various Nstates @@ -451,7 +481,7 @@ Documentation idx_non_cas gives the indice of the determinant in psi_det. -`int_of_3_highest_electrons `_ +`int_of_3_highest_electrons `_ Returns an integer*8 as : .br |_<--- 21 bits ---><--- 21 bits ---><--- 21 bits --->| @@ -463,6 +493,10 @@ Documentation .br +`is_connected_to `_ + Undocumented + + `is_in_wavefunction `_ True if the determinant ``det`` is in the wave function @@ -475,7 +509,7 @@ Documentation Undocumented -`max_degree_exc `_ +`max_degree_exc `_ Maximum degree of excitation in the wf @@ -508,7 +542,7 @@ Documentation Maximum number of determinants diagonalized by Jacobi -`n_det_max_property `_ +`n_det_max_property `_ Max number of determinants in the wave function when you select for a given property @@ -556,7 +590,7 @@ Documentation Number of possible determinants for a given occ_pattern -`one_body_dm_mo `_ +`one_body_dm_mo `_ One-body density matrix @@ -568,15 +602,15 @@ Documentation Alpha and beta one-body density matrix for each state -`one_body_single_double_dm_mo_alpha `_ +`one_body_single_double_dm_mo_alpha `_ Alpha and beta one-body density matrix for each state -`one_body_single_double_dm_mo_beta `_ +`one_body_single_double_dm_mo_beta `_ Alpha and beta one-body density matrix for each state -`one_body_spin_density_mo `_ +`one_body_spin_density_mo `_ rho(alpha) - rho(beta) @@ -584,15 +618,11 @@ Documentation If true, The One body DM is calculated with ignoring the Double<->Doubles extra diag elements -`pouet `_ - Undocumented - - -`psi_average_norm_contrib `_ +`psi_average_norm_contrib `_ Contribution of determinants to the state-averaged density -`psi_average_norm_contrib_sorted `_ +`psi_average_norm_contrib_sorted `_ Wave function sorted by determinants contribution to the norm (state-averaged) @@ -644,7 +674,7 @@ Documentation function. -`psi_coef `_ +`psi_coef `_ The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file is empty @@ -653,33 +683,33 @@ Documentation Undocumented -`psi_coef_max `_ +`psi_coef_max `_ Max and min values of the coefficients -`psi_coef_min `_ +`psi_coef_min `_ Max and min values of the coefficients -`psi_coef_sorted `_ +`psi_coef_sorted `_ Wave function sorted by determinants contribution to the norm (state-averaged) -`psi_coef_sorted_ab `_ +`psi_coef_sorted_ab `_ Determinants on which we apply . They are sorted by the 3 highest electrons in the alpha part, then by the 3 highest electrons in the beta part to accelerate the research of connected determinants. -`psi_coef_sorted_bit `_ +`psi_coef_sorted_bit `_ Determinants on which we apply for perturbation. They are sorted by determinants interpreted as integers. Useful to accelerate the search of a random determinant in the wave function. -`psi_det `_ +`psi_det `_ The wave function determinants. Initialized with Hartree-Fock if the EZFIO file is empty @@ -700,29 +730,29 @@ Documentation Unique beta determinants -`psi_det_size `_ +`psi_det_size `_ Size of the psi_det/psi_coef arrays -`psi_det_sorted `_ +`psi_det_sorted `_ Wave function sorted by determinants contribution to the norm (state-averaged) -`psi_det_sorted_ab `_ +`psi_det_sorted_ab `_ Determinants on which we apply . They are sorted by the 3 highest electrons in the alpha part, then by the 3 highest electrons in the beta part to accelerate the research of connected determinants. -`psi_det_sorted_bit `_ +`psi_det_sorted_bit `_ Determinants on which we apply for perturbation. They are sorted by determinants interpreted as integers. Useful to accelerate the search of a random determinant in the wave function. -`psi_det_sorted_next_ab `_ +`psi_det_sorted_next_ab `_ Determinants on which we apply . They are sorted by the 3 highest electrons in the alpha part, then by the 3 highest electrons in the beta part to accelerate @@ -761,7 +791,7 @@ Documentation Undocumented -`read_dets `_ +`read_dets `_ Reads the determinants from the EZFIO file @@ -777,20 +807,16 @@ Documentation Energy of the reference bitmask used in Slater rules -`remove_duplicates_in_psi_det `_ +`remove_duplicates_in_psi_det `_ Removes duplicate determinants in the wave function. -`resize_h_apply_buffer `_ +`resize_h_apply_buffer `_ Resizes the H_apply buffer of proc iproc. The buffer lock should be set before calling this function. -`routine `_ - Undocumented - - -`s2_eig `_ +`s2_eig `_ Force the wave function to be an eigenfunction of S^2 @@ -810,31 +836,31 @@ Documentation Undocumented -`save_natural_mos `_ +`save_natural_mos `_ Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis -`save_wavefunction `_ +`save_wavefunction `_ Save the wave function into the EZFIO file -`save_wavefunction_general `_ +`save_wavefunction_general `_ Save the wave function into the EZFIO file -`save_wavefunction_specified `_ +`save_wavefunction_specified `_ Save the wave function into the EZFIO file -`save_wavefunction_unsorted `_ +`save_wavefunction_unsorted `_ Save the wave function into the EZFIO file -`set_bite_to_integer `_ +`set_bit_to_integer `_ Undocumented -`set_natural_mos `_ +`set_natural_mos `_ Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis @@ -844,26 +870,26 @@ Documentation for a given couple of hole/particle excitations i. -`sort_dets_ab `_ - Undocumented +`sort_dets_ab `_ + Uncodumented : TODO -`sort_dets_ab_v `_ - Undocumented +`sort_dets_ab_v `_ + Uncodumented : TODO -`sort_dets_ba_v `_ - Undocumented +`sort_dets_ba_v `_ + Uncodumented : TODO -`sort_dets_by_3_highest_electrons `_ +`sort_dets_by_3_highest_electrons `_ Determinants on which we apply . They are sorted by the 3 highest electrons in the alpha part, then by the 3 highest electrons in the beta part to accelerate the research of connected determinants. -`sort_dets_by_det_search_key `_ +`sort_dets_by_det_search_key `_ Determinants are sorted are sorted according to their det_search_key. Useful to accelerate the search of a random determinant in the wave function. @@ -873,12 +899,12 @@ Documentation Return an integer*8 corresponding to a determinant index for searching -`state_average_weight `_ +`state_average_weight `_ Weights in the state-average calculation of the density matrix `tamiser `_ - Undocumented + Uncodumented : TODO `target_energy `_ @@ -889,7 +915,11 @@ Documentation convergence of the correlation energy of SC2 iterations -`threshold_generators `_ +`threshold_davidson `_ + Thresholds of Davidson's algorithm + + +`threshold_generators `_ Thresholds on generators (fraction of the norm) diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index e5726d91..c7183a64 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -203,34 +203,10 @@ output_bitmask Output file for Bitmask -output_cas_sd - Output file for CAS_SD - - -output_cid - Output file for CID - - -output_cisd - Output file for CISD - - -output_cisd_sc2_selected - Output file for CISD_SC2_selected - - -output_cisd_selected - Output file for CISD_selected - - `output_cpu_time_0 `_ Initial CPU and wall times when printing in the output files -output_ddci_selected - Output file for DDCI_selected - - output_determinants Output file for Determinants @@ -243,18 +219,10 @@ output_ezfio_files Output file for Ezfio_files -output_fcidump - Output file for FCIdump - - output_full_ci Output file for Full_CI -output_generators_cas - Output file for Generators_CAS - - output_generators_full Output file for Generators_full @@ -271,10 +239,6 @@ output_integrals_monoelec Output file for Integrals_Monoelec -output_loc_cele - Output file for loc_cele - - output_mo_basis Output file for MO_Basis @@ -283,14 +247,6 @@ output_moguess Output file for MOGuess -output_molden - Output file for Molden - - -output_mp2 - Output file for MP2 - - output_mrcc_cassd Output file for MRCC_CASSD @@ -323,18 +279,10 @@ 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 file for SingleRefMethod - - output_utils Output file for Utils diff --git a/src/Integrals_Bielec/.gitignore b/src/Integrals_Bielec/.gitignore index 54da4aed..f4bdeaca 100644 --- a/src/Integrals_Bielec/.gitignore +++ b/src/Integrals_Bielec/.gitignore @@ -1,20 +1,20 @@ -# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py -IRPF90_temp +# Automatically created by $QP_ROOT/scripts/module/module_handler.py +.ninja_deps +.ninja_log +AO_Basis +Bitmask +Electrons +Ezfio_files IRPF90_man -irpf90_entities -tags -irpf90.make +IRPF90_temp +MO_Basis Makefile Makefile.depend -build.ninja -.ninja_log -.ninja_deps -ezfio_interface.irp.f -Ezfio_files -MO_Basis -Utils +Nuclei Pseudo -Bitmask -AO_Basis -Electrons -Nuclei \ No newline at end of file +Utils +ezfio_interface.irp.f +irpf90.make +irpf90_entities +tags +test_integrals \ No newline at end of file diff --git a/src/Integrals_Bielec/README.rst b/src/Integrals_Bielec/README.rst index b71d9c0d..f09d1a9c 100644 --- a/src/Integrals_Bielec/README.rst +++ b/src/Integrals_Bielec/README.rst @@ -47,7 +47,7 @@ Documentation i(r1) j(r1) 1/r12 k(r2) l(r2) -`ao_bielec_integral_schwartz `_ +`ao_bielec_integral_schwartz `_ Needed to compute Schwartz inequalities @@ -56,7 +56,7 @@ Documentation i(r1) j(r1) 1/r12 k(r2) l(r2) -`ao_bielec_integrals_in_map `_ +`ao_bielec_integrals_in_map `_ Map of Atomic integrals i(r1) j(r2) 1/r12 k(r1) l(r2) @@ -73,6 +73,10 @@ Documentation Computes the product of l values of i,j,k,and l +`bench_maps `_ + Performs timing benchmarks on integral access + + `bielec_integrals_index `_ Undocumented @@ -85,7 +89,7 @@ Documentation Frees the memory of the AO map -`clear_mo_map `_ +`clear_mo_map `_ Frees the memory of the MO map @@ -105,15 +109,15 @@ Documentation Compute integrals on the fly -`dump_ao_integrals `_ +`dump_ao_integrals `_ Save to disk the $ao integrals -`dump_mo_integrals `_ +`dump_mo_integrals `_ Save to disk the $ao integrals -`eri `_ +`eri `_ ATOMIC PRIMTIVE bielectronic integral between the 4 primitives :: primitive_1 = x1**(a_x) y1**(a_y) z1**(a_z) exp(-alpha * r1**2) primitive_2 = x1**(b_x) y1**(b_y) z1**(b_z) exp(- beta * r1**2) @@ -135,7 +139,7 @@ Documentation t_w(i,2,k) = t(i) -`general_primitive_integral `_ +`general_primitive_integral `_ Computes the integral where p,q,r,s are Gaussian primitives @@ -161,52 +165,56 @@ Documentation Returns one integral in the MO basis -`get_mo_bielec_integrals `_ +`get_mo_bielec_integral_schwartz `_ + Returns one integral in the MO basis + + +`get_mo_bielec_integrals `_ Returns multiple integrals in the MO basis, all i for j,k,l fixed. -`get_mo_bielec_integrals_existing_ik `_ +`get_mo_bielec_integrals_existing_ik `_ Returns multiple integrals in the MO basis, all i(1)j(1) 1/r12 k(2)l(2) i for j,k,l fixed. -`get_mo_map_size `_ +`get_mo_map_size `_ Return the number of elements in the MO map -`give_polynom_mult_center_x `_ +`give_polynom_mult_center_x `_ subroutine that returns the explicit polynom in term of the "t" variable of the following polynomw : I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q) -`i_x1_new `_ +`i_x1_new `_ recursive function involved in the bielectronic integral -`i_x1_pol_mult `_ +`i_x1_pol_mult `_ recursive function involved in the bielectronic integral -`i_x1_pol_mult_a1 `_ +`i_x1_pol_mult_a1 `_ recursive function involved in the bielectronic integral -`i_x1_pol_mult_a2 `_ +`i_x1_pol_mult_a2 `_ recursive function involved in the bielectronic integral -`i_x1_pol_mult_recurs `_ +`i_x1_pol_mult_recurs `_ recursive function involved in the bielectronic integral -`i_x2_new `_ +`i_x2_new `_ recursive function involved in the bielectronic integral -`i_x2_pol_mult `_ +`i_x2_pol_mult `_ recursive function involved in the bielectronic integral @@ -218,21 +226,21 @@ Documentation Create new entry into MO map, or accumulate in an existing entry -`integrale_new `_ +`integrale_new `_ calculate the integral of the polynom :: I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q) between ( 0 ; 1) -`load_ao_integrals `_ +`load_ao_integrals `_ Read from disk the $ao integrals -`load_mo_integrals `_ +`load_mo_integrals `_ Read from disk the $ao integrals -`mo_bielec_integral `_ +`mo_bielec_integral `_ Returns one integral in the MO basis @@ -272,6 +280,10 @@ Documentation mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij +`mo_bielec_integral_schwartz `_ + Needed to compute Schwartz inequalities + + `mo_bielec_integrals_in_map `_ If True, the map of MO bielectronic integrals is provided @@ -292,7 +304,7 @@ Documentation Aligned n_pt_max_integrals -`n_pt_sup `_ +`n_pt_sup `_ Returns the upper boundary of the degree of the polynomial involved in the bielctronic integral : Ix(a_x,b_x,c_x,d_x) * Iy(a_y,b_y,c_y,d_y) * Iz(a_z,b_z,c_z,d_z) diff --git a/src/Integrals_Monoelec/README.rst b/src/Integrals_Monoelec/README.rst index 16230cbf..1d2d158b 100644 --- a/src/Integrals_Monoelec/README.rst +++ b/src/Integrals_Monoelec/README.rst @@ -111,11 +111,11 @@ Documentation Pseudo-potential -`ao_pseudo_integral_local `_ +`ao_pseudo_integral_local `_ Local pseudo-potential -`ao_pseudo_integral_non_local `_ +`ao_pseudo_integral_non_local `_ Local pseudo-potential From 6cad30269f44890ba3506009098475b7caa5f409 Mon Sep 17 00:00:00 2001 From: Michel Caffarel Date: Wed, 25 Nov 2015 18:04:05 +0100 Subject: [PATCH 2/2] Guess based on the overlap matrix of AOs to remove linear dependencies --- src/MOGuess/guess_overlap.irp.f | 14 ++++++++++++++ src/MOGuess/truncate_mos.irp.f | 10 ++++++++++ src/MO_Basis/utils.irp.f | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/MOGuess/guess_overlap.irp.f create mode 100644 src/MOGuess/truncate_mos.irp.f diff --git a/src/MOGuess/guess_overlap.irp.f b/src/MOGuess/guess_overlap.irp.f new file mode 100644 index 00000000..768724c6 --- /dev/null +++ b/src/MOGuess/guess_overlap.irp.f @@ -0,0 +1,14 @@ +program guess_mimi + BEGIN_DOC +! Produce `H_core` MO orbital + END_DOC + implicit none + character*(64) :: label + mo_coef = ao_ortho_lowdin_coef + TOUCH mo_coef + label = "Guess" + call mo_as_eigvectors_of_mo_matrix(-ao_overlap, & + size(ao_overlap,1), & + size(ao_overlap,2),label) + call save_mos +end diff --git a/src/MOGuess/truncate_mos.irp.f b/src/MOGuess/truncate_mos.irp.f new file mode 100644 index 00000000..29756055 --- /dev/null +++ b/src/MOGuess/truncate_mos.irp.f @@ -0,0 +1,10 @@ +program prog_truncate_mo + BEGIN_DOC +! Truncate MO set + END_DOC + implicit none + integer :: n + write(*,*) 'Number of MOs to keep' + read (*,*) n + call save_mos_truncated(n) +end diff --git a/src/MO_Basis/utils.irp.f b/src/MO_Basis/utils.irp.f index 7cc94c6d..6f96ab93 100644 --- a/src/MO_Basis/utils.irp.f +++ b/src/MO_Basis/utils.irp.f @@ -21,6 +21,29 @@ subroutine save_mos end +subroutine save_mos_truncated(n) + implicit none + double precision, allocatable :: buffer(:,:) + integer :: i,j,n + + call system('$QP_ROOT/scripts/save_current_mos.sh '//trim(ezfio_filename)) + + call ezfio_set_mo_basis_mo_tot_num(n) + call ezfio_set_mo_basis_mo_label(mo_label) + call ezfio_set_mo_basis_ao_md5(ao_md5) + allocate ( buffer(ao_num,n) ) + buffer = 0.d0 + do j = 1, n + do i = 1, ao_num + buffer(i,j) = mo_coef(i,j) + enddo + enddo + call ezfio_set_mo_basis_mo_coef(buffer) + call ezfio_set_mo_basis_mo_occ(mo_occ) + deallocate (buffer) + +end + subroutine mo_as_eigvectors_of_mo_matrix(matrix,n,m,label) implicit none integer,intent(in) :: n,m