mirror of
https://github.com/LCPQ/quantum_package
synced 2024-07-31 01:24:30 +02:00
31 lines
899 B
FortranFixed
31 lines
899 B
FortranFixed
|
program cisd
|
||
|
implicit none
|
||
|
integer :: i,k
|
||
|
double precision, allocatable :: eigvalues(:),eigvectors(:,:)
|
||
|
PROVIDE ref_bitmask_energy
|
||
|
|
||
|
double precision :: pt2(10), norm_pert(10), H_pert_diag
|
||
|
|
||
|
! N_states = 3
|
||
|
! touch N_states
|
||
|
call H_apply_cisd
|
||
|
allocate(eigvalues(n_states),eigvectors(n_det,n_states))
|
||
|
print *, 'N_det = ', N_det
|
||
|
print *, 'N_states = ', N_states
|
||
|
psi_coef = - 1.d-4
|
||
|
do k=1,N_states
|
||
|
psi_coef(k,k) = 1.d0
|
||
|
enddo
|
||
|
call davidson_diag(psi_det,psi_coef,eigvalues,size(psi_coef,1),N_det,N_states,N_int,output_CISD)
|
||
|
|
||
|
print *, '---'
|
||
|
print *, 'HF:', HF_energy
|
||
|
print *, '---'
|
||
|
do i = 1,1
|
||
|
print *, 'energy(i) = ',eigvalues(i) + nuclear_repulsion
|
||
|
print *, 'E_corr = ',eigvalues(i) - ref_bitmask_energy
|
||
|
enddo
|
||
|
call CISD_SC2(psi_det,psi_coef,eigvalues,size(psi_coef,1),N_det,N_states,N_int,output_CISD)
|
||
|
deallocate(eigvalues,eigvectors)
|
||
|
end
|