=================== Psiref_utils Module =================== Utilities related to the use of a reference wave function. This module needs to be loaded with any psi_ref module. Documentation ============= .. Do not edit this section. It was auto-generated from the .. by the `update_README.py` script. `get_index_in_psi_ref_sorted_bit `_ Returns the index of the determinant in the ``psi_ref_sorted_bit`` array `h_matrix_ref `_ 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_non_ref_rev gives the reverse. `idx_non_ref_rev `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. `is_in_psi_ref `_ True if the determinant ``det`` is in the wave function `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. idx_non_ref_rev gives the reverse. `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 `_ Undocumented `psi_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_non_ref_rev gives the reverse. `psi_non_ref_coef `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. `psi_non_ref_coef_restart `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. `psi_non_ref_coef_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_non_ref_restart `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. `psi_non_ref_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_ref_coef_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_ref_energy `_ Undocumented `psi_ref_energy_diagonalized `_ Undocumented `psi_ref_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. Needed Modules ============== .. Do not edit this section It was auto-generated .. by the `update_README.py` script. .. image:: tree_dependency.png * `Bitmask `_ * `Determinants `_ Documentation ============= .. Do not edit this section It was auto-generated .. by the `update_README.py` script. `a_coef `_ Undocumented `add_poly `_ Add two polynomials D(t) =! D(t) +( B(t)+C(t)) `add_poly_multiply `_ Add a polynomial multiplied by a constant D(t) =! D(t) +( cst * B(t)) `apply_rotation `_ Apply the rotation found by find_rotation `approx_dble `_ Undocumented `b_coef `_ Undocumented `binom `_ Binomial coefficients `binom_func `_ .. math :: .br \frac{i!}{j!(i-j)!} .br `binom_transp `_ Binomial coefficients `dble_fact `_ Undocumented `dble_fact_even `_ n!! `dble_fact_odd `_ n!! `dble_logfact `_ n!! `ddfact2 `_ Undocumented `degree_max_integration_lebedev `_ integrate correctly a polynom of order "degree_max_integration_lebedev" needed for the angular integration according to LEBEDEV formulae `dset_order `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. `dset_order_big `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. This is a version for very large arrays where the indices need to be in integer*8 format `dsort `_ Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `dtranspose `_ Transpose input matrix A into output matrix B `erf0 `_ Undocumented `extract_ref `_ Replaces the total wave function by the normalized projection on the reference `extrapolate_data `_ Extrapolate the data to the FCI limit `f_integral `_ function that calculates the following integral \int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx `fact `_ n! `fact_inv `_ 1/n! `find_rotation `_ Find A.C = B `gammln `_ Undocumented `gammp `_ Undocumented `gaussian_product `_ Gaussian product in 1D. e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} `gaussian_product_x `_ Gaussian product in 1D. e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2} `gcf `_ Undocumented `get_index_in_psi_ref_sorted_bit `_ Returns the index of the determinant in the ``psi_ref_sorted_bit`` array `get_inverse `_ Returns the inverse of the square matrix A `get_pseudo_inverse `_ Find C = A^-1 `give_explicit_poly_and_gaussian `_ Transforms the product of (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) into fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) `give_explicit_poly_and_gaussian_double `_ Transforms the product of (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) exp(-(r-Nucl_center)^2 gama .br into fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 ) * [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 ) * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) `give_explicit_poly_and_gaussian_x `_ Transform the product of (x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) into fact_k (x-x_P)^iorder(1) (y-y_P)^iorder(2) (z-z_P)^iorder(3) exp(-p(r-P)^2) `gser `_ Undocumented `h_matrix_ref `_ Undocumented `heap_dsort `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `heap_dsort_big `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `heap_i2sort `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `heap_i2sort_big `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `heap_i8sort `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `heap_i8sort_big `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `heap_isort `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `heap_isort_big `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `heap_sort `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `heap_sort_big `_ Sort array x(isize) using the heap sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `hermite `_ Hermite polynomial `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 `i2radix_sort `_ Sort integer array x(isize) using the radix sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. iradix should be -1 in input. `i2set_order `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. `i2set_order_big `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. This is a version for very large arrays where the indices need to be in integer*8 format `i2sort `_ Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `i8radix_sort `_ Sort integer array x(isize) using the radix sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. iradix should be -1 in input. `i8radix_sort_big `_ Sort integer array x(isize) using the radix sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. iradix should be -1 in input. `i8set_order `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. `i8set_order_big `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. This is a version for very large arrays where the indices need to be in integer*8 format `i8sort `_ Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `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_non_ref_rev gives the reverse. `idx_non_ref_rev `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. `insertion_dsort `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `insertion_dsort_big `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `insertion_i2sort `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `insertion_i2sort_big `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `insertion_i8sort `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `insertion_i8sort_big `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `insertion_isort `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `insertion_isort_big `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `insertion_sort `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `insertion_sort_big `_ Sort array x(isize) using the insertion sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. This is a version for very large arrays where the indices need to be in integer*8 format `inv_int `_ 1/i `iradix_sort `_ Sort integer array x(isize) using the radix sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. iradix should be -1 in input. `iradix_sort_big `_ Sort integer array x(isize) using the radix sort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. iradix should be -1 in input. `is_in_psi_ref `_ True if the determinant ``det`` is in the wave function `iset_order `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. `iset_order_big `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. This is a version for very large arrays where the indices need to be in integer*8 format `isort `_ Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `lapack_diag `_ Diagonalize matrix H .br H is untouched between input and ouptut .br eigevalues(i) = ith lowest eigenvalue of the H matrix .br eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector .br `lapack_diag_s2 `_ Diagonalize matrix H .br H is untouched between input and ouptut .br eigevalues(i) = ith lowest eigenvalue of the H matrix .br eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector .br `lapack_diagd `_ Diagonalize matrix H .br H is untouched between input and ouptut .br eigevalues(i) = ith lowest eigenvalue of the H matrix .br eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector .br `lapack_partial_diag `_ Diagonalize matrix H .br H is untouched between input and ouptut .br eigevalues(i) = ith lowest eigenvalue of the H matrix .br eigvectors(i,j) = where i is the basis function and psi_j is the j th eigenvector .br `logfact `_ n! `lowercase `_ Transform to lower case `map_load_from_disk `_ Undocumented `map_save_to_disk `_ Undocumented `matrix_vector_product `_ performs u1 =! performs u1 +( u0 * matrix) `multiply_poly `_ Multiply two polynomials D(t) =! D(t) +( B(t)*C(t)) `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. idx_non_ref_rev gives the reverse. `n_points_integration_angular_lebedev `_ Number of points needed for the angular integral `normalize `_ Normalizes vector u `nproc `_ Number of current OpenMP threads `ortho_canonical `_ Compute C_new=C_old.U.s^-1/2 canonical orthogonalization. .br overlap : overlap matrix .br LDA : leftmost dimension of overlap array .br N : Overlap matrix is NxN (array is (LDA,N) ) .br C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors .br LDC : leftmost dimension of C .br m : Coefficients matrix is MxN, ( array is (LDC,N) ) .br `ortho_lowdin `_ Compute C_new=C_old.S^-1/2 orthogonalization. .br overlap : overlap matrix .br LDA : leftmost dimension of overlap array .br N : Overlap matrix is NxN (array is (LDA,N) ) .br C : Coefficients of the vectors to orthogonalize. On exit, orthogonal vectors .br LDC : leftmost dimension of C .br M : Coefficients matrix is MxN, ( array is (LDC,N) ) .br `ortho_qr `_ Orthogonalization using Q.R factorization .br A : matrix to orthogonalize .br LDA : leftmost dimension of A .br n : Number of rows of A .br m : Number of columns of A .br `ortho_qr_unblocked `_ Orthogonalization using Q.R factorization .br A : matrix to orthogonalize .br LDA : leftmost dimension of A .br n : Number of rows of A .br m : Number of columns of A .br `overlap_a_b_c `_ Undocumented `overlap_gaussian_x `_ .. math:: .br \sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx .br `overlap_gaussian_xyz `_ .. math:: .br S_x = \int (x-A_x)^{a_x} exp(-\alpha(x-A_x)^2) (x-B_x)^{b_x} exp(-beta(x-B_x)^2) dx \\ S = S_x S_y S_z .br `overlap_x_abs `_ .. math :: .br \int_{-infty}^{+infty} (x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) dx .br `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 `phi_angular_integration_lebedev `_ Theta phi values together with the weights values for the angular integration : integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ Current status for displaying progress bars. Global variable. `progress_bar `_ Current status for displaying progress bars. Global variable. `progress_timeout `_ Current status for displaying progress bars. Global variable. `progress_title `_ Current status for displaying progress bars. Global variable. `progress_value `_ Current status for displaying progress bars. Global variable. `psi_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_non_ref_rev gives the reverse. `psi_non_ref_coef `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. idx_non_ref_rev gives the reverse. `psi_non_ref_coef_restart `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. `psi_non_ref_coef_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_non_ref_coef_transp `_ Transposed psi_non_ref_coef `psi_non_ref_restart `_ Set of determinants which are not part of the reference, defined from the application of the reference bitmask on the determinants. idx_non_ref gives the indice of the determinant in psi_det. But this is with respect to the restart wave function. `psi_non_ref_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_ref_coef_diagonalized `_ Undocumented `psi_ref_coef_normalized `_ Normalized coefficients of the reference `psi_ref_coef_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `psi_ref_coef_transp `_ Transposed psi_ref_coef `psi_ref_energy `_ Undocumented `psi_ref_energy_diagonalized `_ Undocumented `psi_ref_sorted_bit `_ Reference determinants sorted to accelerate the search of a random determinant in the wave function. `quick_dsort `_ Sort array x(isize) using the quicksort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `quick_i2sort `_ Sort array x(isize) using the quicksort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `quick_i8sort `_ Sort array x(isize) using the quicksort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `quick_isort `_ Sort array x(isize) using the quicksort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `quick_sort `_ Sort array x(isize) using the quicksort algorithm. iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `rec__quicksort `_ Undocumented `rec_d_quicksort `_ Undocumented `rec_i2_quicksort `_ Undocumented `rec_i8_quicksort `_ Undocumented `rec_i_quicksort `_ Undocumented `recentered_poly2 `_ Recenter two polynomials `ref_hamiltonian_matrix `_ H matrix in the Reference space `rint `_ .. math:: .br \int_0^1 dx \exp(-p x^2) x^n .br `rint1 `_ Standard version of rint `rint_large_n `_ Version of rint for large values of n `rint_sum `_ Needed for the calculation of two-electron integrals. `rinteg `_ Undocumented `rintgauss `_ Undocumented `run_progress `_ Display a progress bar with documentation of what is happening `sabpartial `_ Undocumented `set_order `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. `set_order_big `_ array A has already been sorted, and iorder has contains the new order of elements of A. This subroutine changes the order of x to match the new order of A. This is a version for very large arrays where the indices need to be in integer*8 format `set_zero_extra_diag `_ Undocumented `sort `_ Sort array x(isize). iorder in input should be (1,2,3,...,isize), and in output contains the new order of the elements. `sorted_dnumber `_ Returns the number of sorted elements `sorted_i2number `_ Returns the number of sorted elements `sorted_i8number `_ Returns the number of sorted elements `sorted_inumber `_ Returns the number of sorted elements `sorted_number `_ Returns the number of sorted elements `start_progress `_ Starts the progress bar `stop_progress `_ Stop the progress bar `svd `_ Compute A = U.D.Vt .br LDx : leftmost dimension of x .br Dimsneion of A is m x n .br `theta_angular_integration_lebedev `_ Theta phi values together with the weights values for the angular integration : integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ Transpose input matrix A into output matrix B `u_dot_u `_ Compute `u_dot_v `_ Compute `wall_time `_ The equivalent of cpu_time, but for the wall time. `weights_angular_integration_lebedev `_ Theta phi values together with the weights values for the angular integration : integral [dphi,dtheta] f(x,y,z) = 4 * pi * sum (1`_ Write the last git commit in file iunit.