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
@ -48,7 +48,7 @@ subroutine US51_lda_exchange_individual_energy(nEns,nGrid,weight,rhow,rho,LZx,Ex
|
|||||||
|
|
||||||
rI = max(0d0,rho(iG,ispin,iEns))
|
rI = max(0d0,rho(iG,ispin,iEns))
|
||||||
|
|
||||||
if(rI > threshold) Ex(ispin,iEns) = Ex(ispin,iEns) + weight(iG)*(e+dedr*r)*rI
|
if(rI > threshold) Ex(ispin,iEns) = Ex(ispin,iEns) + weight(iG)*(e + dedr*r)*rI
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
|||||||
if(raI > threshold) then
|
if(raI > threshold) then
|
||||||
|
|
||||||
Ec(1,iEns) = Ec(1,iEns) + weight(iG)*(ec_z + decdra*ra)*raI
|
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
|
end if
|
||||||
|
|
||||||
@ -152,6 +152,10 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
! up-down contribution
|
||||||
|
|
||||||
|
if(ra > threshold .and. rb > threshold) LZc(2) = LZc(2) -weight(iG)*(decdra + decdrb)*ra*rb
|
||||||
|
|
||||||
! spin-down contribution
|
! spin-down contribution
|
||||||
|
|
||||||
if(rb > threshold) then
|
if(rb > threshold) then
|
||||||
@ -165,7 +169,7 @@ subroutine UVWN5_lda_correlation_individual_energy(nEns,nGrid,weight,rhow,rho,LZ
|
|||||||
if(rbI > threshold) then
|
if(rbI > threshold) then
|
||||||
|
|
||||||
Ec(3,iEns) = Ec(3,iEns) + weight(iG)*(ec_z + decdrb*rb)*rbI
|
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
|
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))
|
+ sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||||
end do
|
end do
|
||||||
|
|
||||||
print*,E
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
do iEns=1,nEns
|
do iEns=1,nEns
|
||||||
@ -179,14 +177,14 @@ subroutine unrestricted_individual_energy(x_rung,x_DFA,c_rung,c_DFA,LDA_centered
|
|||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
do iEns=1,nEns
|
! do iEns=1,nEns
|
||||||
E(iEns) = sum(ET(:,iEns)) + sum(EV(:,iEns)) &
|
! E(iEns) = sum(ET(:,iEns)) + sum(EV(:,iEns)) &
|
||||||
+ sum(EH(:,iEns)) + sum(Ex(:,iEns)) + sum(Ec(:,iEns)) &
|
! + sum(EH(:,iEns)) + sum(Ex(:,iEns)) + sum(Ec(:,iEns)) &
|
||||||
+ kappa(iEns)*(sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:))) &
|
! + sum(LZH(:)) + sum(LZx(:)) + sum(LZc(:)) &
|
||||||
+ sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
! + sum(ExDD(:,iEns)) + sum(EcDD(:,iEns))
|
||||||
end do
|
! end do
|
||||||
|
|
||||||
print*,E
|
! print*,E
|
||||||
|
|
||||||
!------------------------------------------------------------------------
|
!------------------------------------------------------------------------
|
||||||
! Excitation energies
|
! Excitation energies
|
||||||
|
Loading…
Reference in New Issue
Block a user