diff --git a/devel/import_integrals/export_integrals_mo.irp.f b/devel/import_integrals/export_integrals_mo.irp.f index be0d558..d1e9fbf 100644 --- a/devel/import_integrals/export_integrals_mo.irp.f +++ b/devel/import_integrals/export_integrals_mo.irp.f @@ -1,5 +1,5 @@ program export_integrals_mo - PROVIDE mo_two_e_integrals_in_map + PROVIDE all_mo_integrals call run end diff --git a/devel/sr_correction/sr_correction.irp.f b/devel/sr_correction/sr_correction.irp.f index 43c4c97..d663d5a 100644 --- a/devel/sr_correction/sr_correction.irp.f +++ b/devel/sr_correction/sr_correction.irp.f @@ -9,6 +9,7 @@ end subroutine run implicit none integer :: istate + PROVIDE all_mo_integrals do istate=1,N_states print *, '', istate print *, 'State ', istate @@ -38,10 +39,9 @@ subroutine run print *,'' - print '(''|'',A6,''|'',5(A20,''|''))', 'E(mu)', '', 'E(mu) + ', 'E(mu) + \alpha_0', & - 'E(mu) + \alpha_0_s + \alpha_1_t', 'E(mu) + \alpha_0_r_s + \alpha_1_r_t' - print '(''|'',F6.2,''|'',5(F20.15,''|''))', mu_erf, energy_mu(istate), energy_mu(istate) + correction_mu(istate), energy_mu(istate) + & - correction_alpha_0(istate), energy_mu(istate) + correction_alpha_1(istate), energy_mu(istate) + & - correction_alpha_1_r(istate) + print '(''|'',A6,''|'',5(A25,''|''))', 'mu', 'E(mu)', 'E(mu) + ', 'E(mu) + a_0', & + 'E(mu) + a_0_s + a_1_t' + print '(''|'',F6.2,''|'',5(F25.15,''|''))', mu_erf, energy_mu(istate), energy_mu(istate) + correction_mu(istate), energy_mu(istate) + & + correction_alpha_0(istate), energy_mu(istate) + correction_alpha_1(istate) enddo end diff --git a/stable/mp2/.gitignore b/stable/mp2/.gitignore deleted file mode 100644 index 1561915..0000000 --- a/stable/mp2/.gitignore +++ /dev/null @@ -1,59 +0,0 @@ -IRPF90_temp/ -IRPF90_man/ -build.ninja -irpf90.make -ezfio_interface.irp.f -irpf90_entities -tags -Makefile -ao_basis -ao_one_e_ints -ao_two_e_erf_ints -ao_two_e_ints -aux_quantities -becke_numerical_grid -bitmask -cis -cisd -cipsi -davidson -davidson_dressed -davidson_undressed -density_for_dft -determinants -dft_keywords -dft_utils_in_r -dft_utils_one_e -dft_utils_two_body -dressing -dummy -electrons -ezfio_files -fci -generators_cas -generators_full -hartree_fock -iterations -kohn_sham -kohn_sham_rs -mo_basis -mo_guess -mo_one_e_ints -mo_two_e_erf_ints -mo_two_e_ints -mpi -mrpt_utils -nuclei -perturbation -pseudo -psiref_cas -psiref_utils -scf_utils -selectors_cassd -selectors_full -selectors_utils -single_ref_method -slave -tools -utils -zmq diff --git a/stable/mp2/H_apply.irp.f b/stable/mp2/H_apply.irp.f deleted file mode 100644 index 471dde5..0000000 --- a/stable/mp2/H_apply.irp.f +++ /dev/null @@ -1,15 +0,0 @@ -use bitmasks -BEGIN_SHELL [ /usr/bin/env python3 ] -from generate_h_apply import * -from perturbation import perturbations - -s = H_apply("mp2") -s.set_perturbation("Moller_plesset") -#s.set_perturbation("epstein_nesbet") -print(s) - -s = H_apply("mp2_selection") -s.set_selection_pt2("Moller_Plesset") -print(s) -END_SHELL - diff --git a/stable/mp2/NEED b/stable/mp2/NEED deleted file mode 100644 index 6eaf5b9..0000000 --- a/stable/mp2/NEED +++ /dev/null @@ -1,6 +0,0 @@ -generators_full -selectors_full -determinants -davidson -davidson_undressed -perturbation diff --git a/stable/mp2/README.rst b/stable/mp2/README.rst deleted file mode 100644 index 192a75f..0000000 --- a/stable/mp2/README.rst +++ /dev/null @@ -1,4 +0,0 @@ -=== -mp2 -=== - diff --git a/stable/mp2/mp2.irp.f b/stable/mp2/mp2.irp.f deleted file mode 100644 index b8e0cc4..0000000 --- a/stable/mp2/mp2.irp.f +++ /dev/null @@ -1,21 +0,0 @@ -program mp2 - call run -end - -subroutine run - implicit none - double precision, allocatable :: pt2(:), norm_pert(:) - double precision :: H_pert_diag, E_old - integer :: N_st, iter - PROVIDE Fock_matrix_diag_mo H_apply_buffer_allocated - N_st = N_states - allocate (pt2(N_st), norm_pert(N_st)) - E_old = HF_energy - call H_apply_mp2(pt2, norm_pert, H_pert_diag, N_st) - print *, 'N_det = ', N_det - print *, 'N_states = ', N_states - print *, 'MP2 = ', pt2 - print *, 'E = ', E_old - print *, 'E+MP2 = ', E_old+pt2 - deallocate(pt2,norm_pert) -end diff --git a/stable/qmcchem/EZFIO.cfg b/stable/qmcchem/EZFIO.cfg index c9d238f..8212142 100644 --- a/stable/qmcchem/EZFIO.cfg +++ b/stable/qmcchem/EZFIO.cfg @@ -4,3 +4,9 @@ doc: Threshold on the CI coefficients as computed in QMCChem interface: ezfio,provider,ocaml default: 1.e-8 +[do_frozen_core] +type: logical +doc: If true, save data for a frozen core calculation +interface: ezfio,provider,ocaml +default: False + diff --git a/stable/qmcchem/qmc_e_curve.irp.f b/stable/qmcchem/qmc_e_curve.irp.f index 7b26a9f..685851b 100644 --- a/stable/qmcchem/qmc_e_curve.irp.f +++ b/stable/qmcchem/qmc_e_curve.irp.f @@ -2,10 +2,10 @@ program e_curve use bitmasks implicit none integer :: i,j,k, nab, m, l - double precision :: norm + double precision :: norm integer, allocatable :: iorder(:) double precision , allocatable :: norm_sort(:) - PROVIDE mo_two_e_integrals_in_map mo_one_e_integrals + PROVIDE all_mo_integrals if (.not.read_wf) then @@ -92,7 +92,7 @@ program e_curve N_det = m-1 TOUCH psi_det psi_coef N_det - ! Avoid providing psi_energy + ! Avoid providing psi_energy if (.True.) then double precision :: cost0, cost cost0 = elec_alpha_num**3 + elec_beta_num**3 diff --git a/stable/qmcchem/qmc_e_curve2.irp.f b/stable/qmcchem/qmc_e_curve2.irp.f index 5ae388d..8291f43 100644 --- a/stable/qmcchem/qmc_e_curve2.irp.f +++ b/stable/qmcchem/qmc_e_curve2.irp.f @@ -5,7 +5,7 @@ program e_curve double precision :: norm, E, hij, num, ci, cj double precision :: e_0(N_states) double precision, allocatable :: psi_save(:) - PROVIDE mo_two_e_integrals_in_map mo_one_e_integrals + PROVIDE all_mo_integrals if (.not.read_wf) then stop 'Please set read_wf to true' diff --git a/stable/qmcchem/save_for_qmcchem.irp.f b/stable/qmcchem/save_for_qmcchem.irp.f index 5c29026..5ab3352 100644 --- a/stable/qmcchem/save_for_qmcchem.irp.f +++ b/stable/qmcchem/save_for_qmcchem.irp.f @@ -1,28 +1,28 @@ program save_for_qmc - + implicit none + BEGIN_DOC +! Export data for QMC=Chem + END_DOC integer :: iunit logical :: exists double precision :: e_ref - + ! Determinants read_wf = .True. TOUCH read_wf print *, "N_det = ", N_det call write_spindeterminants - + ! Reference Energy if (do_pseudo) then call write_pseudopotential endif call system( & - 'mkdir -p '//trim(ezfio_filename)//'/simulation ;' // & - 'cp '//trim(ezfio_filename)//'/.version '//trim(ezfio_filename)//'/simulation/.version ; ' // & 'mkdir -p '//trim(ezfio_filename)//'/properties ;' // & 'cp '//trim(ezfio_filename)//'/.version '//trim(ezfio_filename)//'/properties/.version ; ' // & 'echo T > '//trim(ezfio_filename)//'/properties/e_loc' & ) - iunit = 13 - open(unit=iunit,file=trim(ezfio_filename)//'/simulation/e_ref',action='write') + call ezfio_has_fci_energy_pt2(exists) if (exists) then call ezfio_get_fci_energy_pt2(e_ref) @@ -39,9 +39,15 @@ program save_for_qmc endif endif endif - write(iunit,*) e_ref - close(iunit) + call ezfio_set_simulation_e_ref(e_ref) + if (do_frozen_core) then + call ezfio_set_pseudo_core_fock_operator(core_fock_operator) + call ezfio_set_simulation_do_frozen_core(.True.) + endif + +! call ezfio_set_qmcchem_proj_potential_num(proj_num) +! call ezfio_set_qmcchem_proj_potential(proj_potential) call export_trexio(.True., .True.) end diff --git a/stable/qmcchem/truncate_wf_qmcchem.irp.f b/stable/qmcchem/truncate_wf_qmcchem.irp.f index bc33499..d41a699 100644 --- a/stable/qmcchem/truncate_wf_qmcchem.irp.f +++ b/stable/qmcchem/truncate_wf_qmcchem.irp.f @@ -13,7 +13,7 @@ subroutine run double precision , allocatable :: norm_sort(:) double precision :: e_0(N_states) - PROVIDE mo_two_e_integrals_in_map H_apply_buffer_allocated + PROVIDE all_mo_integrals H_apply_buffer_allocated nab = n_det_alpha_unique+n_det_beta_unique allocate ( norm_sort(0:nab), iorder(0:nab) ) @@ -30,17 +30,17 @@ subroutine run norm_sort(i) = det_alpha_norm(i) iorder(i) = i enddo - + do i=1,n_det_beta_unique norm_sort(i+n_det_alpha_unique) = det_beta_norm(i) iorder(i+n_det_alpha_unique) = -i enddo - + call dsort(norm_sort(1),iorder(1),nab) PROVIDE psi_bilinear_matrix_values psi_bilinear_matrix_rows psi_bilinear_matrix_columns - PROVIDE nuclear_repulsion + PROVIDE nuclear_repulsion print *, '' do j=0,nab i = iorder(j) @@ -104,7 +104,7 @@ subroutine run v_0, & size(v_0, 1), & N_states, N_det) - + double precision, external :: u_dot_u, u_dot_v do i=1,N_states e_0(i) = u_dot_v(u_0(1,i),v_0(1,i),N_det)/u_dot_u(u_0(1,i),N_det)