10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 21:03:56 +01:00
quantum_package/plugins/Generators_restart/generators.irp.f

64 lines
1.5 KiB
Fortran
Raw Normal View History

2015-03-19 21:14:52 +01:00
use bitmasks
2016-03-11 23:27:39 +01:00
2015-03-19 21:14:52 +01:00
BEGIN_PROVIDER [ integer, N_det_generators ]
implicit none
BEGIN_DOC
! Read the wave function
END_DOC
integer :: i
integer, save :: ifirst = 0
double precision :: norm
if(ifirst == 0)then
2016-03-11 23:27:39 +01:00
call ezfio_get_determinants_n_det(N_det_generators)
2015-03-19 21:14:52 +01:00
ifirst = 1
2016-03-11 23:27:39 +01:00
else
print*,'PB in generators restart !!!'
2015-03-19 21:14:52 +01:00
endif
2015-04-20 10:12:08 +02:00
call write_int(output_determinants,N_det_generators,'Number of generators')
2015-03-19 21:14:52 +01:00
END_PROVIDER
2016-03-11 23:27:39 +01:00
BEGIN_PROVIDER [ integer(bit_kind), psi_det_generators, (N_int,2,N_det_generators) ]
&BEGIN_PROVIDER [ double precision, psi_coef_generators, (N_det_generators,N_states) ]
2015-03-19 21:14:52 +01:00
implicit none
BEGIN_DOC
! read wf
!
END_DOC
integer :: i, k
integer, save :: ifirst = 0
2016-03-11 23:27:39 +01:00
double precision, allocatable :: psi_coef_read(:,:)
2015-03-19 21:14:52 +01:00
if(ifirst == 0)then
2016-03-11 23:27:39 +01:00
call read_dets(psi_det_generators,N_int,N_det_generators)
allocate (psi_coef_read(N_det_generators,N_states))
call ezfio_get_determinants_psi_coef(psi_coef_read)
2015-03-19 21:14:52 +01:00
do k = 1, N_states
2016-03-11 23:27:39 +01:00
do i = 1, N_det_generators
psi_coef_generators(i,k) = psi_coef_read(i,k)
enddo
2015-03-19 21:14:52 +01:00
enddo
ifirst = 1
2016-03-11 23:27:39 +01:00
deallocate(psi_coef_read)
else
print*,'PB in generators restart !!!'
2015-03-19 21:14:52 +01:00
endif
END_PROVIDER
BEGIN_PROVIDER [ integer, size_select_max]
implicit none
BEGIN_DOC
! Size of the select_max array
END_DOC
size_select_max = 10000
END_PROVIDER
BEGIN_PROVIDER [ double precision, select_max, (size_select_max) ]
implicit none
BEGIN_DOC
! Memo to skip useless selectors
END_DOC
select_max = huge(1.d0)
END_PROVIDER