10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-12 00:54:07 +01:00
quantum_package/src/Dets/save_for_qmcchem.irp.f

50 lines
1.3 KiB
FortranFixed
Raw Normal View History

2014-06-25 14:58:58 +02:00
subroutine save_dets_qmcchem
use bitmasks
implicit none
character :: c(mo_tot_num)
integer :: i,k
integer, allocatable :: occ(:,:,:), occ_tmp(:,:)
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: occ, occ_tmp
2014-09-17 12:27:04 +02:00
read_wf = .True.
TOUCH read_wf
2014-06-25 14:58:58 +02:00
call ezfio_set_determinants_det_num(N_det)
call ezfio_set_determinants_det_coef(psi_coef_sorted(1,1))
allocate (occ(elec_alpha_num,N_det,2))
! OMP PARALLEL DEFAULT(NONE) &
! OMP PRIVATE(occ_tmp,i,k)&
! OMP SHARED(N_det,psi_det_sorted,elec_alpha_num, &
! OMP occ,elec_beta_num,N_int)
allocate (occ_tmp(N_int*bit_kind_size,2))
occ_tmp = 0
! OMP DO
do i=1,N_det
call bitstring_to_list(psi_det_sorted(1,1,i), occ_tmp(1,1), elec_alpha_num, N_int )
call bitstring_to_list(psi_det_sorted(1,2,i), occ_tmp(1,2), elec_beta_num, N_int )
do k=1,elec_alpha_num
occ(k,i,1) = occ_tmp(k,1)
occ(k,i,2) = occ_tmp(k,2)
enddo
enddo
! OMP END DO
deallocate(occ_tmp)
! OMP END PARALLEL
call ezfio_set_determinants_det_occ(occ)
call write_int(output_dets,N_det,'Determinants saved for QMC')
deallocate(occ)
2014-10-17 15:07:07 +02:00
open(unit=31,file=trim(ezfio_filename)//'/mo_basis/mo_classif')
write(31,'(I1)') 1
2014-10-17 15:07:07 +02:00
write(31,*) mo_tot_num
do i=1,mo_tot_num
write(31,'(A)') 'a'
enddo
close(31)
call system('gzip '//trim(ezfio_filename)//'/mo_basis/mo_classif')
2014-06-25 14:58:58 +02:00
end
2014-07-16 15:31:02 +02:00
program save_for_qmc
call save_dets_qmcchem
end