Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the code for the spectral function calculation #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions FModules/third_order_dynbubble.f90
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ subroutine compute_spectralf(smear_id,ener,d2,Pi,notransl,spectralf,mass,nat,ne,
!
integer :: nat3,n,m,ismear,ie
complex(kind=dp) :: G(3*nat,3*nat)
complex(kind=dp) :: fact
complex(kind=dp) :: fact, w_plus_eta

nat3=3*nat

Expand All @@ -301,6 +301,7 @@ subroutine compute_spectralf(smear_id,ener,d2,Pi,notransl,spectralf,mass,nat,ne,
G=G-d2
! ADD PROPTO IDENTITY PART
fact=smear_id(ismear)*(0.0_dp,1.0_dp)
w_plus_eta = ener(ie)+fact
DO n=1,nat3
G(n,n)=G(n,n)+(ener(ie)+fact)**2
ENDDO
Expand All @@ -310,7 +311,7 @@ subroutine compute_spectralf(smear_id,ener,d2,Pi,notransl,spectralf,mass,nat,ne,
CALL eliminate_transl(G,mass,nat)
END IF
DO n=1,nat3
spectralf(ie,ismear)=spectralf(ie,ismear)-2*DIMAG(G(n,n))*ener(ie)/twopi
spectralf(ie,ismear)=spectralf(ie,ismear)-2*DIMAG(G(n,n)*w_plus_eta)/twopi
END DO
ENDDO
ENDDO
Expand Down Expand Up @@ -347,7 +348,11 @@ subroutine compute_spectralf_diag(smear_id,ener,d2_freq,selfnrg,nat,ne,nsmear,sp
!
! (w/2pi)(-2Im [1/a+ib])= (w/pi) b/(a**2+b**2)
!
num = ener(ie)*b
! If w -> w + i eta, then we must add also
! - (eta/pi) a / (a**2+b**2)
!
num = ener(ie)*b
num = num -smear_id(ismear)*a
denom = (a**2+b**2)*pi
!
IF(ABS(denom)/=0._dp)THEN
Expand Down
Loading