Skip to content

Commit

Permalink
Minor changes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulzc committed Jan 8, 2025
1 parent 05b128c commit 7117b9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/bte.f90
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ subroutine dragfull_ephbtes(Tdir, self, num, crys, wann, sym, ph, el)
trans%el_alphabyT = trans%el_alphabyT/crys%T

!delT field:
call iterate_bte_el(num, el, crys, wann,&
call iterate_bte_el(num, el, crys, wann, &
self%el_rta_rates_ibz, self%el_field_term_T, self%el_response_T, ph_drag_term_T)
!Enforce Kelvin-Onsager relation:
!Fix "diffusion" part
Expand Down
6 changes: 3 additions & 3 deletions src/interactions.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module interactions
demux_state, mux_vector, mux_state, expi, Bose, binsearch, Fermi, &
twonorm, write2file_rank2_real, demux_vector, interpolate, expm1, &
precompute_interpolation_corners_and_weights, interpolate_using_precomputed, &
create_set, coarse_grain, timer, eye, shrink, hilbert_transform, interpolator_1d, &
create_set, coarse_grain, timer, eye, shrink, Hilbert_transform, interpolator_1d, &
linspace
use resource_module, only: resource
use screening_module, only: spectral_head_polarizability_3d_qpath
Expand Down Expand Up @@ -178,7 +178,7 @@ pure real(r64) function gCoul2_RPA(el, crys, qcrys, X0_qw)
qcart = matmul(crys%reclattvecs, qcrys)

!Use a safe range for the G vector sums
!Assuming G = G' (neglecting local-field effects: N.E.Brener et. al. 1975 )
!Assuming G = G' (neglecting local-field effects)
do ik1 = -3, 3
do ik2 = -3, 3
do ik3 = -3, 3
Expand Down Expand Up @@ -3060,7 +3060,7 @@ subroutine calculate_Xee_OTF(el, num, wann, istate1, crys, X, &
!Apply energy window to electron 2
if(abs(en2 - el%enref) > el%fsthick) cycle

!Squared matrix element - Thomas Fermi
!Squared matrix element - Thomas Fermi screening
!g2 = gCoul2(el, crys, q_vec%frac, &
! el%evecs_irred(ik1, n1, :), el%evecs(ik3, n3, :))

Expand Down
40 changes: 0 additions & 40 deletions src/screening.f90
Original file line number Diff line number Diff line change
Expand Up @@ -124,46 +124,6 @@ subroutine head_polarizability_imag_3d_T(Imeps_T, Omegas_samp, Omegas_cont, spec
Imeps_T = -pi*Imeps_T
end subroutine head_polarizability_imag_3d_T

subroutine head_polarizability_real_3d_T(Reeps_samp, Omegas_samp, Omegas_cont, Reeps_cont)
!! Head of the bare Real polarizability of the 3d Kohn-Sham system using
!! linear interpolation from the same evaluated on a fine, continuous mesh.
!!
!! Here we calculate the diagonal in G-G' space. Moreover,
!! we use the approximation G.r -> 0.
!!
!! Reeps_samp Real part of bare polarizability on sample mesh
!! Omegas_samp Sampling energies of excitation in the electron gas
!! Omegas_cont Continous energies of excitation in the electron gas
!! Reeps_cont Real part of bare polarizability on continuous mesh

real(r64), intent(in) :: Omegas_samp(:), Omegas_cont(:)
real(r64), intent(in) :: Reeps_cont(:)
real(r64), allocatable, intent(out) :: Reeps_samp(:)

integer :: isamp, ncont, nsamp, ileft, iright
real(r64) :: dOmega, w

ncont = size(Omegas_cont)
nsamp = size(Omegas_samp)

allocate(Reeps_samp(nsamp))

dOmega = Omegas_cont(2) - Omegas_cont(1)

do isamp = 1, nsamp
w = Omegas_samp(isamp)
ileft = minloc(abs(Omegas_cont - w), dim = 1)
if(ileft == ncont) then
Reeps_samp(isamp) = Reeps_cont(ileft)
else
iright = ileft + 1
Reeps_samp(isamp) = ((Omegas_cont(iright) - w)*Reeps_cont(ileft) + &
(w - Omegas_cont(ileft))*Reeps_cont(iright))/dOmega
end if
end do

end subroutine head_polarizability_real_3d_T

subroutine spectral_head_polarizability_3d_qpath(spec_eps, Omegas, qcrys, &
el, wann, crys, tetrahedra)
!! Spectral head of the bare polarizability of the 3d Kohn-Sham system using
Expand Down
2 changes: 1 addition & 1 deletion src/wannier.f90
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ subroutine el_wann(self, crys, nk, kvecs, energies, velocities, evecs, scissor)

!Local variables
integer(i64) :: iuc, ib, jb, ipol, ik, nwork, tmp
real(r64) :: rcart(3), temp !DEBUG: CHANGE THIS
real(r64) :: rcart(3)
real(r64), allocatable :: rwork(:)
complex(r64), allocatable :: work(:)
complex(r64) :: caux, H(self%numwannbands,self%numwannbands), &
Expand Down

0 comments on commit 7117b9f

Please sign in to comment.