From ca1cdbe79ab1fb0d8ecacc11f1a71380ed898ad6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 14 Jul 2017 14:13:01 +0000 Subject: [PATCH 1/5] Fixed save_for_qmcpack --- plugins/QMC/save_for_qmcpack.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/QMC/save_for_qmcpack.irp.f b/plugins/QMC/save_for_qmcpack.irp.f index 186ca616..51ed866d 100644 --- a/plugins/QMC/save_for_qmcpack.irp.f +++ b/plugins/QMC/save_for_qmcpack.irp.f @@ -21,6 +21,6 @@ program qmcpack enddo call save_mos call system('rm '//trim(ezfio_filename)//'/mo_basis/ao_md5') - call system('$QP_ROOT/src/qmcpack/qp_convert_qmcpack_to_ezfio.py '//trim(ezfio_filename)) + call system('$QP_ROOT/src/QMC/qp_convert_qmcpack_to_ezfio.py '//trim(ezfio_filename)) end From c46f4c5014710f1a9f938c42128aa7ba8a420c7b Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 14 Jul 2017 14:15:34 +0000 Subject: [PATCH 2/5] Fixed truncate --- plugins/QMC/truncate_wf_spin.irp.f | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/QMC/truncate_wf_spin.irp.f b/plugins/QMC/truncate_wf_spin.irp.f index 12de19ca..c9f863f1 100644 --- a/plugins/QMC/truncate_wf_spin.irp.f +++ b/plugins/QMC/truncate_wf_spin.irp.f @@ -1,4 +1,10 @@ -program e_curve +program truncate + read_wf = .True. + SOFT_TOUCH read_wf + call run +end + +subroutine run use bitmasks implicit none integer :: i,j,k, kk, nab, m, l @@ -6,9 +12,6 @@ program e_curve integer, allocatable :: iorder(:) double precision , allocatable :: norm_sort(:) double precision :: e_0(N_states) - if (.not.read_wf) then - stop 'Please set read_wf to true' - endif PROVIDE mo_bielec_integrals_in_map H_apply_buffer_allocated @@ -21,8 +24,6 @@ program e_curve allocate(u_t(N_states,N_det),v_t(N_states,N_det),s_t(N_states,N_det)) allocate(u_0(N_det,N_states),v_0(N_det,N_states)) - read(*,*) ci_threshold - norm_sort(0) = 0.d0 iorder(0) = 0 do i=1,n_det_alpha_unique From 5906cb5ac3a222fae61ba2a3f23131da813dbf6d Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 14 Jul 2017 19:31:57 +0000 Subject: [PATCH 3/5] Fixed truncate_wf_spin --- plugins/QMC/truncate_wf_spin.irp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/QMC/truncate_wf_spin.irp.f b/plugins/QMC/truncate_wf_spin.irp.f index c9f863f1..5a5fe125 100644 --- a/plugins/QMC/truncate_wf_spin.irp.f +++ b/plugins/QMC/truncate_wf_spin.irp.f @@ -101,7 +101,7 @@ subroutine run print *, 'Energy', E exit enddo - call wf_of_psi_bilinear_matrix() + call wf_of_psi_bilinear_matrix(.True.) call save_wavefunction deallocate (iorder, norm_sort) From 24725e60e6704629fceb352c77609b37bea83658 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 14 Jul 2017 21:49:32 +0000 Subject: [PATCH 4/5] Removed memory bottleneck --- src/Determinants/spindeterminants.irp.f | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Determinants/spindeterminants.irp.f b/src/Determinants/spindeterminants.irp.f index a1ad04fe..b6ca1cba 100644 --- a/src/Determinants/spindeterminants.irp.f +++ b/src/Determinants/spindeterminants.irp.f @@ -1217,7 +1217,6 @@ subroutine wf_of_psi_bilinear_matrix(truncate) integer :: idx integer, external :: get_index_in_psi_det_sorted_bit double precision :: norm(N_states) - PROVIDE psi_bilinear_matrix do k=1,N_det i = psi_bilinear_matrix_rows(k) From ac0a0ff18622718e7fd73886a3c0e9a6d1f85c6e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sat, 15 Jul 2017 01:02:13 +0200 Subject: [PATCH 5/5] Solved bug for large calculations --- src/Determinants/slater_rules.irp.f | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Determinants/slater_rules.irp.f b/src/Determinants/slater_rules.irp.f index 80dbbad4..d905110d 100644 --- a/src/Determinants/slater_rules.irp.f +++ b/src/Determinants/slater_rules.irp.f @@ -1503,14 +1503,16 @@ subroutine get_excitation_degree_vector_double_alpha_beta(key1,key2,degree,Nint, !DIR$ LOOP COUNT (1000) do i=1,sze d = 0 + degree_alpha = 0 + degree_beta = 0 !DIR$ LOOP COUNT MIN(4) do m=1,Nint d = d + popcnt(xor( key1(m,1,i), key2(m,1))) & + popcnt(xor( key1(m,2,i), key2(m,2))) key_tmp(m,1) = xor(key1(m,1,i),key2(m,1)) key_tmp(m,2) = xor(key1(m,2,i),key2(m,2)) - degree_alpha = popcnt(key_tmp(m,1)) - degree_beta = popcnt(key_tmp(m,2)) + degree_alpha += popcnt(key_tmp(m,1)) + degree_beta += popcnt(key_tmp(m,2)) enddo if(degree_alpha .gt.3 .or. degree_beta .gt.3 )cycle !! no double excitations of same spin degree(l) = ishft(d,-1) @@ -1661,12 +1663,13 @@ subroutine get_excitation_degree_vector_mono_or_exchange_verbose(key1,key2,degre do i=1,sze d = 0 exchange_1 = 0 + exchange_2 = 0 !DIR$ LOOP COUNT MIN(4) do m=1,Nint d = d + popcnt(xor( key1(m,1,i), key2(m,1))) & + popcnt(xor( key1(m,2,i), key2(m,2))) - exchange_1 = popcnt(xor(iand(key1(m,1,i),key1(m,2,i)),iand(key2(m,1),key2(m,2)))) - exchange_2 = popcnt(iand(xor(key1(m,1,i),key2(m,1)),xor(key1(m,2,i),key2(m,2)))) + exchange_1 += popcnt(xor(iand(key1(m,1,i),key1(m,2,i)),iand(key2(m,1),key2(m,2)))) + exchange_2 += popcnt(iand(xor(key1(m,1,i),key2(m,1)),xor(key1(m,2,i),key2(m,2)))) enddo if (d > 4)cycle if (d ==4)then @@ -2225,7 +2228,7 @@ subroutine get_excitation_degree_spin(key1,key2,degree,Nint) degree = sum(popcnt(xorvec(1:4))) case default - do l=1,N_int + do l=1,Nint xorvec(l) = xor( key1(l), key2(l)) enddo degree = sum(popcnt(xorvec(1:Nint)))