mirror of
https://github.com/pfloos/quack
synced 2024-11-06 22:24:03 +01:00
Ncentered version of DD
This commit is contained in:
parent
11703f2706
commit
1de6de072e
@ -155,6 +155,17 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
|
|
||||||
call unrestricted_correlation_derivative_discontinuity(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,EcDD)
|
call unrestricted_correlation_derivative_discontinuity(c_rung,c_DFA,nEns,wEns,nGrid,weight,rhow,drhow,EcDD)
|
||||||
|
|
||||||
|
! Scaling derivative discontinuity for N-centered ensembles
|
||||||
|
|
||||||
|
if(doNcentered) then
|
||||||
|
|
||||||
|
do iEns=1,nEns
|
||||||
|
ExDD(:,iEns) = (1d0 - kappa(iEns))*ExDD(:,iEns)
|
||||||
|
EcDD(:,iEns) = (1d0 - kappa(iEns))*EcDD(:,iEns)
|
||||||
|
end do
|
||||||
|
|
||||||
|
end if
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Total energy
|
! Total energy
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -184,8 +195,6 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
! + sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
! + sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||||
! end do
|
! end do
|
||||||
|
|
||||||
! print*,E
|
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Excitation energies
|
! Excitation energies
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
@ -215,9 +224,6 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
Omaux(iEns) = Omaux(iEns) &
|
Omaux(iEns) = Omaux(iEns) &
|
||||||
+ (kappa(iEns) - kappa(1))*(sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:)))
|
+ (kappa(iEns) - kappa(1))*(sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:)))
|
||||||
|
|
||||||
OmxDD(iEns) = kappa(iEns)*sum(ExDD(:,iEns)) - kappa(1)*sum(ExDD(:,1))
|
|
||||||
OmcDD(iEns) = kappa(iEns)*sum(EcDD(:,iEns)) - kappa(1)*sum(EcDD(:,1))
|
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user