10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-04 10:25:58 +02:00
quantum_package/plugins/MRPT/print_1h2p.irp.f

42 lines
850 B
Fortran
Raw Normal View History

program print_1h2p
implicit none
read_wf = .True.
touch read_wf
2016-12-05 15:10:53 +01:00
call routine_2
2016-11-17 17:03:48 +01:00
end
subroutine routine_2
implicit none
2016-12-05 15:10:53 +01:00
integer :: i,j,degree
double precision :: hij
!provide one_creat_virt
2016-11-25 19:23:09 +01:00
do i =1, n_act_orb
2016-12-05 15:10:53 +01:00
write(*,'(I3,x,100(F16.10,X))')i,one_creat(i,:,1)
2016-11-25 19:23:09 +01:00
! write(*,'(I3,x,100(F16.10,X))')i,one_anhil_one_creat(1,4,1,2,1)
2016-12-05 15:10:53 +01:00
!
2016-11-17 17:03:48 +01:00
enddo
end
subroutine routine
implicit none
double precision,allocatable :: matrix_1h2p(:,:,:)
double precision :: accu(2)
allocate (matrix_1h2p(N_det_ref,N_det_ref,N_states))
integer :: i,j,istate
accu = 0.d0
matrix_1h2p = 0.d0
call H_apply_mrpt_2p(matrix_1h2p,N_det_ref)
do istate = 1, N_states
do i = 1, N_det
do j = 1, N_det
accu(istate) += matrix_1h2p(i,j,istate) * psi_coef(i,istate) * psi_coef(j,istate)
enddo
enddo
print*,accu(istate)
enddo
deallocate (matrix_1h2p)
end