10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Fixed CAS-SD

This commit is contained in:
Anthony Scemama 2015-04-10 17:26:07 +02:00
parent 6ac88cf789
commit 47d913a9ce
3 changed files with 15 additions and 10 deletions

View File

@ -8,6 +8,7 @@ program full_ci
N_st = N_states N_st = N_states
allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st)) allocate (pt2(N_st), norm_pert(N_st),H_pert_diag(N_st))
character*(64) :: perturbation character*(64) :: perturbation
PROVIDE N_det_cas
pt2 = 1.d0 pt2 = 1.d0
diag_algorithm = "Lapack" diag_algorithm = "Lapack"
@ -59,21 +60,21 @@ program full_ci
logical :: in_cas logical :: in_cas
integer :: exc_max, degree_min integer :: exc_max, degree_min
exc_max = 0 exc_max = 0
print *, 'CAS determinants : ', N_det_generators print *, 'CAS determinants : ', N_det_cas
do i=1,min(N_det_generators,10) do i=1,min(N_det_cas,10)
do k=i,N_det_generators do k=i,N_det_cas
call get_excitation_degree(psi_det_generators(1,1,k),psi_det_generators(1,1,i),degree,N_int) call get_excitation_degree(psi_cas(1,1,k),psi_cas(1,1,i),degree,N_int)
exc_max = max(exc_max,degree) exc_max = max(exc_max,degree)
enddo enddo
call debug_det(psi_det_generators(1,1,i),N_int) call debug_det(psi_cas(1,1,i),N_int)
print *, '' print *, ''
enddo enddo
print *, 'Max excitation degree in the CAS :', exc_max print *, 'Max excitation degree in the CAS :', exc_max
do i=1,N_det do i=1,N_det
in_cas = .False. in_cas = .False.
degree_min = 1000 degree_min = 1000
do k=1,N_det_generators do k=1,N_det_cas
call get_excitation_degree(psi_det_generators(1,1,k),psi_det(1,1,i),degree,N_int) call get_excitation_degree(psi_cas(1,1,k),psi_det(1,1,i),degree,N_int)
degree_min = min(degree_min,degree) degree_min = min(degree_min,degree)
enddo enddo
if (degree_min > 2) then if (degree_min > 2) then

View File

@ -1,2 +1,2 @@
AOs BiInts Bitmask CAS_SD Dets Electrons Ezfio_files Generators_CAS Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils AOs BiInts Bitmask Dets Electrons Ezfio_files Generators_full Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -11,8 +11,12 @@ BEGIN_PROVIDER [ double precision, lambda_mrcc, (N_states,psi_det_size) ]
size(psi_cas_coef,1), n_states, ihpsi) size(psi_cas_coef,1), n_states, ihpsi)
double precision :: hij double precision :: hij
do k=1,N_states do k=1,N_states
lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k) if (dabs(ihpsi(k)) > 1.d-5) then
lambda_mrcc(k,i) = min( lambda_mrcc (k,i),0.d0 ) lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k)
lambda_mrcc(k,i) = min( lambda_mrcc (k,i),0.d0 )
else
lambda_mrcc(k,i) = 0.d0
endif
enddo enddo
enddo enddo
END_PROVIDER END_PROVIDER