10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-28 16:12:40 +02:00
QuantumPackage/src/utils_complex/import_kconserv.irp.f

37 lines
725 B
Fortran
Raw Normal View History

2020-02-03 23:46:12 +01:00
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')
2020-02-03 23:46:12 +01:00
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