2014-05-30 18:07:04 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, CI_SC2_energy, (N_states) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! N_states lowest eigenvalues of the CI matrix
|
|
|
|
END_DOC
|
|
|
|
|
|
|
|
integer :: j
|
|
|
|
character*(8) :: st
|
2014-06-02 19:33:42 +02:00
|
|
|
call write_time(output_Dets)
|
2014-05-30 18:07:04 +02:00
|
|
|
do j=1,N_states
|
|
|
|
CI_SC2_energy(j) = CI_SC2_electronic_energy(j) + nuclear_repulsion
|
|
|
|
write(st,'(I4)') j
|
2014-06-02 19:33:42 +02:00
|
|
|
call write_double(output_Dets,CI_SC2_energy(j),'Energy of state '//trim(st))
|
2014-05-30 18:07:04 +02:00
|
|
|
enddo
|
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ double precision, CI_SC2_electronic_energy, (N_states) ]
|
|
|
|
&BEGIN_PROVIDER [ double precision, CI_SC2_eigenvectors, (N_det,N_states) ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Eigenvectors/values of the CI matrix
|
|
|
|
END_DOC
|
|
|
|
integer :: i,j
|
|
|
|
|
|
|
|
do j=1,N_states
|
|
|
|
do i=1,N_det
|
|
|
|
CI_SC2_eigenvectors(i,j) = CI_eigenvectors(i,j)
|
|
|
|
enddo
|
|
|
|
CI_SC2_electronic_energy(j) = CI_electronic_energy(j)
|
|
|
|
enddo
|
|
|
|
|
2014-06-04 21:28:43 +02:00
|
|
|
double precision :: convergence
|
2014-05-30 18:07:04 +02:00
|
|
|
call CISD_SC2(psi_det,CI_SC2_eigenvectors,CI_SC2_electronic_energy, &
|
2014-06-04 21:28:43 +02:00
|
|
|
size(CI_SC2_eigenvectors,1),N_det,N_states,N_int,davidson_threshold)
|
2014-05-30 18:07:04 +02:00
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
subroutine diagonalize_CI_SC2
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Replace the coefficients of the CI states by the coefficients of the
|
|
|
|
! eigenstates of the CI matrix
|
|
|
|
END_DOC
|
|
|
|
integer :: i,j
|
|
|
|
do j=1,N_states
|
|
|
|
do i=1,N_det
|
|
|
|
psi_coef(i,j) = CI_SC2_eigenvectors(i,j)
|
|
|
|
enddo
|
|
|
|
enddo
|
2014-06-04 21:28:43 +02:00
|
|
|
SOFT_TOUCH psi_coef CI_SC2_electronic_energy CI_SC2_energy CI_SC2_eigenvectors
|
2014-05-30 18:07:04 +02:00
|
|
|
end
|