mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-11 13:38:21 +01:00
Single state diagonalization in MRCC
This commit is contained in:
parent
7f9d19346e
commit
f2fdcb379d
plugins
@ -150,17 +150,15 @@ END_PROVIDER
|
|||||||
allocate (eigenvectors(size(CI_eigenvectors_dressed,1),size(CI_eigenvectors_dressed,2)), &
|
allocate (eigenvectors(size(CI_eigenvectors_dressed,1),size(CI_eigenvectors_dressed,2)), &
|
||||||
eigenvalues(size(CI_electronic_energy_dressed,1)))
|
eigenvalues(size(CI_electronic_energy_dressed,1)))
|
||||||
do mrcc_state=1,N_states
|
do mrcc_state=1,N_states
|
||||||
do j=1,min(N_states,N_det)
|
do i=1,N_det
|
||||||
do i=1,N_det
|
eigenvectors(i,1) = psi_coef(i,mrcc_state)
|
||||||
eigenvectors(i,j) = psi_coef(i,j)
|
|
||||||
enddo
|
|
||||||
enddo
|
enddo
|
||||||
call davidson_diag_mrcc_HS2(psi_det,eigenvectors,&
|
call davidson_diag_mrcc_HS2(psi_det,eigenvectors,&
|
||||||
size(eigenvectors,1), &
|
size(eigenvectors,1), &
|
||||||
eigenvalues,N_det,N_states,N_states_diag,N_int, &
|
eigenvalues,N_det,1,N_states_diag,N_int, &
|
||||||
output_determinants,mrcc_state)
|
output_determinants,mrcc_state)
|
||||||
CI_eigenvectors_dressed(1:N_det,mrcc_state) = eigenvectors(1:N_det,mrcc_state)
|
CI_eigenvectors_dressed(1:N_det,mrcc_state) = eigenvectors(1:N_det,1)
|
||||||
CI_electronic_energy_dressed(mrcc_state) = eigenvalues(mrcc_state)
|
CI_electronic_energy_dressed(mrcc_state) = eigenvalues(1)
|
||||||
if (mrcc_state == 1) then
|
if (mrcc_state == 1) then
|
||||||
do k=N_states+1,N_states_diag
|
do k=N_states+1,N_states_diag
|
||||||
CI_eigenvectors_dressed(1:N_det,k) = eigenvectors(1:N_det,k)
|
CI_eigenvectors_dressed(1:N_det,k) = eigenvectors(1:N_det,k)
|
||||||
|
@ -41,11 +41,15 @@ subroutine run(N_st,energy)
|
|||||||
print *, 'MRCEPA0 Iteration', iteration
|
print *, 'MRCEPA0 Iteration', iteration
|
||||||
print *, '==========================='
|
print *, '==========================='
|
||||||
print *, ''
|
print *, ''
|
||||||
E_old = sum(ci_energy_dressed)
|
E_old = sum(ci_energy_dressed(1:N_states))
|
||||||
call write_double(6,ci_energy_dressed(1),"MRCEPA0 energy")
|
do i=1,N_st
|
||||||
|
call write_double(6,ci_energy_dressed(i),"MRCEPA0 energy")
|
||||||
|
enddo
|
||||||
call diagonalize_ci_dressed(lambda)
|
call diagonalize_ci_dressed(lambda)
|
||||||
E_new = sum(ci_energy_dressed)
|
E_new = sum(ci_energy_dressed(1:N_states))
|
||||||
delta_E = dabs(E_new - E_old)
|
delta_E = (E_new - E_old)/dble(N_states)
|
||||||
|
call write_double(6,delta_E,"delta_E")
|
||||||
|
delta_E = dabs(delta_E)
|
||||||
call save_wavefunction
|
call save_wavefunction
|
||||||
call ezfio_set_mrcepa0_energy(ci_energy_dressed(1))
|
call ezfio_set_mrcepa0_energy(ci_energy_dressed(1))
|
||||||
if (iteration >= n_it_mrcc_max) then
|
if (iteration >= n_it_mrcc_max) then
|
||||||
|
Loading…
Reference in New Issue
Block a user