mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Fixed CASSD
This commit is contained in:
parent
4b0021d47f
commit
1032e132a3
@ -23,18 +23,47 @@ END_PROVIDER
|
|||||||
integer :: i, k, l, m
|
integer :: i, k, l, m
|
||||||
logical :: good
|
logical :: good
|
||||||
|
|
||||||
do i=1,N_det
|
do i=1,N_det_generators
|
||||||
do k=1,N_int
|
do k=1,N_int
|
||||||
psi_selectors(k,1,i) = psi_det_sorted(k,1,i)
|
psi_selectors(k,1,i) = psi_det_generators(k,1,i)
|
||||||
psi_selectors(k,2,i) = psi_det_sorted(k,2,i)
|
psi_selectors(k,2,i) = psi_det_generators(k,2,i)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
do k=1,N_states
|
do k=1,N_states
|
||||||
do i=1,N_det
|
do i=1,N_det_generators
|
||||||
psi_selectors_coef(i,k) = psi_coef_sorted(i,k)
|
psi_selectors_coef(i,k) = psi_coef_generators(i,k)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
m=N_det_generators
|
||||||
|
|
||||||
|
do i=1,N_det
|
||||||
|
do l=1,n_cas_bitmask
|
||||||
|
good = .True.
|
||||||
|
do k=1,N_int
|
||||||
|
good = good .and. ( &
|
||||||
|
iand(not(cas_bitmask(k,1,l)), psi_det_sorted(k,1,i)) == &
|
||||||
|
iand(not(cas_bitmask(k,1,l)), HF_bitmask(k,1)) .and. ( &
|
||||||
|
iand(not(cas_bitmask(k,2,l)), psi_det_sorted(k,2,i)) == &
|
||||||
|
iand(not(cas_bitmask(k,2,l)), HF_bitmask(k,2) )) )
|
||||||
|
enddo
|
||||||
|
if (good) then
|
||||||
|
exit
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
if (.not.good) then
|
||||||
|
m = m+1
|
||||||
|
do k=1,N_int
|
||||||
|
psi_selectors(k,1,m) = psi_det_sorted(k,1,i)
|
||||||
|
psi_selectors(k,2,m) = psi_det_sorted(k,2,i)
|
||||||
|
enddo
|
||||||
|
psi_selectors_coef(m,:) = psi_coef_sorted(i,:)
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
if (N_det /= m) then
|
||||||
|
print *, N_det, m
|
||||||
|
stop 'N_det /= m'
|
||||||
|
endif
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, psi_selectors_coef_transp, (N_states,psi_selectors_size) ]
|
BEGIN_PROVIDER [ double precision, psi_selectors_coef_transp, (N_states,psi_selectors_size) ]
|
||||||
|
Loading…
Reference in New Issue
Block a user