mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 04:43:45 +01:00
saving olympe2 modif
This commit is contained in:
parent
83ed57312d
commit
d872d60e70
@ -56,10 +56,10 @@
|
|||||||
print*,'Average trace of overlap_bi_ortho is different from 1 by ', dabs(accu_d-1.d0)
|
print*,'Average trace of overlap_bi_ortho is different from 1 by ', dabs(accu_d-1.d0)
|
||||||
print*,'And bi orthogonality is off by an average of ',accu_nd
|
print*,'And bi orthogonality is off by an average of ',accu_nd
|
||||||
print*,'****************'
|
print*,'****************'
|
||||||
print*,'Overlap matrix betwee mo_l_coef and mo_r_coef '
|
!print*,'Overlap matrix betwee mo_l_coef and mo_r_coef '
|
||||||
do i = 1, mo_num
|
!do i = 1, mo_num
|
||||||
write(*,'(100(F16.10,X))')overlap_bi_ortho(i,:)
|
! write(*,'(100(F16.10,X))')overlap_bi_ortho(i,:)
|
||||||
enddo
|
!enddo
|
||||||
endif
|
endif
|
||||||
print*,'Average trace of overlap_bi_ortho (should be 1.)'
|
print*,'Average trace of overlap_bi_ortho (should be 1.)'
|
||||||
print*,'accu_d = ',accu_d
|
print*,'accu_d = ',accu_d
|
||||||
|
@ -2144,6 +2144,7 @@ subroutine impose_biorthog_degen_eigvec(n, deg_num, e0, L0, R0)
|
|||||||
enddo
|
enddo
|
||||||
!print*,' accu_nd after = ', accu_nd
|
!print*,' accu_nd after = ', accu_nd
|
||||||
if(accu_nd .gt. 1d-12) then
|
if(accu_nd .gt. 1d-12) then
|
||||||
|
print*, ' accu_nd =', accu_nd
|
||||||
print*, ' your strategy for degenerates orbitals failed !'
|
print*, ' your strategy for degenerates orbitals failed !'
|
||||||
print*, m, 'deg on', i
|
print*, m, 'deg on', i
|
||||||
stop
|
stop
|
||||||
|
@ -20,7 +20,7 @@ program minimize_tc_angles
|
|||||||
! TODO
|
! TODO
|
||||||
! check if rotations of orbitals affect the TC energy
|
! check if rotations of orbitals affect the TC energy
|
||||||
! and refuse the step
|
! and refuse the step
|
||||||
call minimize_tc_orb_angles
|
call minimize_tc_orb_angles()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,9 +40,6 @@ subroutine LTxSxR(n, m, L, S, R, C)
|
|||||||
|
|
||||||
end subroutine LTxR
|
end subroutine LTxR
|
||||||
|
|
||||||
! ---
|
|
||||||
|
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
subroutine minimize_tc_orb_angles()
|
subroutine minimize_tc_orb_angles()
|
||||||
@ -103,7 +100,10 @@ subroutine routine_save_rotated_mos(thr_deg, good_angles)
|
|||||||
double precision, allocatable :: stmp(:,:), T(:,:), Snew(:,:), smat2(:,:)
|
double precision, allocatable :: stmp(:,:), T(:,:), Snew(:,:), smat2(:,:)
|
||||||
double precision, allocatable :: mo_l_coef_tmp(:,:), mo_r_coef_tmp(:,:), mo_l_coef_new(:,:)
|
double precision, allocatable :: mo_l_coef_tmp(:,:), mo_r_coef_tmp(:,:), mo_l_coef_new(:,:)
|
||||||
|
|
||||||
E_thr = 1d-04
|
PROVIDE TC_HF_energy
|
||||||
|
PROVIDE mo_r_coef mo_l_coef
|
||||||
|
|
||||||
|
E_thr = 1d-07
|
||||||
E_old = TC_HF_energy
|
E_old = TC_HF_energy
|
||||||
allocate(mo_l_coef_old(ao_num,mo_num), mo_r_coef_old(ao_num,mo_num))
|
allocate(mo_l_coef_old(ao_num,mo_num), mo_r_coef_old(ao_num,mo_num))
|
||||||
mo_r_coef_old = mo_r_coef
|
mo_r_coef_old = mo_r_coef
|
||||||
@ -145,6 +145,7 @@ subroutine routine_save_rotated_mos(thr_deg, good_angles)
|
|||||||
else
|
else
|
||||||
call give_degen_full_list(fock_diag, mo_num, thr_deg, list_degen, n_degen_list)
|
call give_degen_full_list(fock_diag, mo_num, thr_deg, list_degen, n_degen_list)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
print *, ' fock_matrix_mo'
|
print *, ' fock_matrix_mo'
|
||||||
do i = 1, mo_num
|
do i = 1, mo_num
|
||||||
print *, i, fock_diag(i), angle_left_right(i)
|
print *, i, fock_diag(i), angle_left_right(i)
|
||||||
@ -159,6 +160,8 @@ subroutine routine_save_rotated_mos(thr_deg, good_angles)
|
|||||||
if(n_degen .ge. 1000) n_degen = 1 ! convention for core orbitals
|
if(n_degen .ge. 1000) n_degen = 1 ! convention for core orbitals
|
||||||
|
|
||||||
if(n_degen .eq. 1) cycle
|
if(n_degen .eq. 1) cycle
|
||||||
|
print*, ' working on orbital', i
|
||||||
|
print*, ' multiplicity =', n_degen
|
||||||
|
|
||||||
allocate(stmp(n_degen,n_degen), smat2(n_degen,n_degen))
|
allocate(stmp(n_degen,n_degen), smat2(n_degen,n_degen))
|
||||||
allocate(mo_r_coef_tmp(ao_num,n_degen), mo_l_coef_tmp(ao_num,n_degen), mo_l_coef_new(ao_num,n_degen))
|
allocate(mo_r_coef_tmp(ao_num,n_degen), mo_l_coef_tmp(ao_num,n_degen), mo_l_coef_new(ao_num,n_degen))
|
||||||
@ -166,11 +169,11 @@ subroutine routine_save_rotated_mos(thr_deg, good_angles)
|
|||||||
|
|
||||||
print*,'Right orbitals before'
|
print*,'Right orbitals before'
|
||||||
do j = 1, n_degen
|
do j = 1, n_degen
|
||||||
write(*,'(100(F16.10,X))') mo_r_coef_new(1:ao_num,list_degen(i,j))
|
write(*,'(1000(F16.10,X))') mo_r_coef_new(1:ao_num,list_degen(i,j))
|
||||||
enddo
|
enddo
|
||||||
print*,'Left orbitals before'
|
print*,'Left orbitals before'
|
||||||
do j = 1, n_degen
|
do j = 1, n_degen
|
||||||
write(*,'(100(F16.10,X))')mo_l_coef(1:ao_num,list_degen(i,j))
|
write(*,'(1000(F16.10,X))') mo_l_coef(1:ao_num,list_degen(i,j))
|
||||||
enddo
|
enddo
|
||||||
if(angle_left_right(list_degen(i,1)).gt.80.d0.and.n_degen==2)then
|
if(angle_left_right(list_degen(i,1)).gt.80.d0.and.n_degen==2)then
|
||||||
integer :: i_list, j_list
|
integer :: i_list, j_list
|
||||||
@ -194,7 +197,7 @@ subroutine routine_save_rotated_mos(thr_deg, good_angles)
|
|||||||
endif
|
endif
|
||||||
print*,'Right orbitals '
|
print*,'Right orbitals '
|
||||||
do j = 1, n_degen
|
do j = 1, n_degen
|
||||||
write(*,'(100(F16.10,X))')mo_r_coef_tmp(1:ao_num,j)
|
write(*,'(1000(F16.10,X))') mo_r_coef_tmp(1:ao_num,j)
|
||||||
enddo
|
enddo
|
||||||
print*,'Left orbitals '
|
print*,'Left orbitals '
|
||||||
do j = 1, n_degen
|
do j = 1, n_degen
|
||||||
|
@ -5,7 +5,8 @@ program print_detweights
|
|||||||
read_wf = .True.
|
read_wf = .True.
|
||||||
touch read_wf
|
touch read_wf
|
||||||
|
|
||||||
call main()
|
call print_exc()
|
||||||
|
!call main()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ subroutine main()
|
|||||||
|
|
||||||
do i = 1, N_det
|
do i = 1, N_det
|
||||||
deg_sorted(i) = deg(ii(i))
|
deg_sorted(i) = deg(ii(i))
|
||||||
|
print *, deg_sorted(i), c(i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
print *, ' saving psi'
|
print *, ' saving psi'
|
||||||
@ -63,4 +65,33 @@ subroutine main()
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
! ---
|
||||||
|
|
||||||
|
subroutine print_exc()
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
integer :: i
|
||||||
|
integer, allocatable :: deg(:)
|
||||||
|
|
||||||
|
PROVIDE N_int
|
||||||
|
PROVIDE N_det
|
||||||
|
PROVIDE psi_det
|
||||||
|
|
||||||
|
allocate(deg(N_det))
|
||||||
|
|
||||||
|
do i = 1, N_det
|
||||||
|
call get_excitation_degree(psi_det(1,1,1), psi_det(1,1,i), deg(i), N_int)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
open(unit=10, file="exc.dat", action="write")
|
||||||
|
write(10,*) N_det
|
||||||
|
write(10,*) deg
|
||||||
|
close(10)
|
||||||
|
|
||||||
|
deallocate(deg)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user