mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 04:43:45 +01:00
added save_wf_unormalized
This commit is contained in:
parent
b70ae8dc58
commit
db08b90945
@ -587,6 +587,71 @@ subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
subroutine save_wavefunction_general_unormalized(ndet,nstates,psidet,dim_psicoef,psicoef)
|
||||||
|
implicit none
|
||||||
|
BEGIN_DOC
|
||||||
|
! Save the wave function into the |EZFIO| file
|
||||||
|
END_DOC
|
||||||
|
use bitmasks
|
||||||
|
include 'constants.include.F'
|
||||||
|
integer, intent(in) :: ndet,nstates,dim_psicoef
|
||||||
|
integer(bit_kind), intent(in) :: psidet(N_int,2,ndet)
|
||||||
|
double precision, intent(in) :: psicoef(dim_psicoef,nstates)
|
||||||
|
integer*8, allocatable :: psi_det_save(:,:,:)
|
||||||
|
double precision, allocatable :: psi_coef_save(:,:)
|
||||||
|
|
||||||
|
double precision :: accu_norm
|
||||||
|
integer :: i,j,k, ndet_qp_edit
|
||||||
|
|
||||||
|
if (mpi_master) then
|
||||||
|
ndet_qp_edit = min(ndet,N_det_qp_edit)
|
||||||
|
|
||||||
|
call ezfio_set_determinants_N_int(N_int)
|
||||||
|
call ezfio_set_determinants_bit_kind(bit_kind)
|
||||||
|
call ezfio_set_determinants_N_det(ndet)
|
||||||
|
call ezfio_set_determinants_N_det_qp_edit(ndet_qp_edit)
|
||||||
|
call ezfio_set_determinants_n_states(nstates)
|
||||||
|
call ezfio_set_determinants_mo_label(mo_label)
|
||||||
|
|
||||||
|
allocate (psi_det_save(N_int,2,ndet))
|
||||||
|
do i=1,ndet
|
||||||
|
do j=1,2
|
||||||
|
do k=1,N_int
|
||||||
|
psi_det_save(k,j,i) = transfer(psidet(k,j,i),1_8)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
call ezfio_set_determinants_psi_det(psi_det_save)
|
||||||
|
call ezfio_set_determinants_psi_det_qp_edit(psi_det_save)
|
||||||
|
deallocate (psi_det_save)
|
||||||
|
|
||||||
|
allocate (psi_coef_save(ndet,nstates))
|
||||||
|
do k=1,nstates
|
||||||
|
do i=1,ndet
|
||||||
|
psi_coef_save(i,k) = psicoef(i,k)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
|
call ezfio_set_determinants_psi_coef(psi_coef_save)
|
||||||
|
deallocate (psi_coef_save)
|
||||||
|
|
||||||
|
allocate (psi_coef_save(ndet_qp_edit,nstates))
|
||||||
|
do k=1,nstates
|
||||||
|
do i=1,ndet_qp_edit
|
||||||
|
psi_coef_save(i,k) = psicoef(i,k)
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
|
call ezfio_set_determinants_psi_coef_qp_edit(psi_coef_save)
|
||||||
|
deallocate (psi_coef_save)
|
||||||
|
|
||||||
|
call write_int(6,ndet,'Saved determinants')
|
||||||
|
endif
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,index_det_save)
|
subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,index_det_save)
|
||||||
implicit none
|
implicit none
|
||||||
|
Loading…
Reference in New Issue
Block a user