mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-01-02 08:35:38 +01:00
Merge pull request #259 from Ydrnan/fix_cisd
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
Fix cisd
This commit is contained in:
commit
d4ea7fe7e6
@ -10,6 +10,8 @@ function run() {
|
|||||||
qp set determinants n_states 2
|
qp set determinants n_states 2
|
||||||
qp set davidson threshold_davidson 1.e-12
|
qp set davidson threshold_davidson 1.e-12
|
||||||
qp set davidson n_states_diag 24
|
qp set davidson n_states_diag 24
|
||||||
|
qp run cis
|
||||||
|
qp set_frozen_core
|
||||||
qp run cisd
|
qp run cisd
|
||||||
energy1="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)"
|
energy1="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)"
|
||||||
energy2="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)"
|
energy2="$(qp get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)"
|
||||||
|
@ -69,7 +69,9 @@ subroutine run
|
|||||||
do i = 1,N_states
|
do i = 1,N_states
|
||||||
k = maxloc(dabs(psi_coef_sorted(1:N_det,i)),dim=1)
|
k = maxloc(dabs(psi_coef_sorted(1:N_det,i)),dim=1)
|
||||||
delta_E = CI_electronic_energy(i) - diag_h_mat_elem(psi_det_sorted(1,1,k),N_int)
|
delta_E = CI_electronic_energy(i) - diag_h_mat_elem(psi_det_sorted(1,1,k),N_int)
|
||||||
cisdq(i) = CI_energy(i) + delta_E * (1.d0 - psi_coef_sorted(k,i)**2)
|
if (elec_alpha_num + elec_beta_num >= 4) then
|
||||||
|
cisdq(i) = CI_energy(i) + delta_E * (1.d0 - psi_coef_sorted(k,i)**2)
|
||||||
|
endif
|
||||||
enddo
|
enddo
|
||||||
print *, 'N_det = ', N_det
|
print *, 'N_det = ', N_det
|
||||||
print*,''
|
print*,''
|
||||||
@ -78,26 +80,43 @@ subroutine run
|
|||||||
do i = 1,N_states
|
do i = 1,N_states
|
||||||
print *, i, CI_energy(i)
|
print *, i, CI_energy(i)
|
||||||
enddo
|
enddo
|
||||||
print*,''
|
if (elec_alpha_num + elec_beta_num >= 4) then
|
||||||
print*,'******************************'
|
print*,''
|
||||||
print *, 'CISD+Q Energies'
|
print*,'******************************'
|
||||||
do i = 1,N_states
|
print *, 'CISD+Q Energies'
|
||||||
print *, i, cisdq(i)
|
do i = 1,N_states
|
||||||
enddo
|
print *, i, cisdq(i)
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
if (N_states > 1) then
|
if (N_states > 1) then
|
||||||
print*,''
|
if (elec_alpha_num + elec_beta_num >= 4) then
|
||||||
print*,'******************************'
|
print*,''
|
||||||
print*,'Excitation energies (au) (CISD+Q)'
|
print*,'******************************'
|
||||||
do i = 2, N_states
|
print*,'Excitation energies (au) (CISD+Q)'
|
||||||
print*, i ,CI_energy(i) - CI_energy(1), cisdq(i) - cisdq(1)
|
do i = 2, N_states
|
||||||
enddo
|
print*, i ,CI_energy(i) - CI_energy(1), cisdq(i) - cisdq(1)
|
||||||
print*,''
|
enddo
|
||||||
print*,'******************************'
|
print*,''
|
||||||
print*,'Excitation energies (eV) (CISD+Q)'
|
print*,'******************************'
|
||||||
do i = 2, N_states
|
print*,'Excitation energies (eV) (CISD+Q)'
|
||||||
print*, i ,(CI_energy(i) - CI_energy(1))/0.0367502d0, &
|
do i = 2, N_states
|
||||||
(cisdq(i) - cisdq(1)) / 0.0367502d0
|
print*, i ,(CI_energy(i) - CI_energy(1)) * ha_to_ev, &
|
||||||
enddo
|
(cisdq(i) - cisdq(1)) * ha_to_ev
|
||||||
|
enddo
|
||||||
|
else
|
||||||
|
print*,''
|
||||||
|
print*,'******************************'
|
||||||
|
print*,'Excitation energies (au) (CISD)'
|
||||||
|
do i = 2, N_states
|
||||||
|
print*, i ,CI_energy(i) - CI_energy(1)
|
||||||
|
enddo
|
||||||
|
print*,''
|
||||||
|
print*,'******************************'
|
||||||
|
print*,'Excitation energies (eV) (CISD)'
|
||||||
|
do i = 2, N_states
|
||||||
|
print*, i ,(CI_energy(i) - CI_energy(1)) * ha_to_ev
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user