10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-05 13:43:57 +01:00
quantum_package/plugins/loc_cele/loc_exchange_int.irp.f

111 lines
2.5 KiB
Fortran
Raw Normal View History

2016-11-02 16:01:01 +01:00
program loc_int
implicit none
integer :: i,j,k,l,iorb,jorb
double precision :: exchange_int(mo_tot_num)
integer :: iorder(mo_tot_num)
integer :: indices(mo_tot_num,2)
logical :: list_core_inact_check(mo_tot_num)
integer :: n_rot
indices = 0
list_core_inact_check = .True.
n_rot = 0
do i = 1, n_core_inact_orb
iorb = list_core_inact(i)
exchange_int = 0.d0
iorder = 0
print*,''
2016-11-14 19:32:53 +01:00
if(list_core_inact_check(iorb) .eqv. .False.)cycle
2016-11-02 16:01:01 +01:00
do j = i+1, n_core_inact_orb
jorb = list_core_inact(j)
iorder(jorb) = jorb
exchange_int(jorb) = -mo_bielec_integral_jj_exchange(iorb,jorb)
2016-11-02 16:01:01 +01:00
enddo
n_rot += 1
call dsort(exchange_int,iorder,mo_tot_num)
indices(n_rot,1) = iorb
indices(n_rot,2) = iorder(1)
list_core_inact_check(iorder(1)) = .False.
print*,indices(n_rot,1),indices(n_rot,2)
print*,''
print*,''
2016-11-02 16:01:01 +01:00
enddo
print*,'****************************'
print*,'-+++++++++++++++++++++++++'
do i = 1, n_rot
iorb = indices(i,1)
jorb = indices(i,2)
print*,iorb,jorb
call mix_mo_jk(iorb,jorb)
enddo
indices = 0
list_core_inact_check = .True.
n_rot = 0
do i = 1, n_act_orb
iorb = list_act(i)
exchange_int = 0.d0
iorder = 0
print*,''
2016-11-14 19:32:53 +01:00
if(list_core_inact_check(iorb) .eqv. .False.)cycle
2016-11-02 16:01:01 +01:00
do j = i+1, n_act_orb
jorb = list_act(j)
iorder(jorb) = jorb
exchange_int(jorb) = -mo_bielec_integral_jj_exchange(iorb,jorb)
2016-11-02 16:01:01 +01:00
enddo
n_rot += 1
call dsort(exchange_int,iorder,mo_tot_num)
indices(n_rot,1) = iorb
indices(n_rot,2) = iorder(1)
list_core_inact_check(iorder(1)) = .False.
print*,indices(n_rot,1),indices(n_rot,2)
print*,''
print*,''
2016-11-02 16:01:01 +01:00
enddo
print*,'****************************'
print*,'-+++++++++++++++++++++++++'
do i = 1, n_rot
iorb = indices(i,1)
jorb = indices(i,2)
print*,iorb,jorb
call mix_mo_jk(iorb,jorb)
enddo
indices = 0
list_core_inact_check = .True.
n_rot = 0
do i = 1, n_virt_orb
iorb = list_virt(i)
exchange_int = 0.d0
iorder = 0
print*,''
2016-11-14 19:32:53 +01:00
if(list_core_inact_check(iorb) .eqv. .False.)cycle
2016-11-02 16:01:01 +01:00
do j = i+1, n_virt_orb
jorb = list_virt(j)
iorder(jorb) = jorb
exchange_int(jorb) = -mo_bielec_integral_jj_exchange(iorb,jorb)
2016-11-02 16:01:01 +01:00
enddo
n_rot += 1
call dsort(exchange_int,iorder,mo_tot_num)
indices(n_rot,1) = iorb
indices(n_rot,2) = iorder(1)
list_core_inact_check(iorder(1)) = .False.
print*,indices(n_rot,1),indices(n_rot,2)
print*,''
print*,''
2016-11-02 16:01:01 +01:00
enddo
print*,'****************************'
print*,'-+++++++++++++++++++++++++'
do i = 1, n_rot
iorb = indices(i,1)
jorb = indices(i,2)
print*,iorb,jorb
call mix_mo_jk(iorb,jorb)
enddo
call save_mos
end