mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-18 11:23:38 +01:00
bug in CASSCF
This commit is contained in:
parent
9ee67b928b
commit
8f7e7ff264
@ -431,12 +431,14 @@ END_PROVIDER
|
|||||||
BEGIN_PROVIDER [integer, list_all_but_del_orb, (n_all_but_del_orb)]
|
BEGIN_PROVIDER [integer, list_all_but_del_orb, (n_all_but_del_orb)]
|
||||||
implicit none
|
implicit none
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
|
j = 0
|
||||||
do i = 1, mo_num
|
do i = 1, mo_num
|
||||||
if( trim(mo_class(i))=="Core" &
|
if( trim(mo_class(i))=="Core" &
|
||||||
.or. trim(mo_class(i))=="Inactive" &
|
.or. trim(mo_class(i))=="Inactive" &
|
||||||
.or. trim(mo_class(i))=="Active" &
|
.or. trim(mo_class(i))=="Active" &
|
||||||
.or. trim(mo_class(i))=="Virtual" )then
|
.or. trim(mo_class(i))=="Virtual" )then
|
||||||
list_all_but_del_orb(i) = i
|
j += 1
|
||||||
|
list_all_but_del_orb(j) = i
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -14,15 +14,20 @@ subroutine GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_
|
|||||||
do istate = 1, N_states
|
do istate = 1, N_states
|
||||||
call ex_pbe_sr(mu_erf_dft,rho_a(istate),rho_b(istate),grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),ex(istate),vx_rho_a(istate),vx_rho_b(istate),vx_grad_rho_a_2(istate),vx_grad_rho_b_2(istate),vx_grad_rho_a_b(istate))
|
call ex_pbe_sr(mu_erf_dft,rho_a(istate),rho_b(istate),grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),ex(istate),vx_rho_a(istate),vx_rho_b(istate),vx_grad_rho_a_2(istate),vx_grad_rho_b_2(istate),vx_grad_rho_a_b(istate))
|
||||||
|
|
||||||
double precision :: rhoc,rhoo,sigmacc,sigmaco,sigmaoo,vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo
|
vx_rho_a(istate) = d/e_xmd(n_a,n_b,grad_na,grad_nb,grad_n_a . grad_n_b)/d_n_a
|
||||||
! convertion from (alpha,beta) formalism to (closed, open) formalism
|
vx_rho_b
|
||||||
call rho_ab_to_rho_oc(rho_a(istate),rho_b(istate),rhoo,rhoc)
|
vx_grad_rho_a_2 d/e_xmd(n_a,n_b,grad_na,grad_nb,grad_n_a . grad_n_b)/d_grad_rho_a_2
|
||||||
call grad_rho_ab_to_grad_rho_oc(grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),sigmaoo,sigmacc,sigmaco)
|
vx_grad_rho_b_2
|
||||||
|
vx_grad_rho_a_b
|
||||||
call ec_pbe_sr(mu_erf_dft,rhoc,rhoo,sigmacc,sigmaco,sigmaoo,ec(istate),vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo)
|
! double precision :: rhoc,rhoo,sigmacc,sigmaco,sigmaoo,vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo
|
||||||
|
! !!! ! convertion from (alpha,beta) formalism to (closed, open) formalism
|
||||||
call v_rho_oc_to_v_rho_ab(vrhoo,vrhoc,vc_rho_a(istate),vc_rho_b(istate))
|
! call rho_ab_to_rho_oc(rho_a(istate),rho_b(istate),rhoo,rhoc)
|
||||||
call v_grad_rho_oc_to_v_grad_rho_ab(vsigmaoo,vsigmacc,vsigmaco,vc_grad_rho_a_2(istate),vc_grad_rho_b_2(istate),vc_grad_rho_a_b(istate))
|
! call grad_rho_ab_to_grad_rho_oc(grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),sigmaoo,sigmacc,sigmaco)
|
||||||
|
!
|
||||||
|
! call ec_pbe_sr(mu_erf_dft,rhoc,rhoo,sigmacc,sigmaco,sigmaoo,ec(istate),vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo)
|
||||||
|
!
|
||||||
|
! call v_rho_oc_to_v_rho_ab(vrhoo,vrhoc,vc_rho_a(istate),vc_rho_b(istate))
|
||||||
|
! call v_grad_rho_oc_to_v_grad_rho_ab(vsigmaoo,vsigmacc,vsigmaco,vc_grad_rho_a_2(istate),vc_grad_rho_b_2(istate),vc_grad_rho_a_b(istate))
|
||||||
enddo
|
enddo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user