mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-30 15:15:38 +01:00
Replaces psi_det_size by N_det
This commit is contained in:
parent
185f3a500c
commit
6224e449ca
@ -332,7 +332,7 @@ subroutine configuration_to_dets_tree_addressing(o,d,sze,n_alpha,Nint)
|
||||
end
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_configuration, (N_int,2,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_configuration, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_configuration ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
@ -99,7 +99,7 @@ subroutine davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze,
|
||||
|
||||
integer :: rc, ni, nj
|
||||
integer*8 :: rc8
|
||||
integer :: N_states_read, N_det_read, psi_det_size_read
|
||||
integer :: N_states_read, N_det_read
|
||||
integer :: N_det_selectors_read, N_det_generators_read
|
||||
|
||||
integer, external :: zmq_get_dvector
|
||||
|
@ -99,7 +99,7 @@ subroutine davidson_csf_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st,
|
||||
|
||||
integer :: rc, ni, nj
|
||||
integer*8 :: rc8
|
||||
integer :: N_states_read, N_det_read, psi_det_size_read
|
||||
integer :: N_states_read, N_det_read
|
||||
integer :: N_det_selectors_read, N_det_generators_read
|
||||
|
||||
integer, external :: zmq_get_dvector
|
||||
|
@ -99,7 +99,7 @@ subroutine davidson_nos2_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st,
|
||||
|
||||
integer :: rc, ni, nj
|
||||
integer*8 :: rc8
|
||||
integer :: N_states_read, N_det_read, psi_det_size_read
|
||||
integer :: N_states_read, N_det_read
|
||||
integer :: N_det_selectors_read, N_det_generators_read
|
||||
|
||||
integer, external :: zmq_get_dvector
|
||||
|
@ -6,7 +6,7 @@
|
||||
!
|
||||
! psi_s2(i) = $\langle \Psi_i | S^2 | \Psi_i \rangle$
|
||||
END_DOC
|
||||
call u_0_HS2_u_0(psi_energy,psi_s2,psi_coef,N_det,psi_det,N_int,N_states,psi_det_size)
|
||||
call u_0_HS2_u_0(psi_energy,psi_s2,psi_coef,N_det,psi_det,N_int,N_states,N_det)
|
||||
integer :: i
|
||||
do i=N_det+1,N_states
|
||||
psi_energy(i) = 0.d0
|
||||
|
@ -4,7 +4,7 @@ BEGIN_PROVIDER [ double precision, psi_energy_two_e, (N_states) ]
|
||||
! Energy of the current wave function
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
call u_0_H_u_0_two_e(psi_energy_two_e,psi_coef,N_det,psi_det,N_int,N_states,psi_det_size)
|
||||
call u_0_H_u_0_two_e(psi_energy_two_e,psi_coef,N_det,psi_det,N_int,N_states,N_det)
|
||||
do i=N_det+1,N_states
|
||||
psi_energy_two_e(i) = 0.d0
|
||||
enddo
|
||||
|
@ -70,42 +70,7 @@ BEGIN_PROVIDER [integer, max_degree_exc]
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer, psi_det_size ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Size of the psi_det and psi_coef arrays
|
||||
END_DOC
|
||||
PROVIDE ezfio_filename
|
||||
logical :: exists
|
||||
psi_det_size = 1
|
||||
PROVIDE mpi_master
|
||||
if (read_wf) then
|
||||
if (mpi_master) then
|
||||
call ezfio_has_determinants_n_det(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_determinants_n_det(psi_det_size)
|
||||
else
|
||||
psi_det_size = 1
|
||||
endif
|
||||
call write_int(6,psi_det_size,'Dimension of the psi arrays')
|
||||
endif
|
||||
IRP_IF MPI_DEBUG
|
||||
print *, irp_here, mpi_rank
|
||||
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
|
||||
IRP_ENDIF
|
||||
IRP_IF MPI
|
||||
include 'mpif.h'
|
||||
integer :: ierr
|
||||
call MPI_BCAST( psi_det_size, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
|
||||
if (ierr /= MPI_SUCCESS) then
|
||||
stop 'Unable to read psi_det_size with MPI'
|
||||
endif
|
||||
IRP_ENDIF
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! The determinants of the wave function. Initialized with Hartree-Fock if the |EZFIO| file
|
||||
@ -176,7 +141,7 @@ END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_coef, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! The wave function coefficients. Initialized with Hartree-Fock if the |EZFIO| file
|
||||
@ -189,7 +154,7 @@ BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
|
||||
PROVIDE read_wf N_det mo_label ezfio_filename
|
||||
psi_coef = 0.d0
|
||||
do i=1,min(N_states,psi_det_size)
|
||||
do i=1,min(N_states,N_det)
|
||||
psi_coef(i,i) = 1.d0
|
||||
enddo
|
||||
|
||||
@ -237,7 +202,7 @@ BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_average_norm_contrib, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_average_norm_contrib, (N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Contribution of determinants to the state-averaged density.
|
||||
@ -287,10 +252,10 @@ END_PROVIDER
|
||||
!==============================================================================!
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted, (psi_det_size,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_average_norm_contrib_sorted, (psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_order, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_average_norm_contrib_sorted, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_order, (N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Wave function sorted by determinants contribution to the norm (state-averaged)
|
||||
@ -319,17 +284,12 @@ END_PROVIDER
|
||||
psi_det_sorted_order(iorder(i)) = i
|
||||
enddo
|
||||
|
||||
psi_det_sorted(:,:,N_det+1:psi_det_size) = 0_bit_kind
|
||||
psi_coef_sorted(N_det+1:psi_det_size,:) = 0.d0
|
||||
psi_average_norm_contrib_sorted(N_det+1:psi_det_size) = 0.d0
|
||||
psi_det_sorted_order(N_det+1:psi_det_size) = 0
|
||||
|
||||
deallocate(iorder)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_bit, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_bit, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Determinants on which we apply $\langle i|H|psi \rangle$ for perturbation.
|
||||
@ -355,9 +315,6 @@ subroutine sort_dets_by_det_search_key(Ndet, det_in, coef_in, sze, det_out, coef
|
||||
! Determinants are sorted according to their :c:func:`det_search_key`.
|
||||
! Useful to accelerate the search of a random determinant in the wave
|
||||
! function.
|
||||
!
|
||||
! /!\ The first dimension of coef_out and coef_in need to be psi_det_size
|
||||
!
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
integer, allocatable :: iorder(:)
|
||||
@ -491,7 +448,11 @@ subroutine save_wavefunction_truncated(thr)
|
||||
endif
|
||||
enddo
|
||||
if (mpi_master) then
|
||||
call save_wavefunction_general(N_det_save,min(N_states,N_det_save),psi_det_sorted,size(psi_coef_sorted,1),psi_coef_sorted)
|
||||
call save_wavefunction_general(N_det_save, &
|
||||
min(N_states,N_det_save), &
|
||||
psi_det_sorted, &
|
||||
size(psi_coef_sorted,1), &
|
||||
psi_coef_sorted)
|
||||
endif
|
||||
end
|
||||
|
||||
|
@ -159,10 +159,7 @@ subroutine copy_H_apply_buffer_to_wf
|
||||
enddo
|
||||
|
||||
! Update array sizes
|
||||
if (psi_det_size < N_det) then
|
||||
psi_det_size = N_det
|
||||
TOUCH psi_det_size
|
||||
endif
|
||||
TOUCH N_det
|
||||
|
||||
! Restore backup in resized array
|
||||
do i=1,N_det_old
|
||||
@ -180,7 +177,7 @@ subroutine copy_H_apply_buffer_to_wf
|
||||
|
||||
!$OMP PARALLEL DEFAULT(SHARED) &
|
||||
!$OMP PRIVATE(j,k,i) FIRSTPRIVATE(N_det_old) &
|
||||
!$OMP SHARED(N_int,H_apply_buffer,psi_det,psi_coef,N_states,psi_det_size)
|
||||
!$OMP SHARED(N_int,H_apply_buffer,psi_det,psi_coef,N_states,N_det)
|
||||
j=0
|
||||
!$ j=omp_get_thread_num()
|
||||
do k=0,j-1
|
||||
|
@ -1,8 +1,8 @@
|
||||
use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_cas, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_cas_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_cas, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_cas, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_cas_coef, (N_det,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_cas, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_cas ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -44,8 +44,8 @@ use bitmasks
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_cas_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_cas_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_cas_sorted_bit, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_cas_coef_sorted_bit, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! |CAS| determinants sorted to accelerate the search of a random determinant in the wave
|
||||
@ -58,9 +58,9 @@ END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_cas, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_cas_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_cas, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_cas, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_cas_coef, (N_det,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_cas, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_non_cas ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -97,8 +97,8 @@ END_PROVIDER
|
||||
N_det_non_cas = i_non_cas
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_cas_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_cas_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_cas_sorted_bit, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_cas_coef_sorted_bit, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! |CAS| determinants sorted to accelerate the search of a random determinant in the wave
|
||||
|
@ -110,7 +110,7 @@ END_PROVIDER
|
||||
! array of the averaged values of the S^2 operator on the various states
|
||||
END_DOC
|
||||
integer :: i
|
||||
call u_0_S2_u_0(s2_values,psi_coef,n_det,psi_det,N_int,N_states,psi_det_size)
|
||||
call u_0_S2_u_0(s2_values,psi_coef,n_det,psi_det,N_int,N_states,N_det)
|
||||
do i = 1, N_states
|
||||
s_values(i) = 0.5d0 *(-1.d0 + dsqrt(1.d0 + 4 * s2_values(i)))
|
||||
enddo
|
||||
|
@ -24,7 +24,7 @@ integer*8 function spin_det_search_key(det,Nint)
|
||||
end
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_alpha, (N_int,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_alpha, (N_int,N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! List of $\alpha$ determinants of psi_det
|
||||
@ -39,7 +39,7 @@ BEGIN_PROVIDER [ integer(bit_kind), psi_det_alpha, (N_int,psi_det_size) ]
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_beta, (N_int,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_beta, (N_int,N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! List of $\beta$ determinants of psi_det
|
||||
@ -56,7 +56,7 @@ END_PROVIDER
|
||||
|
||||
BEGIN_TEMPLATE
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_$alpha_unique, (N_int,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_$alpha_unique, (N_int,N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_$alpha_unique ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
@ -10,7 +10,6 @@ integer function zmq_put_psi(zmq_to_qp_run_socket,worker_id)
|
||||
|
||||
integer, external :: zmq_put_N_states
|
||||
integer, external :: zmq_put_N_det
|
||||
integer, external :: zmq_put_psi_det_size
|
||||
integer*8, external :: zmq_put_psi_det
|
||||
integer*8, external :: zmq_put_psi_coef
|
||||
|
||||
@ -23,10 +22,6 @@ integer function zmq_put_psi(zmq_to_qp_run_socket,worker_id)
|
||||
zmq_put_psi = -1
|
||||
return
|
||||
endif
|
||||
if (zmq_put_psi_det_size(zmq_to_qp_run_socket, worker_id) == -1) then
|
||||
zmq_put_psi = -1
|
||||
return
|
||||
endif
|
||||
if (zmq_put_psi_det(zmq_to_qp_run_socket, worker_id) == -1) then
|
||||
zmq_put_psi = -1
|
||||
return
|
||||
@ -51,7 +46,6 @@ integer function zmq_get_psi_notouch(zmq_to_qp_run_socket, worker_id)
|
||||
|
||||
integer, external :: zmq_get_N_states
|
||||
integer, external :: zmq_get_N_det
|
||||
integer, external :: zmq_get_psi_det_size
|
||||
integer*8, external :: zmq_get_psi_det
|
||||
integer*8, external :: zmq_get_psi_coef
|
||||
|
||||
@ -65,19 +59,15 @@ integer function zmq_get_psi_notouch(zmq_to_qp_run_socket, worker_id)
|
||||
zmq_get_psi_notouch = -1
|
||||
return
|
||||
endif
|
||||
if (zmq_get_psi_det_size(zmq_to_qp_run_socket, worker_id) == -1) then
|
||||
zmq_get_psi_notouch = -1
|
||||
return
|
||||
endif
|
||||
|
||||
if (size(psi_det,kind=8) /= N_int*2_8*psi_det_size*bit_kind) then
|
||||
if (size(psi_det,kind=8) /= N_int*2_8*N_det*bit_kind) then
|
||||
deallocate(psi_det)
|
||||
allocate(psi_det(N_int,2,psi_det_size))
|
||||
allocate(psi_det(N_int,2,N_det))
|
||||
endif
|
||||
|
||||
if (size(psi_coef,kind=8) /= psi_det_size*N_states) then
|
||||
if (size(psi_coef,kind=8) /= N_det*N_states) then
|
||||
deallocate(psi_coef)
|
||||
allocate(psi_coef(psi_det_size,N_states))
|
||||
allocate(psi_coef(N_det,N_states))
|
||||
endif
|
||||
|
||||
if (zmq_get_psi_det(zmq_to_qp_run_socket, worker_id) == -1_8) then
|
||||
@ -102,7 +92,7 @@ integer function zmq_get_psi(zmq_to_qp_run_socket, worker_id)
|
||||
integer, intent(in) :: worker_id
|
||||
integer, external :: zmq_get_psi_notouch
|
||||
zmq_get_psi = zmq_get_psi_notouch(zmq_to_qp_run_socket, worker_id)
|
||||
SOFT_TOUCH psi_det psi_coef psi_det_size N_det N_states
|
||||
SOFT_TOUCH psi_det psi_coef N_det N_states
|
||||
|
||||
end
|
||||
|
||||
@ -266,7 +256,7 @@ integer function zmq_get_psi_bilinear(zmq_to_qp_run_socket, worker_id)
|
||||
return
|
||||
endif
|
||||
|
||||
SOFT_TOUCH psi_bilinear_matrix_values psi_bilinear_matrix_rows psi_bilinear_matrix_columns psi_bilinear_matrix_order psi_det psi_coef psi_det_size N_det N_states psi_det_beta_unique psi_det_alpha_unique N_det_beta_unique N_det_alpha_unique
|
||||
SOFT_TOUCH psi_bilinear_matrix_values psi_bilinear_matrix_rows psi_bilinear_matrix_columns psi_bilinear_matrix_order psi_det psi_coef N_det N_states psi_det_beta_unique psi_det_alpha_unique N_det_beta_unique N_det_alpha_unique
|
||||
|
||||
end
|
||||
|
||||
@ -374,7 +364,6 @@ N_states ;;
|
||||
N_det ;;
|
||||
N_det_alpha_unique ;;
|
||||
N_det_beta_unique ;;
|
||||
psi_det_size ;;
|
||||
|
||||
END_TEMPLATE
|
||||
|
||||
|
@ -20,11 +20,11 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
call write_int(6,N_det_generators,'Number of generators')
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (psi_det_size,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (psi_det_size,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
|
@ -22,8 +22,8 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
call write_int(6,N_det_generators,'Number of generators')
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
@ -34,9 +34,9 @@ END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (psi_det_size,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_gen, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_gen, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_det_sorted_gen_order, (N_det) ]
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
@ -90,12 +90,12 @@ subroutine remove_small_contributions
|
||||
enddo
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,j,i_H_psi_array) &
|
||||
!$OMP SHARED(k,psi_det_sorted,psi_coef_sorted,N_int,N_det,psi_det_size,N_states, &
|
||||
!$OMP SHARED(k,psi_det_sorted,psi_coef_sorted,N_int,N_det,N_det,N_states, &
|
||||
!$OMP selection_criterion_min,keep,N_det_generators) &
|
||||
!$OMP REDUCTION(+:N_removed)
|
||||
!$OMP DO
|
||||
do i=2*N_det_generators+1, N_det
|
||||
call i_H_psi(psi_det_sorted(1,1,i),psi_det_sorted,psi_coef_sorted,N_int,min(N_det,2*N_det_generators),psi_det_size,N_states,i_H_psi_array)
|
||||
call i_H_psi(psi_det_sorted(1,1,i),psi_det_sorted,psi_coef_sorted,N_int,min(N_det,2*N_det_generators),N_det,N_states,i_H_psi_array)
|
||||
keep(i) = .False.
|
||||
do j=1,N_states
|
||||
keep(i) = keep(i) .or. (-(psi_coef_sorted(i,j)*i_H_psi_array(j)) > selection_criterion_min)
|
||||
|
@ -1,8 +1,8 @@
|
||||
use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_ref, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef, (N_det,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_ref, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_ref ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -26,7 +26,7 @@ use bitmasks
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_inv, (psi_det_size,n_states) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_inv, (N_det,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! 1/psi_ref_coef
|
||||
@ -41,8 +41,8 @@ BEGIN_PROVIDER [ double precision, psi_ref_coef_inv, (psi_det_size,n_states) ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_restart, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef_restart, (psi_det_size,n_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_restart, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef_restart, (N_det,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Projection of the CAS wave function on the restart wave function.
|
||||
|
@ -1,8 +1,8 @@
|
||||
use bitmasks
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_sorted_bit, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef_sorted_bit, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
@ -14,7 +14,7 @@ use bitmasks
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_transp, (n_states,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_transp, (n_states,N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Transposed psi_ref_coef
|
||||
@ -27,7 +27,7 @@ BEGIN_PROVIDER [ double precision, psi_ref_coef_transp, (n_states,psi_det_size)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_normalized, (psi_det_size,n_states) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_ref_coef_normalized, (N_det,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Normalized coefficients of the reference
|
||||
@ -43,7 +43,7 @@ BEGIN_PROVIDER [ double precision, psi_ref_coef_normalized, (psi_det_size,n_sta
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_non_ref_coef_transp, (n_states,psi_det_size) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_non_ref_coef_transp, (n_states,N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Transposed psi_non_ref_coef
|
||||
@ -56,10 +56,10 @@ BEGIN_PROVIDER [ double precision, psi_non_ref_coef_transp, (n_states,psi_det_si
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref, (psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref_rev, (psi_det_size) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef, (N_det,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref_rev, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_non_ref ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -102,8 +102,8 @@ END_PROVIDER
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_restart, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_restart, (psi_det_size,n_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_restart, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_restart, (N_det,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set of determinants which are not part of the reference, defined from the application
|
||||
@ -144,8 +144,8 @@ END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_sorted_bit, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_sorted_bit, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
|
@ -2,7 +2,7 @@ use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [ integer, psi_selectors_size ]
|
||||
implicit none
|
||||
psi_selectors_size = psi_det_size
|
||||
psi_selectors_size = N_det
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_selectors_coef_transp, (N_states,psi_selectors_size) ]
|
||||
|
@ -9,8 +9,8 @@ BEGIN_PROVIDER [ integer, N_det_generators ]
|
||||
N_det_generators = 1
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (psi_det_size,N_states) ]
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! For Single reference wave functions, the generator is the
|
||||
|
Loading…
Reference in New Issue
Block a user