mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 18:16:12 +01:00
Working on truncate_wf
This commit is contained in:
parent
090525748a
commit
7ac793cc52
@ -57,7 +57,7 @@ subroutine run_selection_slave(thread,iproc,energy)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if(done .or. ctask == size(task_id)) then
|
if(done .or. ctask == size(task_id)) then
|
||||||
ASSERT (.not.(buf%N == 0 .and. ctask > 0))
|
ASSERT (buf%N /= 0)
|
||||||
do i=1, ctask
|
do i=1, ctask
|
||||||
call task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i))
|
call task_done_to_taskserver(zmq_to_qp_run_socket,worker_id,task_id(i))
|
||||||
end do
|
end do
|
||||||
|
@ -47,7 +47,7 @@ subroutine run
|
|||||||
!$OMP PARALLEL DO PRIVATE(k)
|
!$OMP PARALLEL DO PRIVATE(k)
|
||||||
do k=1,n_det
|
do k=1,n_det
|
||||||
if (psi_bilinear_matrix_columns(k) == -i) then
|
if (psi_bilinear_matrix_columns(k) == -i) then
|
||||||
psi_bilinear_matrix_values(k,1) = 0.d0
|
psi_bilinear_matrix_values(k,1:N_states) = 0.d0
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
@ -55,7 +55,7 @@ subroutine run
|
|||||||
!$OMP PARALLEL DO PRIVATE(k)
|
!$OMP PARALLEL DO PRIVATE(k)
|
||||||
do k=1,n_det
|
do k=1,n_det
|
||||||
if (psi_bilinear_matrix_rows(k) == i) then
|
if (psi_bilinear_matrix_rows(k) == i) then
|
||||||
psi_bilinear_matrix_values(k,1) = 0.d0
|
psi_bilinear_matrix_values(k,1:N_states) = 0.d0
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
@ -85,20 +85,21 @@ subroutine run
|
|||||||
|
|
||||||
double precision, external :: u_dot_u, u_dot_v
|
double precision, external :: u_dot_u, u_dot_v
|
||||||
do i=1,N_states
|
do i=1,N_states
|
||||||
e_0(i) = u_dot_v(v_t(1,i),u_0(1,i),N_det)/u_dot_u(u_0(1,i),N_det)
|
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),N_det)/u_dot_u(u_0(1,i),N_det)
|
||||||
|
print *, 'E = ', e_0(i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
m = 0
|
m = 0
|
||||||
do k=1,n_det
|
do k=1,n_det
|
||||||
if (psi_bilinear_matrix_values(k,1) /= 0.d0) then
|
if (sum(psi_bilinear_matrix_values(k,1:N_states)) /= 0.d0) then
|
||||||
m = m+1
|
m = m+1
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
E = E_0(1) + nuclear_repulsion
|
do k=1,N_states
|
||||||
norm = u_dot_u(u_0(1,1),N_det)
|
E = E_0(k) + nuclear_repulsion
|
||||||
|
enddo
|
||||||
print *, 'Number of determinants:', m
|
print *, 'Number of determinants:', m
|
||||||
print *, 'Energy', E
|
|
||||||
exit
|
exit
|
||||||
enddo
|
enddo
|
||||||
call wf_of_psi_bilinear_matrix(.True.)
|
call wf_of_psi_bilinear_matrix(.True.)
|
||||||
|
@ -447,28 +447,12 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
|||||||
|
|
||||||
integer :: i,k
|
integer :: i,k
|
||||||
|
|
||||||
PROVIDE progress_bar
|
|
||||||
call start_progress(7,'Saving wfunction',0.d0)
|
|
||||||
|
|
||||||
progress_bar(1) = 1
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_N_int(N_int)
|
call ezfio_set_determinants_N_int(N_int)
|
||||||
progress_bar(1) = 2
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_bit_kind(bit_kind)
|
call ezfio_set_determinants_bit_kind(bit_kind)
|
||||||
progress_bar(1) = 3
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_N_det(ndet)
|
call ezfio_set_determinants_N_det(ndet)
|
||||||
progress_bar(1) = 4
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_n_states(nstates)
|
call ezfio_set_determinants_n_states(nstates)
|
||||||
progress_bar(1) = 5
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_mo_label(mo_label)
|
call ezfio_set_determinants_mo_label(mo_label)
|
||||||
|
|
||||||
progress_bar(1) = 6
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
|
|
||||||
N_int2 = (N_int*bit_kind)/8
|
N_int2 = (N_int*bit_kind)/8
|
||||||
allocate (psi_det_save(N_int2,2,ndet))
|
allocate (psi_det_save(N_int2,2,ndet))
|
||||||
do i=1,ndet
|
do i=1,ndet
|
||||||
@ -484,13 +468,10 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
|||||||
do k=1,N_int2
|
do k=1,N_int2
|
||||||
psi_det_save(k,2,i) = det_8(k)
|
psi_det_save(k,2,i) = det_8(k)
|
||||||
enddo
|
enddo
|
||||||
! print*,psi_det_save
|
|
||||||
enddo
|
enddo
|
||||||
call ezfio_set_determinants_psi_det(psi_det_save)
|
call ezfio_set_determinants_psi_det(psi_det_save)
|
||||||
deallocate (psi_det_save)
|
deallocate (psi_det_save)
|
||||||
|
|
||||||
progress_bar(1) = 7
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
allocate (psi_coef_save(ndet,nstates))
|
allocate (psi_coef_save(ndet,nstates))
|
||||||
double precision :: accu_norm(nstates)
|
double precision :: accu_norm(nstates)
|
||||||
accu_norm = 0.d0
|
accu_norm = 0.d0
|
||||||
@ -537,28 +518,12 @@ subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,inde
|
|||||||
|
|
||||||
integer :: i,k
|
integer :: i,k
|
||||||
|
|
||||||
PROVIDE progress_bar
|
|
||||||
call start_progress(7,'Saving wfunction',0.d0)
|
|
||||||
|
|
||||||
progress_bar(1) = 1
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_N_int(N_int)
|
call ezfio_set_determinants_N_int(N_int)
|
||||||
progress_bar(1) = 2
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_bit_kind(bit_kind)
|
call ezfio_set_determinants_bit_kind(bit_kind)
|
||||||
progress_bar(1) = 3
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_N_det(ndetsave)
|
call ezfio_set_determinants_N_det(ndetsave)
|
||||||
progress_bar(1) = 4
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_n_states(nstates)
|
call ezfio_set_determinants_n_states(nstates)
|
||||||
progress_bar(1) = 5
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
call ezfio_set_determinants_mo_label(mo_label)
|
call ezfio_set_determinants_mo_label(mo_label)
|
||||||
|
|
||||||
progress_bar(1) = 6
|
|
||||||
progress_value = dble(progress_bar(1))
|
|
||||||
|
|
||||||
N_int2 = (N_int*bit_kind)/8
|
N_int2 = (N_int*bit_kind)/8
|
||||||
allocate (psi_det_save(N_int2,2,ndetsave))
|
allocate (psi_det_save(N_int2,2,ndetsave))
|
||||||
do i=1,ndetsave
|
do i=1,ndetsave
|
||||||
|
@ -365,8 +365,9 @@ end
|
|||||||
do k=1,N_det
|
do k=1,N_det
|
||||||
i = psi_bilinear_matrix_rows(k)
|
i = psi_bilinear_matrix_rows(k)
|
||||||
j = psi_bilinear_matrix_columns(k)
|
j = psi_bilinear_matrix_columns(k)
|
||||||
|
f = 0.d0
|
||||||
do l=1,N_states
|
do l=1,N_states
|
||||||
f = psi_bilinear_matrix_values(k,l)*psi_bilinear_matrix_values(k,l)
|
f += psi_bilinear_matrix_values(k,l)*psi_bilinear_matrix_values(k,l)
|
||||||
enddo
|
enddo
|
||||||
det_alpha_norm(i) += f
|
det_alpha_norm(i) += f
|
||||||
det_beta_norm(j) += f
|
det_beta_norm(j) += f
|
||||||
|
Loading…
Reference in New Issue
Block a user