mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-12 17:13:54 +01:00
Better selection
This commit is contained in:
parent
e91d11a6af
commit
f985e07211
@ -5,6 +5,9 @@
|
||||
# Mon Apr 7 15:41:19 CEST 2014
|
||||
|
||||
QPACKAGE_ROOT=${PWD}
|
||||
echo $QPACKAGE_ROOT
|
||||
IRPF90=${QPACKAGE_ROOT}/irpf90/bin/irpf90
|
||||
echo $IRPF90
|
||||
|
||||
if [[ -z ${IRPF90} ]] ;
|
||||
then
|
||||
@ -16,6 +19,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo $IRPF90
|
||||
|
||||
cat << EOF > quantum_package.rc
|
||||
export IRPF90=${IRPF90}
|
||||
@ -34,6 +38,6 @@ fi
|
||||
|
||||
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
|
||||
then
|
||||
echo "Error in IRPF90 installation"
|
||||
echo "Error in EZFIO installation"
|
||||
exit 1
|
||||
fi
|
||||
|
10
src/CISD_SC2_selected/H_apply.irp.f
Normal file
10
src/CISD_SC2_selected/H_apply.irp.f
Normal file
@ -0,0 +1,10 @@
|
||||
use bitmasks
|
||||
BEGIN_SHELL [ /usr/bin/env python ]
|
||||
from generate_h_apply import *
|
||||
from perturbation import perturbations
|
||||
|
||||
s = H_apply("PT2",openmp=True)
|
||||
s.set_perturbation("epstein_nesbet_sc2_projected")
|
||||
print s
|
||||
END_SHELL
|
||||
|
@ -13,7 +13,7 @@ program cisd_sc2_selected
|
||||
pt2 = 1.d0
|
||||
perturbation = "epstein_nesbet_sc2_projected"
|
||||
E_old(1) = HF_energy
|
||||
do while (maxval(abs(pt2(1:N_st))) > 1.d-10)
|
||||
do while (maxval(abs(pt2(1:N_st))) > 1.d-2)
|
||||
print*,'----'
|
||||
print*,''
|
||||
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||
@ -34,6 +34,10 @@ program cisd_sc2_selected
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
print*,'coucou'
|
||||
pt2 = 0.d0
|
||||
call H_apply_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||
do i = 1, N_st
|
||||
max = 0.d0
|
||||
|
||||
@ -51,9 +55,9 @@ program cisd_sc2_selected
|
||||
integer :: imax
|
||||
print *, 'PT2(SC2) = ', pt2(i)
|
||||
print *, 'E(SC2) = ', CI_SC2_energy(i)
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', (E_old(i)+pt2(i))
|
||||
print *, 'E_before(SC2)+PT2(SC2) = ', (CI_SC2_energy(i)+pt2(i))
|
||||
if(i==1)then
|
||||
print *, 'E(SC2)+PT2(projctd)SC2 = ', (E_old(i)+H_pert_diag(i))
|
||||
print *, 'E(SC2)+PT2(projctd)SC2 = ', (CI_SC2_energy(i)+H_pert_diag(i))
|
||||
endif
|
||||
|
||||
print*,'greater coeficient of the state : ',dabs(psi_coef(imax,i))
|
||||
@ -61,5 +65,6 @@ program cisd_sc2_selected
|
||||
print*,'degree of excitation of such determinant : ',degree
|
||||
|
||||
enddo
|
||||
print*,'coucou'
|
||||
deallocate(pt2,norm_pert,H_pert_diag)
|
||||
end
|
||||
|
@ -55,14 +55,15 @@ subroutine pt2_epstein_nesbet_SC2_projected(det_pert,c_pert,e_2_pert,H_pert_diag
|
||||
|
||||
do i =2,N_st
|
||||
H_pert_diag(i) = h
|
||||
if(CI_SC2_electronic_energy(i)>h.and.CI_SC2_electronic_energy(i).ne.0.d0)then
|
||||
c_pert(i) = -1.d0
|
||||
e_2_pert(i) = -2.d0
|
||||
else if (dabs(CI_SC2_electronic_energy(i) - h) > 1.d-6) then
|
||||
c_pert(i) = i_H_psi_array(i) / (CI_SC2_electronic_energy(i) - h)
|
||||
e_2_pert(i) = c_pert(i) * i_H_psi_array(i)
|
||||
! if(CI_SC2_electronic_energy(i)>h.and.CI_SC2_electronic_energy(i).ne.0.d0)then
|
||||
! c_pert(i) = -1.d0
|
||||
! e_2_pert(i) = -2.d0
|
||||
! else if (dabs(CI_SC2_electronic_energy(i) - h) > 1.d-6) then
|
||||
if (dabs(CI_SC2_electronic_energy(i) - h) > 1.d-6) then
|
||||
c_pert(i) = i_H_psi_array(i) / (-dabs(CI_SC2_electronic_energy(i) - h))
|
||||
e_2_pert(i) = (c_pert(i) * i_H_psi_array(i))
|
||||
else
|
||||
c_pert(i) = -1.d0
|
||||
c_pert(i) = i_H_psi_array(i)
|
||||
e_2_pert(i) = -dabs(i_H_psi_array(i))
|
||||
endif
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user