9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 22:13:38 +01:00
qp2/src/two_body_rdm/two_e_dm_mo.irp.f

37 lines
1.2 KiB
Fortran
Raw Normal View History

2021-04-17 02:18:57 +02:00
BEGIN_PROVIDER [double precision, two_e_dm_mo, (mo_num,mo_num,mo_num,mo_num)]
2021-02-22 12:12:30 +01:00
implicit none
BEGIN_DOC
! two_e_dm_bb_mo(i,j,k,l,istate) = STATE SPECIFIC physicist notation for 2RDM of beta/beta electrons
!
! <Psi| a^{\dagger}_{i \beta} a^{\dagger}_{j \beta} a_{l \beta} a_{k \beta} |Psi>
!
2021-05-20 18:19:44 +02:00
! where the indices (i,j,k,l) belong to all MOs.
2021-02-22 12:12:30 +01:00
!
2021-05-20 18:19:44 +02:00
! The normalization (i.e. sum of diagonal elements) is set to $N_{elec} * (N_{elec} - 1)/2$
2021-02-22 12:12:30 +01:00
!
2021-05-20 18:19:44 +02:00
! !!!!! WARNING !!!!! IF "no_core_density" then all elements involving at least one CORE MO are set to zero
! The state-averaged two-electron energy :
2021-02-22 12:12:30 +01:00
!
2021-05-20 18:19:44 +02:00
! \sum_{i,j,k,l = 1, mo_num} two_e_dm_mo(i,j,k,l) * < ii jj | kk ll >
2021-02-22 12:12:30 +01:00
END_DOC
two_e_dm_mo = 0.d0
integer :: i,j,k,l,iorb,jorb,korb,lorb,istate
2021-03-14 01:14:12 +01:00
do l=1,mo_num
lorb = list_core_inact_act(l)
do k=1,mo_num
korb = list_core_inact_act(k)
do j=1,mo_num
jorb = list_core_inact_act(j)
do i=1,mo_num
iorb = list_core_inact_act(i)
2021-04-17 02:18:57 +02:00
two_e_dm_mo(iorb,jorb,korb,lorb) = state_av_full_occ_2_rdm_spin_trace_mo(i,j,k,l)
2021-03-14 01:14:12 +01:00
enddo
enddo
enddo
2021-02-22 12:12:30 +01:00
enddo
2021-04-17 02:18:57 +02:00
two_e_dm_mo(:,:,:,:) = two_e_dm_mo(:,:,:,:) * 2.d0
2021-02-22 12:12:30 +01:00
2021-03-14 01:14:12 +01:00
END_PROVIDER