10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-24 14:12:24 +02:00
QuantumPackage/src/utils_complex/import_kconserv.irp.f
2020-02-17 16:16:46 -06:00

37 lines
725 B
Fortran

program import_kconserv
PROVIDE ezfio_filename
call run
end
subroutine run
use map_module
implicit none
BEGIN_DOC
! read kconserv in physicists' notation order <ij|kl>
! if kconserv(i,j,k)=l, then <ij|kl> is allowed by symmetry
! NOTE: pyscf stores this internally in the order of chemists' notation (ik|jl)
END_DOC
integer :: iunit
integer :: getunitandopen
integer ::i,j,k,l
integer, allocatable :: A(:,:,:)
allocate(A(kpt_num,kpt_num,kpt_num))
A = 0
iunit = getunitandopen('K.qp','r')
do
read (iunit,*,end=10) i,j,k,l
A(i,j,k) = l
enddo
10 continue
close(iunit)
call ezfio_set_nuclei_kconserv(A)
call ezfio_set_nuclei_io_kconserv("Read")
deallocate(A)
end