From 6ad651c46c92afd8cab2b970739499c2f3c22996 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 23 Apr 2014 22:10:36 +0200 Subject: [PATCH 1/9] Added Hartree-Fock in MO basis --- src/Hartree_Fock/ASSUMPTIONS.rst | 0 src/Hartree_Fock/Fock_matrix_mo.irp.f | 127 ++ src/Hartree_Fock/Makefile | 8 + src/Hartree_Fock/NEEDED_MODULES | 1 + src/Hartree_Fock/README.rst | 5 + src/Hartree_Fock/diagonalize_fock.irp.f | 20 + src/Hartree_Fock/hartree_fock.ezfio_config | 4 + src/Hartree_Fock/mo_SCF_iterations.irp.f | 33 + src/Hartree_Fock/options.irp.f | 36 + src/Hartree_Fock/ref_bitmask.irp.f | 57 + src/Hartree_Fock/tests/Makefile | 33 + src/Hartree_Fock/tests/hf_energy.ref | 1690 ++++++++++++++++++++ 12 files changed, 2014 insertions(+) create mode 100644 src/Hartree_Fock/ASSUMPTIONS.rst create mode 100644 src/Hartree_Fock/Fock_matrix_mo.irp.f create mode 100644 src/Hartree_Fock/Makefile create mode 100644 src/Hartree_Fock/NEEDED_MODULES create mode 100644 src/Hartree_Fock/diagonalize_fock.irp.f create mode 100644 src/Hartree_Fock/hartree_fock.ezfio_config create mode 100644 src/Hartree_Fock/mo_SCF_iterations.irp.f create mode 100644 src/Hartree_Fock/options.irp.f create mode 100644 src/Hartree_Fock/ref_bitmask.irp.f create mode 100644 src/Hartree_Fock/tests/Makefile create mode 100644 src/Hartree_Fock/tests/hf_energy.ref diff --git a/src/Hartree_Fock/ASSUMPTIONS.rst b/src/Hartree_Fock/ASSUMPTIONS.rst new file mode 100644 index 00000000..e69de29b diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f new file mode 100644 index 00000000..38b19362 --- /dev/null +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -0,0 +1,127 @@ + BEGIN_PROVIDER [ double precision, Fock_matrix_mo, (mo_tot_num,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, Fock_matrix_diag_mo, (mo_tot_num)] + implicit none + BEGIN_DOC + ! Fock matrix on the MO basis. + ! For open shells, the ROHF Fock Matrix is + ! + ! | F-K | F + K/2 | F | + ! |---------------------------------| + ! | F + K/2 | F | F - K/2 | + ! |---------------------------------| + ! | F | F - K/2 | F + K | + ! + ! F = 1/2 (Fa + Fb) + ! + ! K = Fb - Fa + ! + END_DOC + integer :: i,j,n + double precision :: get_mo_bielec_integral + if (elec_alpha_num == elec_beta_num) then + Fock_matrix_mo = Fock_matrix_alpha_mo + else + + do j=1,elec_beta_num + ! F-K + do i=1,elec_beta_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j))& + - (Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + ! F+K/2 + do i=elec_beta_num+1,elec_alpha_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j))& + + 0.5d0*(Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + ! F + do i=elec_alpha_num+1, mo_tot_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j)) + enddo + enddo + + do j=elec_beta_num+1,elec_alpha_num + ! F+K/2 + do i=1,elec_beta_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j))& + + 0.5d0*(Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + ! F + do i=elec_beta_num+1,elec_alpha_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j)) + enddo + ! F-K/2 + do i=elec_alpha_num+1, mo_tot_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j))& + - 0.5d0*(Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + enddo + + do j=elec_alpha_num+1, mo_tot_num + ! F + do i=1,elec_beta_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j)) + enddo + ! F-K/2 + do i=elec_beta_num+1,elec_alpha_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j))& + - 0.5d0*(Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + ! F+K + do i=elec_alpha_num+1,mo_tot_num + Fock_matrix_mo(i,j) = 0.5d0*(Fock_matrix_alpha_mo(i,j)+Fock_matrix_beta_mo(i,j)) & + + (Fock_matrix_beta_mo(i,j) - Fock_matrix_alpha_mo(i,j)) + enddo + enddo + + endif + do i = 1, mo_tot_num + Fock_matrix_diag_mo(i) = Fock_matrix_mo(i,i) + enddo +END_PROVIDER + + +BEGIN_PROVIDER [ double precision, Fock_matrix_alpha_mo, (mo_tot_num,mo_tot_num) ] + implicit none + BEGIN_DOC + ! Fock matrix on the MO basis + END_DOC + integer :: i,j,n + double precision :: get_mo_bielec_integral + do j=1,mo_tot_num + do i=1,mo_tot_num + Fock_matrix_alpha_mo(i,j) = mo_mono_elec_integral(i,j) + do n=1,elec_beta_num + Fock_matrix_alpha_mo(i,j) += 2.d0*get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& + get_mo_bielec_integral(i,n,n,j,mo_integrals_map) + enddo + do n=elec_beta_num+1,elec_alpha_num + Fock_matrix_alpha_mo(i,j) += get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& + get_mo_bielec_integral(i,n,n,j,mo_integrals_map) + enddo + enddo + enddo +END_PROVIDER + + +BEGIN_PROVIDER [ double precision, Fock_matrix_beta_mo, (mo_tot_num,mo_tot_num) ] + implicit none + BEGIN_DOC + ! Fock matrix on the MO basis + END_DOC + integer :: i,j,n + double precision :: get_mo_bielec_integral + do j=1,mo_tot_num + do i=1,mo_tot_num + Fock_matrix_beta_mo(i,j) = mo_mono_elec_integral(i,j) + do n=1,elec_beta_num + Fock_matrix_beta_mo(i,j) += 2.d0*get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& + get_mo_bielec_integral(i,n,n,j,mo_integrals_map) + enddo + do n=elec_beta_num+1,elec_alpha_num + Fock_matrix_beta_mo(i,j) += get_mo_bielec_integral(i,n,j,n,mo_integrals_map) + enddo + enddo + enddo +END_PROVIDER + + diff --git a/src/Hartree_Fock/Makefile b/src/Hartree_Fock/Makefile new file mode 100644 index 00000000..b2ea1de1 --- /dev/null +++ b/src/Hartree_Fock/Makefile @@ -0,0 +1,8 @@ +default: all + +# Define here all new external source files and objects.Don't forget to prefix the +# object files with IRPF90_temp/ +SRC= +OBJ= + +include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Hartree_Fock/NEEDED_MODULES b/src/Hartree_Fock/NEEDED_MODULES new file mode 100644 index 00000000..163bdf10 --- /dev/null +++ b/src/Hartree_Fock/NEEDED_MODULES @@ -0,0 +1 @@ +AOs BiInts Bitmask Electrons Ezfio_files MonoInts MOs Nuclei Output Utils diff --git a/src/Hartree_Fock/README.rst b/src/Hartree_Fock/README.rst index b8981dd0..410339a1 100644 --- a/src/Hartree_Fock/README.rst +++ b/src/Hartree_Fock/README.rst @@ -1,3 +1,8 @@ +=================== +Hartree-Fock Module +=================== + + Needed Modules ============== diff --git a/src/Hartree_Fock/diagonalize_fock.irp.f b/src/Hartree_Fock/diagonalize_fock.irp.f new file mode 100644 index 00000000..1efd8376 --- /dev/null +++ b/src/Hartree_Fock/diagonalize_fock.irp.f @@ -0,0 +1,20 @@ +subroutine diagonalize_fock() + implicit none + + double precision, allocatable :: mo_coef_new(:,:), R(:,:),eigvalues(:) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: mo_coef_new, R + + allocate(R(mo_tot_num,mo_tot_num)) + allocate(mo_coef_new(ao_num_align,mo_tot_num),eigvalues(mo_tot_num)) + mo_coef_new = mo_coef + + call lapack_diag(eigvalues,R,Fock_matrix_mo,mo_tot_num,mo_tot_num) + + call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num,1.d0,mo_coef_new,size(mo_coef_new,1),R,size(R,1),0.d0,mo_coef,size(mo_coef,1)) + deallocate(mo_coef_new,R,eigvalues) + + mo_label = "Canonical" + SOFT_TOUCH mo_coef mo_label + call clear_mo_map +end + diff --git a/src/Hartree_Fock/hartree_fock.ezfio_config b/src/Hartree_Fock/hartree_fock.ezfio_config new file mode 100644 index 00000000..bbb383f9 --- /dev/null +++ b/src/Hartree_Fock/hartree_fock.ezfio_config @@ -0,0 +1,4 @@ +hartree_fock + thresh_scf double precision + n_it_scf_max integer + diff --git a/src/Hartree_Fock/mo_SCF_iterations.irp.f b/src/Hartree_Fock/mo_SCF_iterations.irp.f new file mode 100644 index 00000000..74df3164 --- /dev/null +++ b/src/Hartree_Fock/mo_SCF_iterations.irp.f @@ -0,0 +1,33 @@ +program scf_iteration + use bitmasks + implicit none + double precision :: SCF_energy_before,SCF_energy_after,diag_H_mat_elem,get_mo_bielec_integral + double precision :: E0 + integer :: i_it + + E0 = ref_bitmask_energy + nuclear_repulsion + i_it = 0 + n_it_scf_max = 100 + SCF_energy_before = huge(1.d0) + SCF_energy_after = E0 + print *, E0 + do while (dabs(SCF_energy_before - SCF_energy_after) > thresh_SCF) + SCF_energy_before = SCF_energy_after + call diagonalize_fock() + SCF_energy_after = ref_bitmask_energy + nuclear_repulsion + print*,SCF_energy_after + i_it +=1 + if(i_it > n_it_scf_max)exit + enddo + + if (i_it == n_it_scf_max) then + stop 'Failed' + endif + if (SCF_energy_after - E0 > thresh_SCF) then + stop 'Failed' + endif + mo_label = "Canonical" + TOUCH mo_label mo_coef + call save_mos + +end diff --git a/src/Hartree_Fock/options.irp.f b/src/Hartree_Fock/options.irp.f new file mode 100644 index 00000000..b3770418 --- /dev/null +++ b/src/Hartree_Fock/options.irp.f @@ -0,0 +1,36 @@ +BEGIN_PROVIDER [ double precision,thresh_SCF ] + implicit none + BEGIN_DOC +! Threshold on the convergence of the Hartree Fock energy + END_DOC + + logical :: has + PROVIDE ezfio_filename + call ezfio_has_Hartree_Fock_thresh_SCF(has) + if (has) then + call ezfio_get_Hartree_Fock_thresh_SCF(thresh_SCF) + else + thresh_SCF = 1.d-10 + call ezfio_set_Hartree_Fock_thresh_SCF(thresh_SCF) + endif + +END_PROVIDER + +BEGIN_PROVIDER [ integer ,n_it_scf_max] + implicit none + BEGIN_DOC +! Maximum number of SCF iterations + END_DOC + + logical :: has + PROVIDE ezfio_filename + call ezfio_has_Hartree_Fock_n_it_scf_max (has) + if (has) then + call ezfio_get_Hartree_Fock_n_it_scf_max(n_it_scf_max) + else + n_it_scf_max = 30 + call ezfio_set_Hartree_Fock_n_it_scf_max(n_it_scf_max) + endif + +END_PROVIDER + diff --git a/src/Hartree_Fock/ref_bitmask.irp.f b/src/Hartree_Fock/ref_bitmask.irp.f new file mode 100644 index 00000000..7f760562 --- /dev/null +++ b/src/Hartree_Fock/ref_bitmask.irp.f @@ -0,0 +1,57 @@ + BEGIN_PROVIDER [ double precision, ref_bitmask_energy ] +&BEGIN_PROVIDER [ double precision, mono_elec_ref_bitmask_energy ] +&BEGIN_PROVIDER [ double precision, kinetic_ref_bitmask_energy ] +&BEGIN_PROVIDER [ double precision, nucl_elec_ref_bitmask_energy ] +&BEGIN_PROVIDER [ double precision, bi_elec_ref_bitmask_energy ] + use bitmasks + implicit none + BEGIN_DOC + ! Energy of the reference bitmask used in Slater rules + END_DOC + + integer :: occ(N_int*bit_kind_size,2) + integer :: i,j + + call bitstring_to_list(ref_bitmask(1,1), occ(1,1), i, N_int) + call bitstring_to_list(ref_bitmask(1,2), occ(1,2), i, N_int) + + + ref_bitmask_energy = 0.d0 + mono_elec_ref_bitmask_energy = 0.d0 + kinetic_ref_bitmask_energy = 0.d0 + nucl_elec_ref_bitmask_energy = 0.d0 + bi_elec_ref_bitmask_energy = 0.d0 + + do i = 1, elec_beta_num + ref_bitmask_energy += mo_mono_elec_integral(occ(i,1),occ(i,1)) + mo_mono_elec_integral(occ(i,2),occ(i,2)) + kinetic_ref_bitmask_energy += mo_kinetic_integral(occ(i,1),occ(i,1)) + mo_kinetic_integral(occ(i,2),occ(i,2)) + nucl_elec_ref_bitmask_energy += mo_nucl_elec_integral(occ(i,1),occ(i,1)) + mo_nucl_elec_integral(occ(i,2),occ(i,2)) + enddo + + do i = elec_beta_num+1,elec_alpha_num + ref_bitmask_energy += mo_mono_elec_integral(occ(i,1),occ(i,1)) + kinetic_ref_bitmask_energy += mo_kinetic_integral(occ(i,1),occ(i,1)) + nucl_elec_ref_bitmask_energy += mo_nucl_elec_integral(occ(i,1),occ(i,1)) + enddo + + do j= 1, elec_alpha_num + do i = j+1, elec_alpha_num + bi_elec_ref_bitmask_energy += mo_bielec_integral_jj_anti(occ(i,1),occ(j,1)) + ref_bitmask_energy += mo_bielec_integral_jj_anti(occ(i,1),occ(j,1)) + enddo + enddo + + do j= 1, elec_beta_num + do i = j+1, elec_beta_num + bi_elec_ref_bitmask_energy += mo_bielec_integral_jj_anti(occ(i,2),occ(j,2)) + ref_bitmask_energy += mo_bielec_integral_jj_anti(occ(i,2),occ(j,2)) + enddo + do i= 1, elec_alpha_num + bi_elec_ref_bitmask_energy += mo_bielec_integral_jj(occ(i,1),occ(j,2)) + ref_bitmask_energy += mo_bielec_integral_jj(occ(i,1),occ(j,2)) + enddo + enddo + mono_elec_ref_bitmask_energy = kinetic_ref_bitmask_energy + nucl_elec_ref_bitmask_energy + +END_PROVIDER + diff --git a/src/Hartree_Fock/tests/Makefile b/src/Hartree_Fock/tests/Makefile new file mode 100644 index 00000000..77bd84ba --- /dev/null +++ b/src/Hartree_Fock/tests/Makefile @@ -0,0 +1,33 @@ +OPENMP =1 +PROFILE =0 +DEBUG = 0 + +IRPF90+= -I tests + +REF_FILES=$(subst %.irp.f, %.ref, $(wildcard *.irp.f)) + +.PHONY: clean executables serial_tests parallel_tests + +all: clean executables serial_tests parallel_tests + +parallel_tests: $(REF_FILES) + @echo ; echo " ---- Running parallel tests ----" ; echo + @OMP_NUM_THREADS=10 ${QPACKAGE_ROOT}/scripts/run_tests.py + +serial_tests: $(REF_FILES) + @echo ; echo " ---- Running serial tests ----" ; echo + @OMP_NUM_THREADS=1 ${QPACKAGE_ROOT}/scripts/run_tests.py + +executables: $(wildcard *.irp.f) veryclean + $(MAKE) -C .. + +%.ref: $(wildcard $(QPACKAGE_ROOT)/data/inputs/*.md5) executables + $(QPACKAGE_ROOT)/scripts/create_test_ref.sh $* + +clean: + $(MAKE) -C .. clean + +veryclean: + $(MAKE) -C .. veryclean + + diff --git a/src/Hartree_Fock/tests/hf_energy.ref b/src/Hartree_Fock/tests/hf_energy.ref new file mode 100644 index 00000000..8cc13e8a --- /dev/null +++ b/src/Hartree_Fock/tests/hf_energy.ref @@ -0,0 +1,1690 @@ +data = { + 'AlCl.ezfio' : { + 'HF energy' : -701.485694012190, +'ref_bitmask_energy' : -755.312111127647, +'mono_elec_ref_bitmask_energy' : -1079.91621944621, +'kinetic_ref_bitmask_energy' : 701.508870457737, +'nucl_elec_ref_bitmask_energy' : -1781.42508990395, +'bi_elec_ref_bitmask_energy' : 324.604108318567, + }, + 'Al.ezfio' : { + 'HF energy' : -241.870133387286, +'ref_bitmask_energy' : -241.870133387286, +'mono_elec_ref_bitmask_energy' : -336.636818051517, +'kinetic_ref_bitmask_energy' : 241.870335910861, +'nucl_elec_ref_bitmask_energy' : -578.507153962378, +'bi_elec_ref_bitmask_energy' : 94.7666846642312, + }, + 'Al+.ezfio' : { + 'HF energy' : -241.668327808148, +'ref_bitmask_energy' : -241.668327808148, +'mono_elec_ref_bitmask_energy' : -332.796040255076, +'kinetic_ref_bitmask_energy' : 241.589470954870, +'nucl_elec_ref_bitmask_energy' : -574.385511209946, +'bi_elec_ref_bitmask_energy' : 91.1277124469289, + }, + 'AlH2.ezfio' : { + 'HF energy' : -243.024871441612, +'ref_bitmask_energy' : -251.775052807891, +'mono_elec_ref_bitmask_energy' : -355.221626689666, +'kinetic_ref_bitmask_energy' : 243.014054214492, +'nucl_elec_ref_bitmask_energy' : -598.235680904158, +'bi_elec_ref_bitmask_energy' : 103.446573881775, + }, + 'AlH3.ezfio' : { + 'HF energy' : -243.631750579304, +'ref_bitmask_energy' : -257.196626040228, +'mono_elec_ref_bitmask_energy' : -365.519233111993, +'kinetic_ref_bitmask_energy' : 243.617729633637, +'nucl_elec_ref_bitmask_energy' : -609.136962745629, +'bi_elec_ref_bitmask_energy' : 108.322607071765, + }, + 'AlH.ezfio' : { + 'HF energy' : -242.453926159631, +'ref_bitmask_energy' : -246.565637496072, +'mono_elec_ref_bitmask_energy' : -345.501805122030, +'kinetic_ref_bitmask_energy' : 242.431860683702, +'nucl_elec_ref_bitmask_energy' : -587.933665805732, +'bi_elec_ref_bitmask_energy' : 98.9361676259577, + }, + 'BCl.ezfio' : { + 'HF energy' : -484.137068254411, +'ref_bitmask_energy' : -509.923954779091, +'mono_elec_ref_bitmask_energy' : -718.593161400916, +'kinetic_ref_bitmask_energy' : 484.168273591585, +'nucl_elec_ref_bitmask_energy' : -1202.76143499250, +'bi_elec_ref_bitmask_energy' : 208.669206621826, + }, + 'BeCl.ezfio' : { + 'HF energy' : -474.175006931210, +'ref_bitmask_energy' : -494.012954410123, +'mono_elec_ref_bitmask_energy' : -694.240509397527, +'kinetic_ref_bitmask_energy' : 474.228945547020, +'nucl_elec_ref_bitmask_energy' : -1168.46945494455, +'bi_elec_ref_bitmask_energy' : 200.227554987406, + }, + 'Be.ezfio' : { + 'HF energy' : -14.5723376309597, +'ref_bitmask_energy' : -14.5723376309597, +'mono_elec_ref_bitmask_energy' : -19.0619456701321, +'kinetic_ref_bitmask_energy' : 14.5723534178576, +'nucl_elec_ref_bitmask_energy' : -33.6342990879898, +'bi_elec_ref_bitmask_energy' : 4.48960803917240, + }, + 'Be+.ezfio' : { + 'HF energy' : -14.2754419384272, +'ref_bitmask_energy' : -14.2754419384272, +'mono_elec_ref_bitmask_energy' : -17.5895909366535, +'kinetic_ref_bitmask_energy' : 14.2079926649703, +'nucl_elec_ref_bitmask_energy' : -31.7975836016238, +'bi_elec_ref_bitmask_energy' : 3.31414899822633, + }, + 'BeF.ezfio' : { + 'HF energy' : -114.114546309874, +'ref_bitmask_energy' : -128.025010686654, +'mono_elec_ref_bitmask_energy' : -186.690724110204, +'kinetic_ref_bitmask_energy' : 114.133619209568, +'nucl_elec_ref_bitmask_energy' : -300.824343319772, +'bi_elec_ref_bitmask_energy' : 58.6657134235497, + }, + 'BeH2.ezfio' : { + 'HF energy' : -15.7673192492741, +'ref_bitmask_energy' : -19.1492791113042, +'mono_elec_ref_bitmask_energy' : -27.0679124271859, +'kinetic_ref_bitmask_energy' : 15.7656865885386, +'nucl_elec_ref_bitmask_energy' : -42.8335990157244, +'bi_elec_ref_bitmask_energy' : 7.91863331588170, + }, + 'BeH.ezfio' : { + 'HF energy' : -15.1494528669011, +'ref_bitmask_energy' : -16.7180826253123, +'mono_elec_ref_bitmask_energy' : -22.7633945131399, +'kinetic_ref_bitmask_energy' : 15.1391550198566, +'nucl_elec_ref_bitmask_energy' : -37.9025495329965, +'bi_elec_ref_bitmask_energy' : 6.04531188782760, + }, + 'BeO.ezfio' : { + 'HF energy' : -89.4107611006815, +'ref_bitmask_energy' : -102.162980370205, +'mono_elec_ref_bitmask_energy' : -149.180786340101, +'kinetic_ref_bitmask_energy' : 89.3277194453385, +'nucl_elec_ref_bitmask_energy' : -238.508505785440, +'bi_elec_ref_bitmask_energy' : 47.0178059698967, + }, + 'BeOH.ezfio' : { + 'HF energy' : -90.1022703626771, +'ref_bitmask_energy' : -107.515753633800, +'mono_elec_ref_bitmask_energy' : -158.207151490227, +'kinetic_ref_bitmask_energy' : 90.0851328518125, +'nucl_elec_ref_bitmask_energy' : -248.292284342039, +'bi_elec_ref_bitmask_energy' : 50.6913978564267, + }, + 'BeS.ezfio' : { + 'HF energy' : -412.126503358951, +'ref_bitmask_energy' : -431.477059830211, +'mono_elec_ref_bitmask_energy' : -608.521642681497, +'kinetic_ref_bitmask_energy' : 412.086039142616, +'nucl_elec_ref_bitmask_energy' : -1020.60768182411, +'bi_elec_ref_bitmask_energy' : 177.044582851287, + }, + 'B.ezfio' : { + 'HF energy' : -24.5265909059949, +'ref_bitmask_energy' : -24.5265909059949, +'mono_elec_ref_bitmask_energy' : -32.3671850555541, +'kinetic_ref_bitmask_energy' : 24.5265842241806, +'nucl_elec_ref_bitmask_energy' : -56.8937692797347, +'bi_elec_ref_bitmask_energy' : 7.84059414955924, + }, + 'B+.ezfio' : { + 'HF energy' : -24.2345623559170, +'ref_bitmask_energy' : -24.2345623559170, +'mono_elec_ref_bitmask_energy' : -30.3232829392094, +'kinetic_ref_bitmask_energy' : 24.1181491808340, +'nucl_elec_ref_bitmask_energy' : -54.4414321200434, +'bi_elec_ref_bitmask_energy' : 6.08872058329241, + }, + 'BH2.ezfio' : { + 'HF energy' : -25.7517507727037, +'ref_bitmask_energy' : -30.4361923748464, +'mono_elec_ref_bitmask_energy' : -42.8702439582144, +'kinetic_ref_bitmask_energy' : 25.7198547100963, +'nucl_elec_ref_bitmask_energy' : -68.5900986683106, +'bi_elec_ref_bitmask_energy' : 12.4340515833680, + }, + 'BH3.ezfio' : { + 'HF energy' : -26.3907766754352, +'ref_bitmask_energy' : -33.8080384906056, +'mono_elec_ref_bitmask_energy' : -48.9818424495040, +'kinetic_ref_bitmask_energy' : 26.3394567948585, +'nucl_elec_ref_bitmask_energy' : -75.3212992443625, +'bi_elec_ref_bitmask_energy' : 15.1738039588983, + }, + 'BH.ezfio' : { + 'HF energy' : -25.1253041866529, +'ref_bitmask_energy' : -27.2501726776583, +'mono_elec_ref_bitmask_energy' : -37.1454031364386, +'kinetic_ref_bitmask_energy' : 25.0937299938251, +'nucl_elec_ref_bitmask_energy' : -62.2391331302637, +'bi_elec_ref_bitmask_energy' : 9.89523045878027, + }, + 'BO.ezfio' : { + 'HF energy' : -99.5225916177685, +'ref_bitmask_energy' : -117.030523760035, +'mono_elec_ref_bitmask_energy' : -170.999641811493, +'kinetic_ref_bitmask_energy' : 99.4215426511367, +'nucl_elec_ref_bitmask_energy' : -270.421184462629, +'bi_elec_ref_bitmask_energy' : 53.9691180514580, + }, + 'BS.ezfio' : { + 'HF energy' : -422.167307517493, +'ref_bitmask_energy' : -448.272123402059, +'mono_elec_ref_bitmask_energy' : -634.303483210515, +'kinetic_ref_bitmask_energy' : 422.123432968741, +'nucl_elec_ref_bitmask_energy' : -1056.42691617926, +'bi_elec_ref_bitmask_energy' : 186.031359808456, + }, + 'C2.ezfio' : { + 'HF energy' : -75.3870289712316, +'ref_bitmask_energy' : -90.5545297387475, +'mono_elec_ref_bitmask_energy' : -130.681178192314, +'kinetic_ref_bitmask_energy' : 75.3065542365351, +'nucl_elec_ref_bitmask_energy' : -205.987732428849, +'bi_elec_ref_bitmask_energy' : 40.1266484535661, + }, + 'C2H2.ezfio' : { + 'HF energy' : -76.8256404731878, +'ref_bitmask_energy' : -101.542665555977, +'mono_elec_ref_bitmask_energy' : -151.549910891955, +'kinetic_ref_bitmask_energy' : 76.6574063597007, +'nucl_elec_ref_bitmask_energy' : -228.207317251656, +'bi_elec_ref_bitmask_energy' : 50.0072453359780, + }, + 'C2H2+.ezfio' : { + 'HF energy' : -76.4654656552418, +'ref_bitmask_energy' : -100.418579027323, +'mono_elec_ref_bitmask_energy' : -145.066247537232, +'kinetic_ref_bitmask_energy' : 76.2754668925334, +'nucl_elec_ref_bitmask_energy' : -221.341714429766, +'bi_elec_ref_bitmask_energy' : 44.6476685099096, + }, + 'C2H3.ezfio' : { + 'HF energy' : -77.3898147870324, +'ref_bitmask_energy' : -105.755374786231, +'mono_elec_ref_bitmask_energy' : -159.362992505946, +'kinetic_ref_bitmask_energy' : 77.2659515875106, +'nucl_elec_ref_bitmask_energy' : -236.628944093456, +'bi_elec_ref_bitmask_energy' : 53.6076177197147, + }, + 'C2H3+.ezfio' : { + 'HF energy' : -77.0932451442133, +'ref_bitmask_energy' : -105.906157528395, +'mono_elec_ref_bitmask_energy' : -155.354463404658, +'kinetic_ref_bitmask_energy' : 76.9485437304371, +'nucl_elec_ref_bitmask_energy' : -232.303007135095, +'bi_elec_ref_bitmask_energy' : 49.4483058762631, + }, + 'C2H4.ezfio' : { + 'HF energy' : -78.0399747736371, +'ref_bitmask_energy' : -111.371305590464, +'mono_elec_ref_bitmask_energy' : -169.964378691347, +'kinetic_ref_bitmask_energy' : 77.8720775539837, +'nucl_elec_ref_bitmask_energy' : -247.836456245331, +'bi_elec_ref_bitmask_energy' : 58.5930731008834, + }, + 'C2H4+.ezfio' : { + 'HF energy' : -77.7132091583792, +'ref_bitmask_energy' : -110.095728924510, +'mono_elec_ref_bitmask_energy' : -162.973433780708, +'kinetic_ref_bitmask_energy' : 77.5510289588596, +'nucl_elec_ref_bitmask_energy' : -240.524462739568, +'bi_elec_ref_bitmask_energy' : 52.8777048561978, + }, + 'C2H5.ezfio' : { + 'HF energy' : -78.5995154328110, +'ref_bitmask_energy' : -115.463374939303, +'mono_elec_ref_bitmask_energy' : -177.655455663721, +'kinetic_ref_bitmask_energy' : 78.4746790493694, +'nucl_elec_ref_bitmask_energy' : -256.130134713091, +'bi_elec_ref_bitmask_energy' : 62.1920807244179, + }, + 'C2H6.ezfio' : { + 'HF energy' : -79.2348661980883, +'ref_bitmask_energy' : -121.342117484172, +'mono_elec_ref_bitmask_energy' : -188.765268061241, +'kinetic_ref_bitmask_energy' : 79.0627561867824, +'nucl_elec_ref_bitmask_energy' : -267.828024248024, +'bi_elec_ref_bitmask_energy' : 67.4231505770700, + }, + 'C2H.ezfio' : { + 'HF energy' : -76.1373302160924, +'ref_bitmask_energy' : -96.0416632817760, +'mono_elec_ref_bitmask_energy' : -141.134172743140, +'kinetic_ref_bitmask_energy' : 75.9188287201314, +'nucl_elec_ref_bitmask_energy' : -217.053001463272, +'bi_elec_ref_bitmask_energy' : 45.0925094613642, + }, + 'CCl.ezfio' : { + 'HF energy' : -497.229520897567, +'ref_bitmask_energy' : -529.152917749944, +'mono_elec_ref_bitmask_energy' : -748.742212553520, +'kinetic_ref_bitmask_energy' : 497.303789161896, +'nucl_elec_ref_bitmask_energy' : -1246.04600171542, +'bi_elec_ref_bitmask_energy' : 219.589294803575, + }, + 'C-.ezfio' : { + 'HF energy' : -37.6786937590015, +'ref_bitmask_energy' : -37.6786937590015, +'mono_elec_ref_bitmask_energy' : -52.8740773586523, +'kinetic_ref_bitmask_energy' : 37.8534354144493, +'nucl_elec_ref_bitmask_energy' : -90.7275127731016, +'bi_elec_ref_bitmask_energy' : 15.1953835996509, + }, + 'C.ezfio' : { + 'HF energy' : -37.6824178814769, +'ref_bitmask_energy' : -37.6824178814769, +'mono_elec_ref_bitmask_energy' : -50.4470863936869, +'kinetic_ref_bitmask_energy' : 37.6824206406203, +'nucl_elec_ref_bitmask_energy' : -88.1295070343072, +'bi_elec_ref_bitmask_energy' : 12.7646685122100, + }, + 'C+.ezfio' : { + 'HF energy' : -37.2855906197634, +'ref_bitmask_energy' : -37.2855906197634, +'mono_elec_ref_bitmask_energy' : -47.5335380165360, +'kinetic_ref_bitmask_energy' : 37.1688550847303, +'nucl_elec_ref_bitmask_energy' : -84.7023931012662, +'bi_elec_ref_bitmask_energy' : 10.2479473967726, + }, + 'CF.ezfio' : { + 'HF energy' : -137.175106843536, +'ref_bitmask_energy' : -159.383524847733, +'mono_elec_ref_bitmask_energy' : -233.520567129238, +'kinetic_ref_bitmask_energy' : 137.148963843327, +'nucl_elec_ref_bitmask_energy' : -370.669530972565, +'bi_elec_ref_bitmask_energy' : 74.1370422815044, + }, + 'CH2_1A1.ezfio' : { + 'HF energy' : -38.8808045538859, +'ref_bitmask_energy' : -44.8611802934810, +'mono_elec_ref_bitmask_energy' : -63.4643904794958, +'kinetic_ref_bitmask_energy' : 38.8061659377926, +'nucl_elec_ref_bitmask_energy' : -102.270556417288, +'bi_elec_ref_bitmask_energy' : 18.6032101860148, + }, + 'CH2_3B1.ezfio' : { + 'HF energy' : -38.9215313180308, +'ref_bitmask_energy' : -45.0561778977676, +'mono_elec_ref_bitmask_energy' : -63.8596061542649, +'kinetic_ref_bitmask_energy' : 38.8783682442810, +'nucl_elec_ref_bitmask_energy' : -102.737974398546, +'bi_elec_ref_bitmask_energy' : 18.8034282564973, + }, + 'CH2-.ezfio' : { + 'HF energy' : -38.8609017023303, +'ref_bitmask_energy' : -44.6606219331717, +'mono_elec_ref_bitmask_energy' : -65.9795568083021, +'kinetic_ref_bitmask_energy' : 38.9186256328148, +'nucl_elec_ref_bitmask_energy' : -104.898182441117, +'bi_elec_ref_bitmask_energy' : 21.3189348751303, + }, + 'CH3-.ezfio' : { + 'HF energy' : -39.4837221961754, +'ref_bitmask_energy' : -48.8061850797718, +'mono_elec_ref_bitmask_energy' : -73.8410955157481, +'kinetic_ref_bitmask_energy' : 39.5037539018218, +'nucl_elec_ref_bitmask_energy' : -113.344849417570, +'bi_elec_ref_bitmask_energy' : 25.0349104359763, + }, + 'CH3.ezfio' : { + 'HF energy' : -39.5596200666848, +'ref_bitmask_energy' : -49.2030742960551, +'mono_elec_ref_bitmask_energy' : -71.5044123287613, +'kinetic_ref_bitmask_energy' : 39.4768655467729, +'nucl_elec_ref_bitmask_energy' : -110.981277875534, +'bi_elec_ref_bitmask_energy' : 22.3013380327062, + }, + 'CH4.ezfio' : { + 'HF energy' : -40.1986952071229, +'ref_bitmask_energy' : -53.5938940592662, +'mono_elec_ref_bitmask_energy' : -79.6205770799877, +'kinetic_ref_bitmask_energy' : 40.0850509860670, +'nucl_elec_ref_bitmask_energy' : -119.705628066055, +'bi_elec_ref_bitmask_energy' : 26.0266830207216, + }, + 'CH4+.ezfio' : { + 'HF energy' : -39.7661081099803, +'ref_bitmask_energy' : -52.7958834785804, +'mono_elec_ref_bitmask_energy' : -75.2007197285508, +'kinetic_ref_bitmask_energy' : 39.6606894761348, +'nucl_elec_ref_bitmask_energy' : -114.861409204686, +'bi_elec_ref_bitmask_energy' : 22.4048362499704, + }, + 'CH-.ezfio' : { + 'HF energy' : -38.2587737336609, +'ref_bitmask_energy' : -40.9522446311838, +'mono_elec_ref_bitmask_energy' : -58.9967054769553, +'kinetic_ref_bitmask_energy' : 38.3753468935393, +'nucl_elec_ref_bitmask_energy' : -97.3720523704946, +'bi_elec_ref_bitmask_energy' : 18.0444608457715, + }, + 'CH.ezfio' : { + 'HF energy' : -38.2686424702538, +'ref_bitmask_energy' : -41.0695100549398, +'mono_elec_ref_bitmask_energy' : -56.5538037619053, +'kinetic_ref_bitmask_energy' : 38.2273440165876, +'nucl_elec_ref_bitmask_energy' : -94.7811477784929, +'bi_elec_ref_bitmask_energy' : 15.4842937069655, + }, + 'Cl2-.ezfio' : { + 'HF energy' : -919.035863292653, +'ref_bitmask_energy' : -974.647581460289, +'mono_elec_ref_bitmask_energy' : -1390.85912499505, +'kinetic_ref_bitmask_energy' : 918.967819178038, +'nucl_elec_ref_bitmask_energy' : -2309.82694417309, +'bi_elec_ref_bitmask_energy' : 416.211543534760, + }, + 'Cl2.ezfio' : { + 'HF energy' : -918.960489369408, +'ref_bitmask_energy' : -993.831842038066, +'mono_elec_ref_bitmask_energy' : -1418.88237349952, +'kinetic_ref_bitmask_energy' : 919.019880811802, +'nucl_elec_ref_bitmask_energy' : -2337.90225431132, +'bi_elec_ref_bitmask_energy' : 425.050531461454, + }, + 'Cl2+.ezfio' : { + 'HF energy' : -918.542978821105, +'ref_bitmask_energy' : -997.374022615435, +'mono_elec_ref_bitmask_energy' : -1415.22356711653, +'kinetic_ref_bitmask_energy' : 918.623041762959, +'nucl_elec_ref_bitmask_energy' : -2333.84660887948, +'bi_elec_ref_bitmask_energy' : 417.849544501090, + }, + 'Cl-.ezfio' : { + 'HF energy' : -459.542220279218, +'ref_bitmask_energy' : -459.542220279218, +'mono_elec_ref_bitmask_energy' : -641.869295551447, +'kinetic_ref_bitmask_energy' : 459.577092639511, +'nucl_elec_ref_bitmask_energy' : -1101.44638819096, +'bi_elec_ref_bitmask_energy' : 182.327075272228, + }, + 'Cl.ezfio' : { + 'HF energy' : -459.467180412915, +'ref_bitmask_energy' : -459.467180412915, +'mono_elec_ref_bitmask_energy' : -634.906264026499, +'kinetic_ref_bitmask_energy' : 459.468061668386, +'nucl_elec_ref_bitmask_energy' : -1094.37432569488, +'bi_elec_ref_bitmask_energy' : 175.439083613584, + }, + 'Cl+.ezfio' : { + 'HF energy' : -459.032330597219, +'ref_bitmask_energy' : -459.032330597219, +'mono_elec_ref_bitmask_energy' : -627.240782490545, +'kinetic_ref_bitmask_energy' : 459.048121637453, +'nucl_elec_ref_bitmask_energy' : -1086.28890412800, +'bi_elec_ref_bitmask_energy' : 168.208451893327, + }, + 'ClH2+.ezfio' : { + 'HF energy' : -460.304792697795, +'ref_bitmask_energy' : -474.267606249523, +'mono_elec_ref_bitmask_energy' : -657.047930357014, +'kinetic_ref_bitmask_energy' : 460.297041781255, +'nucl_elec_ref_bitmask_energy' : -1117.34497213827, +'bi_elec_ref_bitmask_energy' : 182.780324107491, + }, + 'ClH.ezfio' : { + 'HF energy' : -460.089352603531, +'ref_bitmask_energy' : -467.065169316465, +'mono_elec_ref_bitmask_energy' : -649.756317042182, +'kinetic_ref_bitmask_energy' : 460.065166552818, +'nucl_elec_ref_bitmask_energy' : -1109.82148359500, +'bi_elec_ref_bitmask_energy' : 182.691147725716, + }, + 'ClH+.ezfio' : { + 'HF energy' : -459.660296890579, +'ref_bitmask_energy' : -466.451791102416, +'mono_elec_ref_bitmask_energy' : -641.792570328544, +'kinetic_ref_bitmask_energy' : 459.661039901807, +'nucl_elec_ref_bitmask_energy' : -1101.45361023035, +'bi_elec_ref_bitmask_energy' : 175.340779226128, + }, + 'ClS.ezfio' : { + 'HF energy' : -856.997799425004, +'ref_bitmask_energy' : -928.130100748453, +'mono_elec_ref_bitmask_energy' : -1326.07147755224, +'kinetic_ref_bitmask_energy' : 857.094255547968, +'nucl_elec_ref_bitmask_energy' : -2183.16573310021, +'bi_elec_ref_bitmask_energy' : 397.941376803786, + }, + 'ClSiH3.ezfio' : { + 'HF energy' : -750.222146909508, +'ref_bitmask_energy' : -835.707307401540, +'mono_elec_ref_bitmask_energy' : -1208.19477360683, +'kinetic_ref_bitmask_energy' : 750.236913208176, +'nucl_elec_ref_bitmask_energy' : -1958.43168681501, +'bi_elec_ref_bitmask_energy' : 372.487466205290, + }, + 'CN-.ezfio' : { + 'HF energy' : -92.2976193554473, +'ref_bitmask_energy' : -111.067524311110, +'mono_elec_ref_bitmask_energy' : -166.444136550234, +'kinetic_ref_bitmask_energy' : 92.2583390626824, +'nucl_elec_ref_bitmask_energy' : -258.702475612916, +'bi_elec_ref_bitmask_energy' : 55.3766122391237, + }, + 'CN.ezfio' : { + 'HF energy' : -92.1957075951878, +'ref_bitmask_energy' : -111.125478873614, +'mono_elec_ref_bitmask_energy' : -161.824922249642, +'kinetic_ref_bitmask_energy' : 91.9271424326034, +'nucl_elec_ref_bitmask_energy' : -253.752064682246, +'bi_elec_ref_bitmask_energy' : 50.6994433760284, + }, + 'CO2.ezfio' : { + 'HF energy' : -187.649100194032, +'ref_bitmask_energy' : -245.581607782127, +'mono_elec_ref_bitmask_energy' : -371.585525166071, +'kinetic_ref_bitmask_energy' : 187.280050090203, +'nucl_elec_ref_bitmask_energy' : -558.865575256275, +'bi_elec_ref_bitmask_energy' : 126.003917383945, + }, + 'CO.ezfio' : { + 'HF energy' : -112.748168341099, +'ref_bitmask_energy' : -135.070435633479, +'mono_elec_ref_bitmask_energy' : -197.804937696399, +'kinetic_ref_bitmask_energy' : 112.544898856730, +'nucl_elec_ref_bitmask_energy' : -310.349836553129, +'bi_elec_ref_bitmask_energy' : 62.7345020629198, + }, + 'CO+.ezfio' : { + 'HF energy' : -112.258984109491, +'ref_bitmask_energy' : -134.905656677252, +'mono_elec_ref_bitmask_energy' : -192.575479992502, +'kinetic_ref_bitmask_energy' : 111.912953774445, +'nucl_elec_ref_bitmask_energy' : -304.488433766947, +'bi_elec_ref_bitmask_energy' : 57.6698233152501, + }, + 'COS.ezfio' : { + 'HF energy' : -510.289714111917, +'ref_bitmask_energy' : -589.079830621663, +'mono_elec_ref_bitmask_energy' : -859.598680774264, +'kinetic_ref_bitmask_energy' : 510.071759368045, +'nucl_elec_ref_bitmask_energy' : -1369.67044014231, +'bi_elec_ref_bitmask_energy' : 270.518850152602, + }, + 'CP.ezfio' : { + 'HF energy' : -378.455273083565, +'ref_bitmask_energy' : -408.881359079860, +'mono_elec_ref_bitmask_energy' : -582.485374330754, +'kinetic_ref_bitmask_energy' : 378.304490583812, +'nucl_elec_ref_bitmask_energy' : -960.789864914566, +'bi_elec_ref_bitmask_energy' : 173.604015250894, + }, + 'CS2.ezfio' : { + 'HF energy' : -832.925714386155, +'ref_bitmask_energy' : -941.252684498745, +'mono_elec_ref_bitmask_energy' : -1365.17923239164, +'kinetic_ref_bitmask_energy' : 832.865988088416, +'nucl_elec_ref_bitmask_energy' : -2198.04522048006, +'bi_elec_ref_bitmask_energy' : 423.926547892897, + }, + 'CS.ezfio' : { + 'HF energy' : -435.329243846218, +'ref_bitmask_energy' : -468.154919669429, +'mono_elec_ref_bitmask_energy' : -665.109939381495, +'kinetic_ref_bitmask_energy' : 435.282025855565, +'nucl_elec_ref_bitmask_energy' : -1100.39196523706, +'bi_elec_ref_bitmask_energy' : 196.955019712066, + }, + 'CS+.ezfio' : { + 'HF energy' : -434.936153165662, +'ref_bitmask_energy' : -468.828351380352, +'mono_elec_ref_bitmask_energy' : -659.652846768874, +'kinetic_ref_bitmask_energy' : 434.773225934419, +'nucl_elec_ref_bitmask_energy' : -1094.42607270329, +'bi_elec_ref_bitmask_energy' : 190.824495388523, + }, + 'CSi.ezfio' : { + 'HF energy' : -326.603598936436, +'ref_bitmask_energy' : -352.393160851033, +'mono_elec_ref_bitmask_energy' : -502.463583543016, +'kinetic_ref_bitmask_energy' : 326.532434733058, +'nucl_elec_ref_bitmask_energy' : -828.996018276074, +'bi_elec_ref_bitmask_energy' : 150.070422691984, + }, + 'F2.ezfio' : { + 'HF energy' : -198.686434810437, +'ref_bitmask_energy' : -229.228943837799, +'mono_elec_ref_bitmask_energy' : -338.818530698756, +'kinetic_ref_bitmask_energy' : 198.558188026905, +'nucl_elec_ref_bitmask_energy' : -537.376718725662, +'bi_elec_ref_bitmask_energy' : 109.589586860957, + }, + 'FAl.ezfio' : { + 'HF energy' : -341.422997316208, +'ref_bitmask_energy' : -378.534870560229, +'mono_elec_ref_bitmask_energy' : -550.863945120470, +'kinetic_ref_bitmask_energy' : 341.403830572945, +'nucl_elec_ref_bitmask_energy' : -892.267775693416, +'bi_elec_ref_bitmask_energy' : 172.329074560241, + }, + 'FCl.ezfio' : { + 'HF energy' : -558.843438208826, +'ref_bitmask_energy' : -607.490989189419, +'mono_elec_ref_bitmask_energy' : -870.741810988359, +'kinetic_ref_bitmask_energy' : 558.804524388602, +'nucl_elec_ref_bitmask_energy' : -1429.54633537696, +'bi_elec_ref_bitmask_energy' : 263.250821798940, + }, + 'FCl+.ezfio' : { + 'HF energy' : -558.396063471503, +'ref_bitmask_energy' : -609.877031931476, +'mono_elec_ref_bitmask_energy' : -865.903856381428, +'kinetic_ref_bitmask_energy' : 558.394888932294, +'nucl_elec_ref_bitmask_energy' : -1424.29874531372, +'bi_elec_ref_bitmask_energy' : 256.026824449952, + }, + 'F-.ezfio' : { + 'HF energy' : -99.3659835664710, +'ref_bitmask_energy' : -99.3659835664710, +'mono_elec_ref_bitmask_energy' : -144.878705354982, +'kinetic_ref_bitmask_energy' : 99.6460417929872, +'nucl_elec_ref_bitmask_energy' : -244.524747147969, +'bi_elec_ref_bitmask_energy' : 45.5127217885110, + }, + 'F.ezfio' : { + 'HF energy' : -99.3718619401775, +'ref_bitmask_energy' : -99.3718619401775, +'mono_elec_ref_bitmask_energy' : -139.273943954441, +'kinetic_ref_bitmask_energy' : 99.3739812939218, +'nucl_elec_ref_bitmask_energy' : -238.647925248363, +'bi_elec_ref_bitmask_energy' : 39.9020820142640, + }, + 'F+.ezfio' : { + 'HF energy' : -98.7950288480882, +'ref_bitmask_energy' : -98.7950288480882, +'mono_elec_ref_bitmask_energy' : -133.074211994262, +'kinetic_ref_bitmask_energy' : 98.7182635808840, +'nucl_elec_ref_bitmask_energy' : -231.792475575146, +'bi_elec_ref_bitmask_energy' : 34.2791831461735, + }, + 'FH.ezfio' : { + 'HF energy' : -100.018474844113, +'ref_bitmask_energy' : -105.118705344221, +'mono_elec_ref_bitmask_energy' : -150.535302202813, +'kinetic_ref_bitmask_energy' : 99.9915104726786, +'nucl_elec_ref_bitmask_energy' : -250.526812675491, +'bi_elec_ref_bitmask_energy' : 45.4165968585921, + }, + 'FH+.ezfio' : { + 'HF energy' : -99.4976340048913, +'ref_bitmask_energy' : -104.105408038367, +'mono_elec_ref_bitmask_energy' : -143.715957199119, +'kinetic_ref_bitmask_energy' : 99.4041960266019, +'nucl_elec_ref_bitmask_energy' : -243.120153225721, +'bi_elec_ref_bitmask_energy' : 39.6105491607526, + }, + 'FMg.ezfio' : { + 'HF energy' : -299.101723574992, +'ref_bitmask_energy' : -331.720377129013, +'mono_elec_ref_bitmask_energy' : -485.127740479828, +'kinetic_ref_bitmask_energy' : 299.106884812703, +'nucl_elec_ref_bitmask_energy' : -784.234625292532, +'bi_elec_ref_bitmask_energy' : 153.407363350816, + }, + 'FNa.ezfio' : { + 'HF energy' : -261.327681549454, +'ref_bitmask_energy' : -289.023044020907, +'mono_elec_ref_bitmask_energy' : -425.252853929216, +'kinetic_ref_bitmask_energy' : 261.359341817740, +'nucl_elec_ref_bitmask_energy' : -686.612195746956, +'bi_elec_ref_bitmask_energy' : 136.229809908309, + }, + 'FP.ezfio' : { + 'HF energy' : -440.158274578381, +'ref_bitmask_energy' : -484.308132105816, +'mono_elec_ref_bitmask_energy' : -698.754326604411, +'kinetic_ref_bitmask_energy' : 440.137525802307, +'nucl_elec_ref_bitmask_energy' : -1138.89185240672, +'bi_elec_ref_bitmask_energy' : 214.446194498594, + }, + 'FS.ezfio' : { + 'HF energy' : -496.903132566909, +'ref_bitmask_energy' : -543.684103686069, +'mono_elec_ref_bitmask_energy' : -781.683038223124, +'kinetic_ref_bitmask_energy' : 496.884985059180, +'nucl_elec_ref_bitmask_energy' : -1278.56802328230, +'bi_elec_ref_bitmask_energy' : 237.998934537054, + }, + 'FSi.ezfio' : { + 'HF energy' : -388.354987347158, +'ref_bitmask_energy' : -429.358820674751, +'mono_elec_ref_bitmask_energy' : -621.877730005795, +'kinetic_ref_bitmask_energy' : 388.330735987360, +'nucl_elec_ref_bitmask_energy' : -1010.20846599316, +'bi_elec_ref_bitmask_energy' : 192.518909331045, + }, + 'FSiH3.ezfio' : { + 'HF energy' : -390.162027143757, +'ref_bitmask_energy' : -452.773468970257, +'mono_elec_ref_bitmask_energy' : -666.621879758156, +'kinetic_ref_bitmask_energy' : 390.076413009171, +'nucl_elec_ref_bitmask_energy' : -1056.69829276733, +'bi_elec_ref_bitmask_energy' : 213.848410787899, + }, + 'H2CNH.ezfio' : { + 'HF energy' : -94.0388272422280, +'ref_bitmask_energy' : -126.891461659944, +'mono_elec_ref_bitmask_energy' : -191.703350951687, +'kinetic_ref_bitmask_energy' : 93.8419714782566, +'nucl_elec_ref_bitmask_energy' : -285.545322429944, +'bi_elec_ref_bitmask_energy' : 64.8118892917432, + }, + 'H2CO.ezfio' : { + 'HF energy' : -113.875947274648, +'ref_bitmask_energy' : -145.098940780456, +'mono_elec_ref_bitmask_energy' : -217.220228436432, +'kinetic_ref_bitmask_energy' : 113.689750930118, +'nucl_elec_ref_bitmask_energy' : -330.909979366549, +'bi_elec_ref_bitmask_energy' : 72.1212876559759, + }, + 'H2CPH.ezfio' : { + 'HF energy' : -380.309989467127, +'ref_bitmask_energy' : -428.652169738759, +'mono_elec_ref_bitmask_energy' : -620.379768826744, +'kinetic_ref_bitmask_energy' : 380.163022301918, +'nucl_elec_ref_bitmask_energy' : -1000.54279112866, +'bi_elec_ref_bitmask_energy' : 191.727599087985, + }, + 'H2CS.ezfio' : { + 'HF energy' : -436.528874027338, +'ref_bitmask_energy' : -481.105659475798, +'mono_elec_ref_bitmask_energy' : -690.336764344013, +'kinetic_ref_bitmask_energy' : 436.426785712498, +'nucl_elec_ref_bitmask_energy' : -1126.76355005651, +'bi_elec_ref_bitmask_energy' : 209.231104868214, + }, + 'H2.ezfio' : { + 'HF energy' : -1.12872690317081, +'ref_bitmask_energy' : -1.84113569288540, +'mono_elec_ref_bitmask_energy' : -2.49913905475939, +'kinetic_ref_bitmask_energy' : 1.09465826405363, +'nucl_elec_ref_bitmask_energy' : -3.59379731881302, +'bi_elec_ref_bitmask_energy' : 0.658003361873990, + }, + 'H2NNH2.ezfio' : { + 'HF energy' : -111.185798307482, +'ref_bitmask_energy' : -152.610792264925, +'mono_elec_ref_bitmask_energy' : -233.028535468570, +'kinetic_ref_bitmask_energy' : 110.999462981995, +'nucl_elec_ref_bitmask_energy' : -344.027998450565, +'bi_elec_ref_bitmask_energy' : 80.4177432036452, + }, + 'H2PPH2.ezfio' : { + 'HF energy' : -683.794490825937, +'ref_bitmask_energy' : -771.453004282158, +'mono_elec_ref_bitmask_energy' : -1120.41844854519, +'kinetic_ref_bitmask_energy' : 683.664432885202, +'nucl_elec_ref_bitmask_energy' : -1804.08288143040, +'bi_elec_ref_bitmask_energy' : 348.965444263035, + }, + 'H3CCl.ezfio' : { + 'HF energy' : -499.117712329538, +'ref_bitmask_energy' : -549.984389935014, +'mono_elec_ref_bitmask_energy' : -789.257015253655, +'kinetic_ref_bitmask_energy' : 499.068849532502, +'nucl_elec_ref_bitmask_energy' : -1288.32586478616, +'bi_elec_ref_bitmask_energy' : 239.272625318642, + }, + 'H3CF.ezfio' : { + 'HF energy' : -139.044688491990, +'ref_bitmask_energy' : -176.304002865772, +'mono_elec_ref_bitmask_energy' : -266.215059540469, +'kinetic_ref_bitmask_energy' : 138.946289670590, +'nucl_elec_ref_bitmask_energy' : -405.161349211059, +'bi_elec_ref_bitmask_energy' : 89.9110566746969, + }, + 'H3CNH2.ezfio' : { + 'HF energy' : -95.2213391106899, +'ref_bitmask_energy' : -137.117726582685, +'mono_elec_ref_bitmask_energy' : -211.173120857581, +'kinetic_ref_bitmask_energy' : 95.0417690527630, +'nucl_elec_ref_bitmask_energy' : -306.214889910344, +'bi_elec_ref_bitmask_energy' : 74.0553942748957, + }, + 'H3COH.ezfio' : { + 'HF energy' : -115.048711567042, +'ref_bitmask_energy' : -155.271920224268, +'mono_elec_ref_bitmask_energy' : -236.718351942566, +'kinetic_ref_bitmask_energy' : 114.902765576546, +'nucl_elec_ref_bitmask_energy' : -351.621117519112, +'bi_elec_ref_bitmask_energy' : 81.4464317182977, + }, + 'H3CSH.ezfio' : { + 'HF energy' : -437.725401640781, +'ref_bitmask_energy' : -493.592989791269, +'mono_elec_ref_bitmask_energy' : -714.224280514918, +'kinetic_ref_bitmask_energy' : 437.620199477569, +'nucl_elec_ref_bitmask_energy' : -1151.84447999249, +'bi_elec_ref_bitmask_energy' : 220.631290723648, + }, + 'H3SiSiH3.ezfio' : { + 'HF energy' : -581.339048551895, +'ref_bitmask_energy' : -671.775008910499, +'mono_elec_ref_bitmask_energy' : -985.501277149300, +'kinetic_ref_bitmask_energy' : 581.335293895908, +'nucl_elec_ref_bitmask_energy' : -1566.83657104521, +'bi_elec_ref_bitmask_energy' : 313.726268238800, + }, + 'HBO.ezfio' : { + 'HF energy' : -100.173645145283, +'ref_bitmask_energy' : -121.772797872085, +'mono_elec_ref_bitmask_energy' : -179.828730459073, +'kinetic_ref_bitmask_energy' : 100.063661723839, +'nucl_elec_ref_bitmask_energy' : -279.892392182913, +'bi_elec_ref_bitmask_energy' : 58.0559325869889, + }, + 'HBS.ezfio' : { + 'HF energy' : -422.814983965788, +'ref_bitmask_energy' : -454.154889925665, +'mono_elec_ref_bitmask_energy' : -645.477518636573, +'kinetic_ref_bitmask_energy' : 422.717216116011, +'nucl_elec_ref_bitmask_energy' : -1068.19473475258, +'bi_elec_ref_bitmask_energy' : 191.322628710908, + }, + 'HCF.ezfio' : { + 'HF energy' : -137.764724747456, +'ref_bitmask_energy' : -164.777027412916, +'mono_elec_ref_bitmask_energy' : -243.871768551896, +'kinetic_ref_bitmask_energy' : 137.697600954286, +'nucl_elec_ref_bitmask_energy' : -381.569369506182, +'bi_elec_ref_bitmask_energy' : 79.0947411389796, + }, + 'HCN.ezfio' : { + 'HF energy' : -92.8828311342525, +'ref_bitmask_energy' : -116.721298809009, +'mono_elec_ref_bitmask_energy' : -172.434390475410, +'kinetic_ref_bitmask_energy' : 92.6430097188182, +'nucl_elec_ref_bitmask_energy' : -265.077400194228, +'bi_elec_ref_bitmask_energy' : 55.7130916664010, + }, + 'HCO.ezfio' : { + 'HF energy' : -113.252840187183, +'ref_bitmask_energy' : -139.621524666823, +'mono_elec_ref_bitmask_energy' : -206.756447142743, +'kinetic_ref_bitmask_energy' : 113.077429221197, +'nucl_elec_ref_bitmask_energy' : -319.833876363940, +'bi_elec_ref_bitmask_energy' : 67.1349224759200, + }, + 'HCP.ezfio' : { + 'HF energy' : -379.126536333137, +'ref_bitmask_energy' : -415.983978294241, +'mono_elec_ref_bitmask_energy' : -596.280897373645, +'kinetic_ref_bitmask_energy' : 378.991968260061, +'nucl_elec_ref_bitmask_energy' : -975.272865633706, +'bi_elec_ref_bitmask_energy' : 180.296919079404, + }, + 'H.ezfio' : { + 'HF energy' : -0.499278403419543, +'ref_bitmask_energy' : -0.499278403419543, +'mono_elec_ref_bitmask_energy' : -0.499278403419543, +'kinetic_ref_bitmask_energy' : 0.499289366473704, +'nucl_elec_ref_bitmask_energy' : -0.998567769893247, +'bi_elec_ref_bitmask_energy' : 0.000000000000000E+000, + }, + 'HNO.ezfio' : { + 'HF energy' : -129.797769796390, +'ref_bitmask_energy' : -160.093065573994, +'mono_elec_ref_bitmask_energy' : -237.650420584337, +'kinetic_ref_bitmask_energy' : 129.590110120792, +'nucl_elec_ref_bitmask_energy' : -367.240530705128, +'bi_elec_ref_bitmask_energy' : 77.5573550103421, + }, + 'HOCl.ezfio' : { + 'HF energy' : -534.871707009939, +'ref_bitmask_energy' : -585.022260514173, +'mono_elec_ref_bitmask_energy' : -838.821712860829, +'kinetic_ref_bitmask_energy' : 534.786054271548, +'nucl_elec_ref_bitmask_energy' : -1373.60776713238, +'bi_elec_ref_bitmask_energy' : 253.799452346657, + }, + 'HOF.ezfio' : { + 'HF energy' : -174.744411088518, +'ref_bitmask_energy' : -208.228265434483, +'mono_elec_ref_bitmask_energy' : -309.891270805092, +'kinetic_ref_bitmask_energy' : 174.609361954612, +'nucl_elec_ref_bitmask_energy' : -484.500632759703, +'bi_elec_ref_bitmask_energy' : 101.663005370608, + }, + 'HOMg.ezfio' : { + 'HF energy' : -275.076827165014, +'ref_bitmask_energy' : -309.894655429078, +'mono_elec_ref_bitmask_energy' : -453.887605486864, +'kinetic_ref_bitmask_energy' : 275.043796370448, +'nucl_elec_ref_bitmask_energy' : -728.931401857311, +'bi_elec_ref_bitmask_energy' : 143.992950057785, + }, + 'HONa.ezfio' : { + 'HF energy' : -237.297555927780, +'ref_bitmask_energy' : -267.398591270702, +'mono_elec_ref_bitmask_energy' : -394.146047653534, +'kinetic_ref_bitmask_energy' : 237.293238466157, +'nucl_elec_ref_bitmask_energy' : -631.439286119691, +'bi_elec_ref_bitmask_energy' : 126.747456382832, + }, + 'HOO.ezfio' : { + 'HF energy' : -150.181178685319, +'ref_bitmask_energy' : -182.204138681151, +'mono_elec_ref_bitmask_energy' : -270.760000596516, +'kinetic_ref_bitmask_energy' : 150.152713421021, +'nucl_elec_ref_bitmask_energy' : -420.912714017537, +'bi_elec_ref_bitmask_energy' : 88.5558619153649, + }, + 'HOOH.ezfio' : { + 'HF energy' : -150.782967807721, +'ref_bitmask_energy' : -187.458030107726, +'mono_elec_ref_bitmask_energy' : -281.110753127701, +'kinetic_ref_bitmask_energy' : 150.615649525957, +'nucl_elec_ref_bitmask_energy' : -431.726402653659, +'bi_elec_ref_bitmask_energy' : 93.6527230199755, + }, + 'HSSH.ezfio' : { + 'HF energy' : -796.223491475428, +'ref_bitmask_energy' : -879.813064455472, +'mono_elec_ref_bitmask_energy' : -1267.03140974930, +'kinetic_ref_bitmask_energy' : 796.190975307688, +'nucl_elec_ref_bitmask_energy' : -2063.22238505699, +'bi_elec_ref_bitmask_energy' : 387.218345293825, + }, + 'Li2.ezfio' : { + 'HF energy' : -14.8698296243579, +'ref_bitmask_energy' : -16.6188546853201, +'mono_elec_ref_bitmask_energy' : -23.0840652060904, +'kinetic_ref_bitmask_energy' : 14.9239782018551, +'nucl_elec_ref_bitmask_energy' : -38.0080434079455, +'bi_elec_ref_bitmask_energy' : 6.46521052077037, + }, + 'LiCl.ezfio' : { + 'HF energy' : -467.033120094465, +'ref_bitmask_energy' : -480.171100670359, +'mono_elec_ref_bitmask_energy' : -673.262860083129, +'kinetic_ref_bitmask_energy' : 467.045418906560, +'nucl_elec_ref_bitmask_energy' : -1140.30827898969, +'bi_elec_ref_bitmask_energy' : 193.091759412769, + }, + 'Li.ezfio' : { + 'HF energy' : -7.43241987967914, +'ref_bitmask_energy' : -7.43241987967914, +'mono_elec_ref_bitmask_energy' : -9.71349117453924, +'kinetic_ref_bitmask_energy' : 7.43240354572886, +'nucl_elec_ref_bitmask_energy' : -17.1458947202681, +'bi_elec_ref_bitmask_energy' : 2.28107129486010, + }, + 'Li+.ezfio' : { + 'HF energy' : -7.23611864228949, +'ref_bitmask_energy' : -7.23611864228949, +'mono_elec_ref_bitmask_energy' : -8.88677899772811, +'kinetic_ref_bitmask_energy' : 7.22756670548272, +'nucl_elec_ref_bitmask_energy' : -16.1143457032108, +'bi_elec_ref_bitmask_energy' : 1.65066035543863, + }, + 'LiF.ezfio' : { + 'HF energy' : -106.944941706563, +'ref_bitmask_energy' : -116.155143294264, +'mono_elec_ref_bitmask_energy' : -169.599979005435, +'kinetic_ref_bitmask_energy' : 106.944668677929, +'nucl_elec_ref_bitmask_energy' : -276.544647683364, +'bi_elec_ref_bitmask_energy' : 53.4448357111712, + }, + 'LiH.ezfio' : { + 'HF energy' : -7.98368517558935, +'ref_bitmask_energy' : -8.96273651508982, +'mono_elec_ref_bitmask_energy' : -12.4224235637209, +'kinetic_ref_bitmask_energy' : 7.97319387034371, +'nucl_elec_ref_bitmask_energy' : -20.3956174340646, +'bi_elec_ref_bitmask_energy' : 3.45968704863106, + }, + 'LiN.ezfio' : { + 'HF energy' : -61.8118041452728, +'ref_bitmask_energy' : -67.6984034825967, +'mono_elec_ref_bitmask_energy' : -96.5533829712869, +'kinetic_ref_bitmask_energy' : 61.7943055187667, +'nucl_elec_ref_bitmask_energy' : -158.347688490054, +'bi_elec_ref_bitmask_energy' : 28.8549794886902, + }, + 'LiO.ezfio' : { + 'HF energy' : -82.2760882388069, +'ref_bitmask_energy' : -90.2077981913425, +'mono_elec_ref_bitmask_energy' : -130.392345548258, +'kinetic_ref_bitmask_energy' : 82.3770730025094, +'nucl_elec_ref_bitmask_energy' : -212.769418550768, +'bi_elec_ref_bitmask_energy' : 40.1845473569158, + }, + 'LiOH.ezfio' : { + 'HF energy' : -82.9202717820083, +'ref_bitmask_energy' : -95.9749745679274, +'mono_elec_ref_bitmask_energy' : -141.373680829437, +'kinetic_ref_bitmask_energy' : 82.8785053717607, +'nucl_elec_ref_bitmask_energy' : -224.252186201198, +'bi_elec_ref_bitmask_energy' : 45.3987062615096, + }, + 'MgCl.ezfio' : { + 'HF energy' : -659.182345329163, +'ref_bitmask_energy' : -707.422652235946, +'mono_elec_ref_bitmask_energy' : -1011.77813450957, +'kinetic_ref_bitmask_energy' : 659.193684718510, +'nucl_elec_ref_bitmask_energy' : -1670.97181922808, +'bi_elec_ref_bitmask_energy' : 304.355482273629, + }, + 'Mg.ezfio' : { + 'HF energy' : -199.608296967690, +'ref_bitmask_energy' : -199.608296967690, +'mono_elec_ref_bitmask_energy' : -279.423523852096, +'kinetic_ref_bitmask_energy' : 199.597572229296, +'nucl_elec_ref_bitmask_energy' : -479.021096081392, +'bi_elec_ref_bitmask_energy' : 79.8152268844060, + }, + 'Mg+.ezfio' : { + 'HF energy' : -199.364821219466, +'ref_bitmask_energy' : -199.364821219466, +'mono_elec_ref_bitmask_energy' : -275.605395761524, +'kinetic_ref_bitmask_energy' : 199.275513347082, +'nucl_elec_ref_bitmask_energy' : -474.880909108607, +'bi_elec_ref_bitmask_energy' : 76.2405745420588, + }, + 'MgH.ezfio' : { + 'HF energy' : -200.147827036908, +'ref_bitmask_energy' : -203.766339196006, +'mono_elec_ref_bitmask_energy' : -287.007582854722, +'kinetic_ref_bitmask_energy' : 200.134143632848, +'nucl_elec_ref_bitmask_energy' : -487.141726487570, +'bi_elec_ref_bitmask_energy' : 83.2412436587167, + }, + 'MgS.ezfio' : { + 'HF energy' : -597.112139323859, +'ref_bitmask_energy' : -644.100083553614, +'mono_elec_ref_bitmask_energy' : -924.054922309435, +'kinetic_ref_bitmask_energy' : 597.084630132213, +'nucl_elec_ref_bitmask_energy' : -1521.13955244165, +'bi_elec_ref_bitmask_energy' : 279.954838755823, + }, + 'N2.ezfio' : { + 'HF energy' : -108.952853058366, +'ref_bitmask_energy' : -132.405896836405, +'mono_elec_ref_bitmask_energy' : -193.908136356564, +'kinetic_ref_bitmask_energy' : 108.662820456780, +'nucl_elec_ref_bitmask_energy' : -302.570956813344, +'bi_elec_ref_bitmask_energy' : 61.5022395201583, + }, + 'N2+.ezfio' : { + 'HF energy' : -108.368846336937, +'ref_bitmask_energy' : -131.582530491817, +'mono_elec_ref_bitmask_energy' : -187.035605058055, +'kinetic_ref_bitmask_energy' : 108.026746342715, +'nucl_elec_ref_bitmask_energy' : -295.062351400770, +'bi_elec_ref_bitmask_energy' : 55.4530745662383, + }, + 'Na2.ezfio' : { + 'HF energy' : -323.704232504855, +'ref_bitmask_energy' : -344.780745713874, +'mono_elec_ref_bitmask_energy' : -498.239967770295, +'kinetic_ref_bitmask_energy' : 323.759006363523, +'nucl_elec_ref_bitmask_energy' : -821.998974133817, +'bi_elec_ref_bitmask_energy' : 153.459222056420, + }, + 'NaCl.ezfio' : { + 'HF energy' : -621.433736066076, +'ref_bitmask_energy' : -663.081945478113, +'mono_elec_ref_bitmask_energy' : -948.634824075182, +'kinetic_ref_bitmask_energy' : 621.435630097765, +'nucl_elec_ref_bitmask_energy' : -1570.07045417295, +'bi_elec_ref_bitmask_energy' : 285.552878597069, + }, + 'Na.ezfio' : { + 'HF energy' : -161.853026632584, +'ref_bitmask_energy' : -161.853026632584, +'mono_elec_ref_bitmask_energy' : -227.867973909544, +'kinetic_ref_bitmask_energy' : 161.844526887366, +'nucl_elec_ref_bitmask_energy' : -389.712500796910, +'bi_elec_ref_bitmask_energy' : 66.0149472769605, + }, + 'Na+.ezfio' : { + 'HF energy' : -161.671065435205, +'ref_bitmask_energy' : -161.671065435205, +'mono_elec_ref_bitmask_energy' : -224.855519190742, +'kinetic_ref_bitmask_energy' : 161.620323948706, +'nucl_elec_ref_bitmask_energy' : -386.475843139448, +'bi_elec_ref_bitmask_energy' : 63.1844537555369, + }, + 'NaH.ezfio' : { + 'HF energy' : -162.383930713567, +'ref_bitmask_energy' : -165.473114887531, +'mono_elec_ref_bitmask_energy' : -234.825603659063, +'kinetic_ref_bitmask_energy' : 162.401840625122, +'nucl_elec_ref_bitmask_energy' : -397.227444284184, +'bi_elec_ref_bitmask_energy' : 69.3524887715318, + }, + 'N.ezfio' : { + 'HF energy' : -54.3884142370381, +'ref_bitmask_energy' : -54.3884142370381, +'mono_elec_ref_bitmask_energy' : -73.9497848234378, +'kinetic_ref_bitmask_energy' : 54.3881836929576, +'nucl_elec_ref_bitmask_energy' : -128.337968516395, +'bi_elec_ref_bitmask_energy' : 19.5613705863996, + }, + 'N+.ezfio' : { + 'HF energy' : -53.8752648608622, +'ref_bitmask_energy' : -53.8752648608622, +'mono_elec_ref_bitmask_energy' : -70.0003623739714, +'kinetic_ref_bitmask_energy' : 53.7555180765251, +'nucl_elec_ref_bitmask_energy' : -123.755880450497, +'bi_elec_ref_bitmask_energy' : 16.1250975131092, + }, + 'NF.ezfio' : { + 'HF energy' : -153.780010220593, +'ref_bitmask_energy' : -178.978907792855, +'mono_elec_ref_bitmask_energy' : -263.022581555971, +'kinetic_ref_bitmask_energy' : 153.789480924333, +'nucl_elec_ref_bitmask_energy' : -416.812062480304, +'bi_elec_ref_bitmask_energy' : 84.0436737631158, + }, + 'NH2-.ezfio' : { + 'HF energy' : -55.4805663759234, +'ref_bitmask_energy' : -62.8604522104158, +'mono_elec_ref_bitmask_energy' : -93.4913686654669, +'kinetic_ref_bitmask_energy' : 55.5911094512016, +'nucl_elec_ref_bitmask_energy' : -149.082478116668, +'bi_elec_ref_bitmask_energy' : 30.6309164550511, + }, + 'NH2.ezfio' : { + 'HF energy' : -55.5624721092015, +'ref_bitmask_energy' : -63.0540526739444, +'mono_elec_ref_bitmask_energy' : -90.0855440932809, +'kinetic_ref_bitmask_energy' : 55.4744116774327, +'nucl_elec_ref_bitmask_energy' : -145.559955770714, +'bi_elec_ref_bitmask_energy' : 27.0314914193364, + }, + 'NH3.ezfio' : { + 'HF energy' : -56.1953850086869, +'ref_bitmask_energy' : -68.0730044927631, +'mono_elec_ref_bitmask_energy' : -99.5136090357170, +'kinetic_ref_bitmask_energy' : 56.0789909816028, +'nucl_elec_ref_bitmask_energy' : -155.592600017320, +'bi_elec_ref_bitmask_energy' : 31.4406045429538, + }, + 'NH3+.ezfio' : { + 'HF energy' : -55.8800494161241, +'ref_bitmask_energy' : -67.5691658887438, +'mono_elec_ref_bitmask_energy' : -95.0354069687758, +'kinetic_ref_bitmask_energy' : 55.7153774052986, +'nucl_elec_ref_bitmask_energy' : -150.750784374074, +'bi_elec_ref_bitmask_energy' : 27.4662410800319, + }, + 'NH4+.ezfio' : { + 'HF energy' : -56.5445953532616, +'ref_bitmask_energy' : -72.8278395466144, +'mono_elec_ref_bitmask_energy' : -104.693825275491, +'kinetic_ref_bitmask_energy' : 56.3337526627845, +'nucl_elec_ref_bitmask_energy' : -161.027577938275, +'bi_elec_ref_bitmask_energy' : 31.8659857288766, + }, + 'NH-.ezfio' : { + 'HF energy' : -54.8586227957407, +'ref_bitmask_energy' : -58.3221452636954, +'mono_elec_ref_bitmask_energy' : -84.8789332034728, +'kinetic_ref_bitmask_energy' : 55.0344329055211, +'nucl_elec_ref_bitmask_energy' : -139.913366108994, +'bi_elec_ref_bitmask_energy' : 26.5567879397773, + }, + 'NH.ezfio' : { + 'HF energy' : -54.9593474294226, +'ref_bitmask_energy' : -58.4942622190831, +'mono_elec_ref_bitmask_energy' : -81.5746846511843, +'kinetic_ref_bitmask_energy' : 54.9136893485061, +'nucl_elec_ref_bitmask_energy' : -136.488373999690, +'bi_elec_ref_bitmask_energy' : 23.0804224321011, + }, + 'NO-.ezfio' : { + 'HF energy' : -129.206828948043, +'ref_bitmask_energy' : -152.376434846401, +'mono_elec_ref_bitmask_energy' : -229.178253282732, +'kinetic_ref_bitmask_energy' : 129.303012888507, +'nucl_elec_ref_bitmask_energy' : -358.481266171239, +'bi_elec_ref_bitmask_energy' : 76.8018184363309, + }, + 'NO.ezfio' : { + 'HF energy' : -129.252319523161, +'ref_bitmask_energy' : -154.827469211605, +'mono_elec_ref_bitmask_energy' : -227.378727454059, +'kinetic_ref_bitmask_energy' : 129.047374088009, +'nucl_elec_ref_bitmask_energy' : -356.426101542069, +'bi_elec_ref_bitmask_energy' : 72.5512582424542, + }, + 'NP.ezfio' : { + 'HF energy' : -395.142818893893, +'ref_bitmask_energy' : -432.316573590487, +'mono_elec_ref_bitmask_energy' : -619.416682517457, +'kinetic_ref_bitmask_energy' : 394.980586139674, +'nucl_elec_ref_bitmask_energy' : -1014.39726865713, +'bi_elec_ref_bitmask_energy' : 187.100108926969, + }, + 'NS.ezfio' : { + 'HF energy' : -451.901084537550, +'ref_bitmask_energy' : -491.026943983021, +'mono_elec_ref_bitmask_energy' : -700.847280811621, +'kinetic_ref_bitmask_energy' : 451.829877324952, +'nucl_elec_ref_bitmask_energy' : -1152.67715813657, +'bi_elec_ref_bitmask_energy' : 209.820336828600, + }, + 'NSi.ezfio' : { + 'HF energy' : -343.253657392439, +'ref_bitmask_energy' : -376.128060182931, +'mono_elec_ref_bitmask_energy' : -540.162256911595, +'kinetic_ref_bitmask_energy' : 343.144739639108, +'nucl_elec_ref_bitmask_energy' : -883.306996550703, +'bi_elec_ref_bitmask_energy' : 164.034196728665, + }, + 'O2Cl.ezfio' : { + 'HF energy' : -608.981055557933, +'ref_bitmask_energy' : -692.169888749487, +'mono_elec_ref_bitmask_energy' : -1006.14183686085, +'kinetic_ref_bitmask_energy' : 608.633835017315, +'nucl_elec_ref_bitmask_energy' : -1614.77567187816, +'bi_elec_ref_bitmask_energy' : 313.971948111359, + }, + 'O2-.ezfio' : { + 'HF energy' : -149.560363999083, +'ref_bitmask_energy' : -174.587960759355, +'mono_elec_ref_bitmask_energy' : -262.829314381807, +'kinetic_ref_bitmask_energy' : 149.625304577628, +'nucl_elec_ref_bitmask_energy' : -412.454618959435, +'bi_elec_ref_bitmask_energy' : 88.2413536224521, + }, + 'O2.ezfio' : { + 'HF energy' : -149.606668699348, +'ref_bitmask_energy' : -177.494797763907, +'mono_elec_ref_bitmask_energy' : -261.266893011940, +'kinetic_ref_bitmask_energy' : 149.454020096560, +'nucl_elec_ref_bitmask_energy' : -410.720913108501, +'bi_elec_ref_bitmask_energy' : 83.7720952480335, + }, + 'O2+.ezfio' : { + 'HF energy' : -149.166000074674, +'ref_bitmask_energy' : -179.366948831585, +'mono_elec_ref_bitmask_energy' : -257.821793177162, +'kinetic_ref_bitmask_energy' : 148.828052521324, +'nucl_elec_ref_bitmask_energy' : -406.649845698486, +'bi_elec_ref_bitmask_energy' : 78.4548443455766, + }, + 'O2S.ezfio' : { + 'HF energy' : -547.175679355894, +'ref_bitmask_energy' : -653.142023650890, +'mono_elec_ref_bitmask_energy' : -965.385511249040, +'kinetic_ref_bitmask_energy' : 546.873632931067, +'nucl_elec_ref_bitmask_energy' : -1512.25914418011, +'bi_elec_ref_bitmask_energy' : 312.243487598150, + }, + 'O2Si.ezfio' : { + 'HF energy' : -438.628732666338, +'ref_bitmask_energy' : -527.770915823540, +'mono_elec_ref_bitmask_energy' : -785.026498482001, +'kinetic_ref_bitmask_energy' : 438.487216451354, +'nucl_elec_ref_bitmask_energy' : -1223.51371493336, +'bi_elec_ref_bitmask_energy' : 257.255582658461, + }, + 'O3.ezfio' : { + 'HF energy' : -224.268273853452, +'ref_bitmask_energy' : -293.473718485201, +'mono_elec_ref_bitmask_energy' : -445.714827407257, +'kinetic_ref_bitmask_energy' : 224.055103013641, +'nucl_elec_ref_bitmask_energy' : -669.769930420897, +'bi_elec_ref_bitmask_energy' : 152.241108922056, + }, + 'OCl.ezfio' : { + 'HF energy' : -534.251976711640, +'ref_bitmask_energy' : -578.693193127597, +'mono_elec_ref_bitmask_energy' : -826.290103245535, +'kinetic_ref_bitmask_energy' : 534.372265262133, +'nucl_elec_ref_bitmask_energy' : -1360.66236850767, +'bi_elec_ref_bitmask_energy' : 247.596910117938, + }, + 'O-.ezfio' : { + 'HF energy' : -74.7182443707073, +'ref_bitmask_energy' : -74.7182443707073, +'mono_elec_ref_bitmask_energy' : -107.618880003267, +'kinetic_ref_bitmask_energy' : 74.9697394074741, +'nucl_elec_ref_bitmask_energy' : -182.588619410742, +'bi_elec_ref_bitmask_energy' : 32.9006356325601, + }, + 'O.ezfio' : { + 'HF energy' : -74.7875130746643, +'ref_bitmask_energy' : -74.7875130746643, +'mono_elec_ref_bitmask_energy' : -103.272144449139, +'kinetic_ref_bitmask_energy' : 74.7916029032156, +'nucl_elec_ref_bitmask_energy' : -178.063747352354, +'bi_elec_ref_bitmask_energy' : 28.4846313744743, + }, + 'O+.ezfio' : { + 'HF energy' : -74.3482549811714, +'ref_bitmask_energy' : -74.3482549811714, +'mono_elec_ref_bitmask_energy' : -98.3882926001535, +'kinetic_ref_bitmask_energy' : 74.2883987915373, +'nucl_elec_ref_bitmask_energy' : -172.676691391691, +'bi_elec_ref_bitmask_energy' : 24.0400376189821, + }, + 'OH2.ezfio' : { + 'HF energy' : -76.0260182336402, +'ref_bitmask_energy' : -85.1141458828001, +'mono_elec_ref_bitmask_energy' : -122.958177661321, +'kinetic_ref_bitmask_energy' : 75.9467865876156, +'nucl_elec_ref_bitmask_energy' : -198.904964248936, +'bi_elec_ref_bitmask_energy' : 37.8440317785205, + }, + 'OH2+.ezfio' : { + 'HF energy' : -75.6284072894574, +'ref_bitmask_energy' : -84.3075484679187, +'mono_elec_ref_bitmask_energy' : -117.284453889657, +'kinetic_ref_bitmask_energy' : 75.4841828378540, +'nucl_elec_ref_bitmask_energy' : -192.768636727511, +'bi_elec_ref_bitmask_energy' : 32.9769054217385, + }, + 'OH3+.ezfio' : { + 'HF energy' : -76.3105944151678, +'ref_bitmask_energy' : -90.1309775647047, +'mono_elec_ref_bitmask_energy' : -128.258501103409, +'kinetic_ref_bitmask_energy' : 76.1300023417367, +'nucl_elec_ref_bitmask_energy' : -204.388503445145, +'bi_elec_ref_bitmask_energy' : 38.1275235387040, + }, + 'OH-.ezfio' : { + 'HF energy' : -75.3303738871590, +'ref_bitmask_energy' : -79.6178136197902, +'mono_elec_ref_bitmask_energy' : -117.029518063491, +'kinetic_ref_bitmask_energy' : 75.5296920087432, +'nucl_elec_ref_bitmask_energy' : -192.559210072234, +'bi_elec_ref_bitmask_energy' : 37.4117044437012, + }, + 'OH.ezfio' : { + 'HF energy' : -75.3895110537158, +'ref_bitmask_energy' : -79.6957037014627, +'mono_elec_ref_bitmask_energy' : -112.635486632110, +'kinetic_ref_bitmask_energy' : 75.3494737654369, +'nucl_elec_ref_bitmask_energy' : -187.984960397546, +'bi_elec_ref_bitmask_energy' : 32.9397829306468, + }, + 'OH+.ezfio' : { + 'HF energy' : -74.9749728887007, +'ref_bitmask_energy' : -79.0303594123141, +'mono_elec_ref_bitmask_energy' : -107.326738405811, +'kinetic_ref_bitmask_energy' : 74.8755185639843, +'nucl_elec_ref_bitmask_energy' : -182.202256969796, +'bi_elec_ref_bitmask_energy' : 28.2963789934973, + }, + 'OMg.ezfio' : { + 'HF energy' : -274.341184211428, +'ref_bitmask_energy' : -303.470207092162, +'mono_elec_ref_bitmask_energy' : -442.271808614338, +'kinetic_ref_bitmask_energy' : 274.348741153479, +'nucl_elec_ref_bitmask_energy' : -716.620549767817, +'bi_elec_ref_bitmask_energy' : 138.801601522175, + }, + 'ONa.ezfio' : { + 'HF energy' : -236.664152848023, +'ref_bitmask_energy' : -260.894132509816, +'mono_elec_ref_bitmask_energy' : -381.578433750049, +'kinetic_ref_bitmask_energy' : 236.817431371128, +'nucl_elec_ref_bitmask_energy' : -618.395865121177, +'bi_elec_ref_bitmask_energy' : 120.684301240233, + }, + 'OP-.ezfio' : { + 'HF energy' : -415.561714335502, +'ref_bitmask_energy' : -455.854398269512, +'mono_elec_ref_bitmask_energy' : -662.537146349561, +'kinetic_ref_bitmask_energy' : 415.591583247202, +'nucl_elec_ref_bitmask_energy' : -1078.12872959676, +'bi_elec_ref_bitmask_energy' : 206.682748080049, + }, + 'OP.ezfio' : { + 'HF energy' : -415.558482788815, +'ref_bitmask_energy' : -457.929384156667, +'mono_elec_ref_bitmask_energy' : -659.132030599251, +'kinetic_ref_bitmask_energy' : 415.429176596650, +'nucl_elec_ref_bitmask_energy' : -1074.56120719590, +'bi_elec_ref_bitmask_energy' : 201.202646442584, + }, + 'OPH.ezfio' : { + 'HF energy' : -416.140263243263, +'ref_bitmask_energy' : -465.659530291045, +'mono_elec_ref_bitmask_energy' : -673.874319195956, +'kinetic_ref_bitmask_energy' : 415.983288985234, +'nucl_elec_ref_bitmask_energy' : -1089.85760818119, +'bi_elec_ref_bitmask_energy' : 208.214788904911, + }, + 'OS.ezfio' : { + 'HF energy' : -472.330778237311, +'ref_bitmask_energy' : -516.960604864444, +'mono_elec_ref_bitmask_energy' : -741.183799251108, +'kinetic_ref_bitmask_energy' : 472.219387087294, +'nucl_elec_ref_bitmask_energy' : -1213.40318633840, +'bi_elec_ref_bitmask_energy' : 224.223194386665, + }, + 'OSi.ezfio' : { + 'HF energy' : -363.789556324034, +'ref_bitmask_energy' : -402.679222917210, +'mono_elec_ref_bitmask_energy' : -582.135307223483, +'kinetic_ref_bitmask_energy' : 363.713225813361, +'nucl_elec_ref_bitmask_energy' : -945.848533036843, +'bi_elec_ref_bitmask_energy' : 179.456084306271, + }, + 'P2.ezfio' : { + 'HF energy' : -681.465211250950, +'ref_bitmask_energy' : -743.986152767963, +'mono_elec_ref_bitmask_energy' : -1067.76893871777, +'kinetic_ref_bitmask_energy' : 681.325280930017, +'nucl_elec_ref_bitmask_energy' : -1749.09421964778, +'bi_elec_ref_bitmask_energy' : 323.782785949801, + }, + 'P2+.ezfio' : { + 'HF energy' : -681.121514077413, +'ref_bitmask_energy' : -740.845069968766, +'mono_elec_ref_bitmask_energy' : -1053.32021666594, +'kinetic_ref_bitmask_energy' : 680.944588335582, +'nucl_elec_ref_bitmask_energy' : -1734.26480500152, +'bi_elec_ref_bitmask_energy' : 312.475146697173, + }, + 'PCl.ezfio' : { + 'HF energy' : -800.234358184711, +'ref_bitmask_energy' : -865.802935894343, +'mono_elec_ref_bitmask_energy' : -1237.33136456075, +'kinetic_ref_bitmask_energy' : 800.309177349015, +'nucl_elec_ref_bitmask_energy' : -2037.64054190976, +'bi_elec_ref_bitmask_energy' : 371.528428666406, + }, + 'P-.ezfio' : { + 'HF energy' : -340.664919800865, +'ref_bitmask_energy' : -340.664919800865, +'mono_elec_ref_bitmask_energy' : -476.443068924220, +'kinetic_ref_bitmask_energy' : 340.751038951999, +'nucl_elec_ref_bitmask_energy' : -817.194107876218, +'bi_elec_ref_bitmask_energy' : 135.778149123354, + }, + 'P.ezfio' : { + 'HF energy' : -340.709013931628, +'ref_bitmask_energy' : -340.709013931628, +'mono_elec_ref_bitmask_energy' : -471.522902226452, +'kinetic_ref_bitmask_energy' : 340.708441968232, +'nucl_elec_ref_bitmask_energy' : -812.231344194684, +'bi_elec_ref_bitmask_energy' : 130.813888294824, + }, + 'PH2-.ezfio' : { + 'HF energy' : -341.853251697101, +'ref_bitmask_energy' : -353.065762640531, +'mono_elec_ref_bitmask_energy' : -500.315751182310, +'kinetic_ref_bitmask_energy' : 341.859192087909, +'nucl_elec_ref_bitmask_energy' : -842.174943270220, +'bi_elec_ref_bitmask_energy' : 147.249988541779, + }, + 'PH2.ezfio' : { + 'HF energy' : -341.867449813082, +'ref_bitmask_energy' : -353.220449621873, +'mono_elec_ref_bitmask_energy' : -495.303728652761, +'kinetic_ref_bitmask_energy' : 341.793111465280, +'nucl_elec_ref_bitmask_energy' : -837.096840118042, +'bi_elec_ref_bitmask_energy' : 142.083279030889, + }, + 'PH2+.ezfio' : { + 'HF energy' : -341.529503791600, +'ref_bitmask_energy' : -352.892909663997, +'mono_elec_ref_bitmask_energy' : -489.333819769333, +'kinetic_ref_bitmask_energy' : 341.412582689431, +'nucl_elec_ref_bitmask_energy' : -830.746402458764, +'bi_elec_ref_bitmask_energy' : 136.440910105336, + }, + 'PH3.ezfio' : { + 'HF energy' : -342.470362960353, +'ref_bitmask_energy' : -359.955103854939, +'mono_elec_ref_bitmask_energy' : -508.157975197783, +'kinetic_ref_bitmask_energy' : 342.374700623617, +'nucl_elec_ref_bitmask_energy' : -850.532675821400, +'bi_elec_ref_bitmask_energy' : 148.202871342844, + }, + 'PH3+.ezfio' : { + 'HF energy' : -342.152708985272, +'ref_bitmask_energy' : -359.782936775907, +'mono_elec_ref_bitmask_energy' : -502.468762749527, +'kinetic_ref_bitmask_energy' : 342.086680511105, +'nucl_elec_ref_bitmask_energy' : -844.555443260633, +'bi_elec_ref_bitmask_energy' : 142.685825973620, + }, + 'PH4+.ezfio' : { + 'HF energy' : -342.785240589305, +'ref_bitmask_energy' : -366.855757903340, +'mono_elec_ref_bitmask_energy' : -515.845128888156, +'kinetic_ref_bitmask_energy' : 342.705079385548, +'nucl_elec_ref_bitmask_energy' : -858.550208273705, +'bi_elec_ref_bitmask_energy' : 148.989370984816, + }, + 'PH-.ezfio' : { + 'HF energy' : -341.251369361655, +'ref_bitmask_energy' : -346.694829306477, +'mono_elec_ref_bitmask_energy' : -488.037938793915, +'kinetic_ref_bitmask_energy' : 341.295884734223, +'nucl_elec_ref_bitmask_energy' : -829.333823528138, +'bi_elec_ref_bitmask_energy' : 141.343109487438, + }, + 'PH.ezfio' : { + 'HF energy' : -341.279870157921, +'ref_bitmask_energy' : -346.804025447085, +'mono_elec_ref_bitmask_energy' : -483.090829396660, +'kinetic_ref_bitmask_energy' : 341.239290060827, +'nucl_elec_ref_bitmask_energy' : -824.330119457487, +'bi_elec_ref_bitmask_energy' : 136.286803949575, + }, + 'PS.ezfio' : { + 'HF energy' : -738.252369078958, +'ref_bitmask_energy' : -804.303201073965, +'mono_elec_ref_bitmask_energy' : -1152.65595086058, +'kinetic_ref_bitmask_energy' : 738.189978720827, +'nucl_elec_ref_bitmask_energy' : -1890.84592958141, +'bi_elec_ref_bitmask_energy' : 348.352749786621, + }, + 'S2-.ezfio' : { + 'HF energy' : -795.075875020214, +'ref_bitmask_energy' : -861.158497334360, +'mono_elec_ref_bitmask_energy' : -1239.82676929132, +'kinetic_ref_bitmask_energy' : 795.098402084333, +'nucl_elec_ref_bitmask_energy' : -2034.92517137566, +'bi_elec_ref_bitmask_energy' : 378.668271956965, + }, + 'S2.ezfio' : { + 'HF energy' : -795.048666427488, +'ref_bitmask_energy' : -865.342032836786, +'mono_elec_ref_bitmask_energy' : -1238.82242789967, +'kinetic_ref_bitmask_energy' : 795.019840232126, +'nucl_elec_ref_bitmask_energy' : -2033.84226813180, +'bi_elec_ref_bitmask_energy' : 373.480395062888, + }, + 'S-.ezfio' : { + 'HF energy' : -397.503586425750, +'ref_bitmask_energy' : -397.503586425750, +'mono_elec_ref_bitmask_energy' : -555.343468884357, +'kinetic_ref_bitmask_energy' : 397.571092166841, +'nucl_elec_ref_bitmask_energy' : -952.914561051198, +'bi_elec_ref_bitmask_energy' : 157.839882458607, + }, + 'S.ezfio' : { + 'HF energy' : -397.492839610292, +'ref_bitmask_energy' : -397.492839610292, +'mono_elec_ref_bitmask_energy' : -549.424418176342, +'kinetic_ref_bitmask_energy' : 397.495441602785, +'nucl_elec_ref_bitmask_energy' : -946.919859779127, +'bi_elec_ref_bitmask_energy' : 151.931578566051, + }, + 'S+.ezfio' : { + 'HF energy' : -397.158500783483, +'ref_bitmask_energy' : -397.158500783483, +'mono_elec_ref_bitmask_energy' : -542.888677533245, +'kinetic_ref_bitmask_energy' : 397.177701090312, +'nucl_elec_ref_bitmask_energy' : -940.066378623558, +'bi_elec_ref_bitmask_energy' : 145.730176749763, + }, + 'SH2.ezfio' : { + 'HF energy' : -398.694517084319, +'ref_bitmask_energy' : -411.512379129294, +'mono_elec_ref_bitmask_energy' : -576.419294101960, +'kinetic_ref_bitmask_energy' : 398.636416228341, +'nucl_elec_ref_bitmask_energy' : -975.055710330302, +'bi_elec_ref_bitmask_energy' : 164.906914972667, + }, + 'SH2+.ezfio' : { + 'HF energy' : -398.351169874859, +'ref_bitmask_energy' : -411.032576983306, +'mono_elec_ref_bitmask_energy' : -569.458425037196, +'kinetic_ref_bitmask_energy' : 398.306861375366, +'nucl_elec_ref_bitmask_energy' : -967.765286412562, +'bi_elec_ref_bitmask_energy' : 158.425848053890, + }, + 'SH3+.ezfio' : { + 'HF energy' : -398.973194233290, +'ref_bitmask_energy' : -418.474066327225, +'mono_elec_ref_bitmask_energy' : -583.720643630061, +'kinetic_ref_bitmask_energy' : 398.915932237301, +'nucl_elec_ref_bitmask_energy' : -982.636575867361, +'bi_elec_ref_bitmask_energy' : 165.246577302836, + }, + 'SH-.ezfio' : { + 'HF energy' : -398.107622741242, +'ref_bitmask_energy' : -404.321814289132, +'mono_elec_ref_bitmask_energy' : -568.567331913203, +'kinetic_ref_bitmask_energy' : 398.142867574041, +'nucl_elec_ref_bitmask_energy' : -966.710199487244, +'bi_elec_ref_bitmask_energy' : 164.245517624070, + }, + 'SH.ezfio' : { + 'HF energy' : -398.084654326950, +'ref_bitmask_energy' : -404.332319604400, +'mono_elec_ref_bitmask_energy' : -562.586998492153, +'kinetic_ref_bitmask_energy' : 398.052209600011, +'nucl_elec_ref_bitmask_energy' : -960.639208092164, +'bi_elec_ref_bitmask_energy' : 158.254678887754, + }, + 'SH+.ezfio' : { + 'HF energy' : -397.745809473026, +'ref_bitmask_energy' : -403.920573171976, +'mono_elec_ref_bitmask_energy' : -555.839372724730, +'kinetic_ref_bitmask_energy' : 397.727314776765, +'nucl_elec_ref_bitmask_energy' : -953.566687501495, +'bi_elec_ref_bitmask_energy' : 151.918799552754, + }, + 'Si2.ezfio' : { + 'HF energy' : -577.755924972096, +'ref_bitmask_energy' : -623.115297317062, +'mono_elec_ref_bitmask_energy' : -891.917317472422, +'kinetic_ref_bitmask_energy' : 577.709560060960, +'nucl_elec_ref_bitmask_energy' : -1469.62687753338, +'bi_elec_ref_bitmask_energy' : 268.802020155361, + }, + 'SiCl.ezfio' : { + 'HF energy' : -748.421099801069, +'ref_bitmask_energy' : -808.294731967459, +'mono_elec_ref_bitmask_energy' : -1155.37531163858, +'kinetic_ref_bitmask_energy' : 748.465936664613, +'nucl_elec_ref_bitmask_energy' : -1903.84124830319, +'bi_elec_ref_bitmask_energy' : 347.080579671119, + }, + 'Si-.ezfio' : { + 'HF energy' : -288.867792903717, +'ref_bitmask_energy' : -288.867792903717, +'mono_elec_ref_bitmask_energy' : -404.689192219053, +'kinetic_ref_bitmask_energy' : 288.960146575997, +'nucl_elec_ref_bitmask_energy' : -693.649338795051, +'bi_elec_ref_bitmask_energy' : 115.821399315337, + }, + 'Si.ezfio' : { + 'HF energy' : -288.846436684304, +'ref_bitmask_energy' : -288.846436684304, +'mono_elec_ref_bitmask_energy' : -400.576789237072, +'kinetic_ref_bitmask_energy' : 288.845829285131, +'nucl_elec_ref_bitmask_energy' : -689.422618522203, +'bi_elec_ref_bitmask_energy' : 111.730352552767, + }, + 'SiH2_1A1.ezfio' : { + 'HF energy' : -290.018306277381, +'ref_bitmask_energy' : -299.940667559153, +'mono_elec_ref_bitmask_energy' : -421.527693561450, +'kinetic_ref_bitmask_energy' : 289.965147257834, +'nucl_elec_ref_bitmask_energy' : -711.492840819284, +'bi_elec_ref_bitmask_energy' : 121.587026002297, + }, + 'SiH2_3B1.ezfio' : { + 'HF energy' : -290.009702410434, +'ref_bitmask_energy' : -300.148829506092, +'mono_elec_ref_bitmask_energy' : -421.892652612763, +'kinetic_ref_bitmask_energy' : 290.000460639944, +'nucl_elec_ref_bitmask_energy' : -711.893113252707, +'bi_elec_ref_bitmask_energy' : 121.743823106671, + }, + 'SiH2-.ezfio' : { + 'HF energy' : -290.025439329492, +'ref_bitmask_energy' : -299.743326133599, +'mono_elec_ref_bitmask_energy' : -425.616540188884, +'kinetic_ref_bitmask_energy' : 290.046385275259, +'nucl_elec_ref_bitmask_energy' : -715.662925464144, +'bi_elec_ref_bitmask_energy' : 125.873214055285, + }, + 'SiH3-.ezfio' : { + 'HF energy' : -290.624267212889, +'ref_bitmask_energy' : -305.646157211709, +'mono_elec_ref_bitmask_energy' : -436.998668864518, +'kinetic_ref_bitmask_energy' : 290.617514451149, +'nucl_elec_ref_bitmask_energy' : -727.616183315667, +'bi_elec_ref_bitmask_energy' : 131.352511652808, + }, + 'SiH3.ezfio' : { + 'HF energy' : -290.623628850741, +'ref_bitmask_energy' : -306.197314225725, +'mono_elec_ref_bitmask_energy' : -433.384719709375, +'kinetic_ref_bitmask_energy' : 290.598569225447, +'nucl_elec_ref_bitmask_energy' : -723.983288934822, +'bi_elec_ref_bitmask_energy' : 127.187405483649, + }, + 'SiH4.ezfio' : { + 'HF energy' : -291.242909389258, +'ref_bitmask_energy' : -312.494465030436, +'mono_elec_ref_bitmask_energy' : -445.357569917750, +'kinetic_ref_bitmask_energy' : 291.198237079817, +'nucl_elec_ref_bitmask_energy' : -736.555806997567, +'bi_elec_ref_bitmask_energy' : 132.863104887314, + }, + 'SiH4+.ezfio' : { + 'HF energy' : -290.841802192315, +'ref_bitmask_energy' : -311.875836671533, +'mono_elec_ref_bitmask_energy' : -439.468023829906, +'kinetic_ref_bitmask_energy' : 290.877648807866, +'nucl_elec_ref_bitmask_energy' : -730.345672637773, +'bi_elec_ref_bitmask_energy' : 127.592187158373, + }, + 'SiH-.ezfio' : { + 'HF energy' : -289.439671881982, +'ref_bitmask_energy' : -294.146458086556, +'mono_elec_ref_bitmask_energy' : -414.837841621459, +'kinetic_ref_bitmask_energy' : 289.495114000412, +'nucl_elec_ref_bitmask_energy' : -704.332955621871, +'bi_elec_ref_bitmask_energy' : 120.691383534903, + }, + 'SiH.ezfio' : { + 'HF energy' : -289.425030633777, +'ref_bitmask_energy' : -294.238233262415, +'mono_elec_ref_bitmask_energy' : -410.739039199952, +'kinetic_ref_bitmask_energy' : 289.393788608990, +'nucl_elec_ref_bitmask_energy' : -700.132827808942, +'bi_elec_ref_bitmask_energy' : 116.500805937537, + }, + 'SiS.ezfio' : { + 'HF energy' : -686.480427822221, +'ref_bitmask_energy' : -747.215020114069, +'mono_elec_ref_bitmask_energy' : -1071.78945524327, +'kinetic_ref_bitmask_energy' : 686.435354337622, +'nucl_elec_ref_bitmask_energy' : -1758.22480958089, +'bi_elec_ref_bitmask_energy' : 324.574435129197, + }, +} From c03132b4f94c69949e2f4e809008102c3a179b42 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 24 Apr 2014 12:31:15 +0200 Subject: [PATCH 2/9] Minor changes in Hartree-Fock --- src/BiInts/ao_bi_integrals.irp.f | 1 + src/Hartree_Fock/Fock_matrix_mo.irp.f | 3 +- src/Hartree_Fock/HF_density_matrix_ao.irp.f | 87 +++++++++++++++++++++ src/Hartree_Fock/hartree_fock.ezfio_config | 2 + src/Hartree_Fock/options.irp.f | 39 ++++++++- src/Makefile.common | 2 +- src/MonoInts/ao_mono_ints.irp.f | 14 ++++ src/MonoInts/mo_mono_ints.irp.f | 4 +- 8 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 src/Hartree_Fock/HF_density_matrix_ao.irp.f diff --git a/src/BiInts/ao_bi_integrals.irp.f b/src/BiInts/ao_bi_integrals.irp.f index 904122d6..fbd6fb98 100644 --- a/src/BiInts/ao_bi_integrals.irp.f +++ b/src/BiInts/ao_bi_integrals.irp.f @@ -194,6 +194,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ] use map_module BEGIN_DOC ! Map of Atomic integrals + ! i(r1) j(r2) 1/r12 k(r1) l(r2) END_DOC integer :: i,j,k,l diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f index 38b19362..d9e05510 100644 --- a/src/Hartree_Fock/Fock_matrix_mo.irp.f +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -1,4 +1,4 @@ - BEGIN_PROVIDER [ double precision, Fock_matrix_mo, (mo_tot_num,mo_tot_num) ] + BEGIN_PROVIDER [ double precision, Fock_matrix_mo, (mo_tot_num_align,mo_tot_num) ] &BEGIN_PROVIDER [ double precision, Fock_matrix_diag_mo, (mo_tot_num)] implicit none BEGIN_DOC @@ -17,7 +17,6 @@ ! END_DOC integer :: i,j,n - double precision :: get_mo_bielec_integral if (elec_alpha_num == elec_beta_num) then Fock_matrix_mo = Fock_matrix_alpha_mo else diff --git a/src/Hartree_Fock/HF_density_matrix_ao.irp.f b/src/Hartree_Fock/HF_density_matrix_ao.irp.f new file mode 100644 index 00000000..b0d58344 --- /dev/null +++ b/src/Hartree_Fock/HF_density_matrix_ao.irp.f @@ -0,0 +1,87 @@ + BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_alpha, (ao_num_align,ao_num) ] +&BEGIN_PROVIDER [ double precision, HF_density_matrix_ao_beta, (ao_num_align,ao_num) ] + implicit none + BEGIN_DOC + ! Alpha and Beta density matrix in the AO basis + END_DOC + integer :: i,j,k,l1,l2 + integer, allocatable :: mo_occ(:,:) + + allocate ( mo_occ(elec_alpha_num,2) ) + call bitstring_to_list( HF_bitmask(1,1), mo_occ(1,1), j, N_int) + ASSERT ( j==elec_alpha_num ) + + call bitstring_to_list( HF_bitmask(1,2), mo_occ(1,2), j, N_int) + ASSERT ( j==elec_beta_num ) + + do j=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,ao_num_align + HF_density_matrix_ao_alpha(i,j) = 0.d0 + HF_density_matrix_ao_beta (i,j) = 0.d0 + enddo + do k=1,elec_beta_num + l1 = mo_occ(k,1) + l2 = mo_occ(k,2) + !DIR$ VECTOR ALIGNED + do i=1,ao_num + HF_density_matrix_ao_alpha(i,j) = HF_density_matrix_ao_alpha(i,j) +& + mo_coef(i,l1) * mo_coef(j,l1) + HF_density_matrix_ao_beta (i,j) = HF_density_matrix_ao_beta (i,j) +& + mo_coef(i,l2) * mo_coef(j,l2) + enddo + enddo + do k=elec_beta_num+1,elec_alpha_num + l1 = mo_occ(k,1) + !DIR$ VECTOR ALIGNED + do i=1,ao_num + HF_density_matrix_ao_alpha(i,j) = HF_density_matrix_ao_alpha(i,j) +& + mo_coef(i,l1) * mo_coef(j,l1) + enddo + enddo + enddo + deallocate(mo_occ) +END_PROVIDER + +BEGIN_PROVIDER [ double precision, HF_density_matrix_ao, (ao_num_align,ao_num) ] + implicit none + BEGIN_DOC + ! Density matrix in the AO basis + END_DOC + integer :: i,j,k,l1,l2 + integer, allocatable :: mo_occ(:,:) + + allocate ( mo_occ(elec_alpha_num,2) ) + call bitstring_to_list( HF_bitmask(1,1), mo_occ(1,1), j, N_int) + ASSERT ( j==elec_alpha_num ) + + call bitstring_to_list( HF_bitmask(1,2), mo_occ(1,2), j, N_int) + ASSERT ( j==elec_beta_num ) + + do j=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,ao_num_align + HF_density_matrix_ao(i,j) = 0.d0 + enddo + do k=1,elec_beta_num + l1 = mo_occ(k,1) + l2 = mo_occ(k,2) + !DIR$ VECTOR ALIGNED + do i=1,ao_num + HF_density_matrix_ao(i,j) = HF_density_matrix_ao(i,j) + & + mo_coef(i,l1) * mo_coef(j,l1) + & + mo_coef(i,l2) * mo_coef(j,l2) + enddo + enddo + do k=elec_beta_num+1,elec_alpha_num + l1 = mo_occ(k,1) + !DIR$ VECTOR ALIGNED + do i=1,ao_num + HF_density_matrix_ao(i,j) = HF_density_matrix_ao(i,j) + & + mo_coef(i,l1) * mo_coef(j,l1) + enddo + enddo + enddo + deallocate(mo_occ) +END_PROVIDER + diff --git a/src/Hartree_Fock/hartree_fock.ezfio_config b/src/Hartree_Fock/hartree_fock.ezfio_config index bbb383f9..134486f4 100644 --- a/src/Hartree_Fock/hartree_fock.ezfio_config +++ b/src/Hartree_Fock/hartree_fock.ezfio_config @@ -1,4 +1,6 @@ hartree_fock thresh_scf double precision n_it_scf_max integer + direct logical + diis logical diff --git a/src/Hartree_Fock/options.irp.f b/src/Hartree_Fock/options.irp.f index b3770418..303ce89d 100644 --- a/src/Hartree_Fock/options.irp.f +++ b/src/Hartree_Fock/options.irp.f @@ -16,7 +16,7 @@ BEGIN_PROVIDER [ double precision,thresh_SCF ] END_PROVIDER -BEGIN_PROVIDER [ integer ,n_it_scf_max] +BEGIN_PROVIDER [ integer, n_it_scf_max] implicit none BEGIN_DOC ! Maximum number of SCF iterations @@ -34,3 +34,40 @@ BEGIN_PROVIDER [ integer ,n_it_scf_max] END_PROVIDER + +BEGIN_PROVIDER [ logical, do_direct_SCF ] + implicit none + BEGIN_DOC +! If True, compute integrals on the fly + END_DOC + + logical :: has + PROVIDE ezfio_filename + call ezfio_has_Hartree_Fock_direct(has) + if (has) then + call ezfio_get_Hartree_Fock_direct(do_direct_SCF) + else + do_direct_SCF = .False. + call ezfio_set_Hartree_Fock_direct(do_direct_SCF) + endif + +END_PROVIDER + +BEGIN_PROVIDER [ logical, do_DIIS ] + implicit none + BEGIN_DOC +! If True, compute integrals on the fly + END_DOC + + logical :: has + PROVIDE ezfio_filename + call ezfio_has_Hartree_Fock_DIIS(has) + if (has) then + call ezfio_get_Hartree_Fock_DIIS(do_DIIS) + else + do_DIIS = .False. + call ezfio_set_Hartree_Fock_DIIS(do_DIIS) + endif + +END_PROVIDER + diff --git a/src/Makefile.common b/src/Makefile.common index 4c2b2b2b..2dad85e2 100644 --- a/src/Makefile.common +++ b/src/Makefile.common @@ -113,7 +113,7 @@ clean_links: endif LIB+=$(EZFIO) $(MKL) -IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) +IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS) irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile $(EZFIO) NEEDED_MODULES $(IRPF90) diff --git a/src/MonoInts/ao_mono_ints.irp.f b/src/MonoInts/ao_mono_ints.irp.f index f77924d3..9a135dda 100644 --- a/src/MonoInts/ao_mono_ints.irp.f +++ b/src/MonoInts/ao_mono_ints.irp.f @@ -119,3 +119,17 @@ BEGIN_PROVIDER [ double precision, ao_overlap_abs,(ao_num_align,ao_num) ] !$OMP END PARALLEL DO END_PROVIDER +BEGIN_PROVIDER [ double precision, ao_mono_elec_integral,(ao_num_align,ao_num)] + implicit none + integer :: i,j,n,l + BEGIN_DOC + ! array of the mono electronic hamiltonian on the AOs basis + ! : sum of the kinetic and nuclear electronic potential + END_DOC + do j = 1, ao_num + do i = 1, ao_num + ao_mono_elec_integral(i,j) = ao_nucl_elec_integral(i,j) + ao_kinetic_integral(i,j) + enddo + enddo +END_PROVIDER + diff --git a/src/MonoInts/mo_mono_ints.irp.f b/src/MonoInts/mo_mono_ints.irp.f index 956c6454..e466c9cc 100644 --- a/src/MonoInts/mo_mono_ints.irp.f +++ b/src/MonoInts/mo_mono_ints.irp.f @@ -39,8 +39,8 @@ BEGIN_PROVIDER [ double precision, mo_mono_elec_integral,(mo_tot_num_align,mo_to ! array of the mono electronic hamiltonian on the MOs basis ! : sum of the kinetic and nuclear electronic potential END_DOC - do i = 1, mo_tot_num - do j = 1, mo_tot_num + do j = 1, mo_tot_num + do i = 1, mo_tot_num mo_mono_elec_integral(i,j) = mo_nucl_elec_integral(i,j) + mo_kinetic_integral(i,j) enddo enddo From b9cfe96b179ea94f4578c39dd5b62e4b22f57e34 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 25 Apr 2014 10:25:05 +0200 Subject: [PATCH 3/9] Bug in diag_fock --- src/Hartree_Fock/diagonalize_fock.irp.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hartree_Fock/diagonalize_fock.irp.f b/src/Hartree_Fock/diagonalize_fock.irp.f index 1efd8376..00f3275b 100644 --- a/src/Hartree_Fock/diagonalize_fock.irp.f +++ b/src/Hartree_Fock/diagonalize_fock.irp.f @@ -4,11 +4,11 @@ subroutine diagonalize_fock() double precision, allocatable :: mo_coef_new(:,:), R(:,:),eigvalues(:) !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: mo_coef_new, R - allocate(R(mo_tot_num,mo_tot_num)) + allocate(R(size(Fock_matrix_mo,1),mo_tot_num)) allocate(mo_coef_new(ao_num_align,mo_tot_num),eigvalues(mo_tot_num)) mo_coef_new = mo_coef - call lapack_diag(eigvalues,R,Fock_matrix_mo,mo_tot_num,mo_tot_num) + call lapack_diag(eigvalues,R,Fock_matrix_mo,size(Fock_matrix_mo,1),mo_tot_num) call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num,1.d0,mo_coef_new,size(mo_coef_new,1),R,size(R,1),0.d0,mo_coef,size(mo_coef,1)) deallocate(mo_coef_new,R,eigvalues) From 7db8b1eab0e4ef5041a14c00157f181f23ad04d8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 25 Apr 2014 22:18:26 +0200 Subject: [PATCH 4/9] Hartree-Fock without MO bielec map --- src/BiInts/mo_bi_integrals.irp.f | 156 ++++++++++++++--------- src/Hartree_Fock/Fock_matrix_mo.irp.f | 131 ++++++++++++++----- src/Hartree_Fock/mo_SCF_iterations.irp.f | 2 +- 3 files changed, 195 insertions(+), 94 deletions(-) diff --git a/src/BiInts/mo_bi_integrals.irp.f b/src/BiInts/mo_bi_integrals.irp.f index a0c77fe1..349886c3 100644 --- a/src/BiInts/mo_bi_integrals.irp.f +++ b/src/BiInts/mo_bi_integrals.irp.f @@ -72,7 +72,6 @@ subroutine add_integrals_to_map(mask_ijkl) PROVIDE N_int ao_bielec_integrals_in_map ao_integrals_map mo_coef mo_coef_transp - !Get list of MOs for i,j,k and l !------------------------------- @@ -82,9 +81,6 @@ subroutine add_integrals_to_map(mask_ijkl) call bitstring_to_list( mask_ijkl(1,3), list_ijkl(1,3), n_k, N_int ) call bitstring_to_list( mask_ijkl(1,4), list_ijkl(1,4), n_l, N_int ) - - - l1_global = 0 size_buffer = min(ao_num*ao_num*ao_num,16000000) write(output_BiInts,*) 'Providing the molecular integrals ' @@ -294,63 +290,101 @@ subroutine add_integrals_to_map(mask_ijkl) end -BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj, (mo_tot_num_align,mo_tot_num)] - implicit none - BEGIN_DOC - ! Bi-electronic integrals - END_DOC - integer :: i,j - double precision :: get_mo_bielec_integral - PROVIDE mo_bielec_integrals_in_map - do j= 1, mo_tot_num - !DIR$ VECTOR ALIGNED - do i= 1, mo_tot_num - mo_bielec_integral_jj(i,j) = get_mo_bielec_integral(i,j,i,j,mo_integrals_map) - enddo - ! Padding - do i= mo_tot_num+1, mo_tot_num_align - mo_bielec_integral_jj(i,j) = 0.d0 - enddo - enddo - -END_PROVIDER -BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_exchange, (mo_tot_num_align,mo_tot_num)] - implicit none - BEGIN_DOC - ! Bi-electronic integrals - - END_DOC - integer :: i,j - double precision :: get_mo_bielec_integral - PROVIDE mo_bielec_integrals_in_map - - do j = 1, mo_tot_num - !DIR$ VECTOR ALIGNED - do i = 1,mo_tot_num - mo_bielec_integral_jj_exchange(i,j) = get_mo_bielec_integral(i,j,j,i,mo_integrals_map) - enddo - ! Padding - do i= mo_tot_num+1, mo_tot_num_align - mo_bielec_integral_jj_exchange(i,j) = 0.d0 - enddo - enddo - -END_PROVIDER -BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_anti, (mo_tot_num_align,mo_tot_num)] - implicit none - BEGIN_DOC - ! Bi-electronic integrals - - END_DOC - integer :: i,j - PROVIDE mo_bielec_integrals_in_map - - do j = 1, mo_tot_num - !DIR$ VECTOR ALIGNED - do i = 1,mo_tot_num_align - mo_bielec_integral_jj_anti(i,j) = mo_bielec_integral_jj(i,j) - mo_bielec_integral_jj_exchange(i,j) - enddo - enddo - -END_PROVIDER + BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj, (mo_tot_num_align,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_exchange, (mo_tot_num_align,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_anti, (mo_tot_num_align,mo_tot_num) ] + implicit none + BEGIN_DOC + ! Transform Bi-electronic integrals and + END_DOC + + integer :: i,j,p,q,r,s + double precision :: integral, c + integer :: n, pp + double precision, allocatable :: int_value(:) + integer, allocatable :: int_idx(:) + + double precision, allocatable :: iqrs(:,:), iqsr(:,:), iqis(:), iqri(:) + + PROVIDE ao_bielec_integrals_in_map + + mo_bielec_integral_jj = 0.d0 + mo_bielec_integral_jj_exchange = 0.d0 + + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: iqrs, iqsr + + + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP PRIVATE (i,j,p,q,r,s,integral,c,n,pp,int_value,int_idx, & + !$OMP iqrs, iqsr,iqri,iqis) & + !$OMP SHARED(mo_tot_num,mo_coef_transp,mo_tot_num_align,ao_num) & + !$OMP REDUCTION(+:mo_bielec_integral_jj,mo_bielec_integral_jj_exchange) + + allocate( int_value(ao_num), int_idx(ao_num), & + iqrs(mo_tot_num_align,ao_num), iqis(mo_tot_num), iqri(mo_tot_num), & + iqsr(mo_tot_num_align,ao_num) ) + + !$OMP DO + do q=1,ao_num + do s=1,ao_num + + do j=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqrs(i,j) = 0.d0 + iqsr(i,j) = 0.d0 + enddo + enddo + + do r=1,ao_num + call get_ao_bielec_integrals_non_zero(q,r,s,ao_num,int_value,int_idx,n) + do pp=1,n + p = int_idx(pp) + integral = int_value(pp) + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqrs(i,r) += mo_coef_transp(i,p) * integral + enddo + enddo + call get_ao_bielec_integrals_non_zero(q,s,r,ao_num,int_value,int_idx,n) + do pp=1,n + p = int_idx(pp) + integral = int_value(pp) + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqsr(i,r) += mo_coef_transp(i,p) * integral + enddo + enddo + enddo + iqis = 0.d0 + iqri = 0.d0 + do r=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqis(i) += mo_coef_transp(i,r) * iqrs(i,r) + iqri(i) += mo_coef_transp(i,r) * iqsr(i,r) + enddo + enddo + do i=1,mo_tot_num + !DIR$ VECTOR ALIGNED + do j=1,mo_tot_num + c = mo_coef_transp(j,q)*mo_coef_transp(j,s) + mo_bielec_integral_jj(j,i) += c * iqis(i) + mo_bielec_integral_jj_exchange(j,i) += c * iqri(i) + enddo + enddo + + enddo + enddo + !$OMP END DO NOWAIT + deallocate(iqrs,iqsr,int_value,int_idx) + !$OMP END PARALLEL + + mo_bielec_integral_jj_anti = mo_bielec_integral_jj - mo_bielec_integral_jj_exchange + + +END_PROVIDER + diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f index d9e05510..aafe842f 100644 --- a/src/Hartree_Fock/Fock_matrix_mo.irp.f +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -79,48 +79,115 @@ END_PROVIDER -BEGIN_PROVIDER [ double precision, Fock_matrix_alpha_mo, (mo_tot_num,mo_tot_num) ] + + BEGIN_PROVIDER [ double precision, Fock_matrix_alpha_ao, (ao_num_align, ao_num) ] +&BEGIN_PROVIDER [ double precision, Fock_matrix_beta_ao, (ao_num_align, ao_num) ] + implicit none + BEGIN_DOC + ! Alpha Fock matrix in AO basis set + END_DOC + + integer :: i,j,k,l,k1,kmax + double precision, allocatable :: ao_ints_val(:) + integer, allocatable :: ao_ints_idx(:) + double precision :: integral + double precision :: ao_bielec_integral + !DIR$ ATTRIBUTES ALIGN : 32 :: ao_ints_idx, ao_ints_val + if (do_direct_SCF) then + do j=1,ao_num + do i=1,ao_num + Fock_matrix_alpha_ao(i,j) = ao_mono_elec_integral(i,j) + Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) + do l=1,ao_num + do k=1,ao_num + if ((abs(HF_density_matrix_ao_alpha(k,l)) > 1.d-9).or. & + (abs(HF_density_matrix_ao_beta (k,l)) > 1.d-9)) then + integral = 2.d0*ao_bielec_integral(k,l,i,j)-ao_bielec_integral(k,j,i,l) + Fock_matrix_alpha_ao(i,j) =Fock_matrix_alpha_ao(i,j) +( HF_density_matrix_ao_alpha(k,l) * integral) + Fock_matrix_beta_ao (i,j) =Fock_matrix_beta_ao (i,j) +( HF_density_matrix_ao_beta (k,l) * integral) + endif + enddo + enddo + enddo + enddo + else + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP PRIVATE(i,j,l,k1,k,integral,ao_ints_val,ao_ints_idx,kmax) & + !$OMP SHARED(ao_num,Fock_matrix_alpha_ao,ao_mono_elec_integral,& + !$OMP ao_num_align,Fock_matrix_beta_ao,HF_density_matrix_ao_alpha, & + !$OMP HF_density_matrix_ao_beta) + allocate(ao_ints_idx(ao_num_align),ao_ints_val(ao_num_align)) + !$OMP DO + do j=1,ao_num + do i=1,ao_num + Fock_matrix_alpha_ao(i,j) = ao_mono_elec_integral(i,j) + Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) + do l=1,ao_num + call get_ao_bielec_integrals_non_zero(i,l,j,ao_num,ao_ints_val,ao_ints_idx,kmax) + do k1=1,kmax + k = ao_ints_idx(k1) + integral = ao_ints_val(k1)+ao_ints_val(k1) + Fock_matrix_alpha_ao(i,j) += HF_density_matrix_ao_alpha(k,l) * integral + Fock_matrix_beta_ao (i,j) += HF_density_matrix_ao_beta (k,l) * integral + enddo + call get_ao_bielec_integrals_non_zero(i,j,l,ao_num,ao_ints_val,ao_ints_idx,kmax) + do k1=1,kmax + k = ao_ints_idx(k1) + integral = -ao_ints_val(k1) + Fock_matrix_alpha_ao(i,j) += HF_density_matrix_ao_alpha(k,l) * integral + Fock_matrix_beta_ao (i,j) += HF_density_matrix_ao_beta (k,l) * integral + enddo + enddo + enddo + enddo + !$OMP END DO + deallocate(ao_ints_val,ao_ints_idx) + !$OMP END PARALLEL + endif + +END_PROVIDER + + + + + + +BEGIN_PROVIDER [ double precision, Fock_matrix_alpha_mo, (mo_tot_num_align,mo_tot_num) ] implicit none BEGIN_DOC ! Fock matrix on the MO basis END_DOC - integer :: i,j,n - double precision :: get_mo_bielec_integral - do j=1,mo_tot_num - do i=1,mo_tot_num - Fock_matrix_alpha_mo(i,j) = mo_mono_elec_integral(i,j) - do n=1,elec_beta_num - Fock_matrix_alpha_mo(i,j) += 2.d0*get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& - get_mo_bielec_integral(i,n,n,j,mo_integrals_map) - enddo - do n=elec_beta_num+1,elec_alpha_num - Fock_matrix_alpha_mo(i,j) += get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& - get_mo_bielec_integral(i,n,n,j,mo_integrals_map) - enddo - enddo - enddo + double precision, allocatable :: T(:,:) + allocate ( T(ao_num_align,mo_tot_num) ) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T + call dgemm('N','N', ao_num, mo_tot_num, ao_num, & + 1.d0, Fock_matrix_alpha_ao,size(Fock_matrix_alpha_ao,1), & + mo_coef, size(mo_coef,1), & + 0.d0, T, ao_num_align) + call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, & + 1.d0, mo_coef,size(mo_coef,1), & + T, size(T,1), & + 0.d0, Fock_matrix_alpha_mo, mo_tot_num_align) + deallocate(T) END_PROVIDER -BEGIN_PROVIDER [ double precision, Fock_matrix_beta_mo, (mo_tot_num,mo_tot_num) ] +BEGIN_PROVIDER [ double precision, Fock_matrix_beta_mo, (mo_tot_num_align,mo_tot_num) ] implicit none BEGIN_DOC ! Fock matrix on the MO basis END_DOC - integer :: i,j,n - double precision :: get_mo_bielec_integral - do j=1,mo_tot_num - do i=1,mo_tot_num - Fock_matrix_beta_mo(i,j) = mo_mono_elec_integral(i,j) - do n=1,elec_beta_num - Fock_matrix_beta_mo(i,j) += 2.d0*get_mo_bielec_integral(i,n,j,n,mo_integrals_map) -& - get_mo_bielec_integral(i,n,n,j,mo_integrals_map) - enddo - do n=elec_beta_num+1,elec_alpha_num - Fock_matrix_beta_mo(i,j) += get_mo_bielec_integral(i,n,j,n,mo_integrals_map) - enddo - enddo - enddo + double precision, allocatable :: T(:,:) + allocate ( T(ao_num_align,mo_tot_num) ) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: T + call dgemm('N','N', ao_num, mo_tot_num, ao_num, & + 1.d0, Fock_matrix_beta_ao,size(Fock_matrix_beta_ao,1), & + mo_coef, size(mo_coef,1), & + 0.d0, T, ao_num_align) + call dgemm('T','N', mo_tot_num, mo_tot_num, ao_num, & + 1.d0, mo_coef,size(mo_coef,1), & + T, size(T,1), & + 0.d0, Fock_matrix_beta_mo, mo_tot_num_align) + deallocate(T) END_PROVIDER - diff --git a/src/Hartree_Fock/mo_SCF_iterations.irp.f b/src/Hartree_Fock/mo_SCF_iterations.irp.f index 74df3164..c8f3d113 100644 --- a/src/Hartree_Fock/mo_SCF_iterations.irp.f +++ b/src/Hartree_Fock/mo_SCF_iterations.irp.f @@ -28,6 +28,6 @@ program scf_iteration endif mo_label = "Canonical" TOUCH mo_label mo_coef - call save_mos +! call save_mos end From 13d4bf8b0ed935558c0b7b747ff3e06c1906f2ca Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 25 Apr 2014 22:43:34 +0200 Subject: [PATCH 5/9] Accelerated Hartree-Fock --- src/Hartree_Fock/Fock_matrix_mo.irp.f | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f index aafe842f..b27d9799 100644 --- a/src/Hartree_Fock/Fock_matrix_mo.irp.f +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -118,10 +118,12 @@ END_PROVIDER !$OMP HF_density_matrix_ao_beta) allocate(ao_ints_idx(ao_num_align),ao_ints_val(ao_num_align)) !$OMP DO - do j=1,ao_num - do i=1,ao_num + do i=1,ao_num + do j=1,ao_num Fock_matrix_alpha_ao(i,j) = ao_mono_elec_integral(i,j) Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) + enddo + do j=1,ao_num do l=1,ao_num call get_ao_bielec_integrals_non_zero(i,l,j,ao_num,ao_ints_val,ao_ints_idx,kmax) do k1=1,kmax @@ -129,13 +131,9 @@ END_PROVIDER integral = ao_ints_val(k1)+ao_ints_val(k1) Fock_matrix_alpha_ao(i,j) += HF_density_matrix_ao_alpha(k,l) * integral Fock_matrix_beta_ao (i,j) += HF_density_matrix_ao_beta (k,l) * integral - enddo - call get_ao_bielec_integrals_non_zero(i,j,l,ao_num,ao_ints_val,ao_ints_idx,kmax) - do k1=1,kmax - k = ao_ints_idx(k1) integral = -ao_ints_val(k1) - Fock_matrix_alpha_ao(i,j) += HF_density_matrix_ao_alpha(k,l) * integral - Fock_matrix_beta_ao (i,j) += HF_density_matrix_ao_beta (k,l) * integral + Fock_matrix_alpha_ao(i,l) += HF_density_matrix_ao_alpha(k,j) * integral + Fock_matrix_beta_ao (i,l) += HF_density_matrix_ao_beta (k,j) * integral enddo enddo enddo From 6a9ebb343ba40cfafd998a05c298ef992959047d Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 25 Apr 2014 23:55:54 +0200 Subject: [PATCH 6/9] Corrected bug in ROHF --- src/BiInts/ao_bi_integrals.irp.f | 11 +- src/BiInts/bi_integrals.ezfio_config | 1 + src/BiInts/mo_bi_integrals.irp.f | 215 ++++++++++++--------- src/BiInts/options.irp.f | 18 ++ src/Hartree_Fock/Fock_matrix_mo.irp.f | 52 +++-- src/Hartree_Fock/README.rst | 5 - src/Hartree_Fock/hartree_fock.ezfio_config | 1 - src/Hartree_Fock/options.irp.f | 18 -- 8 files changed, 183 insertions(+), 138 deletions(-) diff --git a/src/BiInts/ao_bi_integrals.irp.f b/src/BiInts/ao_bi_integrals.irp.f index fbd6fb98..c9beb9c3 100644 --- a/src/BiInts/ao_bi_integrals.irp.f +++ b/src/BiInts/ao_bi_integrals.irp.f @@ -160,20 +160,17 @@ subroutine compute_ao_bielec_integrals(j,k,l,sze,buffer_value) thresh = ao_integrals_threshold integer :: n_centers, i - integer*1 :: center_count(nucl_num) PROVIDE gauleg_t2 ao_nucl all_utils if (ao_overlap_abs(j,l) < thresh) then - buffer_value = 0. + buffer_value = 0._integral_kind return endif - center_count = 0 - do i = 1, ao_num if (ao_overlap_abs(i,k)*ao_overlap_abs(j,l) < thresh) then - buffer_value(i) = 0. + buffer_value(i) = 0._integral_kind cycle endif !DIR$ FORCEINLINE @@ -211,7 +208,6 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ] integer :: n_integrals, n_centers integer :: jl_pairs(2,ao_num*(ao_num+1)/2), kk, m, j1, i1, lmax - integer*1 :: center_count(nucl_num) PROVIDE gauleg_t2 ao_integrals_map all_utils integral = ao_bielec_integral(1,1,1,1) @@ -243,7 +239,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ] call cpu_time(cpu_1) !$OMP PARALLEL PRIVATE(i,j,k,l,kk, & !$OMP integral,buffer_i,buffer_value,n_integrals, & - !$OMP cpu_2,wall_2,i1,j1,center_count) & + !$OMP cpu_2,wall_2,i1,j1) & !$OMP DEFAULT(NONE) & !$OMP SHARED (ao_num, jl_pairs, ao_integrals_map,thresh, & !$OMP cpu_1,wall_1,lock, lmax,n_centers,ao_nucl, & @@ -252,7 +248,6 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_in_map ] allocate(buffer_i(size_buffer)) allocate(buffer_value(size_buffer)) n_integrals = 0 - center_count = 0 !$OMP DO SCHEDULE(dynamic) do kk=1,lmax diff --git a/src/BiInts/bi_integrals.ezfio_config b/src/BiInts/bi_integrals.ezfio_config index c0a3989a..e780dce8 100644 --- a/src/BiInts/bi_integrals.ezfio_config +++ b/src/BiInts/bi_integrals.ezfio_config @@ -5,4 +5,5 @@ bielec_integrals write_mo_integrals logical threshold_ao double precision threshold_mo double precision + direct logical diff --git a/src/BiInts/mo_bi_integrals.irp.f b/src/BiInts/mo_bi_integrals.irp.f index 349886c3..27ff4959 100644 --- a/src/BiInts/mo_bi_integrals.irp.f +++ b/src/BiInts/mo_bi_integrals.irp.f @@ -296,95 +296,132 @@ end BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj, (mo_tot_num_align,mo_tot_num) ] &BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_exchange, (mo_tot_num_align,mo_tot_num) ] &BEGIN_PROVIDER [ double precision, mo_bielec_integral_jj_anti, (mo_tot_num_align,mo_tot_num) ] - implicit none - BEGIN_DOC - ! Transform Bi-electronic integrals and - END_DOC - - integer :: i,j,p,q,r,s - double precision :: integral, c - integer :: n, pp - double precision, allocatable :: int_value(:) - integer, allocatable :: int_idx(:) - - double precision, allocatable :: iqrs(:,:), iqsr(:,:), iqis(:), iqri(:) + implicit none + BEGIN_DOC + ! Transform Bi-electronic integrals and + END_DOC + + integer :: i,j,p,q,r,s + double precision :: c + real(integral_kind) :: integral + integer :: n, pp + real(integral_kind), allocatable :: int_value(:) + integer, allocatable :: int_idx(:) + + double precision, allocatable :: iqrs(:,:), iqsr(:,:), iqis(:), iqri(:) + + PROVIDE ao_integrals_threshold + if (.not.do_direct_integrals) then + PROVIDE ao_bielec_integrals_in_map + endif + + mo_bielec_integral_jj = 0.d0 + mo_bielec_integral_jj_exchange = 0.d0 + + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: iqrs, iqsr + + + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP PRIVATE (i,j,p,q,r,s,integral,c,n,pp,int_value,int_idx, & + !$OMP iqrs, iqsr,iqri,iqis) & + !$OMP SHARED(mo_tot_num,mo_coef_transp,mo_tot_num_align,ao_num,& + !$OMP ao_integrals_threshold,do_direct_integrals) & + !$OMP REDUCTION(+:mo_bielec_integral_jj,mo_bielec_integral_jj_exchange) + + allocate( int_value(ao_num), int_idx(ao_num), & + iqrs(mo_tot_num_align,ao_num), iqis(mo_tot_num), iqri(mo_tot_num),& + iqsr(mo_tot_num_align,ao_num) ) + + !$OMP DO SCHEDULE (guided) + do s=1,ao_num + do q=1,ao_num + + do j=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqrs(i,j) = 0.d0 + iqsr(i,j) = 0.d0 + enddo + enddo + + if (do_direct_integrals) then + double precision :: ao_bielec_integral + do r=1,ao_num + call compute_ao_bielec_integrals(q,r,s,ao_num,int_value) + do p=1,ao_num + integral = int_value(p) + if (abs(integral) > ao_integrals_threshold) then + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqrs(i,r) += mo_coef_transp(i,p) * integral + enddo + endif + enddo + call compute_ao_bielec_integrals(q,s,r,ao_num,int_value) + do p=1,ao_num + integral = int_value(p) + if (abs(integral) > ao_integrals_threshold) then + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqsr(i,r) += mo_coef_transp(i,p) * integral + enddo + endif + enddo + enddo - PROVIDE ao_bielec_integrals_in_map + else - mo_bielec_integral_jj = 0.d0 - mo_bielec_integral_jj_exchange = 0.d0 - - !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: iqrs, iqsr - - - !$OMP PARALLEL DEFAULT(NONE) & - !$OMP PRIVATE (i,j,p,q,r,s,integral,c,n,pp,int_value,int_idx, & - !$OMP iqrs, iqsr,iqri,iqis) & - !$OMP SHARED(mo_tot_num,mo_coef_transp,mo_tot_num_align,ao_num) & - !$OMP REDUCTION(+:mo_bielec_integral_jj,mo_bielec_integral_jj_exchange) - - allocate( int_value(ao_num), int_idx(ao_num), & - iqrs(mo_tot_num_align,ao_num), iqis(mo_tot_num), iqri(mo_tot_num), & - iqsr(mo_tot_num_align,ao_num) ) - - !$OMP DO - do q=1,ao_num - do s=1,ao_num - - do j=1,ao_num - !DIR$ VECTOR ALIGNED - do i=1,mo_tot_num - iqrs(i,j) = 0.d0 - iqsr(i,j) = 0.d0 - enddo - enddo - - do r=1,ao_num - call get_ao_bielec_integrals_non_zero(q,r,s,ao_num,int_value,int_idx,n) - do pp=1,n - p = int_idx(pp) - integral = int_value(pp) - !DIR$ VECTOR ALIGNED - do i=1,mo_tot_num - iqrs(i,r) += mo_coef_transp(i,p) * integral - enddo - enddo - call get_ao_bielec_integrals_non_zero(q,s,r,ao_num,int_value,int_idx,n) - do pp=1,n - p = int_idx(pp) - integral = int_value(pp) - !DIR$ VECTOR ALIGNED - do i=1,mo_tot_num - iqsr(i,r) += mo_coef_transp(i,p) * integral - enddo - enddo - enddo - iqis = 0.d0 - iqri = 0.d0 - do r=1,ao_num - !DIR$ VECTOR ALIGNED - do i=1,mo_tot_num - iqis(i) += mo_coef_transp(i,r) * iqrs(i,r) - iqri(i) += mo_coef_transp(i,r) * iqsr(i,r) - enddo - enddo - do i=1,mo_tot_num - !DIR$ VECTOR ALIGNED - do j=1,mo_tot_num - c = mo_coef_transp(j,q)*mo_coef_transp(j,s) - mo_bielec_integral_jj(j,i) += c * iqis(i) - mo_bielec_integral_jj_exchange(j,i) += c * iqri(i) - enddo - enddo - - enddo - enddo - !$OMP END DO NOWAIT - deallocate(iqrs,iqsr,int_value,int_idx) - !$OMP END PARALLEL - - mo_bielec_integral_jj_anti = mo_bielec_integral_jj - mo_bielec_integral_jj_exchange - - + do r=1,ao_num + call get_ao_bielec_integrals_non_zero(q,r,s,ao_num,int_value,int_idx,n) + do pp=1,n + p = int_idx(pp) + integral = int_value(pp) + if (abs(integral) > ao_integrals_threshold) then + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqrs(i,r) += mo_coef_transp(i,p) * integral + enddo + endif + enddo + call get_ao_bielec_integrals_non_zero(q,s,r,ao_num,int_value,int_idx,n) + do pp=1,n + p = int_idx(pp) + integral = int_value(pp) + if (abs(integral) > ao_integrals_threshold) then + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqsr(i,r) += mo_coef_transp(i,p) * integral + enddo + endif + enddo + enddo + endif + iqis = 0.d0 + iqri = 0.d0 + do r=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,mo_tot_num + iqis(i) += mo_coef_transp(i,r) * iqrs(i,r) + iqri(i) += mo_coef_transp(i,r) * iqsr(i,r) + enddo + enddo + do i=1,mo_tot_num + !DIR$ VECTOR ALIGNED + do j=1,mo_tot_num + c = mo_coef_transp(j,q)*mo_coef_transp(j,s) + mo_bielec_integral_jj(j,i) += c * iqis(i) + mo_bielec_integral_jj_exchange(j,i) += c * iqri(i) + enddo + enddo + + enddo + enddo + !$OMP END DO NOWAIT + deallocate(iqrs,iqsr,int_value,int_idx) + !$OMP END PARALLEL + + mo_bielec_integral_jj_anti = mo_bielec_integral_jj - mo_bielec_integral_jj_exchange + + END_PROVIDER - + diff --git a/src/BiInts/options.irp.f b/src/BiInts/options.irp.f index c821661c..d4af85e1 100644 --- a/src/BiInts/options.irp.f +++ b/src/BiInts/options.irp.f @@ -107,3 +107,21 @@ BEGIN_PROVIDER [ double precision, mo_integrals_threshold ] END_PROVIDER + +BEGIN_PROVIDER [ logical, do_direct_integrals ] + implicit none + BEGIN_DOC +! If True, compute integrals on the fly + END_DOC + + logical :: has + PROVIDE ezfio_filename + call ezfio_has_bielec_integrals_direct(has) + if (has) then + call ezfio_get_bielec_integrals_direct(do_direct_integrals) + else + do_direct_integrals = .False. + call ezfio_set_bielec_integrals_direct(do_direct_integrals) + endif + +END_PROVIDER diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f index b27d9799..9b5c193d 100644 --- a/src/Hartree_Fock/Fock_matrix_mo.irp.f +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -92,24 +92,40 @@ END_PROVIDER integer, allocatable :: ao_ints_idx(:) double precision :: integral double precision :: ao_bielec_integral - !DIR$ ATTRIBUTES ALIGN : 32 :: ao_ints_idx, ao_ints_val - if (do_direct_SCF) then + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: ao_ints_idx, ao_ints_val + if (do_direct_integrals) then + PROVIDE all_utils + !$OMP PARALLEL DEFAULT(NONE) & + !$OMP PRIVATE(i,j,l,k1,k,integral) & + !$OMP SHARED(ao_num,Fock_matrix_alpha_ao,ao_mono_elec_integral,& + !$OMP ao_num_align,Fock_matrix_beta_ao,HF_density_matrix_ao_alpha, & + !$OMP HF_density_matrix_ao_beta) + !$OMP DO SCHEDULE(GUIDED) do j=1,ao_num - do i=1,ao_num + do i=1,j Fock_matrix_alpha_ao(i,j) = ao_mono_elec_integral(i,j) Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) do l=1,ao_num do k=1,ao_num if ((abs(HF_density_matrix_ao_alpha(k,l)) > 1.d-9).or. & (abs(HF_density_matrix_ao_beta (k,l)) > 1.d-9)) then - integral = 2.d0*ao_bielec_integral(k,l,i,j)-ao_bielec_integral(k,j,i,l) - Fock_matrix_alpha_ao(i,j) =Fock_matrix_alpha_ao(i,j) +( HF_density_matrix_ao_alpha(k,l) * integral) - Fock_matrix_beta_ao (i,j) =Fock_matrix_beta_ao (i,j) +( HF_density_matrix_ao_beta (k,l) * integral) + integral = (HF_density_matrix_ao_alpha(k,l)+HF_density_matrix_ao_beta (k,l)) * ao_bielec_integral(k,l,i,j) + Fock_matrix_alpha_ao(i,j) += integral + Fock_matrix_beta_ao (i,j) += integral + + integral = ao_bielec_integral(k,j,i,l) + Fock_matrix_alpha_ao(i,j) -= HF_density_matrix_ao_alpha(k,l)*integral + Fock_matrix_beta_ao (i,j) -= HF_density_matrix_ao_beta (k,l)*integral endif enddo enddo + Fock_matrix_alpha_ao(j,i) = Fock_matrix_alpha_ao(i,j) + Fock_matrix_beta_ao (j,i) = Fock_matrix_beta_ao (i,j) enddo enddo + !$OMP END DO NOWAIT + !$OMP END PARALLEL + else !$OMP PARALLEL DEFAULT(NONE) & !$OMP PRIVATE(i,j,l,k1,k,integral,ao_ints_val,ao_ints_idx,kmax) & @@ -117,23 +133,25 @@ END_PROVIDER !$OMP ao_num_align,Fock_matrix_beta_ao,HF_density_matrix_ao_alpha, & !$OMP HF_density_matrix_ao_beta) allocate(ao_ints_idx(ao_num_align),ao_ints_val(ao_num_align)) - !$OMP DO - do i=1,ao_num - do j=1,ao_num + !$OMP DO SCHEDULE(GUIDED) + do j=1,ao_num + !DIR$ VECTOR ALIGNED + do i=1,ao_num Fock_matrix_alpha_ao(i,j) = ao_mono_elec_integral(i,j) Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) enddo - do j=1,ao_num - do l=1,ao_num + do l=1,ao_num + do i=1,ao_num call get_ao_bielec_integrals_non_zero(i,l,j,ao_num,ao_ints_val,ao_ints_idx,kmax) + !DIR$ VECTOR ALIGNED do k1=1,kmax k = ao_ints_idx(k1) - integral = ao_ints_val(k1)+ao_ints_val(k1) - Fock_matrix_alpha_ao(i,j) += HF_density_matrix_ao_alpha(k,l) * integral - Fock_matrix_beta_ao (i,j) += HF_density_matrix_ao_beta (k,l) * integral - integral = -ao_ints_val(k1) - Fock_matrix_alpha_ao(i,l) += HF_density_matrix_ao_alpha(k,j) * integral - Fock_matrix_beta_ao (i,l) += HF_density_matrix_ao_beta (k,j) * integral + integral = (HF_density_matrix_ao_alpha(k,l)+HF_density_matrix_ao_beta(k,l)) * ao_ints_val(k1) + Fock_matrix_alpha_ao(i,j) += integral + Fock_matrix_beta_ao (i,j) += integral + integral = ao_ints_val(k1) + Fock_matrix_alpha_ao(l,j) -= HF_density_matrix_ao_alpha(k,i) * integral + Fock_matrix_beta_ao (l,j) -= HF_density_matrix_ao_beta (k,i) * integral enddo enddo enddo diff --git a/src/Hartree_Fock/README.rst b/src/Hartree_Fock/README.rst index 410339a1..b8981dd0 100644 --- a/src/Hartree_Fock/README.rst +++ b/src/Hartree_Fock/README.rst @@ -1,8 +1,3 @@ -=================== -Hartree-Fock Module -=================== - - Needed Modules ============== diff --git a/src/Hartree_Fock/hartree_fock.ezfio_config b/src/Hartree_Fock/hartree_fock.ezfio_config index 134486f4..0a53b7a9 100644 --- a/src/Hartree_Fock/hartree_fock.ezfio_config +++ b/src/Hartree_Fock/hartree_fock.ezfio_config @@ -1,6 +1,5 @@ hartree_fock thresh_scf double precision n_it_scf_max integer - direct logical diis logical diff --git a/src/Hartree_Fock/options.irp.f b/src/Hartree_Fock/options.irp.f index 303ce89d..74819a63 100644 --- a/src/Hartree_Fock/options.irp.f +++ b/src/Hartree_Fock/options.irp.f @@ -35,24 +35,6 @@ BEGIN_PROVIDER [ integer, n_it_scf_max] END_PROVIDER -BEGIN_PROVIDER [ logical, do_direct_SCF ] - implicit none - BEGIN_DOC -! If True, compute integrals on the fly - END_DOC - - logical :: has - PROVIDE ezfio_filename - call ezfio_has_Hartree_Fock_direct(has) - if (has) then - call ezfio_get_Hartree_Fock_direct(do_direct_SCF) - else - do_direct_SCF = .False. - call ezfio_set_Hartree_Fock_direct(do_direct_SCF) - endif - -END_PROVIDER - BEGIN_PROVIDER [ logical, do_DIIS ] implicit none BEGIN_DOC From 54d0f4161e931278cc92f97cfcc7da01d6894696 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sat, 26 Apr 2014 01:18:26 +0200 Subject: [PATCH 7/9] Corrected OpenMP bugs --- scripts/update_README.py | 8 +- src/Hartree_Fock/Fock_matrix_mo.irp.f | 12 ++- src/Hartree_Fock/diagonalize_fock.irp.f | 40 ++++---- src/Hartree_Fock/mo_SCF_iterations.irp.f | 14 ++- src/MOGuess/README.rst | 14 +++ src/MOGuess/localize.irp.f | 114 ----------------------- 6 files changed, 56 insertions(+), 146 deletions(-) delete mode 100644 src/MOGuess/localize.irp.f diff --git a/scripts/update_README.py b/scripts/update_README.py index 00e038b7..fc769db7 100755 --- a/scripts/update_README.py +++ b/scripts/update_README.py @@ -95,18 +95,14 @@ def update_needed(data): return data -import subprocess +import os def git_add(): """Executes: git add README.rst if git is present on the machine.""" command = "git add "+README - - try: - subprocess.call(command.split()) - except OSError: - pass + os.system(command+" &> /dev/null") def main(): diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix_mo.irp.f index 9b5c193d..04d2f1cc 100644 --- a/src/Hartree_Fock/Fock_matrix_mo.irp.f +++ b/src/Hartree_Fock/Fock_matrix_mo.irp.f @@ -94,7 +94,7 @@ END_PROVIDER double precision :: ao_bielec_integral !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: ao_ints_idx, ao_ints_val if (do_direct_integrals) then - PROVIDE all_utils + PROVIDE all_utils ao_overlap_abs ao_integrals_threshold !$OMP PARALLEL DEFAULT(NONE) & !$OMP PRIVATE(i,j,l,k1,k,integral) & !$OMP SHARED(ao_num,Fock_matrix_alpha_ao,ao_mono_elec_integral,& @@ -107,6 +107,7 @@ END_PROVIDER Fock_matrix_beta_ao (i,j) = ao_mono_elec_integral(i,j) do l=1,ao_num do k=1,ao_num + PROVIDE HF_density_matrix_ao_alpha HF_density_matrix_ao_beta if ((abs(HF_density_matrix_ao_alpha(k,l)) > 1.d-9).or. & (abs(HF_density_matrix_ao_beta (k,l)) > 1.d-9)) then integral = (HF_density_matrix_ao_alpha(k,l)+HF_density_matrix_ao_beta (k,l)) * ao_bielec_integral(k,l,i,j) @@ -207,3 +208,12 @@ BEGIN_PROVIDER [ double precision, Fock_matrix_beta_mo, (mo_tot_num_align,mo_tot deallocate(T) END_PROVIDER +BEGIN_PROVIDER [ double precision, HF_energy ] + implicit none + BEGIN_DOC + ! Hartree-Fock energy + END_DOC + HF_energy = nuclear_repulsion + ref_bitmask_energy +END_PROVIDER + + diff --git a/src/Hartree_Fock/diagonalize_fock.irp.f b/src/Hartree_Fock/diagonalize_fock.irp.f index 00f3275b..c34a1415 100644 --- a/src/Hartree_Fock/diagonalize_fock.irp.f +++ b/src/Hartree_Fock/diagonalize_fock.irp.f @@ -1,20 +1,20 @@ -subroutine diagonalize_fock() - implicit none - - double precision, allocatable :: mo_coef_new(:,:), R(:,:),eigvalues(:) - !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: mo_coef_new, R - - allocate(R(size(Fock_matrix_mo,1),mo_tot_num)) - allocate(mo_coef_new(ao_num_align,mo_tot_num),eigvalues(mo_tot_num)) - mo_coef_new = mo_coef - - call lapack_diag(eigvalues,R,Fock_matrix_mo,size(Fock_matrix_mo,1),mo_tot_num) - - call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num,1.d0,mo_coef_new,size(mo_coef_new,1),R,size(R,1),0.d0,mo_coef,size(mo_coef,1)) - deallocate(mo_coef_new,R,eigvalues) - - mo_label = "Canonical" - SOFT_TOUCH mo_coef mo_label - call clear_mo_map -end - + BEGIN_PROVIDER [ double precision, diagonal_Fock_matrix_mo, (mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, eigenvectors_Fock_matrix_mo, (ao_num_align,mo_tot_num) ] + implicit none + BEGIN_DOC + ! Diagonal Fock matrix in the MO basis + END_DOC + + double precision, allocatable :: R(:,:) + !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: R + + allocate(R(mo_tot_num_align,mo_tot_num)) + + call lapack_diag(diagonal_Fock_matrix_mo,R,Fock_matrix_mo,size(Fock_matrix_mo,1),& + mo_tot_num) + + call dgemm('N','N',ao_num,mo_tot_num,mo_tot_num,1.d0,mo_coef,size(mo_coef,1),& + R,size(R,1),0.d0,eigenvectors_Fock_matrix_mo,size(eigenvectors_Fock_matrix_mo,1)) + deallocate(R) +END_PROVIDER + diff --git a/src/Hartree_Fock/mo_SCF_iterations.irp.f b/src/Hartree_Fock/mo_SCF_iterations.irp.f index c8f3d113..61969f0b 100644 --- a/src/Hartree_Fock/mo_SCF_iterations.irp.f +++ b/src/Hartree_Fock/mo_SCF_iterations.irp.f @@ -5,16 +5,20 @@ program scf_iteration double precision :: E0 integer :: i_it - E0 = ref_bitmask_energy + nuclear_repulsion + E0 = HF_energy i_it = 0 n_it_scf_max = 100 SCF_energy_before = huge(1.d0) SCF_energy_after = E0 print *, E0 - do while (dabs(SCF_energy_before - SCF_energy_after) > thresh_SCF) + mo_label = "Canonical" + thresh_SCF = 1.d-10 + do while (i_it < 10 .or. dabs(SCF_energy_before - SCF_energy_after) > thresh_SCF) SCF_energy_before = SCF_energy_after - call diagonalize_fock() - SCF_energy_after = ref_bitmask_energy + nuclear_repulsion + mo_coef = eigenvectors_Fock_matrix_mo + TOUCH mo_coef mo_label + call clear_mo_map + SCF_energy_after = HF_energy print*,SCF_energy_after i_it +=1 if(i_it > n_it_scf_max)exit @@ -28,6 +32,6 @@ program scf_iteration endif mo_label = "Canonical" TOUCH mo_label mo_coef -! call save_mos + call save_mos end diff --git a/src/MOGuess/README.rst b/src/MOGuess/README.rst index 14ade90f..7a81c93d 100644 --- a/src/MOGuess/README.rst +++ b/src/MOGuess/README.rst @@ -2,3 +2,17 @@ MOGuess Module ============== +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `Ezfio_files `_ +* `MOs `_ +* `Nuclei `_ +* `Output `_ +* `Utils `_ +* `MonoInts `_ + diff --git a/src/MOGuess/localize.irp.f b/src/MOGuess/localize.irp.f deleted file mode 100644 index 53790e02..00000000 --- a/src/MOGuess/localize.irp.f +++ /dev/null @@ -1,114 +0,0 @@ -!TODO Ecrire un cholesky avec bitmask - - -subroutine localize_mos(mask, nint) - implicit none - use bitmasks - integer, intent(in) :: nint - integer(bit_kind), intent(in) :: mask(nint) - integer :: i,j,k,l - double precision, allocatable :: DM(:,:) - double precision, allocatable :: mo_coef_new(:,:), R(:,:) - integer :: n - !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: DM, mo_coef_new, R - integer :: rank - integer, parameter :: n_core = 2 - - allocate(R(mo_tot_num,mo_tot_num)) - allocate(DM(ao_num_align,ao_num)) - allocate(mo_coef_new(ao_num_align,mo_tot_num)) - n = ao_num - mo_coef_new = mo_coef - -BEGIN_TEMPLATE - DM = 0.d0 - if ($START < $END) then - do k=$START, $END - do j=1,n - !DEC$ VECTOR ALIGNED - do i=1,n - DM(i,j) += mo_coef_new(i,k)*mo_coef_new(j,k) - enddo - enddo - enddo - call cholesky_mo(n,$END-$START+1,DM,mo_coef_new(1,$START),size(mo_coef_new,1),-1.d0,rank) - endif -SUBST [ START, END ] - 1 ; n_core ;; -END_TEMPLATE - - deallocate(DM) - call find_rotation(mo_coef,ao_num_align,mo_coef_new,ao_num,R,mo_tot_num) - mo_coef = mo_coef_new - deallocate(mo_coef_new) - - double precision,allocatable :: mo_energy_new(:) - integer, allocatable :: iorder(:) - allocate(mo_energy_new(mo_tot_num),iorder(mo_tot_num)) - - do i=1,mo_tot_num - iorder(i) = i - mo_energy_new(i) = 0.d0 - do k=1,mo_tot_num - mo_energy_new(i) += R(k,i)*R(k,i)*mo_energy(k) - enddo - enddo - mo_energy = mo_energy_new - call dsort(mo_energy(1),iorder(1),n_core) - allocate (mo_coef_new(ao_num_align,mo_tot_num)) - mo_coef_new = mo_coef - do j=1,mo_tot_num - do i=1,ao_num - mo_coef(i,j) = mo_coef_new(i,iorder(j)) - enddo - enddo - deallocate (mo_coef_new,R) - deallocate(mo_energy_new,iorder) - mo_label = 'localized' - - SOFT_TOUCH mo_coef mo_energy mo_label -end - - - - - -subroutine cholesky_mo(n,m,P,C,LDC,tol_in,rank) - implicit none - integer, intent(in) :: n,m, LDC - double precision, intent(in) :: P(LDC,n) - double precision, intent(out) :: C(LDC,m) - double precision, intent(in) :: tol_in - integer, intent(out) :: rank - - integer :: info - integer :: i,k - integer :: ipiv(n) - double precision:: tol - double precision, allocatable :: W(:,:), work(:) - !DEC$ ATTRIBUTES ALIGN: 32 :: W - !DEC$ ATTRIBUTES ALIGN: 32 :: work - !DEC$ ATTRIBUTES ALIGN: 32 :: ipiv - - allocate(W(LDC,n),work(2*n)) - tol=tol_in - - info = 0 - do i=1,n - do k=1,i - W(i,k) = P(i,k) - enddo - do k=i+1,n - W(i,k) = 0. - enddo - enddo - call DPSTRF('L', n, W, LDC, ipiv, rank, tol, work, info ) - do i=1,n - do k=1,min(m,rank) - C(ipiv(i),k) = W(i,k) - enddo - enddo - - deallocate(W,work) -end - From b02cfe8dc35d877ac72c7588f287d4a402e8b065 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 13 May 2014 13:57:58 +0200 Subject: [PATCH 8/9] CISD OK --- scripts/generate_h_apply.py | 65 ++ scripts/update_README.py | 104 +- setup_environment.sh | 1 + src/AOs/README.rst | 60 +- src/BiInts/README.rst | 208 ++++ src/BiInts/map_integrals.irp.f | 2 +- src/Bitmask/README.rst | 49 +- src/Bitmask/bitmasks.irp.f | 1 + src/Bitmask/bitmasks_routines.irp.f | 16 +- src/CISD/ASSUMPTIONS.rst | 0 src/CISD/H_apply.irp.f | 67 ++ src/CISD/Makefile | 8 + src/CISD/NEEDED_MODULES | 1 + src/CISD/README.rst | 27 + src/CISD/cisd.irp.f | 19 + src/CISD/h_apply.py | 11 + src/CISD/tests/Makefile | 33 + src/Dets/ASSUMPTIONS.rst | 7 + src/Dets/H_apply.irp.f | 157 +++ src/Dets/H_apply_template.f | 356 +++++++ src/Dets/NEEDED_MODULES | 1 + src/Dets/README.rst | 54 + src/Dets/determinants.irp.f | 69 ++ src/Dets/determinants_bitmasks.irp.f | 57 ++ src/Dets/s2.irp.f | 34 + src/Dets/slater_rules.irp.f | 949 ++++++++++++++++++ src/Dets/utils.irp.f | 15 + src/Electrons/README.rst | 26 +- src/Ezfio_files/README.rst | 27 + ...Fock_matrix_mo.irp.f => Fock_matrix.irp.f} | 0 src/Hartree_Fock/README.rst | 63 ++ src/Hartree_Fock/options.irp.f | 7 +- src/Hartree_Fock/tests/hf_energy.irp.f | 9 + src/Hartree_Fock_AOs/README.rst | 30 + src/MOGuess/README.rst | 25 + src/MOs/README.rst | 39 + src/MOs/utils.irp.f | 2 +- src/Makefile.common | 2 +- src/MonoInts/README.rst | 130 +++ src/NEEDED_MODULES | 2 +- src/Nuclei/README.rst | 66 ++ src/Nuclei/nuclei.irp.f | 330 +++--- src/Output/README.rst | 36 + src/README.rst | 8 +- src/Utils/README.rst | 171 ++++ src/Utils/sort.irp.f | 3 +- 46 files changed, 3170 insertions(+), 177 deletions(-) create mode 100755 scripts/generate_h_apply.py create mode 100644 src/CISD/ASSUMPTIONS.rst create mode 100644 src/CISD/H_apply.irp.f create mode 100644 src/CISD/Makefile create mode 100644 src/CISD/NEEDED_MODULES create mode 100644 src/CISD/README.rst create mode 100644 src/CISD/cisd.irp.f create mode 100755 src/CISD/h_apply.py create mode 100644 src/CISD/tests/Makefile create mode 100644 src/Dets/ASSUMPTIONS.rst create mode 100644 src/Dets/H_apply.irp.f create mode 100644 src/Dets/H_apply_template.f create mode 100644 src/Dets/NEEDED_MODULES create mode 100644 src/Dets/README.rst create mode 100644 src/Dets/determinants.irp.f create mode 100644 src/Dets/determinants_bitmasks.irp.f create mode 100644 src/Dets/s2.irp.f create mode 100644 src/Dets/slater_rules.irp.f create mode 100644 src/Dets/utils.irp.f rename src/Hartree_Fock/{Fock_matrix_mo.irp.f => Fock_matrix.irp.f} (100%) create mode 100644 src/Hartree_Fock/tests/hf_energy.irp.f create mode 100644 src/Hartree_Fock_AOs/README.rst diff --git a/scripts/generate_h_apply.py b/scripts/generate_h_apply.py new file mode 100755 index 00000000..5fa3e436 --- /dev/null +++ b/scripts/generate_h_apply.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python + +import os +file = open(os.environ["QPACKAGE_ROOT"]+'/src/Dets/H_apply_template.f','r') +template = file.read() +file.close() + +keywords = """ +subroutine +parameters +initialization +declarations +keys_work +finalization +""".split() + +def new_dict(openmp=True): + s ={} + for k in keywords: + s[k] = "" + #s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) & + s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(SHARED) & + !$OMP PRIVATE(i,j,k,l,keys_out,hole,particle, & + !$OMP occ_particle,occ_hole,j_a,k_a,other_spin, & + !$OMP hole_save,ispin,jj,l_a,hij_elec,hij_tab, & + !$OMP accu,i_a,hole_tmp,particle_tmp,occ_particle_tmp, & + !$OMP occ_hole_tmp,key_idx,i_b,j_b,key,N_elec_in_key_part_1,& + !$OMP N_elec_in_key_hole_1,N_elec_in_key_part_2, & + !$OMP N_elec_in_key_hole_2,ia_ja_pairs) & + !$OMP SHARED(key_in,N_int,elec_num_tab, & + !$OMP hole_1, particl_1, hole_2, particl_2, & + !$OMP lck,thresh,elec_alpha_num,E_ref)""" + s["omp_init_lock"] = "call omp_init_lock(lck)" + s["omp_set_lock"] = "call omp_set_lock(lck)" + s["omp_unset_lock"] = "call omp_unset_lock(lck)" + s["omp_test_lock"] = "omp_test_lock(lck)" + s["omp_destroy_lock"] = "call omp_destroy_lock(lck)" + s["omp_end_parallel"] = "!$OMP END PARALLEL" + s["omp_master"] = "!$OMP MASTER" + s["omp_end_master"] = "!$OMP END MASTER" + s["omp_barrier"] = "!$OMP BARRIER" + s["omp_do"] = "!$OMP DO SCHEDULE (static)" + s["omp_enddo"] = "!$OMP ENDDO NOWAIT" + + if not openmp: + for k in s: + s[k] = "" + s["omp_test_lock"] = ".False." + s["size_max"] = str(1024*128) + s["set_i_H_j_threshold"] = """ + thresh = H_apply_threshold + """ + return s + + + +def create_h_apply(s): + buffer = template + for key in s: + buffer = buffer.replace('$'+key, s[key]) + print buffer + + + + diff --git a/scripts/update_README.py b/scripts/update_README.py index fc769db7..61b8ee40 100755 --- a/scripts/update_README.py +++ b/scripts/update_README.py @@ -8,14 +8,30 @@ __author__ = "Anthony Scemama " README="README.rst" Assum_key="Assumptions\n===========\n" Needed_key="Needed Modules\n==============\n" +Doc_key="Documentation\n=============\n" Sentinel="@@$%&@@" URL="http://github.com/LCPQ/quantum_package/tree/master/src/" +import os +import subprocess + +header = """ +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +""" + +try: + subprocess.check_output("git status".split()) + has_git = True +except OSError: + has_git = False def fetch_splitted_data(): - """Read the README.rst file and split it in 3 strings: + """Read the README.rst file and split it in strings: * The description * The assumptions + * The documentation * The needed modules The result is given as a list of strings """ @@ -26,6 +42,7 @@ def fetch_splitted_data(): # Place sentinels data = data.replace(Assum_key,Sentinel+Assum_key) + data = data.replace(Doc_key,Sentinel+Doc_key) data = data.replace(Needed_key,Sentinel+Needed_key) # Now Split data using the sentinels @@ -46,11 +63,6 @@ def update_assumptions(data): assumptions = file.read() file.close() - header = """ -.. Do not edit this section. It was auto-generated from the -.. ASSUMPTIONS.rst file. - -""" if assumptions.strip() != "": assumptions = Assum_key + header + assumptions + '\n\n' @@ -74,11 +86,6 @@ def update_needed(data): modules = file.read() file.close() - header = """ -.. Do not edit this section. It was auto-generated from the -.. NEEDED_MODULES file. - -""" if modules.strip() != "": modules = [ '* `%s <%s%s>`_'%(x,URL,x) for x in modules.split() ] modules = "\n".join(modules) @@ -95,7 +102,77 @@ def update_needed(data): return data -import os + +def update_documentation(data): + """Reads the BEGIN_DOC ... END_DOC blocks and builds the documentation""" + + # If the file does not exist, don't do anything + try: + file = open('tags','r') + except: + return + tags = file.readlines() + file.close() + + def extract_doc(item): + """Extracts the documentation contained in IRPF90_man file""" + file = open("IRPF90_man/%s.l"%(item),'r') + lines = file.readlines() + file.close() + result = [] + inside = False + for line in lines: + if not inside: + inside = line.startswith(".SH Description") + else: + if line.startswith(".SH"): + return "".join(result) + result.append(" "+line.strip()+"\n") + + + + items = [] + command = "git ls-tree --full-tree --name-only HEAD:src/%s" + command = command%(os.path.basename(os.getcwd())) + try: + tracked_files = subprocess.check_output(command.split()) + tracked_files = tracked_files.splitlines() + except: + tracked_files = [] + for filename in tracked_files: + if filename.endswith('.irp.f'): + # Search for providers, subroutines and functions in each file using + # the tags file + search = "\t"+filename+"\t" + tmp = filter(lambda line: search in line, tags) + + # Search for the documentation in the IRPF90_man directory + for item in tmp : + item, _, line = item.split('\t') + doc = extract_doc(item) + items.append( (item, filename, doc, line) ) + + dirname = os.path.basename(os.getcwd()) + # Write the documentation in the README + template = "`%(item)s <%(url)s%(dirname)s/%(filename)s#L%(line)s>`_\n%(doc)s\n" + + documentation = Doc_key + header + url = URL + for item, filename, doc, line in items: + documentation += template%locals() + documentation += '\n\n' + + has_doc = False + for i in range(len(data)): + if data[i].startswith(Doc_key): + has_doc = True + data[i] = documentation + + if not has_doc: + data.append(documentation) + + return data + def git_add(): """Executes: @@ -106,8 +183,11 @@ def git_add(): def main(): + if not has_git: + return data = fetch_splitted_data() data = update_assumptions(data) + data = update_documentation(data) data = update_needed(data) output = ''.join(data) diff --git a/setup_environment.sh b/setup_environment.sh index 8475b1f6..9147d7e6 100755 --- a/setup_environment.sh +++ b/setup_environment.sh @@ -22,6 +22,7 @@ fi cat << EOF > quantum_package.rc export IRPF90=${IRPF90} export QPACKAGE_ROOT=${QPACKAGE_ROOT} +export PYTHONPATH+=:\${QPACKAGE_ROOT}/scripts export PATH+=:\${QPACKAGE_ROOT}/scripts export PATH+=:\${QPACKAGE_ROOT}/bin export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache" diff --git a/src/AOs/README.rst b/src/AOs/README.rst index a1fe987b..cfb95d03 100644 --- a/src/AOs/README.rst +++ b/src/AOs/README.rst @@ -21,7 +21,7 @@ Assumptions =========== .. Do not edit this section. It was auto-generated from the -.. ASSUMPTIONS.rst file. +.. NEEDED_MODULES file. * The atomic orbitals are normalized: @@ -43,3 +43,61 @@ Needed Modules * `Nuclei `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`ao_coef `_ + coefficient of the primitives on the AO basis + ao_coef(i,j) = coefficient of the jth primitive on the ith ao + +`ao_coef_transp `_ + Transposed ao_coef and ao_expo + +`ao_expo `_ + coefficient of the primitives on the AO basis + ao_coef(i,j) = coefficient of the jth primitive on the ith ao + +`ao_expo_transp `_ + Transposed ao_coef and ao_expo + +`ao_nucl `_ + Index of the nuclei on which the ao is centered + +`ao_num `_ + Number of atomic orbitals + +`ao_num_align `_ + Number of atomic orbitals + +`ao_overlap `_ + matrix of the overlap for tha AOs + S(i,j) = overlap between the ith and the jth atomic basis function + +`ao_power `_ + coefficient of the primitives on the AO basis + ao_coef(i,j) = coefficient of the jth primitive on the ith ao + +`ao_prim_num `_ + Number of primitives per atomic orbital + +`ao_prim_num_max `_ +None +`ao_prim_num_max_align `_ +None + + diff --git a/src/BiInts/README.rst b/src/BiInts/README.rst index 35499607..91d6e8c2 100644 --- a/src/BiInts/README.rst +++ b/src/BiInts/README.rst @@ -26,3 +26,211 @@ Needed Modules * `Utils `_ * `MonoInts `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`ao_bielec_integral `_ + integral of the AO basis or (ij|kl) + i(r1) j(r1) 1/r12 k(r2) l(r2) + +`ao_bielec_integral_schwartz `_ + Needed to compuet Schwartz inequalities + +`ao_bielec_integrals_in_map `_ + Map of Atomic integrals + i(r1) j(r2) 1/r12 k(r1) l(r2) + +`compute_ao_bielec_integrals `_ + Compute AO 1/r12 integrals for all i and fixed j,k,l + +`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) + primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2) + primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2) + +`general_primitive_integral `_ + Computes the integral where p,q,r,s are Gaussian primitives + +`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 `_ + recursive function involved in the bielectronic integral + +`i_x1_pol_mult `_ + recursive function involved in the bielectronic integral + +`i_x1_pol_mult_a1 `_ + recursive function involved in the bielectronic integral + +`i_x1_pol_mult_a2 `_ + recursive function involved in the bielectronic integral + +`i_x1_pol_mult_recurs `_ + recursive function involved in the bielectronic integral + +`i_x2_new `_ + recursive function involved in the bielectronic integral + +`i_x2_pol_mult `_ + recursive function involved in the bielectronic integral + +`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) + +`n_pt_sup `_ + Returns the upper boundary of the degree of the polynom 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) + +`gauleg `_ + Gauss-Legendre + +`gauleg_t2 `_ + t_w(i,1,k) = w(i) + t_w(i,2,k) = t(i) + +`gauleg_w `_ + t_w(i,1,k) = w(i) + t_w(i,2,k) = t(i) + +`ao_integrals_map `_ + AO integrals + +`bielec_integrals_index `_ +None +`clear_ao_map `_ + Frees the memory of the AO map + +`clear_mo_map `_ + Frees the memory of the MO map + +`get_ao_bielec_integral `_ + Gets one AO bi-electronic integral from the AO map + +`get_ao_bielec_integrals `_ + Gets multiple AO bi-electronic integral from the AO map . + All i are retrieved for j,k,l fixed. + +`get_ao_bielec_integrals_non_zero `_ + Gets multiple AO bi-electronic integral from the AO map . + All non-zero i are retrieved for j,k,l fixed. + +`get_ao_map_size `_ + Returns the number of elements in the AO map + +`get_mo_bielec_integral `_ + 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_map_size `_ + Return the number of elements in the MO map + +`insert_into_ao_integrals_map `_ + Create new entry into AO map + +`insert_into_mo_integrals_map `_ + Create new entry into MO map, or accumulate in an existing entry + +`mo_bielec_integral `_ + Returns one integral in the MO basis + +`mo_integrals_map `_ + MO integrals + +`add_integrals_to_map `_ + Adds integrals to tha MO map according to some bitmask + +`mo_bielec_integral_jj `_ + Transform Bi-electronic integrals and + +`mo_bielec_integral_jj_anti `_ + Transform Bi-electronic integrals and + +`mo_bielec_integral_jj_exchange `_ + Transform Bi-electronic integrals and + +`mo_bielec_integrals_in_map `_ + If True, the map of MO bielectronic integrals is provided + +`mo_bielec_integrals_index `_ + Computes an unique index for i,j,k,l integrals + +`ao_integrals_threshold `_ + If < ao_integrals_threshold, = 0 + +`mo_integrals_threshold `_ + If < mo_integrals_threshold, = 0 + +`read_ao_integrals `_ + If true, read AO integrals in EZFIO + +`read_mo_integrals `_ + If true, read MO integrals in EZFIO + +`write_ao_integrals `_ + If true, write AO integrals in EZFIO + +`write_mo_integrals `_ + If true, write MO integrals in EZFIO + + + diff --git a/src/BiInts/map_integrals.irp.f b/src/BiInts/map_integrals.irp.f index 5d639702..e4ae14f5 100644 --- a/src/BiInts/map_integrals.irp.f +++ b/src/BiInts/map_integrals.irp.f @@ -330,5 +330,5 @@ end SUBST [ ao_integrals_map, ao_integrals, ao_num , get_ao_bielec_integral ] ao_integrals_map ; ao_integrals ; ao_num ; get_ao_bielec_integral ;; -mo_integrals_map ; mo_integrals ; n_act ; get_mo_bielec_integral ;; +mo_integrals_map ; mo_integrals ; mo_tot_num ; get_mo_bielec_integral ;; END_TEMPLATE diff --git a/src/Bitmask/README.rst b/src/Bitmask/README.rst index 2a53efd0..bc513e82 100644 --- a/src/Bitmask/README.rst +++ b/src/Bitmask/README.rst @@ -22,7 +22,7 @@ Assumptions =========== .. Do not edit this section. It was auto-generated from the -.. ASSUMPTIONS.rst file. +.. NEEDED_MODULES file. ``bit_kind_shift``, ``bit_kind_size`` and ``bit_kind`` are coherent: @@ -48,3 +48,50 @@ Needed Modules * `Output `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`full_ijkl_bitmask `_ + Bitmask to include all possible MOs + +`hf_bitmask `_ + Hartree Fock bit mask + +`n_int `_ + Number of 64-bit integers needed to represent determinants as binary strings + +`ref_bitmask `_ + Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask + +`bitstring_to_hexa `_ + Transform a bit string to a string in hexadecimal format for printing + +`bitstring_to_list `_ + Gives the inidices(+1) of the bits set to 1 in the bit string + +`bitstring_to_str `_ + Transform a bit string to a string for printing + +`list_to_bitstring `_ + return the physical string "string(N_int,2)" from the array of occupations "list(N_int*bit_kind_size,2) + list + <== ipos ==> + | + v + string :|------------------------|-------------------------|------------------------| + <==== bit_kind_size ====> <==== bit_kind_size ====> <==== bit_kind_size ====> + { iint } { iint } { iint } + + + diff --git a/src/Bitmask/bitmasks.irp.f b/src/Bitmask/bitmasks.irp.f index 06e95431..ccdff541 100644 --- a/src/Bitmask/bitmasks.irp.f +++ b/src/Bitmask/bitmasks.irp.f @@ -55,3 +55,4 @@ BEGIN_PROVIDER [ integer(bit_kind), ref_bitmask, (N_int,2)] ref_bitmask = HF_bitmask END_PROVIDER + diff --git a/src/Bitmask/bitmasks_routines.irp.f b/src/Bitmask/bitmasks_routines.irp.f index bede60de..cb5f98eb 100644 --- a/src/Bitmask/bitmasks_routines.irp.f +++ b/src/Bitmask/bitmasks_routines.irp.f @@ -114,4 +114,18 @@ subroutine bitstring_to_hexa( output, string, Nint ) enddo end - +subroutine debug_det(string,Nint) + implicit none + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: string(Nint,2) + character*(512) :: output(2) + call bitstring_to_hexa( output(1), string(1,1), Nint ) + call bitstring_to_hexa( output(2), string(1,2), Nint ) + print *, trim(output(1)) , '|', trim(output(2)) + + call bitstring_to_str( output(1), string(1,1), N_int ) + call bitstring_to_str( output(2), string(1,2), N_int ) + print *, trim(output(1)) + print *, trim(output(2)) + +end diff --git a/src/CISD/ASSUMPTIONS.rst b/src/CISD/ASSUMPTIONS.rst new file mode 100644 index 00000000..e69de29b diff --git a/src/CISD/H_apply.irp.f b/src/CISD/H_apply.irp.f new file mode 100644 index 00000000..b7f27dfc --- /dev/null +++ b/src/CISD/H_apply.irp.f @@ -0,0 +1,67 @@ +BEGIN_SHELL [ /bin/bash ] +./h_apply.py +END_SHELL + + +subroutine fill_H_apply_buffer_cisd(n_selected,det_buffer,Nint) + use bitmasks + implicit none + BEGIN_DOC + ! Fill the H_apply buffer with determiants for CISD + END_DOC + + integer, intent(in) :: n_selected, Nint + integer(bit_kind), intent(in) :: det_buffer(Nint,2,n_selected) + integer :: i,j,k + integer :: new_size + new_size = H_apply_buffer_N_det + n_selected + if (new_size > h_apply_buffer_size) then + call resize_h_apply_buffer_det(max(h_apply_buffer_size*2,new_size)) + endif + do i=1,H_apply_buffer_N_det + ASSERT (sum(popcnt(h_apply_buffer_det(:,1,i)) )== elec_alpha_num) + ASSERT (sum(popcnt(h_apply_buffer_det(:,2,i))) == elec_beta_num) + enddo + do i=1,n_selected + do j=1,N_int + h_apply_buffer_det(j,1,i+H_apply_buffer_N_det) = det_buffer(j,1,i) + h_apply_buffer_det(j,2,i+H_apply_buffer_N_det) = det_buffer(j,2,i) + enddo + ASSERT (sum(popcnt(h_apply_buffer_det(:,1,i+H_apply_buffer_N_det)) )== elec_alpha_num) + ASSERT (sum(popcnt(h_apply_buffer_det(:,2,i+H_apply_buffer_N_det))) == elec_beta_num) + H_apply_buffer_coef(i,:) = 0.d0 + enddo + H_apply_buffer_N_det = new_size + do i=1,H_apply_buffer_N_det + ASSERT (sum(popcnt(h_apply_buffer_det(:,1,i)) )== elec_alpha_num) + ASSERT (sum(popcnt(h_apply_buffer_det(:,2,i))) == elec_beta_num) + enddo + SOFT_TOUCH H_apply_buffer_det H_apply_buffer_coef H_apply_buffer_N_det +end + + +subroutine H_apply_cisd + implicit none + BEGIN_DOC + ! Calls H_apply on the HF determinant and selects all connected single and double + ! excitations (of the same symmetry). + END_DOC + + integer(bit_kind) :: hole_mask(N_int,2) + integer(bit_kind) :: particle_mask(N_int,2) + hole_mask(:,1) = HF_bitmask(:,1) + hole_mask(:,2) = HF_bitmask(:,2) + particle_mask(:,1) = iand(not(HF_bitmask(:,1)),full_ijkl_bitmask(:,1)) + particle_mask(:,2) = iand(not(HF_bitmask(:,2)),full_ijkl_bitmask(:,2)) + + call H_apply_cisd_monoexc(HF_bitmask, & + hole_mask, particle_mask) + call H_apply_cisd_diexc(HF_bitmask, & + hole_mask, particle_mask, & + hole_mask, particle_mask ) + + call copy_H_apply_buffer_to_wf + +end + + diff --git a/src/CISD/Makefile b/src/CISD/Makefile new file mode 100644 index 00000000..b2ea1de1 --- /dev/null +++ b/src/CISD/Makefile @@ -0,0 +1,8 @@ +default: all + +# Define here all new external source files and objects.Don't forget to prefix the +# object files with IRPF90_temp/ +SRC= +OBJ= + +include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/CISD/NEEDED_MODULES b/src/CISD/NEEDED_MODULES new file mode 100644 index 00000000..f6551dd9 --- /dev/null +++ b/src/CISD/NEEDED_MODULES @@ -0,0 +1 @@ +AOs BiInts Bitmask Dets Electrons Ezfio_files Hartree_Fock MonoInts MOs Nuclei Output Utils diff --git a/src/CISD/README.rst b/src/CISD/README.rst new file mode 100644 index 00000000..cc863454 --- /dev/null +++ b/src/CISD/README.rst @@ -0,0 +1,27 @@ +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `BiInts `_ +* `Bitmask `_ +* `Dets `_ +* `Electrons `_ +* `Ezfio_files `_ +* `Hartree_Fock `_ +* `MonoInts `_ +* `MOs `_ +* `Nuclei `_ +* `Output `_ +* `Utils `_ + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + + + diff --git a/src/CISD/cisd.irp.f b/src/CISD/cisd.irp.f new file mode 100644 index 00000000..7a495d32 --- /dev/null +++ b/src/CISD/cisd.irp.f @@ -0,0 +1,19 @@ +program cisd + implicit none + integer :: i + call H_apply_cisd + double precision, allocatable :: eigvalues(:),eigvectors(:,:) + allocate(eigvalues(n_det),eigvectors(n_det,n_det)) + print *, 'N_det = ', N_det + call lapack_diag(eigvalues,eigvectors,H_matrix_all_dets,n_det,n_det) + +! print *, H_matrix_all_dets + print *, '---' + print *, 'HF:', HF_energy + print *, '---' + do i = 1,3 + print *, 'energy(i) = ',eigvalues(i) + nuclear_repulsion + enddo +! print *, eigvectors(:,1) + deallocate(eigvalues,eigvectors) +end diff --git a/src/CISD/h_apply.py b/src/CISD/h_apply.py new file mode 100755 index 00000000..25a1e328 --- /dev/null +++ b/src/CISD/h_apply.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +import generate_h_apply + +# H_apply +s = generate_h_apply.new_dict(openmp=True) +s["subroutine"] = "H_apply_cisd" +s["keys_work"] = "call fill_H_apply_buffer_cisd(key_idx,keys_out,N_int)" +generate_h_apply.create_h_apply(s) + + diff --git a/src/CISD/tests/Makefile b/src/CISD/tests/Makefile new file mode 100644 index 00000000..77bd84ba --- /dev/null +++ b/src/CISD/tests/Makefile @@ -0,0 +1,33 @@ +OPENMP =1 +PROFILE =0 +DEBUG = 0 + +IRPF90+= -I tests + +REF_FILES=$(subst %.irp.f, %.ref, $(wildcard *.irp.f)) + +.PHONY: clean executables serial_tests parallel_tests + +all: clean executables serial_tests parallel_tests + +parallel_tests: $(REF_FILES) + @echo ; echo " ---- Running parallel tests ----" ; echo + @OMP_NUM_THREADS=10 ${QPACKAGE_ROOT}/scripts/run_tests.py + +serial_tests: $(REF_FILES) + @echo ; echo " ---- Running serial tests ----" ; echo + @OMP_NUM_THREADS=1 ${QPACKAGE_ROOT}/scripts/run_tests.py + +executables: $(wildcard *.irp.f) veryclean + $(MAKE) -C .. + +%.ref: $(wildcard $(QPACKAGE_ROOT)/data/inputs/*.md5) executables + $(QPACKAGE_ROOT)/scripts/create_test_ref.sh $* + +clean: + $(MAKE) -C .. clean + +veryclean: + $(MAKE) -C .. veryclean + + diff --git a/src/Dets/ASSUMPTIONS.rst b/src/Dets/ASSUMPTIONS.rst new file mode 100644 index 00000000..e9e24d09 --- /dev/null +++ b/src/Dets/ASSUMPTIONS.rst @@ -0,0 +1,7 @@ +* The MOs are orthonormal +* All the determinants have the same number of electrons +* The determinants are orthonormal +* The number of generator determinants <= the number of determinants +* All the determinants in the H_apply buffer are supposed to be different from the + wave function determinants +* All the determinants in the H_apply buffer are supposed to be unique diff --git a/src/Dets/H_apply.irp.f b/src/Dets/H_apply.irp.f new file mode 100644 index 00000000..5fdeffc7 --- /dev/null +++ b/src/Dets/H_apply.irp.f @@ -0,0 +1,157 @@ +use bitmasks + +BEGIN_PROVIDER [ double precision, H_apply_threshold ] + implicit none + BEGIN_DOC + ! Theshold on | | + END_DOC + logical :: has + PROVIDE ezfio_filename + call ezfio_has_determinants_H_apply_threshold(has) + if (has) then + call ezfio_get_determinants_H_apply_threshold(H_apply_threshold) + else + H_apply_threshold = 1.d-10 + call ezfio_set_determinants_H_apply_threshold(H_apply_threshold) + endif + call write_time(output_Dets) + call write_double(output_Dets, H_apply_threshold, & + 'H_apply_threshold') +END_PROVIDER + +BEGIN_PROVIDER [ integer*8, H_apply_buffer_size ] + implicit none + BEGIN_DOC + ! Size of the H_apply buffer. + END_DOC + H_apply_buffer_size = 1000 + +END_PROVIDER + +subroutine resize_H_apply_buffer_det(new_size) + implicit none + integer, intent(in) :: new_size + integer(bit_kind), allocatable :: buffer_det(:,:,:) + double precision, allocatable :: buffer_coef(:,:) + integer :: i,j,k + integer :: Ndet + + ASSERT (new_size > 0) + allocate ( buffer_det(N_int,2,new_size), buffer_coef(new_size,N_states) ) + + do i=1,min(new_size,H_apply_buffer_N_det) + do k=1,N_int + buffer_det(k,1,i) = H_apply_buffer_det(k,1,i) + buffer_det(k,2,i) = H_apply_buffer_det(k,2,i) + enddo + ASSERT (sum(popcnt(H_apply_buffer_det(:,1,i))) == elec_alpha_num) + ASSERT (sum(popcnt(H_apply_buffer_det(:,2,i))) == elec_beta_num ) + enddo + do k=1,N_states + do i=1,min(new_size,H_apply_buffer_N_det) + buffer_coef(i,k) = H_apply_buffer_coef(i,k) + enddo + enddo + + H_apply_buffer_size = new_size + Ndet = min(new_size,H_apply_buffer_N_det) + TOUCH H_apply_buffer_size + + H_apply_buffer_N_det = Ndet + + do i=1,H_apply_buffer_N_det + do k=1,N_int + H_apply_buffer_det(k,1,i) = buffer_det(k,1,i) + H_apply_buffer_det(k,2,i) = buffer_det(k,2,i) + enddo + ASSERT (sum(popcnt(H_apply_buffer_det(:,1,i))) == elec_alpha_num) + ASSERT (sum(popcnt(H_apply_buffer_det(:,2,i))) == elec_beta_num ) + enddo + do k=1,N_states + do i=1,H_apply_buffer_N_det + H_apply_buffer_coef(i,k) = buffer_coef(i,k) + enddo + enddo + + deallocate (buffer_det, buffer_coef) + SOFT_TOUCH H_apply_buffer_det H_apply_buffer_coef H_apply_buffer_N_det + +end + + BEGIN_PROVIDER [ integer(bit_kind), H_apply_buffer_det,(N_int,2,H_apply_buffer_size) ] +&BEGIN_PROVIDER [ double precision, H_apply_buffer_coef,(H_apply_buffer_size,N_states) ] +&BEGIN_PROVIDER [ integer, H_apply_buffer_N_det ] + implicit none + BEGIN_DOC + ! Buffer of determinants/coefficients for H_apply. Uninitialized. Filled by H_apply subroutines. + END_DOC + H_apply_buffer_N_det = 0 + +END_PROVIDER + + +subroutine copy_H_apply_buffer_to_wf + implicit none + integer(bit_kind), allocatable :: buffer_det(:,:,:) + double precision, allocatable :: buffer_coef(:,:) + integer :: i,j,k + integer :: N_det_old + + ASSERT (N_int > 0) + ASSERT (N_det > 0) + + allocate ( buffer_det(N_int,2,N_det), buffer_coef(N_det,N_states) ) + + do i=1,N_det + do k=1,N_int + ASSERT (sum(popcnt(psi_det(:,1,i))) == elec_alpha_num) + ASSERT (sum(popcnt(psi_det(:,2,i))) == elec_beta_num) + buffer_det(k,1,i) = psi_det(k,1,i) + buffer_det(k,2,i) = psi_det(k,2,i) + enddo + enddo + do k=1,N_states + do i=1,N_det + buffer_coef(i,k) = psi_coef(i,k) + enddo + enddo + + N_det_old = N_det + N_det = N_det + H_apply_buffer_N_det + TOUCH N_det + + do i=1,N_det_old + do k=1,N_int + psi_det(k,1,i) = buffer_det(k,1,i) + psi_det(k,2,i) = buffer_det(k,2,i) + enddo + ASSERT (sum(popcnt(psi_det(:,1,i))) == elec_alpha_num) + ASSERT (sum(popcnt(psi_det(:,2,i))) == elec_beta_num ) + enddo + do i=1,H_apply_buffer_N_det + do k=1,N_int + psi_det(k,1,i+N_det_old) = H_apply_buffer_det(k,1,i) + psi_det(k,2,i+N_det_old) = H_apply_buffer_det(k,2,i) + enddo + ASSERT (sum(popcnt(psi_det(:,1,i+N_det_old))) == elec_alpha_num) + ASSERT (sum(popcnt(psi_det(:,2,i+N_det_old))) == elec_beta_num ) + enddo + do k=1,N_states + do i=1,N_det_old + psi_coef(i,k) = buffer_coef(i,k) + enddo + do i=1,H_apply_buffer_N_det + psi_coef(i+N_det_old,k) = H_apply_buffer_coef(i,k) + enddo + enddo + + SOFT_TOUCH psi_det psi_coef + +end + + + + + + + diff --git a/src/Dets/H_apply_template.f b/src/Dets/H_apply_template.f new file mode 100644 index 00000000..21c73377 --- /dev/null +++ b/src/Dets/H_apply_template.f @@ -0,0 +1,356 @@ +subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2 $parameters ) + use omp_lib + use bitmasks + implicit none + $declarations + integer(omp_lock_kind) :: lck + integer(bit_kind),intent(in) :: key_in(N_int,2) + integer(bit_kind),allocatable :: keys_out(:,:,:) + double precision, allocatable :: hij_tab(:) + integer(bit_kind), intent(in) :: hole_1(N_int,2), particl_1(N_int,2) + integer(bit_kind), intent(in) :: hole_2(N_int,2), particl_2(N_int,2) + integer(bit_kind) :: hole_save(N_int,2) + integer(bit_kind) :: key(N_int,2),hole(N_int,2), particle(N_int,2) + integer(bit_kind) :: hole_tmp(N_int,2), particle_tmp(N_int,2) + integer :: ii,i,jj,j,k,ispin,l + integer :: occ_particle(N_int*bit_kind_size,2) + integer :: occ_hole(N_int*bit_kind_size,2) + integer :: occ_particle_tmp(N_int*bit_kind_size,2) + integer :: occ_hole_tmp(N_int*bit_kind_size,2) + integer :: kk,pp,other_spin,key_idx + integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2) + integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2) + + integer,parameter :: size_max = $size_max + double precision :: hij_elec, mo_bielec_integral, thresh + integer, allocatable :: ia_ja_pairs(:,:,:) + double precision :: diag_H_mat_elem, E_ref + + PROVIDE mo_integrals_map + PROVIDE mo_bielec_integrals_in_map + + $set_i_H_j_threshold + + $omp_init_lock + + + E_ref = diag_H_mat_elem(key_in,N_int) + + $initialization + + $omp_parallel + allocate (keys_out(N_int,2,size_max),hij_tab(size_max)) + + !print*,'key_in !!' + !call print_key(key_in) + !print*,'hole_1, particl_1' + !call print_key(hole_1) + !call print_key(particl_1) + !print*,'hole_2, particl_2' + !call print_key(hole_2) + !call print_key(particl_2) + + + !!!! First couple hole particle + do j = 1, N_int + hole(j,1) = iand(hole_1(j,1),key_in(j,1)) + hole(j,2) = iand(hole_1(j,2),key_in(j,2)) + particle(j,1) = iand(xor(particl_1(j,1),key_in(j,1)),particl_1(j,1)) + particle(j,2) = iand(xor(particl_1(j,2),key_in(j,2)),particl_1(j,2)) + enddo + call bitstring_to_list(particle(1,1),occ_particle(1,1),N_elec_in_key_part_1(1),N_int) + call bitstring_to_list(particle(1,2),occ_particle(1,2),N_elec_in_key_part_1(2),N_int) + call bitstring_to_list(hole(1,1),occ_hole(1,1),N_elec_in_key_hole_1(1),N_int) + call bitstring_to_list(hole(1,2),occ_hole(1,2),N_elec_in_key_hole_1(2),N_int) + allocate (ia_ja_pairs(2,0:(elec_alpha_num)*mo_tot_num,2)) + + do ispin=1,2 + i=0 + do ii=N_elec_in_key_hole_1(ispin),1,-1 ! hole + i_a = occ_hole(ii,ispin) + ASSERT (i_a > 0) + ASSERT (i_a <= mo_tot_num) + + do jj=1,N_elec_in_key_part_1(ispin) !particle + j_a = occ_particle(jj,ispin) + ASSERT (j_a > 0) + ASSERT (j_a <= mo_tot_num) + i += 1 + ia_ja_pairs(1,i,ispin) = i_a + ia_ja_pairs(2,i,ispin) = j_a + enddo + enddo + ia_ja_pairs(1,0,ispin) = i + enddo + + key_idx = 0 + + integer :: i_a,j_a,i_b,j_b,k_a,l_a,k_b,l_b + integer(bit_kind) :: test(N_int,2) + double precision :: accu + accu = 0.d0 + hij_elec = 0.d0 + do ispin=1,2 + other_spin = iand(ispin,1)+1 + $omp_do + do ii=1,ia_ja_pairs(1,0,ispin) + i_a = ia_ja_pairs(1,ii,ispin) + ASSERT (i_a > 0) + ASSERT (i_a <= mo_tot_num) + j_a = ia_ja_pairs(2,ii,ispin) + ASSERT (j_a > 0) + ASSERT (j_a <= mo_tot_num) + hole = key_in + k = ishft(i_a-1,-bit_kind_shift)+1 + j = i_a-ishft(k-1,bit_kind_shift)-1 + hole(k,ispin) = ibclr(hole(k,ispin),j) + k_a = ishft(j_a-1,-bit_kind_shift)+1 + l_a = j_a-ishft(k_a-1,bit_kind_shift)-1 + hole(k_a,ispin) = ibset(hole(k_a,ispin),l_a) + + !!!! Second couple hole particle + do j = 1, N_int + hole_tmp(j,1) = iand(hole_2(j,1),hole(j,1)) + hole_tmp(j,2) = iand(hole_2(j,2),hole(j,2)) + particle_tmp(j,1) = iand(xor(particl_2(j,1),hole(j,1)),particl_2(j,1)) + particle_tmp(j,2) = iand(xor(particl_2(j,2),hole(j,2)),particl_2(j,2)) + enddo + + call bitstring_to_list(particle_tmp(1,1),occ_particle_tmp(1,1),N_elec_in_key_part_2(1),N_int) + call bitstring_to_list(particle_tmp(1,2),occ_particle_tmp(1,2),N_elec_in_key_part_2(2),N_int) + call bitstring_to_list(hole_tmp (1,1),occ_hole_tmp (1,1),N_elec_in_key_hole_2(1),N_int) + call bitstring_to_list(hole_tmp (1,2),occ_hole_tmp (1,2),N_elec_in_key_hole_2(2),N_int) + + ! hole = a^(+)_j_a(ispin) a_i_a(ispin)|key_in> : mono exc :: orb(i_a,ispin) --> orb(j_a,ispin) + hole_save = hole + if (ispin == 1) then + integer :: jjj + + do kk = 1,N_elec_in_key_hole_2(other_spin) + hole = hole_save + i_b = occ_hole_tmp(kk,other_spin) + ASSERT (i_b > 0) + ASSERT (i_b <= mo_tot_num) + k = ishft(i_b-1,-bit_kind_shift)+1 + j = i_b-ishft(k-1,bit_kind_shift)-1 + hole(k,other_spin) = ibclr(hole(k,other_spin),j) + do jjj=1,N_elec_in_key_part_2(other_spin) ! particule + j_b = occ_particle_tmp(jjj,other_spin) + ASSERT (j_b > 0) + ASSERT (j_b <= mo_tot_num) + if(dabs( mo_bielec_integral(j_a,j_b,i_a,i_b))=thresh) then + key_idx += 1 + do k=1,N_int + keys_out(k,1,key_idx) = key(k,1) + keys_out(k,2,key_idx) = key(k,2) + enddo + hij_tab(key_idx) = hij_elec + ASSERT (key_idx <= size_max) + if (key_idx == size_max) then + $omp_set_lock + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + enddo + if (key_idx > ishft(size_max,-5)) then + if ($omp_test_lock) then + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + enddo + endif + ! does all the mono excitations of the same spin + do kk = 1,N_elec_in_key_hole_2(ispin) + i_b = occ_hole_tmp(kk,ispin) + ASSERT (i_b > 0) + ASSERT (i_b <= mo_tot_num) + if (i_b <= i_a.or.i_b == j_a) cycle + hole = hole_save + k = ishft(i_b-1,-bit_kind_shift)+1 + j = i_b-ishft(k-1,bit_kind_shift)-1 + hole(k,ispin) = ibclr(hole(k,ispin),j) + do jjj=1,N_elec_in_key_part_2(ispin) + j_b = occ_particle_tmp(jjj,ispin) + ASSERT (j_b > 0) + ASSERT (j_b <= mo_tot_num) + if (j_b <= j_a) cycle + if(dabs( mo_bielec_integral(j_a,j_b,i_b,i_a)) orb(j_b,ispin) + + call i_H_j(key,key_in,N_int,hij_elec) + if(dabs(hij_elec)>=thresh) then + key_idx += 1 + do k=1,N_int + keys_out(k,1,key_idx) = key(k,1) + keys_out(k,2,key_idx) = key(k,2) + enddo + hij_tab(key_idx) = hij_elec + ASSERT (key_idx <= size_max) + if (key_idx == size_max) then + $omp_set_lock + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + enddo + if (key_idx > ishft(size_max,-5)) then + if ($omp_test_lock) then + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + enddo! kk + enddo ! ii + $omp_enddo + enddo ! ispin + $omp_set_lock + $keys_work + $omp_unset_lock + deallocate (keys_out,hij_tab,ia_ja_pairs) + $omp_end_parallel + $omp_destroy_lock + $finalization + +end + +subroutine $subroutine_monoexc(key_in, hole_1,particl_1 $parameters ) + use omp_lib + use bitmasks + implicit none + $declarations + integer(omp_lock_kind) :: lck + integer(bit_kind),intent(in) :: key_in(N_int,2) + integer(bit_kind),allocatable :: keys_out(:,:,:) + double precision, allocatable :: hij_tab(:) + integer(bit_kind), intent(in) :: hole_1(N_int,2), particl_1(N_int,2) + integer(bit_kind) :: hole_2(N_int,2), particl_2(N_int,2) + integer(bit_kind) :: hole_save(N_int,2) + integer(bit_kind) :: key(N_int,2),hole(N_int,2), particle(N_int,2) + integer(bit_kind) :: hole_tmp(N_int,2), particle_tmp(N_int,2) + integer :: ii,i,jj,j,k,ispin,l + integer :: occ_particle(N_int*bit_kind_size,2) + integer :: occ_hole(N_int*bit_kind_size,2) + integer :: occ_particle_tmp(N_int*bit_kind_size,2) + integer :: occ_hole_tmp(N_int*bit_kind_size,2) + integer :: kk,pp,other_spin,key_idx + integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2) + integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2) + + integer,parameter :: size_max = $size_max + double precision :: hij_elec, thresh + integer, allocatable :: ia_ja_pairs(:,:,:) + double precision :: diag_H_mat_elem, E_ref + + PROVIDE mo_integrals_map + PROVIDE mo_bielec_integrals_in_map + + $set_i_H_j_threshold + + $omp_init_lock + + + E_ref = diag_H_mat_elem(key_in,N_int) + + $initialization + + $omp_parallel + allocate (keys_out(N_int,2,size_max),hij_tab(size_max)) + !!!! First couple hole particle + do j = 1, N_int + hole(j,1) = iand(hole_1(j,1),key_in(j,1)) + hole(j,2) = iand(hole_1(j,2),key_in(j,2)) + particle(j,1) = iand(xor(particl_1(j,1),key_in(j,1)),particl_1(j,1)) + particle(j,2) = iand(xor(particl_1(j,2),key_in(j,2)),particl_1(j,2)) + enddo + + call bitstring_to_list(particle(1,1),occ_particle(1,1),N_elec_in_key_part_1(1),N_int) + call bitstring_to_list(particle(1,2),occ_particle(1,2),N_elec_in_key_part_1(2),N_int) + call bitstring_to_list(hole (1,1),occ_hole (1,1),N_elec_in_key_hole_1(1),N_int) + call bitstring_to_list(hole (1,2),occ_hole (1,2),N_elec_in_key_hole_1(2),N_int) + allocate (ia_ja_pairs(2,0:(elec_alpha_num)*mo_tot_num,2)) + + do ispin=1,2 + i=0 + do ii=N_elec_in_key_hole_1(ispin),1,-1 ! hole + i_a = occ_hole(ii,ispin) + do jj=1,N_elec_in_key_part_1(ispin) !particule + j_a = occ_particle(jj,ispin) + i += 1 + ia_ja_pairs(1,i,ispin) = i_a + ia_ja_pairs(2,i,ispin) = j_a + enddo + enddo + ia_ja_pairs(1,0,ispin) = i + enddo + + key_idx = 0 + + integer :: i_a,j_a,i_b,j_b,k_a,l_a,k_b,l_b + integer(bit_kind) :: test(N_int,2) + double precision :: accu + accu = 0.d0 + hij_elec = 0.d0 + do ispin=1,2 + other_spin = iand(ispin,1)+1 + $omp_do + do ii=1,ia_ja_pairs(1,0,ispin) + i_a = ia_ja_pairs(1,ii,ispin) + j_a = ia_ja_pairs(2,ii,ispin) + hole = key_in + k = ishft(i_a-1,-bit_kind_shift)+1 + j = i_a-ishft(k-1,bit_kind_shift)-1 + hole(k,ispin) = ibclr(hole(k,ispin),j) + k_a = ishft(j_a-1,-bit_kind_shift)+1 + l_a = j_a-ishft(k_a-1,bit_kind_shift)-1 + hole(k_a,ispin) = ibset(hole(k_a,ispin),l_a) + call i_H_j(hole,key_in,N_int,hij_elec) + if(dabs(hij_elec) .ge. thresh)then + key_idx += 1 + do k=1,N_int + keys_out(k,1,key_idx) = hole(k,1) + keys_out(k,2,key_idx) = hole(k,2) + enddo + hij_tab(key_idx) = hij_elec + if (key_idx > ishft(size_max,-5)) then + if ($omp_test_lock) then + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + if (key_idx == size_max) then + $omp_set_lock + $keys_work + $omp_unset_lock + key_idx = 0 + endif + endif + enddo ! ii + $omp_enddo + enddo ! ispin + $omp_set_lock + $keys_work + $omp_unset_lock + deallocate (keys_out,hij_tab,ia_ja_pairs) + $omp_end_parallel + $omp_destroy_lock + $finalization + +end + diff --git a/src/Dets/NEEDED_MODULES b/src/Dets/NEEDED_MODULES new file mode 100644 index 00000000..26eb5a9a --- /dev/null +++ b/src/Dets/NEEDED_MODULES @@ -0,0 +1 @@ +AOs BiInts Bitmask Electrons Ezfio_files Hartree_Fock MonoInts MOs Nuclei Output Utils diff --git a/src/Dets/README.rst b/src/Dets/README.rst new file mode 100644 index 00000000..501f440c --- /dev/null +++ b/src/Dets/README.rst @@ -0,0 +1,54 @@ +=========== +Dets Module +=========== + +This module contains the determinants of the CI wave function. + +H is applied on the list of generator determinants. Selected determinants +are added into the *H_apply buffer*. Then the new wave function is +constructred as the concatenation of the odl wave function and +some determinants of the H_apply buffer. Generator determinants are built +as a subset of the determinants of the wave function. + + +Assumptions +=========== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* The MOs are orthonormal +* All the determinants have the same number of electrons +* The determinants are orthonormal +* The number of generator determinants <= the number of determinants +* All the determinants in the H_apply buffer are supposed to be different from the + wave function determinants +* All the determinants in the H_apply buffer are supposed to be unique + + +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `BiInts `_ +* `Bitmask `_ +* `Electrons `_ +* `Ezfio_files `_ +* `Hartree_Fock `_ +* `MonoInts `_ +* `MOs `_ +* `Nuclei `_ +* `Output `_ +* `Utils `_ + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + + + diff --git a/src/Dets/determinants.irp.f b/src/Dets/determinants.irp.f new file mode 100644 index 00000000..829d5693 --- /dev/null +++ b/src/Dets/determinants.irp.f @@ -0,0 +1,69 @@ +use bitmasks + +BEGIN_PROVIDER [ integer, N_states ] + implicit none + BEGIN_DOC +! Number of states to consider + END_DOC + N_states = 1 +END_PROVIDER + +BEGIN_PROVIDER [ integer, N_det ] + implicit none + BEGIN_DOC + ! Number of determinants in the wave function + END_DOC + N_det = max(1,N_states) +END_PROVIDER + + BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,N_det) ] +&BEGIN_PROVIDER [ double precision, psi_coef, (N_det,N_states) ] + implicit none + BEGIN_DOC + ! The wave function. Initialized with Hartree-Fock + END_DOC + + integer, save :: ifirst = 0 + + if (ifirst == 0) then + ifirst = 1 + psi_det = 0_bit_kind + psi_coef = 0.d0 + + integer :: i + do i=1,N_int + psi_det(i,1,1) = HF_bitmask(i,1) + psi_det(i,2,1) = HF_bitmask(i,2) + enddo + + do i=1,N_states + psi_coef(i,i) = 1.d0 + enddo + endif + +END_PROVIDER + + +BEGIN_PROVIDER [ integer, N_det_generators ] + implicit none + BEGIN_DOC + ! Number of generator determinants in the wave function + END_DOC + N_det_generators = N_det +END_PROVIDER + +BEGIN_PROVIDER [ integer(bit_kind), psi_generators, (N_int,2,N_det) ] + implicit none + BEGIN_DOC + ! Determinants on which H is applied + END_DOC + psi_generators = 0_bit_kind + integer :: i + + do i=1,N_int + psi_generators(i,1,1) = psi_det(i,1,1) + psi_generators(i,2,1) = psi_det(i,1,1) + enddo + +END_PROVIDER + diff --git a/src/Dets/determinants_bitmasks.irp.f b/src/Dets/determinants_bitmasks.irp.f new file mode 100644 index 00000000..8343fa84 --- /dev/null +++ b/src/Dets/determinants_bitmasks.irp.f @@ -0,0 +1,57 @@ +use bitmasks + +integer, parameter :: hole_ = 1 +integer, parameter :: particle_ = 2 +integer, parameter :: hole2_ = 3 +integer, parameter :: particle2_= 4 + +BEGIN_PROVIDER [ integer, N_single_exc_bitmasks ] + implicit none + BEGIN_DOC + ! Number of single excitation bitmasks + END_DOC + N_single_exc_bitmasks = 1 + !TODO : Read from input! +END_PROVIDER + +BEGIN_PROVIDER [ integer(bit_kind), single_exc_bitmask, (N_int, 2, N_single_exc_bitmasks) ] + implicit none + BEGIN_DOC + ! single_exc_bitmask(:,1,i) is the bitmask for holes + ! single_exc_bitmask(:,2,i) is the bitmask for particles + ! for a given couple of hole/particle excitations i. + END_DOC + + single_exc_bitmask(:,hole_,1) = HF_bitmask(:,1) + single_exc_bitmask(:,particle_,1) = not(HF_bitmask(:,2)) + !TODO : Read from input! +END_PROVIDER + + +BEGIN_PROVIDER [ integer, N_double_exc_bitmasks ] + implicit none + BEGIN_DOC + ! Number of double excitation bitmasks + END_DOC + N_double_exc_bitmasks = 1 + !TODO : Read from input! +END_PROVIDER + +BEGIN_PROVIDER [ integer(bit_kind), double_exc_bitmask, (N_int, 4, N_double_exc_bitmasks) ] + implicit none + BEGIN_DOC + ! double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1 + ! double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1 + ! double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2 + ! double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2 + ! for a given couple of hole/particle excitations i. + END_DOC + + double_exc_bitmask(:,hole_,1) = HF_bitmask(:,1) + double_exc_bitmask(:,particle_,1) = not(HF_bitmask(:,2)) + double_exc_bitmask(:,hole2_,1) = HF_bitmask(:,1) + double_exc_bitmask(:,particle2_,1) = not(HF_bitmask(:,2)) + + !TODO : Read from input! +END_PROVIDER + diff --git a/src/Dets/s2.irp.f b/src/Dets/s2.irp.f new file mode 100644 index 00000000..c970d628 --- /dev/null +++ b/src/Dets/s2.irp.f @@ -0,0 +1,34 @@ +subroutine get_s2(key_i,key_j,phase,Nint) + implicit none + BEGIN_DOC +! Returns + END_DOC + integer, intent(in) :: Nint + integer, intent(in) :: key_i(Nint,2) + integer, intent(in) :: key_j(Nint,2) + double precision, intent(out) :: phase + integer :: exc(0:2,2,2) + integer :: degree + double precision :: phase_spsm + integer :: nup, i + + phase = 0.d0 + !$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_spsm,Nint) + if (exc(0,1,1) == 1) then ! Mono alpha + mono-beta + if ( (exc(1,1,1) == exc(1,2,2)).and.(exc(1,1,2) == exc(1,2,1)) ) then + phase = -phase_spsm + endif + endif + case(0) + nup = 0 + do i=1,Nint + nup += popcnt(iand(xor(key_i(i,1),key_i(i,2)),key_i(i,1))) + enddo + phase = dble(nup) + end select +end + diff --git a/src/Dets/slater_rules.irp.f b/src/Dets/slater_rules.irp.f new file mode 100644 index 00000000..93487c6d --- /dev/null +++ b/src/Dets/slater_rules.irp.f @@ -0,0 +1,949 @@ +subroutine get_excitation_degree(key1,key2,degree,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Returns the excitation degree between two determinants + END_DOC + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: key1(Nint,2) + integer(bit_kind), intent(in) :: key2(Nint,2) + integer, intent(out) :: degree + + integer :: l + + ASSERT (Nint > 0) + + degree = popcnt(xor( key1(1,1), key2(1,1))) + & + popcnt(xor( key1(1,2), key2(1,2))) + !DEC$ NOUNROLL + do l=2,Nint + degree = degree+ popcnt(xor( key1(l,1), key2(l,1))) + & + popcnt(xor( key1(l,2), key2(l,2))) + enddo + ASSERT (degree >= 0) + degree = ishft(degree,-1) + +end + + + +subroutine get_excitation(det1,det2,exc,degree,phase,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Returns the excitation operators between two determinants and the phase + END_DOC + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: det1(Nint,2) + integer(bit_kind), intent(in) :: det2(Nint,2) + integer, intent(out) :: exc(0:2,2,2) + integer, intent(out) :: degree + double precision, intent(out) :: phase + ! exc(number,hole/particle,spin) + ! ex : + ! exc(0,1,1) = number of holes alpha + ! exc(0,2,1) = number of particle alpha + ! exc(0,2,2) = number of particle beta + ! exc(1,2,1) = first particle alpha + ! exc(1,1,1) = first hole alpha + ! exc(1,2,2) = first particle beta + ! exc(1,1,2) = first hole beta + + ASSERT (Nint > 0) + + !DIR$ FORCEINLINE + call get_excitation_degree(det1,det2,degree,Nint) + select case (degree) + + case (3:) + degree = -1 + return + + case (2) + call get_double_excitation(det1,det2,exc,phase,Nint) + return + + case (1) + call get_mono_excitation(det1,det2,exc,phase,Nint) + return + + case(0) + return + + end select +end + +subroutine decode_exc(exc,degree,h1,p1,h2,p2,s1,s2) + implicit none + BEGIN_DOC + ! Decodes the exc arrays returned by get_excitation. + ! h1,h2 : Holes + ! p1,p2 : Particles + ! s1,s2 : Spins (1:alpha, 2:beta) + ! degree : Degree of excitation + END_DOC + integer, intent(in) :: exc(0:2,2,2),degree + integer, intent(out) :: h1,h2,p1,p2,s1,s2 + ASSERT (degree > 0) + ASSERT (degree < 3) + + select case(degree) + case(2) + if (exc(0,1,1) == 2) then + h1 = exc(1,1,1) + h2 = exc(2,1,1) + p1 = exc(1,2,1) + p2 = exc(2,2,1) + s1 = 1 + s2 = 1 + else if (exc(0,1,2) == 2) then + h1 = exc(1,1,2) + h2 = exc(2,1,2) + p1 = exc(1,2,2) + p2 = exc(2,2,2) + s1 = 2 + s2 = 2 + else + h1 = exc(1,1,1) + h2 = exc(1,1,2) + p1 = exc(1,2,1) + p2 = exc(1,2,2) + s1 = 1 + s2 = 2 + endif + case(1) + if (exc(0,1,1) == 1) then + h1 = exc(1,1,1) + h2 = 0 + p1 = exc(1,2,1) + p2 = 0 + s1 = 1 + s2 = 0 + else + h1 = exc(1,1,2) + h2 = 0 + p1 = exc(1,2,2) + p2 = 0 + s1 = 2 + s2 = 0 + endif + case(0) + h1 = 0 + p1 = 0 + h2 = 0 + p2 = 0 + s1 = 0 + s2 = 0 + end select +end + +subroutine get_double_excitation(det1,det2,exc,phase,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Returns the two excitation operators between two doubly excited determinants and the phase + END_DOC + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: det1(Nint,2) + integer(bit_kind), intent(in) :: det2(Nint,2) + integer, intent(out) :: exc(0:2,2,2) + double precision, intent(out) :: phase + integer :: tz + integer :: l, ispin, idx_hole, idx_particle, ishift + integer :: nperm + integer :: i,j,k,m,n + integer :: high, low + integer :: a,b,c,d + integer(bit_kind) :: hole, particle, tmp + double precision, parameter :: phase_dble(0:1) = (/ 1.d0, -1.d0 /) + + ASSERT (Nint > 0) + nperm = 0 + exc(0,1,1) = 0 + exc(0,2,1) = 0 + exc(0,1,2) = 0 + exc(0,2,2) = 0 + do ispin = 1,2 + idx_particle = 0 + idx_hole = 0 + ishift = 1-bit_kind_size + do l=1,Nint + ishift = ishift + bit_kind_size + if (det1(l,ispin) == det2(l,ispin)) then + cycle + endif + tmp = xor( det1(l,ispin), det2(l,ispin) ) + particle = iand(tmp, det2(l,ispin)) + hole = iand(tmp, det1(l,ispin)) + do while (particle /= 0_bit_kind) + tz = trailz(particle) + idx_particle = idx_particle + 1 + exc(0,2,ispin) = exc(0,2,ispin) + 1 + exc(idx_particle,2,ispin) = tz+ishift + particle = iand(particle,particle-1_bit_kind) + enddo + if (iand(exc(0,1,ispin),exc(0,2,ispin))==2) then ! exc(0,1,ispin)==2 or exc(0,2,ispin)==2 + exit + endif + do while (hole /= 0_bit_kind) + tz = trailz(hole) + idx_hole = idx_hole + 1 + exc(0,1,ispin) = exc(0,1,ispin) + 1 + exc(idx_hole,1,ispin) = tz+ishift + hole = iand(hole,hole-1_bit_kind) + enddo + if (iand(exc(0,1,ispin),exc(0,2,ispin))==2) then ! exc(0,1,ispin)==2 or exc(0,2,ispin) + exit + endif + enddo + + ! TODO : Voir si il faut sortir i,n,k,m du case. + + select case (exc(0,1,ispin)) + case(0) + cycle + + case(1) + low = min(exc(1,1,ispin), exc(1,2,ispin)) + high = max(exc(1,1,ispin), exc(1,2,ispin)) + + ASSERT (low > 0) + j = ishft(low-1,-bit_kind_shift)+1 ! Find integer in array(Nint) + n = iand(low,bit_kind_size-1) ! mod(low,bit_kind_size) + ASSERT (high > 0) + k = ishft(high-1,-bit_kind_shift)+1 + m = iand(high,bit_kind_size-1) + + if (j==k) then + nperm = nperm + popcnt(iand(det1(j,ispin), & + iand( ibset(0_bit_kind,m-1)-1_bit_kind, & + ibclr(-1_bit_kind,n)+1_bit_kind ) )) + else + nperm = nperm + popcnt(iand(det1(k,ispin), & + ibset(0_bit_kind,m-1)-1_bit_kind)) + & + popcnt(iand(det1(j,ispin), ibclr(-1_bit_kind,n) +1_bit_kind)) + do i=j+1,k-1 + nperm = nperm + popcnt(det1(i,ispin)) + end do + endif + + case (2) + + do i=1,2 + low = min(exc(i,1,ispin), exc(i,2,ispin)) + high = max(exc(i,1,ispin), exc(i,2,ispin)) + + ASSERT (low > 0) + j = ishft(low-1,-bit_kind_shift)+1 ! Find integer in array(Nint) + n = iand(low,bit_kind_size-1) ! mod(low,bit_kind_size) + ASSERT (high > 0) + k = ishft(high-1,-bit_kind_shift)+1 + m = iand(high,bit_kind_size-1) + + if (j==k) then + nperm = nperm + popcnt(iand(det1(j,ispin), & + iand( ibset(0_bit_kind,m-1)-1_bit_kind, & + ibclr(-1_bit_kind,n)+1_bit_kind ) )) + else + nperm = nperm + popcnt(iand(det1(k,ispin), & + ibset(0_bit_kind,m-1)-1_bit_kind)) + & + popcnt(iand(det1(j,ispin), ibclr(-1_bit_kind,n) +1_bit_kind)) + do l=j+1,k-1 + nperm = nperm + popcnt(det1(l,ispin)) + end do + endif + + enddo + + a = min(exc(1,1,ispin), exc(1,2,ispin)) + b = max(exc(1,1,ispin), exc(1,2,ispin)) + c = min(exc(2,1,ispin), exc(2,2,ispin)) + d = max(exc(2,1,ispin), exc(2,2,ispin)) + if (c>a .and. cb) then + nperm = nperm + 1 + endif + exit + end select + + enddo + phase = phase_dble(iand(nperm,1)) + +end + +subroutine get_mono_excitation(det1,det2,exc,phase,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Returns the excitation operator between two singly excited determinants and the phase + END_DOC + integer, intent(in) :: Nint + integer(bit_kind), intent(in) :: det1(Nint,2) + integer(bit_kind), intent(in) :: det2(Nint,2) + integer, intent(out) :: exc(0:2,2,2) + double precision, intent(out) :: phase + integer :: tz + integer :: l, ispin, idx_hole, idx_particle, ishift + integer :: nperm + integer :: i,j,k,m,n + integer :: high, low + integer :: a,b,c,d + integer(bit_kind) :: hole, particle, tmp + double precision, parameter :: phase_dble(0:1) = (/ 1.d0, -1.d0 /) + + ASSERT (Nint > 0) + nperm = 0 + exc(0,1,1) = 0 + exc(0,2,1) = 0 + exc(0,1,2) = 0 + exc(0,2,2) = 0 + do ispin = 1,2 + ishift = 1-bit_kind_size + do l=1,Nint + ishift = ishift + bit_kind_size + if (det1(l,ispin) == det2(l,ispin)) then + cycle + endif + tmp = xor( det1(l,ispin), det2(l,ispin) ) + particle = iand(tmp, det2(l,ispin)) + hole = iand(tmp, det1(l,ispin)) + if (particle /= 0_bit_kind) then + tz = trailz(particle) + exc(0,2,ispin) = 1 + exc(1,2,ispin) = tz+ishift + endif + if (hole /= 0_bit_kind) then + tz = trailz(hole) + exc(0,1,ispin) = 1 + exc(1,1,ispin) = tz+ishift + endif + + if ( iand(exc(0,1,ispin),exc(0,2,ispin)) /= 1) then ! exc(0,1,ispin)/=1 and exc(0,2,ispin) /= 1 + cycle + endif + + low = min(exc(1,1,ispin),exc(1,2,ispin)) + high = max(exc(1,1,ispin),exc(1,2,ispin)) + + ASSERT (low > 0) + j = ishft(low-1,-bit_kind_shift)+1 ! Find integer in array(Nint) + n = iand(low,bit_kind_size-1) ! mod(low,bit_kind_size) + ASSERT (high > 0) + k = ishft(high-1,-bit_kind_shift)+1 + m = iand(high,bit_kind_size-1) + if (j==k) then + nperm = popcnt(iand(det1(j,ispin), & + iand(ibset(0_bit_kind,m-1)-1_bit_kind,ibclr(-1_bit_kind,n)+1_bit_kind))) + else + nperm = nperm + popcnt(iand(det1(k,ispin),ibset(0_bit_kind,m-1)-1_bit_kind)) +& + popcnt(iand(det1(j,ispin),ibclr(-1_bit_kind,n)+1_bit_kind)) + do i=j+1,k-1 + nperm = nperm + popcnt(det1(i,ispin)) + end do + endif + phase = phase_dble(iand(nperm,1)) + return + + enddo + enddo +end + + + + + +subroutine i_H_j(key_i,key_j,Nint,hij) + 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 + + integer :: exc(0:2,2,2) + integer :: 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, phase,phase_2 + 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 + + 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_psim(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array) + implicit none + integer, intent(in) :: Nint, Ndet,Ndet_max,Nstate + integer, intent(in) :: keys(Nint,2,Ndet_max) + double precision, intent(in) :: coef(Ndet_max,Nstate) + integer, intent(in) :: key(Nint,2) + double precision, intent(out) :: i_H_psi_array(Nstate) + + integer :: i, ii,j + double precision :: phase + integer :: exc(0:2,2,2) + double precision :: hij + integer :: idx(0:Ndet) + + i_H_psi_array = 0.d0 + call filter_connected_i_H_psi0(keys,key,Nint,Ndet,idx) + do ii=1,idx(0) + i = idx(ii) + !DEC$ FORCEINLINE + call i_H_j(keys(1,1,i),key,Nint,hij) + do j = 1, Nstate + i_H_psi_array(j) = i_H_psi_array(j) + coef(i,j)*hij + enddo + enddo +end + + + +subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,sze_max,idx) + use bitmasks + implicit none + BEGIN_DOC +! Applies get_excitation_degree to an array of determinants + END_DOC + integer, intent(in) :: Nint, sze,sze_max + integer(bit_kind), intent(in) :: key1(Nint,2,sze_max) + integer(bit_kind), intent(in) :: key2(Nint,2) + integer, intent(out) :: degree(sze) + integer, intent(out) :: idx(0:sze) + + integer :: i,l + + ASSERT (Nint > 0) + ASSERT (sze > 0) + ASSERT (sze_max >= sze) + + l=1 + if (Nint==1) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree(l) = ishft(popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))),-1) + if (degree(l) < 3) then + idx(l) = i + l = l+1 + endif + enddo + + else if (Nint==2) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree(l) = ishft(popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))),-1) + if (degree(l) < 3) then + idx(l) = i + l = l+1 + endif + enddo + + else if (Nint==3) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree(l) = ishft( popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))) + & + popcnt(xor( key1(3,1,i), key2(3,1))) + & + popcnt(xor( key1(3,2,i), key2(3,2))),-1) + if (degree(l) < 3) then + idx(l) = i + l = l+1 + endif + enddo + + else + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree(l) = 0 + !DEC$ LOOP COUNT MIN(4) + do l=1,Nint + degree(l) = degree(l)+ popcnt(xor( key1(l,1,i), key2(l,1))) +& + popcnt(xor( key1(l,2,i), key2(l,2))) + enddo + degree(l) = ishft(degree(l),-1) + if (degree(l) < 3) then + idx(l) = i + l = l+1 + endif + enddo + + endif + idx(0) = l-1 +end + + + +subroutine filter_connected(key1,key2,Nint,sze,sze_max,idx) + use bitmasks + implicit none + BEGIN_DOC +! Filters out the determinants that are not connected by H + END_DOC + integer, intent(in) :: Nint, sze,sze_max + integer(bit_kind), intent(in) :: key1(Nint,2,sze_max) + integer(bit_kind), intent(in) :: key2(Nint,2) + integer, intent(out) :: idx(0:sze) + + integer :: i,j,l + integer :: degree_x2 + + ASSERT (Nint > 0) + ASSERT (sze > 0) + ASSERT (sze_max >= sze) + + l=1 + + if (Nint==1) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + if (degree_x2 < 5) then + idx(l) = i + l = l+1 + endif + enddo + + else if (Nint==2) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))) + if (degree_x2 < 5) then + idx(l) = i + l = l+1 + endif + enddo + + else if (Nint==3) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))) + & + popcnt(xor( key1(3,1,i), key2(3,1))) + & + popcnt(xor( key1(3,2,i), key2(3,2))) + if (degree_x2 < 5) then + idx(l) = i + l = l+1 + endif + enddo + + else + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = 0 + !DEC$ LOOP COUNT MIN(4) + do j=1,Nint + degree_x2 = degree_x2+ popcnt(xor( key1(j,1,i), key2(j,1))) +& + popcnt(xor( key1(j,2,i), key2(j,2))) + if (degree_x2 > 4) then + exit + endif + enddo + if (degree_x2 <= 5) then + idx(l) = i + l = l+1 + endif + enddo + + endif + idx(0) = l-1 +end + +subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,sze_max,idx) + use bitmasks + implicit none + integer, intent(in) :: Nint, sze,sze_max + integer(bit_kind), intent(in) :: key1(Nint,2,sze_max) + integer(bit_kind), intent(in) :: key2(Nint,2) + integer, intent(out) :: idx(0:sze) + + integer :: i,l + integer :: degree_x2 + + ASSERT (Nint > 0) + ASSERT (sze > 0) + ASSERT (sze_max >= sze) + + l=1 + + if (Nint==1) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + if (degree_x2 < 5) then + if(degree_x2 .ne. 0)then + idx(l) = i + l = l+1 + endif + endif + enddo + + else if (Nint==2) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))) + if (degree_x2 < 5) then + if(degree_x2 .ne. 0)then + idx(l) = i + l = l+1 + endif + endif + enddo + + else if (Nint==3) then + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + & + popcnt(xor( key1(1,2,i), key2(1,2))) + & + popcnt(xor( key1(2,1,i), key2(2,1))) + & + popcnt(xor( key1(2,2,i), key2(2,2))) + & + popcnt(xor( key1(3,1,i), key2(3,1))) + & + popcnt(xor( key1(3,2,i), key2(3,2))) + if (degree_x2 < 5) then + if(degree_x2 .ne. 0)then + idx(l) = i + l = l+1 + endif + endif + enddo + + else + + !DIR$ LOOP COUNT (1000) + do i=1,sze + degree_x2 = 0 + !DEC$ LOOP COUNT MIN(4) + do l=1,Nint + degree_x2 = degree_x2+ popcnt(xor( key1(l,1,i), key2(l,1))) +& + popcnt(xor( key1(l,2,i), key2(l,2))) + if (degree_x2 > 4) then + exit + endif + enddo + if (degree_x2 <= 5) then + if(degree_x2 .ne. 0)then + idx(l) = i + l = l+1 + endif + endif + enddo + + endif + idx(0) = l-1 +end + + + +double precision function diag_H_mat_elem(det_in,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Computes + END_DOC + integer,intent(in) :: Nint + integer(bit_kind),intent(in) :: det_in(Nint,2) + + integer(bit_kind) :: hole(Nint,2) + integer(bit_kind) :: particle(Nint,2) + integer :: i, nexc(2), ispin + integer :: occ_particle(Nint*bit_kind_size,2) + integer :: occ_hole(Nint*bit_kind_size,2) + integer(bit_kind) :: det_tmp(Nint,2) + integer :: na, nb + + ASSERT (Nint > 0) + ASSERT (sum(popcnt(det_in(:,1))) == elec_alpha_num) + ASSERT (sum(popcnt(det_in(:,2))) == elec_beta_num) + + nexc(1) = 0 + nexc(2) = 0 + do i=1,Nint + hole(i,1) = xor(det_in(i,1),ref_bitmask(i,1)) + hole(i,2) = xor(det_in(i,2),ref_bitmask(i,2)) + particle(i,1) = iand(hole(i,1),det_in(i,1)) + particle(i,2) = iand(hole(i,2),det_in(i,2)) + hole(i,1) = iand(hole(i,1),ref_bitmask(i,1)) + hole(i,2) = iand(hole(i,2),ref_bitmask(i,2)) + nexc(1) += popcnt(hole(i,1)) + nexc(2) += popcnt(hole(i,2)) + enddo + + diag_H_mat_elem = ref_bitmask_energy + if (nexc(1)+nexc(2) == 0) then + return + endif + +!call debug_det(det_in,Nint) + integer :: tmp + call bitstring_to_list(particle(1,1), occ_particle(1,1), tmp, Nint) + ASSERT (tmp == nexc(1)) + call bitstring_to_list(particle(1,2), occ_particle(1,2), tmp, Nint) + ASSERT (tmp == nexc(2)) + call bitstring_to_list(hole(1,1), occ_hole(1,1), tmp, Nint) + ASSERT (tmp == nexc(1)) + call bitstring_to_list(hole(1,2), occ_hole(1,2), tmp, Nint) + ASSERT (tmp == nexc(2)) + + det_tmp = ref_bitmask + do ispin=1,2 + na = elec_num_tab(ispin) + nb = elec_num_tab(iand(ispin,1)+1) + do i=1,nexc(ispin) + !DIR$ FORCEINLINE + call ac_operator( occ_particle(i,ispin), ispin, det_tmp, diag_H_mat_elem, Nint,na,nb) + !DIR$ FORCEINLINE + call a_operator ( occ_hole (i,ispin), ispin, det_tmp, diag_H_mat_elem, Nint,na,nb) + enddo + enddo +end + +subroutine a_operator(iorb,ispin,key,hjj,Nint,na,nb) + use bitmasks + implicit none + BEGIN_DOC +! Needed for diag_H_mat_elem + END_DOC + integer, intent(in) :: iorb, ispin, Nint + integer, intent(inout) :: na, nb + integer(bit_kind), intent(inout) :: key(Nint,2) + double precision, intent(inout) :: hjj + + integer :: occ(Nint*bit_kind_size,2) + integer :: other_spin + integer :: k,l,i + + ASSERT (iorb > 0) + ASSERT (ispin > 0) + ASSERT (ispin < 3) + ASSERT (Nint > 0) + + k = ishft(iorb-1,-bit_kind_shift)+1 + ASSERT (k > 0) + l = iorb - ishft(k-1,bit_kind_shift)-1 + key(k,ispin) = ibclr(key(k,ispin),l) + other_spin = iand(ispin,1)+1 + + !DIR$ FORCEINLINE + call get_occ_from_key(key,occ,Nint) + na -= 1 + + hjj -= mo_mono_elec_integral(iorb,iorb) + + ! Same spin + do i=1,na + hjj -= mo_bielec_integral_jj_anti(occ(i,ispin),iorb) + enddo + + ! Opposite spin + do i=1,nb + hjj -= mo_bielec_integral_jj(occ(i,other_spin),iorb) + enddo + +end + + +subroutine ac_operator(iorb,ispin,key,hjj,Nint,na,nb) + use bitmasks + implicit none + BEGIN_DOC +! Needed for diag_H_mat_elem + END_DOC + integer, intent(in) :: iorb, ispin, Nint + integer, intent(inout) :: na, nb + integer(bit_kind), intent(inout) :: key(Nint,2) + double precision, intent(inout) :: hjj + + integer :: occ(Nint*bit_kind_size,2) + integer :: other_spin + integer :: k,l,i + + ASSERT (iorb > 0) + ASSERT (ispin > 0) + ASSERT (ispin < 3) + ASSERT (Nint > 0) + + integer :: tmp + !DIR$ FORCEINLINE + call bitstring_to_list(key(1,1), occ(1,1), tmp, Nint) + ASSERT (tmp == elec_alpha_num) + !DIR$ FORCEINLINE + call bitstring_to_list(key(1,2), occ(1,2), tmp, Nint) + ASSERT (tmp == elec_beta_num) + + k = ishft(iorb-1,-bit_kind_shift)+1 + ASSERT (k > 0) + l = iorb - ishft(k-1,bit_kind_shift)-1 + key(k,ispin) = ibset(key(k,ispin),l) + other_spin = iand(ispin,1)+1 + + hjj += mo_mono_elec_integral(iorb,iorb) + + ! Same spin + do i=1,na + hjj += mo_bielec_integral_jj_anti(occ(i,ispin),iorb) + enddo + + ! Opposite spin + do i=1,nb + hjj += mo_bielec_integral_jj(occ(i,other_spin),iorb) + enddo + na += 1 +end + +subroutine get_occ_from_key(key,occ,Nint) + use bitmasks + implicit none + BEGIN_DOC +! Returns a list of occupation numbers from a bitstring + END_DOC + integer(bit_kind), intent(in) :: key(Nint,2) + integer , intent(in) :: Nint + integer , intent(out) :: occ(Nint*bit_kind_size,2) + integer :: tmp + + call bitstring_to_list(key(1,1), occ(1,1), tmp, Nint) + call bitstring_to_list(key(1,2), occ(1,2), tmp, Nint) + +end diff --git a/src/Dets/utils.irp.f b/src/Dets/utils.irp.f new file mode 100644 index 00000000..b16d44c9 --- /dev/null +++ b/src/Dets/utils.irp.f @@ -0,0 +1,15 @@ +BEGIN_PROVIDER [ double precision, H_matrix_all_dets,(n_det,n_det) ] + implicit none + BEGIN_DOC + ! H matrix on the basis of the slater deter;inants defined by psi_det + END_DOC + integer :: i,j + double precision :: hij + do i =1,N_det + do j =i,N_det + call i_H_j(psi_det(1,1,i),psi_det(1,1,j),N_int,hij) + H_matrix_all_dets(i,j) = hij + H_matrix_all_dets(j,i) = hij + enddo + enddo +END_PROVIDER diff --git a/src/Electrons/README.rst b/src/Electrons/README.rst index 2969c413..8f87a3ce 100644 --- a/src/Electrons/README.rst +++ b/src/Electrons/README.rst @@ -10,7 +10,7 @@ Assumptions =========== .. Do not edit this section. It was auto-generated from the -.. ASSUMPTIONS.rst file. +.. NEEDED_MODULES file. * ``elec_num`` >= 0 * ``elec_alpha_num`` >= 0 @@ -28,3 +28,27 @@ Needed Modules * `Output `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`elec_alpha_num `_ + Numbers of alpha ("up") , beta ("down") and total electrons + +`elec_beta_num `_ + Numbers of alpha ("up") , beta ("down") and total electrons + +`elec_num `_ + Numbers of alpha ("up") , beta ("down") and total electrons + +`elec_num_tab `_ + Numbers of alpha ("up") , beta ("down") and total electrons + + + diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index 2bc2eebf..7e25f4a5 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -5,3 +5,30 @@ Ezfio_files Module This modules essentially contains the name of the EZFIO directory in the ``ezfio_filename`` variable. This is read as the first argument of the command-line, or as the ``QPACKAGE_INPUT`` environment variable. +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`ezfio_filename `_ + Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment + variable if it is set, or as the 1st argument of the command line. + +`getunitandopen `_ + :f: + file name + .br + :mode: + 'R' : READ, UNFORMATTED + 'W' : WRITE, UNFORMATTED + 'r' : READ, FORMATTED + 'w' : WRITE, FORMATTED + 'a' : APPEND, FORMATTED + 'x' : READ/WRITE, FORMATTED + .br + + + diff --git a/src/Hartree_Fock/Fock_matrix_mo.irp.f b/src/Hartree_Fock/Fock_matrix.irp.f similarity index 100% rename from src/Hartree_Fock/Fock_matrix_mo.irp.f rename to src/Hartree_Fock/Fock_matrix.irp.f diff --git a/src/Hartree_Fock/README.rst b/src/Hartree_Fock/README.rst index b8981dd0..ca424513 100644 --- a/src/Hartree_Fock/README.rst +++ b/src/Hartree_Fock/README.rst @@ -15,3 +15,66 @@ Needed Modules * `Output `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`hf_density_matrix_ao `_ + Density matrix in the AO basis + +`hf_density_matrix_ao_alpha `_ + Alpha and Beta density matrix in the AO basis + +`hf_density_matrix_ao_beta `_ + Alpha and Beta density matrix in the AO basis + +`diagonal_fock_matrix_mo `_ + Diagonal Fock matrix in the MO basis + +`eigenvectors_fock_matrix_mo `_ + Diagonal Fock matrix in the MO basis + +`scf_iteration `_ +None +`do_diis `_ + If True, compute integrals on the fly + +`n_it_scf_max `_ + Maximum number of SCF iterations + +`thresh_scf `_ + Threshold on the convergence of the Hartree Fock energy + +`bi_elec_ref_bitmask_energy `_ + Energy of the reference bitmask used in Slater rules + +`kinetic_ref_bitmask_energy `_ + Energy of the reference bitmask used in Slater rules + +`mono_elec_ref_bitmask_energy `_ + Energy of the reference bitmask used in Slater rules + +`nucl_elec_ref_bitmask_energy `_ + Energy of the reference bitmask used in Slater rules + +`ref_bitmask_energy `_ + Energy of the reference bitmask used in Slater rules + + + diff --git a/src/Hartree_Fock/options.irp.f b/src/Hartree_Fock/options.irp.f index 74819a63..f0a8659e 100644 --- a/src/Hartree_Fock/options.irp.f +++ b/src/Hartree_Fock/options.irp.f @@ -3,8 +3,8 @@ BEGIN_PROVIDER [ double precision,thresh_SCF ] BEGIN_DOC ! Threshold on the convergence of the Hartree Fock energy END_DOC - - logical :: has + + logical :: has PROVIDE ezfio_filename call ezfio_has_Hartree_Fock_thresh_SCF(has) if (has) then @@ -13,6 +13,9 @@ BEGIN_PROVIDER [ double precision,thresh_SCF ] thresh_SCF = 1.d-10 call ezfio_set_Hartree_Fock_thresh_SCF(thresh_SCF) endif + call write_time(output_Hartree_Fock) + call write_double(output_Hartree_Fock, thresh_SCF, & + 'thresh_SCF') END_PROVIDER diff --git a/src/Hartree_Fock/tests/hf_energy.irp.f b/src/Hartree_Fock/tests/hf_energy.irp.f new file mode 100644 index 00000000..244ae5fe --- /dev/null +++ b/src/Hartree_Fock/tests/hf_energy.irp.f @@ -0,0 +1,9 @@ +program test + implicit none + print *, 'HF energy :', HF_energy + print *, 'ref_bitmask_energy :', ref_bitmask_energy + print *, 'mono_elec_ref_bitmask_energy :', mono_elec_ref_bitmask_energy + print *, 'kinetic_ref_bitmask_energy :', kinetic_ref_bitmask_energy + print *, 'nucl_elec_ref_bitmask_energy :', nucl_elec_ref_bitmask_energy + print *, 'bi_elec_ref_bitmask_energy :', bi_elec_ref_bitmask_energy +end diff --git a/src/Hartree_Fock_AOs/README.rst b/src/Hartree_Fock_AOs/README.rst new file mode 100644 index 00000000..0418aca5 --- /dev/null +++ b/src/Hartree_Fock_AOs/README.rst @@ -0,0 +1,30 @@ +=================== +Hartree-Fock Module +=================== + + +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `BiInts `_ +* `Bitmask `_ +* `Electrons `_ +* `Ezfio_files `_ +* `MonoInts `_ +* `MOs `_ +* `Nuclei `_ +* `Output `_ +* `Utils `_ + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + + + diff --git a/src/MOGuess/README.rst b/src/MOGuess/README.rst index 7a81c93d..19cfe2bb 100644 --- a/src/MOGuess/README.rst +++ b/src/MOGuess/README.rst @@ -16,3 +16,28 @@ Needed Modules * `Utils `_ * `MonoInts `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`h_core_guess `_ +None +`ao_ortho_lowdin_coef `_ + matrix of the coefficients of the mos generated by the + orthonormalization by the S^{-1/2} canonical transformation of the aos + ao_ortho_lowdin_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_lowdin orbital + +`ao_ortho_lowdin_overlap `_ + overlap matrix of the ao_ortho_lowdin + supposed to be the Identity + +`ao_ortho_lowdin_nucl_elec_integral `_ +None + + diff --git a/src/MOs/README.rst b/src/MOs/README.rst index 5cfe9da1..ff0741db 100644 --- a/src/MOs/README.rst +++ b/src/MOs/README.rst @@ -27,3 +27,42 @@ Needed Modules * `Nuclei `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`mo_coef `_ + Molecular orbital coefficients on AO basis set + mo_coef(i,j) = coefficient of the ith ao on the jth mo + +`mo_coef_transp `_ + Molecular orbital coefficients on AO basis set + +`mo_energy `_ + Fock diagonal elements + +`mo_label `_ + Label characterizing the MOS (local, canonical, natural, etc) + +`mo_tot_num `_ + Total number of molecular orbitals and the size of the keys corresponding + +`mo_tot_num_align `_ + Aligned variable for dimensioning of arrays + +`mo_as_eigvectors_of_mo_matrix `_ +None +`save_mos `_ +None + + diff --git a/src/MOs/utils.irp.f b/src/MOs/utils.irp.f index 50d9b411..186f5efc 100644 --- a/src/MOs/utils.irp.f +++ b/src/MOs/utils.irp.f @@ -3,7 +3,7 @@ subroutine save_mos double precision, allocatable :: buffer(:,:) integer :: i,j - call system('save_current_mos.sh '//trim(ezfio_filename)) + call system('$QPACKAGE_ROOT/scripts/save_current_mos.sh '//trim(ezfio_filename)) call ezfio_set_mo_basis_mo_label(mo_label) allocate ( buffer(ao_num,mo_tot_num) ) diff --git a/src/Makefile.common b/src/Makefile.common index 2dad85e2..fa02f7ec 100644 --- a/src/Makefile.common +++ b/src/Makefile.common @@ -115,7 +115,7 @@ endif LIB+=$(EZFIO) $(MKL) IRPF90+=$(patsubst %, -I %, $(INCLUDE_DIRS)) $(IRPF90_FLAGS) -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile $(EZFIO) NEEDED_MODULES +irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile $(EZFIO) NEEDED_MODULES $(wildcard *.py) $(IRPF90) Makefile.depend: Makefile diff --git a/src/MonoInts/README.rst b/src/MonoInts/README.rst index 3ac02cb3..f16cb706 100644 --- a/src/MonoInts/README.rst +++ b/src/MonoInts/README.rst @@ -11,3 +11,133 @@ Needed Modules * `Output `_ * `Utils `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`ao_mono_elec_integral `_ + array of the mono electronic hamiltonian on the AOs basis + : sum of the kinetic and nuclear electronic potential + +`ao_overlap `_ + Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr)` + +`ao_overlap_abs `_ + Overlap between absolute value of atomic basis functions: + :math:`\int |\chi_i(r)| |\chi_j(r)| dr)` + +`ao_overlap_x `_ + Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr)` + +`ao_overlap_y `_ + Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr)` + +`ao_overlap_z `_ + Overlap between atomic basis functions: + :math:`\int \chi_i(r) \chi_j(r) dr)` + +`check_ortho `_ +None +`do_print `_ +None +`n_pt_max_i_x `_ +None +`n_pt_max_integrals `_ +None +`ao_deriv2_x `_ + second derivatives matrix elements in the ao basis + .. math:: + .br + {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle + +`ao_deriv2_y `_ + second derivatives matrix elements in the ao basis + .. math:: + .br + {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle + +`ao_deriv2_z `_ + second derivatives matrix elements in the ao basis + .. math:: + .br + {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle + +`ao_kinetic_integral `_ + array of the priminitve basis kinetic integrals + \langle \chi_i |\hat{T}| \chi_j \rangle + +`mo_kinetic_integral `_ +None +`mo_mono_elec_integral `_ + array of the mono electronic hamiltonian on the MOs basis + : sum of the kinetic and nuclear electronic potential + +`mo_overlap `_ +None +`orthonormalize_mos `_ +None +`ao_nucl_elec_integral `_ + interaction nuclear electron + +`give_polynom_mult_center_mono_elec `_ +None +`i_x1_pol_mult_mono_elec `_ +None +`i_x2_pol_mult_mono_elec `_ +None +`int_gaus_pol `_ +None +`nai_pol_mult `_ +None +`v_e_n `_ +None +`v_phi `_ +None +`v_r `_ +None +`v_theta `_ +None +`wallis `_ +None +`mo_nucl_elec_integral `_ +None +`save_ortho_mos `_ +None + + diff --git a/src/NEEDED_MODULES b/src/NEEDED_MODULES index 274f78af..1a75cb06 100644 --- a/src/NEEDED_MODULES +++ b/src/NEEDED_MODULES @@ -1 +1 @@ -AOs Bitmask Electrons Ezfio_files MOs Nuclei Output Utils Hartree_Fock BiInts MonoInts MOGuess Dets DensityMatrix +AOs Bitmask Electrons Ezfio_files MOs Nuclei Output Utils Hartree_Fock BiInts MonoInts MOGuess Dets DensityMatrix CISD diff --git a/src/Nuclei/README.rst b/src/Nuclei/README.rst index 35a16e50..731bb3d1 100644 --- a/src/Nuclei/README.rst +++ b/src/Nuclei/README.rst @@ -16,3 +16,69 @@ Needed Modules * `Utils `_ * `Output `_ +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`nucl_charge `_ + Nuclear charges + +`nucl_coord `_ + Nuclear coordinates in the format (:, {x,y,z}) + +`nucl_coord_transp `_ + Transposed array of nucl_coord + +`nucl_dist `_ + nucl_dist : Nucleus-nucleus distances + nucl_dist_2 : Nucleus-nucleus distances squared + nucl_dist_vec : Nucleus-nucleus distances vectors + +`nucl_dist_2 `_ + nucl_dist : Nucleus-nucleus distances + nucl_dist_2 : Nucleus-nucleus distances squared + nucl_dist_vec : Nucleus-nucleus distances vectors + +`nucl_dist_vec_x `_ + nucl_dist : Nucleus-nucleus distances + nucl_dist_2 : Nucleus-nucleus distances squared + nucl_dist_vec : Nucleus-nucleus distances vectors + +`nucl_dist_vec_y `_ + nucl_dist : Nucleus-nucleus distances + nucl_dist_2 : Nucleus-nucleus distances squared + nucl_dist_vec : Nucleus-nucleus distances vectors + +`nucl_dist_vec_z `_ + nucl_dist : Nucleus-nucleus distances + nucl_dist_2 : Nucleus-nucleus distances squared + nucl_dist_vec : Nucleus-nucleus distances vectors + +`nucl_label `_ + Nuclear labels + +`nucl_num `_ + Number of nuclei + +`nucl_num_aligned `_ + Number of nuclei + +`nuclear_repulsion `_ + Nuclear repulsion energy + + + diff --git a/src/Nuclei/nuclei.irp.f b/src/Nuclei/nuclei.irp.f index 8c8fd8db..7e7d6149 100644 --- a/src/Nuclei/nuclei.irp.f +++ b/src/Nuclei/nuclei.irp.f @@ -1,174 +1,198 @@ BEGIN_PROVIDER [ integer, nucl_num ] &BEGIN_PROVIDER [ integer, nucl_num_aligned ] - implicit none - BEGIN_DOC - ! Number of nuclei - END_DOC - - PROVIDE ezfio_filename - nucl_num = 0 - call ezfio_get_nuclei_nucl_num(nucl_num) - ASSERT (nucl_num > 0) - integer :: align_double - nucl_num_aligned = align_double(nucl_num) + implicit none + BEGIN_DOC + ! Number of nuclei + END_DOC + + PROVIDE ezfio_filename + nucl_num = 0 + logical :: has + call ezfio_has_nuclei_nucl_num(has) + if (has) then + call ezfio_get_nuclei_nucl_num(nucl_num) + else + print *, irp_here + stop 1 + endif + ASSERT (nucl_num > 0) + integer :: align_double + nucl_num_aligned = align_double(nucl_num) END_PROVIDER - + BEGIN_PROVIDER [ double precision, nucl_charge, (nucl_num) ] - implicit none - BEGIN_DOC - ! Nuclear charges - END_DOC - PROVIDE ezfio_filename - nucl_charge = -1.d0 - call ezfio_get_nuclei_nucl_charge(nucl_charge) - ASSERT (nucl_charge(:) >= 0.d0) + implicit none + BEGIN_DOC + ! Nuclear charges + END_DOC + PROVIDE ezfio_filename + nucl_charge = -1.d0 + logical :: has + call ezfio_has_nuclei_nucl_charge(has) + if (has) then + call ezfio_get_nuclei_nucl_charge(nucl_charge) + else + print *, irp_here + stop 1 + endif + ASSERT (minval(nucl_charge) >= 0.d0) END_PROVIDER - + BEGIN_PROVIDER [ character*(32), nucl_label, (nucl_num) ] - implicit none - BEGIN_DOC - ! Nuclear labels - END_DOC - PROVIDE ezfio_filename - nucl_label = "" - call ezfio_get_nuclei_nucl_label(nucl_label) + implicit none + BEGIN_DOC + ! Nuclear labels + END_DOC + PROVIDE ezfio_filename + nucl_label = "" + logical :: has + call ezfio_has_nuclei_nucl_label(has) + if (has) then + call ezfio_get_nuclei_nucl_label(nucl_label) + endif END_PROVIDER - + BEGIN_PROVIDER [ double precision, nucl_coord, (nucl_num_aligned,3) ] - implicit none - - BEGIN_DOC - ! Nuclear coordinates in the format (:, {x,y,z}) - END_DOC - PROVIDE ezfio_filename - - double precision, allocatable :: buffer(:,:) - nucl_coord = 0.d0 - allocate (buffer(nucl_num,3)) - buffer = 0.d0 - call ezfio_get_nuclei_nucl_coord(buffer) - integer :: i,j - - do i=1,3 - do j=1,nucl_num - nucl_coord(j,i) = buffer(j,i) + implicit none + + BEGIN_DOC + ! Nuclear coordinates in the format (:, {x,y,z}) + END_DOC + PROVIDE ezfio_filename + + double precision, allocatable :: buffer(:,:) + nucl_coord = 0.d0 + allocate (buffer(nucl_num,3)) + buffer = 0.d0 + logical :: has + call ezfio_has_nuclei_nucl_coord(has) + if (.not.has) then + print *, irp_here + stop 1 + endif + call ezfio_get_nuclei_nucl_coord(buffer) + integer :: i,j + + do i=1,3 + do j=1,nucl_num + nucl_coord(j,i) = buffer(j,i) + enddo enddo - enddo - deallocate(buffer) + deallocate(buffer) + + character*(64), parameter :: f = '(A16, 4(X,F12.6))' + character*(64), parameter :: ft= '(A16, 4(X,A12 ))' + double precision, parameter :: a0= 0.529177249d0 + call write_time(output_Nuclei) + write(output_Nuclei,'(A)') '' + write(output_Nuclei,'(A)') 'Nuclear Coordinates (Angstroms)' + write(output_Nuclei,'(A)') '===============================' + write(output_Nuclei,'(A)') '' + write(output_Nuclei,ft) & + '================','============','============','============','============' + write(output_Nuclei,*) & + ' Atom Charge X Y Z ' + write(output_Nuclei,ft) & + '================','============','============','============','============' + do i=1,nucl_num + write(output_Nuclei,f) nucl_label(i), nucl_charge(i), & + nucl_coord(i,1)*a0, & + nucl_coord(i,2)*a0, & + nucl_coord(i,3)*a0 + enddo + write(output_Nuclei,ft) & + '================','============','============','============','============' + write(output_Nuclei,'(A)') '' + +END_PROVIDER + - character*(64), parameter :: f = '(A16, 4(X,F12.6))' - character*(64), parameter :: ft= '(A16, 4(X,A12 ))' - double precision, parameter :: a0= 0.529177249d0 - call write_time(output_Nuclei) - write(output_Nuclei,'(A)') '' - write(output_Nuclei,'(A)') 'Nuclear Coordinates (Angstroms)' - write(output_Nuclei,'(A)') '===============================' - write(output_Nuclei,'(A)') '' - write(output_Nuclei,ft) & - '================','============','============','============','============' - write(output_Nuclei,*) & - ' Atom Charge X Y Z ' - write(output_Nuclei,ft) & - '================','============','============','============','============' - do i=1,nucl_num - write(output_Nuclei,f) nucl_label(i), nucl_charge(i), & - nucl_coord(i,1)*a0, & - nucl_coord(i,2)*a0, & - nucl_coord(i,3)*a0 - enddo - write(output_Nuclei,ft) & - '================','============','============','============','============' - write(output_Nuclei,'(A)') '' - -END_PROVIDER - - BEGIN_PROVIDER [ double precision, nucl_coord_transp, (3,nucl_num) ] - implicit none - BEGIN_DOC -! Transposed array of nucl_coord - END_DOC - integer :: i, k - nucl_coord_transp = 0.d0 - - do i=1,nucl_num - nucl_coord_transp(1,i) = nucl_coord(i,1) - nucl_coord_transp(2,i) = nucl_coord(i,2) - nucl_coord_transp(3,i) = nucl_coord(i,3) - enddo + implicit none + BEGIN_DOC + ! Transposed array of nucl_coord + END_DOC + integer :: i, k + nucl_coord_transp = 0.d0 + + do i=1,nucl_num + nucl_coord_transp(1,i) = nucl_coord(i,1) + nucl_coord_transp(2,i) = nucl_coord(i,2) + nucl_coord_transp(3,i) = nucl_coord(i,3) + enddo END_PROVIDER - + BEGIN_PROVIDER [ double precision, nucl_dist_2, (nucl_num_aligned,nucl_num) ] &BEGIN_PROVIDER [ double precision, nucl_dist_vec_x, (nucl_num_aligned,nucl_num) ] &BEGIN_PROVIDER [ double precision, nucl_dist_vec_y, (nucl_num_aligned,nucl_num) ] &BEGIN_PROVIDER [ double precision, nucl_dist_vec_z, (nucl_num_aligned,nucl_num) ] &BEGIN_PROVIDER [ double precision, nucl_dist, (nucl_num_aligned,nucl_num) ] - implicit none - BEGIN_DOC -! nucl_dist : Nucleus-nucleus distances - -! nucl_dist_2 : Nucleus-nucleus distances squared - -! nucl_dist_vec : Nucleus-nucleus distances vectors - END_DOC - - integer :: ie1, ie2, l - integer,save :: ifirst = 0 - if (ifirst == 0) then - ifirst = 1 - nucl_dist = 0.d0 - nucl_dist_2 = 0.d0 - nucl_dist_vec_x = 0.d0 - nucl_dist_vec_y = 0.d0 - nucl_dist_vec_z = 0.d0 - endif + implicit none + BEGIN_DOC + ! nucl_dist : Nucleus-nucleus distances + + ! nucl_dist_2 : Nucleus-nucleus distances squared + + ! nucl_dist_vec : Nucleus-nucleus distances vectors + END_DOC + + integer :: ie1, ie2, l + integer,save :: ifirst = 0 + if (ifirst == 0) then + ifirst = 1 + nucl_dist = 0.d0 + nucl_dist_2 = 0.d0 + nucl_dist_vec_x = 0.d0 + nucl_dist_vec_y = 0.d0 + nucl_dist_vec_z = 0.d0 + endif + + do ie2 = 1,nucl_num + !DEC$ VECTOR ALWAYS + !DEC$ VECTOR ALIGNED + do ie1 = 1,nucl_num_aligned + nucl_dist_vec_x(ie1,ie2) = nucl_coord(ie1,1) - nucl_coord(ie2,1) + nucl_dist_vec_y(ie1,ie2) = nucl_coord(ie1,2) - nucl_coord(ie2,2) + nucl_dist_vec_z(ie1,ie2) = nucl_coord(ie1,3) - nucl_coord(ie2,3) + enddo + !DEC$ VECTOR ALWAYS + !DEC$ VECTOR ALIGNED + do ie1 = 1,nucl_num_aligned + nucl_dist_2(ie1,ie2) = nucl_dist_vec_x(ie1,ie2)*nucl_dist_vec_x(ie1,ie2) +& + nucl_dist_vec_y(ie1,ie2)*nucl_dist_vec_y(ie1,ie2) + & + nucl_dist_vec_z(ie1,ie2)*nucl_dist_vec_z(ie1,ie2) + nucl_dist(ie1,ie2) = sqrt(nucl_dist_2(ie1,ie2)) + ASSERT (nucl_dist(ie1,ie2) > 0.d0) + enddo + enddo + +END_PROVIDER - do ie2 = 1,nucl_num - !DEC$ VECTOR ALWAYS - !DEC$ VECTOR ALIGNED - do ie1 = 1,nucl_num_aligned - nucl_dist_vec_x(ie1,ie2) = nucl_coord(ie1,1) - nucl_coord(ie2,1) - nucl_dist_vec_y(ie1,ie2) = nucl_coord(ie1,2) - nucl_coord(ie2,2) - nucl_dist_vec_z(ie1,ie2) = nucl_coord(ie1,3) - nucl_coord(ie2,3) - enddo - !DEC$ VECTOR ALWAYS - !DEC$ VECTOR ALIGNED - do ie1 = 1,nucl_num_aligned - nucl_dist_2(ie1,ie2) = nucl_dist_vec_x(ie1,ie2)*nucl_dist_vec_x(ie1,ie2) +& - nucl_dist_vec_y(ie1,ie2)*nucl_dist_vec_y(ie1,ie2) + & - nucl_dist_vec_z(ie1,ie2)*nucl_dist_vec_z(ie1,ie2) - nucl_dist(ie1,ie2) = sqrt(nucl_dist_2(ie1,ie2)) - ASSERT (nucl_dist(ie1,ie2) > 0.d0) - enddo - enddo - -END_PROVIDER - BEGIN_PROVIDER [ double precision, nuclear_repulsion ] - implicit none - BEGIN_DOC - ! Nuclear repulsion energy - END_DOC - integer :: k,l - double precision :: Z12, r2, x(3) - nuclear_repulsion = 0.d0 - do l = 1, nucl_num - do k = 1, nucl_num - if(k /= l) then - Z12 = nucl_charge(k)*nucl_charge(l) - x(1) = nucl_coord(k,1) - nucl_coord(l,1) - x(2) = nucl_coord(k,2) - nucl_coord(l,2) - x(3) = nucl_coord(k,3) - nucl_coord(l,3) - r2 = x(1)*x(1) + x(2)*x(2) + x(3)*x(3) - nuclear_repulsion += Z12/dsqrt(r2) - endif + implicit none + BEGIN_DOC + ! Nuclear repulsion energy + END_DOC + integer :: k,l + double precision :: Z12, r2, x(3) + nuclear_repulsion = 0.d0 + do l = 1, nucl_num + do k = 1, nucl_num + if(k /= l) then + Z12 = nucl_charge(k)*nucl_charge(l) + x(1) = nucl_coord(k,1) - nucl_coord(l,1) + x(2) = nucl_coord(k,2) - nucl_coord(l,2) + x(3) = nucl_coord(k,3) - nucl_coord(l,3) + r2 = x(1)*x(1) + x(2)*x(2) + x(3)*x(3) + nuclear_repulsion += Z12/dsqrt(r2) + endif + enddo enddo - enddo - nuclear_repulsion *= 0.5d0 - - call write_time(output_Nuclei) - call write_double(output_Nuclei,nuclear_repulsion, & - 'Nuclear repulsion energy') + nuclear_repulsion *= 0.5d0 + + call write_time(output_Nuclei) + call write_double(output_Nuclei,nuclear_repulsion, & + 'Nuclear repulsion energy') END_PROVIDER - - + + diff --git a/src/Output/README.rst b/src/Output/README.rst index e86ba76f..11c96070 100644 --- a/src/Output/README.rst +++ b/src/Output/README.rst @@ -25,3 +25,39 @@ All output should be printed using routines present in this module. +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `Utils `_ + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`output_cpu_time_0 `_ + Initial CPU and wall times when printing in the output files + +`output_wall_time_0 `_ + Initial CPU and wall times when printing in the output files + +`write_double `_ + Write a double precision value in output + +`write_int `_ + Write an integer value in output + +`write_time `_ + Write a time stamp in the output for chronological reconstruction + + + diff --git a/src/README.rst b/src/README.rst index 90272cd7..9c6b5bcb 100644 --- a/src/README.rst +++ b/src/README.rst @@ -122,5 +122,11 @@ Needed Modules * `Nuclei `_ * `Output `_ * `Utils `_ -* `Hartree-fock `_ +* `Hartree_Fock `_ +* `BiInts `_ +* `MonoInts `_ +* `MOGuess `_ +* `Dets `_ +* `DensityMatrix `_ +* `CISD `_ diff --git a/src/Utils/README.rst b/src/Utils/README.rst index bd60ec67..40bdf3ac 100644 --- a/src/Utils/README.rst +++ b/src/Utils/README.rst @@ -4,3 +4,174 @@ Utils Module Contains general purpose utilities. +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`apply_rotation `_ + Apply the rotation found by find_rotation + +`find_rotation `_ + Find A.C = B + +`get_pseudo_inverse `_ + Find C = A^-1 + +`lapack_diag `_ + Diagonalize matrix H + +`ortho_lowdin `_ + Compute U.S^-1/2 canonical orthogonalization + +`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)) + +`f_integral `_ + function that calculates the following integral + \int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx + +`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} + +`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_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) + +`hermite `_ + Hermite polynomial + +`multiply_poly `_ + Multiply two polynomials + D(t) =! D(t) +( B(t)*C(t)) + +`recentered_poly2 `_ + Recenter two polynomials + +`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. + +`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 + +`align_double `_ + Compute 1st dimension such that it is aligned for vectorization. + +`binom `_ + Binomial coefficients + +`binom_func `_ + .. math :: + .br + \frac{i!}{j!(i-j)!} + .br + +`binom_transp `_ + Binomial coefficients + +`dble_fact `_ + n!! + +`fact `_ + n! + +`fact_inv `_ + 1/n! + +`inv_int `_ + 1/i + +`nproc `_ + Number of current OpenMP threads + +`wall_time `_ + The equivalent of cpu_time, but for the wall time. + +`write_git_log `_ + Write the last git commit in file iunit. + + + + diff --git a/src/Utils/sort.irp.f b/src/Utils/sort.irp.f index 171ad2a6..572cc353 100644 --- a/src/Utils/sort.irp.f +++ b/src/Utils/sort.irp.f @@ -382,7 +382,8 @@ BEGIN_TEMPLATE return endif - ASSERT (iradix > 0) + ASSERT (iradix >= 0) + if (isize < 48) then call insertion_$Xsort$big(x,iorder,isize) return From 3e7c65d85859376ed307d55b5b06201564748f62 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 14 May 2014 00:01:31 +0200 Subject: [PATCH 9/9] Updated documentation --- scripts/update_README.py | 2 +- src/AOs/NEEDED_MODULES | 3 +- src/AOs/README.rst | 43 ++++----- src/BiInts/README.rst | 141 ++++++++++------------------- src/Bitmask/README.rst | 26 ++---- src/CISD/README.rst | 9 ++ src/DensityMatrix/README.rst | 31 +++++++ src/Dets/README.rst | 105 +++++++++++++++++++++ src/Dets/determinants.ezfio_config | 9 ++ src/Electrons/README.rst | 12 +-- src/Ezfio_files/README.rst | 6 +- src/Hartree_Fock/README.rst | 87 ++++++++++++------ src/MOGuess/README.rst | 12 +-- src/MOs/NEEDED_MODULES | 2 +- src/MOs/README.rst | 31 +++---- src/MonoInts/README.rst | 93 +++++++------------ src/Nuclei/README.rst | 36 +++----- src/Output/README.rst | 15 +-- src/Utils/README.rst | 114 ++++++++++------------- src/Utils/util.irp.f | 104 +++++++++++++++++++-- 20 files changed, 505 insertions(+), 376 deletions(-) create mode 100644 src/DensityMatrix/README.rst create mode 100644 src/Dets/determinants.ezfio_config diff --git a/scripts/update_README.py b/scripts/update_README.py index 61b8ee40..c89c1c15 100755 --- a/scripts/update_README.py +++ b/scripts/update_README.py @@ -148,7 +148,7 @@ def update_documentation(data): # Search for the documentation in the IRPF90_man directory for item in tmp : - item, _, line = item.split('\t') + item, _, line = item.strip().split('\t') doc = extract_doc(item) items.append( (item, filename, doc, line) ) diff --git a/src/AOs/NEEDED_MODULES b/src/AOs/NEEDED_MODULES index e829976c..9f7ccbcc 100644 --- a/src/AOs/NEEDED_MODULES +++ b/src/AOs/NEEDED_MODULES @@ -1 +1,2 @@ -Ezfio_files Nuclei Utils +Ezfio_files Nuclei Output Utils + diff --git a/src/AOs/README.rst b/src/AOs/README.rst index cfb95d03..1070d856 100644 --- a/src/AOs/README.rst +++ b/src/AOs/README.rst @@ -41,6 +41,7 @@ Needed Modules * `Ezfio_files `_ * `Nuclei `_ +* `Output `_ * `Utils `_ Documentation @@ -49,55 +50,43 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`ao_coef `_ - coefficient of the primitives on the AO basis +`ao_coef `_ + Coefficients, exponents and powers of x,y and z ao_coef(i,j) = coefficient of the jth primitive on the ith ao -`ao_coef_transp `_ +`ao_coef_transp `_ Transposed ao_coef and ao_expo -`ao_expo `_ - coefficient of the primitives on the AO basis +`ao_expo `_ + Coefficients, exponents and powers of x,y and z ao_coef(i,j) = coefficient of the jth primitive on the ith ao -`ao_expo_transp `_ +`ao_expo_transp `_ Transposed ao_coef and ao_expo -`ao_nucl `_ +`ao_nucl `_ Index of the nuclei on which the ao is centered -`ao_num `_ +`ao_num `_ Number of atomic orbitals -`ao_num_align `_ +`ao_num_align `_ Number of atomic orbitals -`ao_overlap `_ +`ao_overlap `_ matrix of the overlap for tha AOs S(i,j) = overlap between the ith and the jth atomic basis function -`ao_power `_ - coefficient of the primitives on the AO basis +`ao_power `_ + Coefficients, exponents and powers of x,y and z ao_coef(i,j) = coefficient of the jth primitive on the ith ao -`ao_prim_num `_ +`ao_prim_num `_ Number of primitives per atomic orbital -`ao_prim_num_max `_ +`ao_prim_num_max `_ None -`ao_prim_num_max_align `_ +`ao_prim_num_max_align `_ None diff --git a/src/BiInts/README.rst b/src/BiInts/README.rst index 91d6e8c2..b2cdffc7 100644 --- a/src/BiInts/README.rst +++ b/src/BiInts/README.rst @@ -32,204 +32,161 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`ao_bielec_integral `_ +`ao_bielec_integral `_ integral of the AO basis or (ij|kl) i(r1) j(r1) 1/r12 k(r2) l(r2) -`ao_bielec_integral_schwartz `_ +`ao_bielec_integral_schwartz `_ Needed to compuet Schwartz inequalities -`ao_bielec_integrals_in_map `_ +`ao_bielec_integrals_in_map `_ Map of Atomic integrals i(r1) j(r2) 1/r12 k(r1) l(r2) -`compute_ao_bielec_integrals `_ +`compute_ao_bielec_integrals `_ Compute AO 1/r12 integrals for all i and fixed j,k,l -`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) primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2) primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2) -`general_primitive_integral `_ +`general_primitive_integral `_ Computes the integral where p,q,r,s are Gaussian primitives -`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 -`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) -`n_pt_sup `_ +`n_pt_sup `_ Returns the upper boundary of the degree of the polynom 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) -`gauleg `_ +`gauleg `_ Gauss-Legendre -`gauleg_t2 `_ +`gauleg_t2 `_ t_w(i,1,k) = w(i) t_w(i,2,k) = t(i) -`gauleg_w `_ +`gauleg_w `_ t_w(i,1,k) = w(i) t_w(i,2,k) = t(i) -`ao_integrals_map `_ +`ao_integrals_map `_ AO integrals -`bielec_integrals_index `_ +`bielec_integrals_index `_ None -`clear_ao_map `_ +`clear_ao_map `_ Frees the memory of the AO map -`clear_mo_map `_ +`clear_mo_map `_ Frees the memory of the MO map -`get_ao_bielec_integral `_ +`get_ao_bielec_integral `_ Gets one AO bi-electronic integral from the AO map -`get_ao_bielec_integrals `_ +`get_ao_bielec_integrals `_ Gets multiple AO bi-electronic integral from the AO map . All i are retrieved for j,k,l fixed. -`get_ao_bielec_integrals_non_zero `_ +`get_ao_bielec_integrals_non_zero `_ Gets multiple AO bi-electronic integral from the AO map . All non-zero i are retrieved for j,k,l fixed. -`get_ao_map_size `_ +`get_ao_map_size `_ Returns the number of elements in the AO map -`get_mo_bielec_integral `_ +`get_mo_bielec_integral `_ Returns one integral in the MO basis -`get_mo_bielec_integrals `_ +`get_mo_bielec_integrals `_ Returns multiple integrals in the MO basis, all i for j,k,l fixed. -`get_mo_map_size `_ +`get_mo_map_size `_ Return the number of elements in the MO map -`insert_into_ao_integrals_map `_ +`insert_into_ao_integrals_map `_ Create new entry into AO map -`insert_into_mo_integrals_map `_ +`insert_into_mo_integrals_map `_ Create new entry into MO map, or accumulate in an existing entry -`mo_bielec_integral `_ +`mo_bielec_integral `_ Returns one integral in the MO basis -`mo_integrals_map `_ +`mo_integrals_map `_ MO integrals -`add_integrals_to_map `_ +`add_integrals_to_map `_ Adds integrals to tha MO map according to some bitmask -`mo_bielec_integral_jj `_ +`mo_bielec_integral_jj `_ Transform Bi-electronic integrals and -`mo_bielec_integral_jj_anti `_ +`mo_bielec_integral_jj_anti `_ Transform Bi-electronic integrals and -`mo_bielec_integral_jj_exchange `_ +`mo_bielec_integral_jj_exchange `_ Transform Bi-electronic integrals and -`mo_bielec_integrals_in_map `_ +`mo_bielec_integrals_in_map `_ If True, the map of MO bielectronic integrals is provided -`mo_bielec_integrals_index `_ +`mo_bielec_integrals_index `_ Computes an unique index for i,j,k,l integrals -`ao_integrals_threshold `_ +`ao_integrals_threshold `_ If < ao_integrals_threshold, = 0 -`mo_integrals_threshold `_ +`do_direct_integrals `_ + If True, compute integrals on the fly + +`mo_integrals_threshold `_ If < mo_integrals_threshold, = 0 -`read_ao_integrals `_ +`read_ao_integrals `_ If true, read AO integrals in EZFIO -`read_mo_integrals `_ +`read_mo_integrals `_ If true, read MO integrals in EZFIO -`write_ao_integrals `_ +`write_ao_integrals `_ If true, write AO integrals in EZFIO -`write_mo_integrals `_ +`write_mo_integrals `_ If true, write MO integrals in EZFIO diff --git a/src/Bitmask/README.rst b/src/Bitmask/README.rst index bc513e82..62147fc4 100644 --- a/src/Bitmask/README.rst +++ b/src/Bitmask/README.rst @@ -54,36 +54,30 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`full_ijkl_bitmask `_ +`full_ijkl_bitmask `_ Bitmask to include all possible MOs -`hf_bitmask `_ +`hf_bitmask `_ Hartree Fock bit mask -`n_int `_ +`n_int `_ Number of 64-bit integers needed to represent determinants as binary strings -`ref_bitmask `_ +`ref_bitmask `_ Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask -`bitstring_to_hexa `_ +`bitstring_to_hexa `_ Transform a bit string to a string in hexadecimal format for printing -`bitstring_to_list `_ +`bitstring_to_list `_ Gives the inidices(+1) of the bits set to 1 in the bit string -`bitstring_to_str `_ +`bitstring_to_str `_ Transform a bit string to a string for printing -`list_to_bitstring `_ +`debug_det `_ +None +`list_to_bitstring `_ return the physical string "string(N_int,2)" from the array of occupations "list(N_int*bit_kind_size,2) list <== ipos ==> diff --git a/src/CISD/README.rst b/src/CISD/README.rst index cc863454..ceb15b27 100644 --- a/src/CISD/README.rst +++ b/src/CISD/README.rst @@ -23,5 +23,14 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. +`fill_h_apply_buffer_cisd `_ + Fill the H_apply buffer with determiants for CISD + +`h_apply_cisd `_ + Calls H_apply on the HF determinant and selects all connected single and double + excitations (of the same symmetry). + +`cisd `_ +None diff --git a/src/DensityMatrix/README.rst b/src/DensityMatrix/README.rst new file mode 100644 index 00000000..d0734ed9 --- /dev/null +++ b/src/DensityMatrix/README.rst @@ -0,0 +1,31 @@ +==================== +DensityMatrix Module +==================== + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + + + +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `BiInts `_ +* `Bitmask `_ +* `Dets `_ +* `Electrons `_ +* `Ezfio_files `_ +* `Hartree_Fock `_ +* `MonoInts `_ +* `MOs `_ +* `Nuclei `_ +* `Output `_ +* `Utils `_ + diff --git a/src/Dets/README.rst b/src/Dets/README.rst index 501f440c..8c7eaa4c 100644 --- a/src/Dets/README.rst +++ b/src/Dets/README.rst @@ -50,5 +50,110 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. +`copy_h_apply_buffer_to_wf `_ +None +`h_apply_buffer_coef `_ + Buffer of determinants/coefficients for H_apply. Uninitialized. Filled by H_apply subroutines. + +`h_apply_buffer_det `_ + Buffer of determinants/coefficients for H_apply. Uninitialized. Filled by H_apply subroutines. + +`h_apply_buffer_n_det `_ + Buffer of determinants/coefficients for H_apply. Uninitialized. Filled by H_apply subroutines. + +`h_apply_buffer_size `_ + Size of the H_apply buffer. + +`h_apply_threshold `_ + Theshold on | | + +`resize_h_apply_buffer_det `_ +None +`n_det `_ + Number of determinants in the wave function + +`n_det_generators `_ + Number of generator determinants in the wave function + +`n_states `_ + Number of states to consider + +`psi_coef `_ + The wave function. Initialized with Hartree-Fock + +`psi_det `_ + The wave function. Initialized with Hartree-Fock + +`psi_generators `_ + Determinants on which H is applied + +`double_exc_bitmask `_ + double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1 + double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1 + double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2 + double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2 + for a given couple of hole/particle excitations i. + +`n_double_exc_bitmasks `_ + Number of double excitation bitmasks + +`n_single_exc_bitmasks `_ + Number of single excitation bitmasks + +`single_exc_bitmask `_ + single_exc_bitmask(:,1,i) is the bitmask for holes + single_exc_bitmask(:,2,i) is the bitmask for particles + for a given couple of hole/particle excitations i. + +`get_s2 `_ + Returns + +`a_operator `_ + Needed for diag_H_mat_elem + +`ac_operator `_ + Needed for diag_H_mat_elem + +`decode_exc `_ + Decodes the exc arrays returned by get_excitation. + h1,h2 : Holes + p1,p2 : Particles + s1,s2 : Spins (1:alpha, 2:beta) + degree : Degree of excitation + +`diag_h_mat_elem `_ + Computes + +`filter_connected `_ + Filters out the determinants that are not connected by H + +`filter_connected_i_h_psi0 `_ +None +`get_double_excitation `_ + Returns the two excitation operators between two doubly excited determinants and the phase + +`get_excitation `_ + Returns the excitation operators between two determinants and the phase + +`get_excitation_degree `_ + Returns the excitation degree between two determinants + +`get_excitation_degree_vector `_ + Applies get_excitation_degree to an array of determinants + +`get_mono_excitation `_ + Returns the excitation operator between two singly excited determinants and the phase + +`get_occ_from_key `_ + Returns a list of occupation numbers from a bitstring + +`i_h_j `_ + Returns where i and j are determinants + +`i_h_psim `_ +None +`h_matrix_all_dets `_ + H matrix on the basis of the slater deter;inants defined by psi_det + diff --git a/src/Dets/determinants.ezfio_config b/src/Dets/determinants.ezfio_config new file mode 100644 index 00000000..a7a86f43 --- /dev/null +++ b/src/Dets/determinants.ezfio_config @@ -0,0 +1,9 @@ +determinants + N_int integer + bit_kind integer + n_dets integer + n_states integer + psi_coef double precision (determinants_n_dets,determinants_n_states) + psi_det integer (determinants_N_int*determinants_bit_kind/4,2,determinants_n_dets) + H_apply_threshold double precision + diff --git a/src/Electrons/README.rst b/src/Electrons/README.rst index 8f87a3ce..ffd6d21b 100644 --- a/src/Electrons/README.rst +++ b/src/Electrons/README.rst @@ -34,20 +34,16 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`elec_alpha_num `_ +`elec_alpha_num `_ Numbers of alpha ("up") , beta ("down") and total electrons -`elec_beta_num `_ +`elec_beta_num `_ Numbers of alpha ("up") , beta ("down") and total electrons -`elec_num `_ +`elec_num `_ Numbers of alpha ("up") , beta ("down") and total electrons -`elec_num_tab `_ +`elec_num_tab `_ Numbers of alpha ("up") , beta ("down") and total electrons diff --git a/src/Ezfio_files/README.rst b/src/Ezfio_files/README.rst index 7e25f4a5..274eff11 100644 --- a/src/Ezfio_files/README.rst +++ b/src/Ezfio_files/README.rst @@ -11,13 +11,11 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`ezfio_filename `_ +`ezfio_filename `_ Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment variable if it is set, or as the 1st argument of the command line. -`getunitandopen `_ +`getunitandopen `_ :f: file name .br diff --git a/src/Hartree_Fock/README.rst b/src/Hartree_Fock/README.rst index ca424513..94c85fc1 100644 --- a/src/Hartree_Fock/README.rst +++ b/src/Hartree_Fock/README.rst @@ -21,59 +21,90 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`hf_density_matrix_ao `_ +`fock_matrix_alpha_ao `_ + Alpha Fock matrix in AO basis set + +`fock_matrix_alpha_mo `_ + Fock matrix on the MO basis + +`fock_matrix_beta_ao `_ + Alpha Fock matrix in AO basis set + +`fock_matrix_beta_mo `_ + Fock matrix on the MO basis + +`fock_matrix_diag_mo `_ + Fock matrix on the MO basis. + For open shells, the ROHF Fock Matrix is + .br + | F-K | F + K/2 | F | + |---------------------------------| + | F + K/2 | F | F - K/2 | + |---------------------------------| + | F | F - K/2 | F + K | + .br + F = 1/2 (Fa + Fb) + .br + K = Fb - Fa + .br + +`fock_matrix_mo `_ + Fock matrix on the MO basis. + For open shells, the ROHF Fock Matrix is + .br + | F-K | F + K/2 | F | + |---------------------------------| + | F + K/2 | F | F - K/2 | + |---------------------------------| + | F | F - K/2 | F + K | + .br + F = 1/2 (Fa + Fb) + .br + K = Fb - Fa + .br + +`hf_energy `_ + Hartree-Fock energy + +`hf_density_matrix_ao `_ Density matrix in the AO basis -`hf_density_matrix_ao_alpha `_ +`hf_density_matrix_ao_alpha `_ Alpha and Beta density matrix in the AO basis -`hf_density_matrix_ao_beta `_ +`hf_density_matrix_ao_beta `_ Alpha and Beta density matrix in the AO basis -`diagonal_fock_matrix_mo `_ +`diagonal_fock_matrix_mo `_ Diagonal Fock matrix in the MO basis -`eigenvectors_fock_matrix_mo `_ +`eigenvectors_fock_matrix_mo `_ Diagonal Fock matrix in the MO basis -`scf_iteration `_ +`scf_iteration `_ None -`do_diis `_ +`do_diis `_ If True, compute integrals on the fly -`n_it_scf_max `_ +`n_it_scf_max `_ Maximum number of SCF iterations -`thresh_scf `_ +`thresh_scf `_ Threshold on the convergence of the Hartree Fock energy -`bi_elec_ref_bitmask_energy `_ +`bi_elec_ref_bitmask_energy `_ Energy of the reference bitmask used in Slater rules -`kinetic_ref_bitmask_energy `_ +`kinetic_ref_bitmask_energy `_ Energy of the reference bitmask used in Slater rules -`mono_elec_ref_bitmask_energy `_ +`mono_elec_ref_bitmask_energy `_ Energy of the reference bitmask used in Slater rules -`nucl_elec_ref_bitmask_energy `_ +`nucl_elec_ref_bitmask_energy `_ Energy of the reference bitmask used in Slater rules -`ref_bitmask_energy `_ +`ref_bitmask_energy `_ Energy of the reference bitmask used in Slater rules diff --git a/src/MOGuess/README.rst b/src/MOGuess/README.rst index 19cfe2bb..d23ebe86 100644 --- a/src/MOGuess/README.rst +++ b/src/MOGuess/README.rst @@ -22,22 +22,18 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`h_core_guess `_ +`h_core_guess `_ None -`ao_ortho_lowdin_coef `_ +`ao_ortho_lowdin_coef `_ matrix of the coefficients of the mos generated by the orthonormalization by the S^{-1/2} canonical transformation of the aos ao_ortho_lowdin_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_lowdin orbital -`ao_ortho_lowdin_overlap `_ +`ao_ortho_lowdin_overlap `_ overlap matrix of the ao_ortho_lowdin supposed to be the Identity -`ao_ortho_lowdin_nucl_elec_integral `_ +`ao_ortho_lowdin_nucl_elec_integral `_ None diff --git a/src/MOs/NEEDED_MODULES b/src/MOs/NEEDED_MODULES index 2132a408..6ec1892c 100644 --- a/src/MOs/NEEDED_MODULES +++ b/src/MOs/NEEDED_MODULES @@ -1 +1 @@ -AOs Ezfio_files Nuclei Utils +AOs Ezfio_files Nuclei Output Utils diff --git a/src/MOs/README.rst b/src/MOs/README.rst index ff0741db..3e4981df 100644 --- a/src/MOs/README.rst +++ b/src/MOs/README.rst @@ -25,6 +25,7 @@ Needed Modules * `AOs `_ * `Ezfio_files `_ * `Nuclei `_ +* `Output `_ * `Utils `_ Documentation @@ -33,36 +34,28 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`mo_coef `_ +`mo_coef `_ Molecular orbital coefficients on AO basis set mo_coef(i,j) = coefficient of the ith ao on the jth mo + mo_label : Label characterizing the MOS (local, canonical, natural, etc) -`mo_coef_transp `_ +`mo_coef_transp `_ Molecular orbital coefficients on AO basis set -`mo_energy `_ - Fock diagonal elements +`mo_label `_ + Molecular orbital coefficients on AO basis set + mo_coef(i,j) = coefficient of the ith ao on the jth mo + mo_label : Label characterizing the MOS (local, canonical, natural, etc) -`mo_label `_ - Label characterizing the MOS (local, canonical, natural, etc) - -`mo_tot_num `_ +`mo_tot_num `_ Total number of molecular orbitals and the size of the keys corresponding -`mo_tot_num_align `_ +`mo_tot_num_align `_ Aligned variable for dimensioning of arrays -`mo_as_eigvectors_of_mo_matrix `_ +`mo_as_eigvectors_of_mo_matrix `_ None -`save_mos `_ +`save_mos `_ None diff --git a/src/MonoInts/README.rst b/src/MonoInts/README.rst index f16cb706..03ec9939 100644 --- a/src/MonoInts/README.rst +++ b/src/MonoInts/README.rst @@ -17,127 +17,96 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`ao_mono_elec_integral `_ +`ao_mono_elec_integral `_ array of the mono electronic hamiltonian on the AOs basis : sum of the kinetic and nuclear electronic potential -`ao_overlap `_ +`ao_overlap `_ Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` -`ao_overlap_abs `_ +`ao_overlap_abs `_ Overlap between absolute value of atomic basis functions: :math:`\int |\chi_i(r)| |\chi_j(r)| dr)` -`ao_overlap_x `_ +`ao_overlap_x `_ Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` -`ao_overlap_y `_ +`ao_overlap_y `_ Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` -`ao_overlap_z `_ +`ao_overlap_z `_ Overlap between atomic basis functions: :math:`\int \chi_i(r) \chi_j(r) dr)` -`check_ortho `_ +`check_ortho `_ None -`do_print `_ +`do_print `_ None -`n_pt_max_i_x `_ +`n_pt_max_i_x `_ None -`n_pt_max_integrals `_ +`n_pt_max_integrals `_ None -`ao_deriv2_x `_ +`ao_deriv2_x `_ second derivatives matrix elements in the ao basis .. math:: .br {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle -`ao_deriv2_y `_ +`ao_deriv2_y `_ second derivatives matrix elements in the ao basis .. math:: .br {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle -`ao_deriv2_z `_ +`ao_deriv2_z `_ second derivatives matrix elements in the ao basis .. math:: .br {\tt ao_deriv2_x} = \langle \chi_i(x,y,z) \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle -`ao_kinetic_integral `_ +`ao_kinetic_integral `_ array of the priminitve basis kinetic integrals \langle \chi_i |\hat{T}| \chi_j \rangle -`mo_kinetic_integral `_ +`mo_kinetic_integral `_ None -`mo_mono_elec_integral `_ +`mo_mono_elec_integral `_ array of the mono electronic hamiltonian on the MOs basis : sum of the kinetic and nuclear electronic potential -`mo_overlap `_ +`mo_overlap `_ None -`orthonormalize_mos `_ +`orthonormalize_mos `_ None -`ao_nucl_elec_integral `_ +`ao_nucl_elec_integral `_ interaction nuclear electron -`give_polynom_mult_center_mono_elec `_ +`give_polynom_mult_center_mono_elec `_ None -`i_x1_pol_mult_mono_elec `_ +`i_x1_pol_mult_mono_elec `_ None -`i_x2_pol_mult_mono_elec `_ +`i_x2_pol_mult_mono_elec `_ None -`int_gaus_pol `_ +`int_gaus_pol `_ None -`nai_pol_mult `_ +`nai_pol_mult `_ None -`v_e_n `_ +`v_e_n `_ None -`v_phi `_ +`v_phi `_ None -`v_r `_ +`v_r `_ None -`v_theta `_ +`v_theta `_ None -`wallis `_ +`wallis `_ None -`mo_nucl_elec_integral `_ +`mo_nucl_elec_integral `_ None -`save_ortho_mos `_ +`save_ortho_mos `_ None diff --git a/src/Nuclei/README.rst b/src/Nuclei/README.rst index 731bb3d1..cf164529 100644 --- a/src/Nuclei/README.rst +++ b/src/Nuclei/README.rst @@ -22,62 +22,50 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`nucl_charge `_ +`nucl_charge `_ Nuclear charges -`nucl_coord `_ +`nucl_coord `_ Nuclear coordinates in the format (:, {x,y,z}) -`nucl_coord_transp `_ +`nucl_coord_transp `_ Transposed array of nucl_coord -`nucl_dist `_ +`nucl_dist `_ nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_dist_2 `_ +`nucl_dist_2 `_ nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_dist_vec_x `_ +`nucl_dist_vec_x `_ nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_dist_vec_y `_ +`nucl_dist_vec_y `_ nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_dist_vec_z `_ +`nucl_dist_vec_z `_ nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors -`nucl_label `_ +`nucl_label `_ Nuclear labels -`nucl_num `_ +`nucl_num `_ Number of nuclei -`nucl_num_aligned `_ +`nucl_num_aligned `_ Number of nuclei -`nuclear_repulsion `_ +`nuclear_repulsion `_ Nuclear repulsion energy diff --git a/src/Output/README.rst b/src/Output/README.rst index 11c96070..e56cae81 100644 --- a/src/Output/README.rst +++ b/src/Output/README.rst @@ -39,24 +39,19 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`output_cpu_time_0 `_ +`output_cpu_time_0 `_ Initial CPU and wall times when printing in the output files -`output_wall_time_0 `_ +`output_wall_time_0 `_ Initial CPU and wall times when printing in the output files -`write_double `_ +`write_double `_ Write a double precision value in output -`write_int `_ +`write_int `_ Write an integer value in output -`write_time `_ +`write_time `_ Write a time stamp in the output for chronological reconstruction diff --git a/src/Utils/README.rst b/src/Utils/README.rst index 40bdf3ac..7feee8ad 100644 --- a/src/Utils/README.rst +++ b/src/Utils/README.rst @@ -10,53 +10,42 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. -`apply_rotation `_ +`apply_rotation `_ Apply the rotation found by find_rotation -`find_rotation `_ +`find_rotation `_ Find A.C = B -`get_pseudo_inverse `_ +`get_pseudo_inverse `_ Find C = A^-1 -`lapack_diag `_ +`lapack_diag `_ Diagonalize matrix H -`ortho_lowdin `_ +`ortho_lowdin `_ Compute U.S^-1/2 canonical orthogonalization -`add_poly `_ +`add_poly `_ Add two polynomials D(t) =! D(t) +( B(t)+C(t)) -`add_poly_multiply `_ +`add_poly_multiply `_ Add a polynomial multiplied by a constant D(t) =! D(t) +( cst * B(t)) -`f_integral `_ +`f_integral `_ function that calculates the following integral \int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx -`gaussian_product `_ +`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_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} -`give_explicit_poly_and_gaussian `_ +`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 @@ -64,112 +53,105 @@ Documentation * [ 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 `_ +`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) -`hermite `_ +`hermite `_ Hermite polynomial -`multiply_poly `_ +`multiply_poly `_ Multiply two polynomials D(t) =! D(t) +( B(t)*C(t)) -`recentered_poly2 `_ +`recentered_poly2 `_ Recenter two polynomials -`rint `_ +`rint `_ .. math:: .br \int_0^1 dx \exp(-p x^2) x^n .br -`rint1 `_ +`rint1 `_ Standard version of rint -`rint_large_n `_ +`rint_large_n `_ Version of rint for large values of n -`rint_sum `_ +`rint_sum `_ Needed for the calculation of two-electron integrals. -`overlap_gaussian_x `_ +`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 `_ +`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 `_ +`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 -`align_double `_ +`align_double `_ Compute 1st dimension such that it is aligned for vectorization. -`binom `_ +`all_utils `_ + Dummy provider to provide all utils + +`binom `_ Binomial coefficients -`binom_func `_ +`binom_func `_ .. math :: .br \frac{i!}{j!(i-j)!} .br -`binom_transp `_ +`binom_transp `_ Binomial coefficients -`dble_fact `_ +`dble_fact `_ n!! -`fact `_ +`fact `_ n! -`fact_inv `_ +`fact_inv `_ 1/n! -`inv_int `_ +`inv_int `_ 1/i -`nproc `_ +`normalize `_ + Normalizes vector u + u is expected to be aligned in memory. + +`nproc `_ Number of current OpenMP threads -`wall_time `_ +`u_dot_u `_ + Compute + u is expected to be aligned in memory. + +`u_dot_v `_ + Compute + u and v are expected to be aligned in memory. + +`wall_time `_ The equivalent of cpu_time, but for the wall time. -`write_git_log `_ +`write_git_log `_ Write the last git commit in file iunit. diff --git a/src/Utils/util.irp.f b/src/Utils/util.irp.f index bf662e74..20e09917 100644 --- a/src/Utils/util.irp.f +++ b/src/Utils/util.irp.f @@ -1,16 +1,16 @@ BEGIN_PROVIDER [ logical, all_utils ] - implicit none - BEGIN_DOC - ! Dummy provider to provide all utils - END_DOC -! Do not move this : it greps itself -BEGIN_SHELL [ /bin/bash ] + implicit none + BEGIN_DOC + ! Dummy provider to provide all utils + END_DOC + ! Do not move this : it greps itself + BEGIN_SHELL [ /bin/bash ] for i in $(grep "BEGIN_PROVIDER" $QPACKAGE_ROOT/src/Utils/*.irp.f | cut -d ',' -f 2 | cut -d ']' -f 1 | tail --lines=+3 ) do - echo PROVIDE $i + echo PROVIDE $i done -END_SHELL - + END_SHELL + END_PROVIDER double precision function binom_func(i,j) @@ -209,3 +209,89 @@ BEGIN_PROVIDER [ integer, nproc ] !$OMP END PARALLEL END_PROVIDER + +double precision function u_dot_v(u,v,sze) + implicit none + BEGIN_DOC + ! Compute + ! u and v are expected to be aligned in memory. + END_DOC + integer, intent(in) :: sze + double precision, intent(in) :: u(sze),v(sze) + + integer :: i,t1, t2, t3, t4 + + ASSERT (sze > 0) + t1 = 0 + t2 = sze/4 + t3 = t2+t2 + t4 = t3+t2 + u_dot_v = 0.d0 + !DIR$ VECTOR ALWAYS + !DIR$ VECTOR ALIGNED + do i=1,t2 + u_dot_v = u_dot_v + u(t1+i)*v(t1+i) + u(t2+i)*v(t2+i) + & + u(t3+i)*v(t3+i) + u(t4+i)*v(t4+i) + enddo + !DIR$ VECTOR ALWAYS + !DIR$ VECTOR ALIGNED + do i=t4+t2+1,sze + u_dot_v = u_dot_v + u(i)*v(i) + enddo + +end + +double precision function u_dot_u(u,sze) + implicit none + BEGIN_DOC + ! Compute + ! u is expected to be aligned in memory. + END_DOC + integer, intent(in) :: sze + double precision, intent(in) :: u(sze) + + integer :: i + integer :: t1, t2, t3, t4 + + ASSERT (sze > 0) + t1 = 0 + t2 = sze/4 + t3 = t2+t2 + t4 = t3+t2 + u_dot_u = 0.d0 + do i=1,t2 + u_dot_u = u_dot_u + u(t1+i)*u(t1+i) + u(t2+i)*u(t2+i) + & + u(t3+i)*u(t3+i) + u(t4+i)*u(t4+i) + enddo + do i=t4+t2+1,sze + u_dot_u = u_dot_u+u(i)*u(i) + enddo + +end + +subroutine normalize(u,sze) + implicit none + BEGIN_DOC + ! Normalizes vector u + ! u is expected to be aligned in memory. + END_DOC + integer, intent(in) :: sze + double precision, intent(inout):: u(sze) + double precision :: d + double precision, external :: u_dot_u + integer :: i + + !DIR$ FORCEINLINE + d = 1.d0/dsqrt( u_dot_u(u,sze) ) + if (d /= 1.d0) then + do i=1,sze + u(i) = d*u(i) + enddo + endif +end + + + + + +