mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-16 17:28:32 +02:00
added the possibility to do maxovl in TC SCF
This commit is contained in:
parent
854f40ffe2
commit
a402d509a9
@ -130,3 +130,9 @@ type: Threshold
|
|||||||
doc: Threshold to determine if two orbitals are degenerate in TCSCF in order to avoid random quasi orthogonality between the right- and left-eigenvector for the same eigenvalue
|
doc: Threshold to determine if two orbitals are degenerate in TCSCF in order to avoid random quasi orthogonality between the right- and left-eigenvector for the same eigenvalue
|
||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: 1.e-6
|
default: 1.e-6
|
||||||
|
|
||||||
|
[maxovl_tc]
|
||||||
|
type: logical
|
||||||
|
doc: If |true|, maximize the overlap between orthogonalized left- and right eigenvectors
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: False
|
||||||
|
@ -58,29 +58,25 @@ subroutine routine_save_rotated_mos
|
|||||||
do j = 1, n_degen
|
do j = 1, n_degen
|
||||||
write(*,'(100(F8.4,X))')stmp(:,j)
|
write(*,'(100(F8.4,X))')stmp(:,j)
|
||||||
enddo
|
enddo
|
||||||
T = 0.d0
|
if(maxovl_tc)then
|
||||||
Snew = 0.d0
|
T = 0.d0
|
||||||
call maxovl(n_degen, n_degen, stmp, T, Snew)
|
Snew = 0.d0
|
||||||
print*,'overlap after'
|
call maxovl(n_degen, n_degen, stmp, T, Snew)
|
||||||
do j = 1, n_degen
|
print*,'overlap after'
|
||||||
write(*,'(100(F16.10,X))')Snew(:,j)
|
do j = 1, n_degen
|
||||||
enddo
|
write(*,'(100(F16.10,X))')Snew(:,j)
|
||||||
! mo_l_coef_new = 0.D0
|
enddo
|
||||||
! do j = 1, n_degen
|
call dgemm( 'N', 'N', ao_num, n_degen, n_degen, 1.d0 &
|
||||||
! do k = 1, n_degen
|
, mo_l_coef_tmp, size(mo_l_coef_tmp, 1), T(1,1), size(T, 1) &
|
||||||
! do m = 1, ao_num
|
, 0.d0, mo_l_coef_new, size(mo_l_coef_new, 1) )
|
||||||
! mo_l_coef_new(m,j) += T(k,j) * mo_l_coef_tmp(m,k)
|
call build_s_matrix(ao_num,n_degen,mo_l_coef_new,mo_r_coef_tmp,ao_overlap,stmp)
|
||||||
! enddo
|
print*,'Overlap test'
|
||||||
! enddo
|
do j = 1, n_degen
|
||||||
! enddo
|
write(*,'(100(F16.10,X))')stmp(:,j)
|
||||||
call dgemm( 'N', 'N', ao_num, n_degen, n_degen, 1.d0 &
|
enddo
|
||||||
, mo_l_coef_tmp, size(mo_l_coef_tmp, 1), T(1,1), size(T, 1) &
|
else
|
||||||
, 0.d0, mo_l_coef_new, size(mo_l_coef_new, 1) )
|
mo_l_coef_new = mo_l_coef_tmp
|
||||||
call build_s_matrix(ao_num,n_degen,mo_l_coef_new,mo_r_coef_tmp,ao_overlap,stmp)
|
endif
|
||||||
print*,'Overlap test'
|
|
||||||
do j = 1, n_degen
|
|
||||||
write(*,'(100(F16.10,X))')stmp(:,j)
|
|
||||||
enddo
|
|
||||||
call impose_biorthog_svd_overlap(ao_num, n_degen, ao_overlap, mo_l_coef_new, mo_r_coef_tmp)
|
call impose_biorthog_svd_overlap(ao_num, n_degen, ao_overlap, mo_l_coef_new, mo_r_coef_tmp)
|
||||||
call build_s_matrix(ao_num,n_degen,mo_l_coef_new,mo_r_coef_tmp,ao_overlap,stmp)
|
call build_s_matrix(ao_num,n_degen,mo_l_coef_new,mo_r_coef_tmp,ao_overlap,stmp)
|
||||||
print*,'LAST OVERLAP '
|
print*,'LAST OVERLAP '
|
||||||
|
Loading…
Reference in New Issue
Block a user