mirror of
https://github.com/pfloos/quack
synced 2024-12-23 04:43:42 +01:00
fix bug in LZc
This commit is contained in:
parent
bbe1c4b2ff
commit
20dc79e533
@ -144,7 +144,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
||||
if(raI > threshold) then
|
||||
|
||||
Ec(1,iEns) = Ec(1,iEns) + weight(iG)*(ec_z + decdra*ra)*raI
|
||||
Ec(2,iEns) = Ec(2,iEns) + weight(iG)*decdra*rb*raI
|
||||
if(rb > threshold) Ec(2,iEns) = Ec(2,iEns) + weight(iG)*decdra*rb*raI
|
||||
|
||||
end if
|
||||
|
||||
@ -152,6 +152,10 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
||||
|
||||
end if
|
||||
|
||||
! up-down contribution
|
||||
|
||||
if(ra > threshold .and. rb > threshold) LZc(2) = LZc(2) -weight(iG)*(decdra + decdrb)*ra*rb
|
||||
|
||||
! spin-down contribution
|
||||
|
||||
if(rb > threshold) then
|
||||
@ -165,7 +169,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
||||
if(rbI > threshold) then
|
||||
|
||||
Ec(3,iEns) = Ec(3,iEns) + weight(iG)*(ec_z + decdrb*rb)*rbI
|
||||
Ec(2,iEns) = Ec(2,iEns) + weight(iG)*decdrb*ra*rbI
|
||||
if(ra > threshold) Ec(2,iEns) = Ec(2,iEns) + weight(iG)*decdrb*ra*rbI
|
||||
|
||||
end if
|
||||
|
||||
|
@ -167,8 +167,6 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
||||
+ sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||
end do
|
||||
|
||||
print*,E
|
||||
|
||||
else
|
||||
|
||||
do iEns=1,nEns
|
||||
@ -179,14 +177,14 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
||||
|
||||
end if
|
||||
|
||||
do iEns=1,nEns
|
||||
E(iEns) = sum(ET(:,iEns)) + sum(EV(:,iEns)) &
|
||||
+ sum(EH(:,iEns)) + sum(Ex(:,iEns)) + sum(Ec(:,iEns)) &
|
||||
+ kappa(iEns)*(sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:))) &
|
||||
+ sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||
end do
|
||||
! do iEns=1,nEns
|
||||
! E(iEns) = sum(ET(:,iEns)) + sum(EV(:,iEns)) &
|
||||
! + sum(EH(:,iEns)) + sum(Ex(:,iEns)) + sum(Ec(:,iEns)) &
|
||||
! + sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:)) &
|
||||
! + sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||
! end do
|
||||
|
||||
print*,E
|
||||
! print*,E
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Excitation energies
|
||||
|
Loading…
Reference in New Issue
Block a user