mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-24 13:23:41 +01:00
Fixed CISD
This commit is contained in:
parent
7298ba2b66
commit
df90b9fe98
@ -3,7 +3,9 @@
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python2 ]
|
||||
from generate_h_apply import H_apply
|
||||
H = H_apply("cisd")
|
||||
H = H_apply("cisd",do_double_exc=True)
|
||||
print H
|
||||
H = H_apply("cis",do_double_exc=False)
|
||||
print H
|
||||
END_SHELL
|
||||
|
||||
|
@ -1,20 +1,22 @@
|
||||
program cisd
|
||||
program cis
|
||||
implicit none
|
||||
read_wf = .False.
|
||||
SOFT_TOUCH read_wf
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
print *, 'HF = ', HF_energy
|
||||
print *, 'N_states = ', N_states
|
||||
N_det = 1
|
||||
touch psi_det psi_coef N_det
|
||||
call H_apply_cisd
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1,N_states
|
||||
print *, 'energy = ',CI_energy(i)
|
||||
print *, 'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
|
||||
enddo
|
||||
|
||||
call ezfio_set_cisd_energy(CI_energy(1))
|
||||
psi_coef = ci_eigenvectors
|
||||
SOFT_TOUCH psi_coef
|
||||
call save_wavefunction
|
||||
|
||||
end
|
||||
|
@ -26,13 +26,13 @@ subroutine run1
|
||||
!$OMP PARALLEL DO DEFAULT(SHARED) &
|
||||
!$OMP PRIVATE(k,c_alpha) SCHEDULE(static,64)
|
||||
do k=1,N_det
|
||||
if (maxval(abs(psi_coef(k,1:N_states))) == 0.d0) then
|
||||
! if (maxval(abs(psi_coef(k,1:N_states))) == 0.d0) then
|
||||
if (iand(k,1023) == 0) then
|
||||
print *, k, '/', N_det
|
||||
endif
|
||||
call get_cc_coef(psi_det(1,1,k), c_alpha)
|
||||
psi_coef(k,1:N_states) = c_alpha(1:N_states)
|
||||
endif
|
||||
! endif
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
SOFT_TOUCH psi_coef
|
||||
@ -46,12 +46,12 @@ subroutine run2
|
||||
|
||||
psi_det(1:N_int,1:2,1:N_det) = psi_det_sorted(1:N_int,1:2,1:N_det)
|
||||
psi_coef(1:N_det,1:N_states) = psi_coef_sorted(1:N_det,1:N_states)
|
||||
do k=N_det,1,-1
|
||||
if (maxval(abs(psi_coef(k,1:N_states))) > 0.d0) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
N_det = k
|
||||
! do k=N_det,1,-1
|
||||
! if (maxval(abs(psi_coef(k,1:N_states))) > 0.d0) then
|
||||
! exit
|
||||
! endif
|
||||
! enddo
|
||||
! N_det = k
|
||||
SOFT_TOUCH N_det psi_coef psi_det
|
||||
call save_wavefunction
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user