mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-01 17:13:42 +02:00
Better selection
This commit is contained in:
parent
e91d11a6af
commit
f985e07211
@ -5,6 +5,9 @@
|
|||||||
# Mon Apr 7 15:41:19 CEST 2014
|
# Mon Apr 7 15:41:19 CEST 2014
|
||||||
|
|
||||||
QPACKAGE_ROOT=${PWD}
|
QPACKAGE_ROOT=${PWD}
|
||||||
|
echo $QPACKAGE_ROOT
|
||||||
|
IRPF90=${QPACKAGE_ROOT}/irpf90/bin/irpf90
|
||||||
|
echo $IRPF90
|
||||||
|
|
||||||
if [[ -z ${IRPF90} ]] ;
|
if [[ -z ${IRPF90} ]] ;
|
||||||
then
|
then
|
||||||
@ -16,6 +19,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo $IRPF90
|
||||||
|
|
||||||
cat << EOF > quantum_package.rc
|
cat << EOF > quantum_package.rc
|
||||||
export IRPF90=${IRPF90}
|
export IRPF90=${IRPF90}
|
||||||
@ -34,6 +38,6 @@ fi
|
|||||||
|
|
||||||
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
|
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
|
||||||
then
|
then
|
||||||
echo "Error in IRPF90 installation"
|
echo "Error in EZFIO installation"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
pt2 = 1.d0
|
||||||
perturbation = "epstein_nesbet_sc2_projected"
|
perturbation = "epstein_nesbet_sc2_projected"
|
||||||
E_old(1) = HF_energy
|
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*,'----'
|
||||||
print*,''
|
print*,''
|
||||||
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
call H_apply_cisd_selection(perturbation,pt2, norm_pert, H_pert_diag, N_st)
|
||||||
@ -34,6 +34,10 @@ program cisd_sc2_selected
|
|||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
print*,'coucou'
|
||||||
|
pt2 = 0.d0
|
||||||
|
call H_apply_PT2(pt2, norm_pert, H_pert_diag, N_st)
|
||||||
do i = 1, N_st
|
do i = 1, N_st
|
||||||
max = 0.d0
|
max = 0.d0
|
||||||
|
|
||||||
@ -51,9 +55,9 @@ program cisd_sc2_selected
|
|||||||
integer :: imax
|
integer :: imax
|
||||||
print *, 'PT2(SC2) = ', pt2(i)
|
print *, 'PT2(SC2) = ', pt2(i)
|
||||||
print *, 'E(SC2) = ', CI_SC2_energy(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
|
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
|
endif
|
||||||
|
|
||||||
print*,'greater coeficient of the state : ',dabs(psi_coef(imax,i))
|
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
|
print*,'degree of excitation of such determinant : ',degree
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
print*,'coucou'
|
||||||
deallocate(pt2,norm_pert,H_pert_diag)
|
deallocate(pt2,norm_pert,H_pert_diag)
|
||||||
end
|
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
|
do i =2,N_st
|
||||||
H_pert_diag(i) = h
|
H_pert_diag(i) = h
|
||||||
if(CI_SC2_electronic_energy(i)>h.and.CI_SC2_electronic_energy(i).ne.0.d0)then
|
! if(CI_SC2_electronic_energy(i)>h.and.CI_SC2_electronic_energy(i).ne.0.d0)then
|
||||||
c_pert(i) = -1.d0
|
! c_pert(i) = -1.d0
|
||||||
e_2_pert(i) = -2.d0
|
! e_2_pert(i) = -2.d0
|
||||||
else if (dabs(CI_SC2_electronic_energy(i) - h) > 1.d-6) then
|
! 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)
|
if (dabs(CI_SC2_electronic_energy(i) - h) > 1.d-6) then
|
||||||
e_2_pert(i) = c_pert(i) * i_H_psi_array(i)
|
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
|
else
|
||||||
c_pert(i) = -1.d0
|
c_pert(i) = i_H_psi_array(i)
|
||||||
e_2_pert(i) = -dabs(i_H_psi_array(i))
|
e_2_pert(i) = -dabs(i_H_psi_array(i))
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
Loading…
Reference in New Issue
Block a user