From 24c4dddc2fd3e347a8308f2c9bcbb9b92708a75c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 9 Oct 2017 15:29:58 +0200 Subject: [PATCH] Aded densify_coefmatrix.irp.f --- plugins/QMC/densify_coefmatrix.irp.f | 18 ++++++++++++++++++ src/Determinants/spindeterminants.irp.f | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 plugins/QMC/densify_coefmatrix.irp.f diff --git a/plugins/QMC/densify_coefmatrix.irp.f b/plugins/QMC/densify_coefmatrix.irp.f new file mode 100644 index 00000000..aca29944 --- /dev/null +++ b/plugins/QMC/densify_coefmatrix.irp.f @@ -0,0 +1,18 @@ +program densify + implicit none + read_wf = .True. + touch read_wf + call generate_all_alpha_beta_det_products() + +! call wf_of_psi_bilinear_matrix(.False.) +! integer :: i, istate +! do istate=1,N_states +! do i=1,N_det +! if (psi_coef(i,istate) == 0.d0) then +! psi_coef(i,istate) = 1.d-6 +! endif +! enddo +! enddo + call diagonalize_ci + call save_wavefunction +end diff --git a/src/Determinants/spindeterminants.irp.f b/src/Determinants/spindeterminants.irp.f index 75c2ee31..1d873af8 100644 --- a/src/Determinants/spindeterminants.irp.f +++ b/src/Determinants/spindeterminants.irp.f @@ -691,7 +691,7 @@ subroutine generate_all_alpha_beta_det_products integer, external :: get_index_in_psi_det_sorted_bit integer(bit_kind), allocatable :: tmp_det(:,:,:) logical, external :: is_in_wavefunction - integer, external :: omp_get_thread_num + PROVIDE H_apply_buffer_allocated !$OMP PARALLEL DEFAULT(NONE) SHARED(psi_coef_sorted_bit,N_det_beta_unique,& !$OMP N_det_alpha_unique, N_int, psi_det_alpha_unique, psi_det_beta_unique,& @@ -713,7 +713,7 @@ subroutine generate_all_alpha_beta_det_products enddo call fill_H_apply_buffer_no_selection(l-1, tmp_det, N_int, iproc) enddo - !$OMP END DO NOWAIT + !$OMP END DO deallocate(tmp_det) !$OMP END PARALLEL call copy_H_apply_buffer_to_wf