10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-25 22:52:15 +02:00

bug in lambda_mrcc

This commit is contained in:
Yann Garniron 2016-04-07 11:13:14 +02:00
parent 690dfb5bb6
commit 4298ab6ab0
4 changed files with 4 additions and 25 deletions

View File

@ -35,7 +35,7 @@ OPENMP : 1 ; Append OpenMP flags
# -ffast-math and the Fortran-specific
# -fno-protect-parens and -fstack-arrays.
[OPT]
FCFLAGS : -Ofast
FCFLAGS : -Ofast
# Profiling flags
#################

View File

@ -16,7 +16,7 @@
lambda_mrcc_pt2(0) = 0
do i=1,N_det_non_ref
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef_normalized, N_int, N_det_ref,&
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,&
size(psi_ref_coef,1), N_states,ihpsi_current)
call i_H_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
do k=1,N_states

View File

@ -124,7 +124,7 @@ END_PROVIDER
provide lambda_mrcc
do i_state = 1, N_states
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas)
!$OMP PARALLEL DO default(none) schedule(dynamic) private(j,k,Hjk,Hki,degree) shared(lambda_mrcc,i_state, N_det_non_ref,psi_ref, psi_non_ref,N_int,delta_cas,N_det_ref)
do i=1,N_det_ref
do j=1,i
call get_excitation_degree(psi_ref(1,1,i), psi_ref(1,1,j), degree, N_int)

View File

@ -42,7 +42,7 @@ subroutine mrcepa0_iterations
! E_past(j) = E_new
! j +=1
call save_wavefunction
if (iteration > 0) then
if (iteration > 10) then
exit
endif
print*,'------------'
@ -55,7 +55,6 @@ subroutine mrcepa0_iterations
print*,'------------'
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCEPA0 energy")
call write_double(6,ci_energy_dressed(1)+rest,"Final MRCEPA0+rest energy")
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
call save_wavefunction
end
@ -88,23 +87,3 @@ subroutine set_generators_bitmasks_as_holes_and_particles
end
BEGIN_PROVIDER [ double precision, rest ]
integer :: i, j
double precision :: hij, c0
c0 = 1d0
do i=1,N_det_non_ref
c0 += psi_non_ref_coef(i,1)**2
end do
c0 = dsqrt(c0)
print *, "C", c0
rest = 0d0
do i=1, N_det_non_ref
if(lambda_mrcc(1, i) == 0d0) then
do j=1, N_det_ref
call i_h_j(psi_ref(1,1,j), psi_non_ref(1,1,i), N_int, hij)
rest += hij * psi_non_ref_coef(i,1) * psi_ref_coef(j,1) / c0
end do
end if
end do
END_PROVIDER