From d1a1c359f4c1d8075c752990eb2281d7cad1ac5f Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 9 Feb 2018 15:55:21 +0100 Subject: [PATCH] Missing file --- ocaml/qptypes_generator.ml | 18 +++--- plugins/Perturbation/dipole_moment.irp.f | 75 ---------------------- plugins/Psiref_CAS/NEEDED_CHILDREN_MODULES | 2 +- plugins/mrcepa0/dressing_vector.irp.f | 29 +++++++++ 4 files changed, 39 insertions(+), 85 deletions(-) delete mode 100644 plugins/Perturbation/dipole_moment.irp.f create mode 100644 plugins/mrcepa0/dressing_vector.irp.f diff --git a/ocaml/qptypes_generator.ml b/ocaml/qptypes_generator.ml index ba633a60..aa6bd533 100644 --- a/ocaml/qptypes_generator.ml +++ b/ocaml/qptypes_generator.ml @@ -58,7 +58,7 @@ let input_data = " * Det_number_max : int assert (x > 0) ; - if (x > 10000000000) then + if (x > 10_00_000_000) then warning \"More than 10 billion determinants\"; * States_number : int @@ -142,18 +142,18 @@ let input_data = " let input_ezfio = " * MO_number : int mo_basis_mo_tot_num - 1 : 10000 - More than 10000 MOs + 1 : 10_000 + More than 10_000 MOs * AO_number : int ao_basis_ao_num - 1 : 10000 - More than 10000 AOs + 1 : 10_000 + More than 10_000 AOs * Nucl_number : int nuclei_nucl_num - 1 : 10000 - More than 10000 nuclei + 1 : 10_000 + More than 10_000 nuclei * N_int_number : int determinants_n_int @@ -162,8 +162,8 @@ let input_ezfio = " * Det_number : int determinants_n_det - 1 : 10000000000 - More than 10 billion of determinants + 1 : 10_000_000_000 + More than 10 billion determinants " diff --git a/plugins/Perturbation/dipole_moment.irp.f b/plugins/Perturbation/dipole_moment.irp.f deleted file mode 100644 index 53beb081..00000000 --- a/plugins/Perturbation/dipole_moment.irp.f +++ /dev/null @@ -1,75 +0,0 @@ -subroutine pt2_dipole_moment_z(det_pert,c_pert,e_2_pert,H_pert_diag,Nint,ndet,n_st,minilist,idx_minilist,N_minilist) - use bitmasks - implicit none - integer, intent(in) :: Nint,ndet,n_st - integer(bit_kind), intent(in) :: det_pert(Nint,2) - double precision , intent(out) :: c_pert(n_st),e_2_pert(n_st),H_pert_diag(N_st) - double precision :: i_O1_psi_array(N_st) - double precision :: i_H_psi_array(N_st) - - integer, intent(in) :: N_minilist - integer, intent(in) :: idx_minilist(0:N_det_selectors) - integer(bit_kind), intent(in) :: minilist(Nint,2,N_det_selectors) - - BEGIN_DOC - ! compute the perturbatibe contribution to the dipole moment of one determinant - ! - ! for the various n_st states, at various level of theory. - ! - ! c_pert(i) = /( - ) - ! - ! e_2_pert(i) = c_pert(i) * - ! - ! H_pert_diag(i) = c_pert(i)^2 * - ! - ! To get the contribution of the first order : - ! - ! = sum(over i) e_2_pert(i) - ! - ! To get the contribution of the diagonal elements of the second order : - ! - ! [ + + sum(over i) H_pert_diag(i) ] / [1. + sum(over i) c_pert(i) **2] - ! - END_DOC - - integer :: i,j - double precision :: diag_H_mat_elem - integer :: exc(0:2,2,2) - integer :: degree - double precision :: phase,delta_e,h,oii,diag_o1_mat_elem - integer :: h1,h2,p1,p2,s1,s2 - ASSERT (Nint == N_int) - ASSERT (Nint > 0) - -! call get_excitation_degree(HF_bitmask,det_pert,degree,N_int) -! if(degree.gt.degree_max_generators+1)then -! H_pert_diag = 0.d0 -! e_2_pert = 0.d0 -! c_pert = 0.d0 -! return -! endif - - call i_O1_psi(mo_dipole_z,det_pert,psi_selectors,psi_selectors_coef,Nint,N_det_selectors,psi_selectors_size,N_st,i_O1_psi_array) - !call i_H_psi(det_pert,psi_selectors,psi_selectors_coef,Nint,N_det_selectors,psi_selectors_size,N_st,i_H_psi_array) - call i_H_psi_minilist(det_pert,minilist,idx_minilist,N_minilist,psi_selectors_coef,Nint,N_minilist,psi_selectors_size,N_st,i_H_psi_array) - - h = diag_H_mat_elem(det_pert,Nint) - oii = diag_O1_mat_elem(mo_dipole_z,det_pert,N_int) - - - do i =1,N_st - if(CI_electronic_energy(i)>h.and.CI_electronic_energy(i).ne.0.d0)then - c_pert(i) = -1.d0 - e_2_pert(i) = selection_criterion*selection_criterion_factor*2.d0 - else if (dabs(CI_electronic_energy(i) - h) > 1.d-6) then - c_pert(i) = i_H_psi_array(i) / (CI_electronic_energy(i) - h) - e_2_pert(i) = c_pert(i) * (i_O1_psi_array(i)+i_O1_psi_array(i) ) - H_pert_diag(i) = e_2_pert(i) + c_pert(i) * c_pert(i) * oii - else - c_pert(i) = -1.d0 - e_2_pert(i) = -dabs(i_H_psi_array(i)) - H_pert_diag(i) = c_pert(i) * i_O1_psi_array(i) - endif - enddo -end - diff --git a/plugins/Psiref_CAS/NEEDED_CHILDREN_MODULES b/plugins/Psiref_CAS/NEEDED_CHILDREN_MODULES index 22828878..c11605ac 100644 --- a/plugins/Psiref_CAS/NEEDED_CHILDREN_MODULES +++ b/plugins/Psiref_CAS/NEEDED_CHILDREN_MODULES @@ -1 +1 @@ -Psiref_Utils DavidsonUndressed +Psiref_Utils diff --git a/plugins/mrcepa0/dressing_vector.irp.f b/plugins/mrcepa0/dressing_vector.irp.f new file mode 100644 index 00000000..7c5809d9 --- /dev/null +++ b/plugins/mrcepa0/dressing_vector.irp.f @@ -0,0 +1,29 @@ + BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ] +&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ] + implicit none + BEGIN_DOC + ! Null dressing vectors + END_DOC + dressing_column_h(:,:) = 0.d0 + dressing_column_s(:,:) = 0.d0 + + integer :: i,ii,k,j,jj, l + double precision :: f, tmp + double precision, external :: u_dot_v + + do k=1,N_states + l = dressed_column_idx(k) + f = 1.d0/psi_coef(l,k) + do jj = 1, n_det_non_ref + j = idx_non_ref(jj) + dressing_column_h(j,k) = delta_ij (k,jj) + dressing_column_s(j,k) = delta_ij_s2(k,jj) + enddo + tmp = u_dot_v(dressing_column_h(1,k), psi_coef(1,k), N_det) + dressing_column_h(l,k) -= tmp * f + tmp = u_dot_v(dressing_column_s(1,k), psi_coef(1,k), N_det) + dressing_column_s(l,k) -= tmp * f + enddo + +END_PROVIDER +