9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

Removed penalty method from TCSCF: problem with normal ordering

This commit is contained in:
Anthony Scemama 2023-05-11 22:45:18 +02:00
parent f0b71bc2b0
commit 01b70ffb17

View File

@ -304,22 +304,23 @@ subroutine davidson_hs2_nonsym_b1space(u_in, H_jj, s2_out,energies, sze, N_st, N
! Penalty method ! Penalty method
! -------------- ! --------------
if (s2_eig) then ! if (s2_eig) then
h_p = s_ ! h_p = s_
do k=1,shift2 ! do k=1,shift2
h_p(k,k) = h_p(k,k) - expected_s2 ! h_p(k,k) = h_p(k,k) - expected_s2
enddo ! enddo
if (only_expected_s2) then ! if (only_expected_s2) then
alpha = 0.1d0 ! alpha = 0.1d0
h_p = h + alpha*h_p ! h_p = h + alpha*h_p
else ! else
alpha = 0.0001d0 ! alpha = 0.0001d0
h_p = h + alpha*h_p ! h_p = h + alpha*h_p
endif ! endif
else ! else
h_p = h h_p = h
alpha = 0.d0 alpha = 0.d0
endif ! endif
! Diagonalize h y = lambda y ! Diagonalize h y = lambda y
! --------------------------- ! ---------------------------