Commit ffd83704 authored by Samuel Poncé's avatar Samuel Poncé

Modifications to make the scissor work correctly.

parent 40469931
......@@ -754,6 +754,19 @@
! identify the bands within fsthick from the Fermi level
! (in shuffle mode this actually does not depend on q)
!
! ------------------------------------------------------------
! Apply a possible shift to eigenenergies (applied later)
icbm = 0
IF (ABS(scissor) > eps6) THEN
IF ( noncolin ) THEN
icbm = FLOOR(nelec/1.0d0) +1
ELSE
icbm = FLOOR(nelec/2.0d0) +1
ENDIF
etf(icbm:nbndsub, :) = etf(icbm:nbndsub, :) + scissor
!
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
!
CALL fermiwindow
!
......@@ -1090,6 +1103,10 @@
( nbndsub, nrr_k, cufkk, etf(:, ikk), chw, cfac, dims)
CALL hamwan2bloch &
( nbndsub, nrr_k, cufkq, etf(:, ikq), chw, cfacq, dims)
!
! Apply a possible scissor shift
etf(icbm:nbndsub, ikk) = etf(icbm:nbndsub, ikk) + scissor
etf(icbm:nbndsub, ikq) = etf(icbm:nbndsub, ikq) + scissor
!
IF (vme) THEN
!
......@@ -1207,31 +1224,12 @@
!
! Indirect absorption ---------------------------------------------------------
! If Indirect absortpion, keep unshifted values:
IF ( lindabs .AND. .NOT. scattering ) etf_ks(:,:) = etf(:,:)
!
! Apply a scissor shift to CBM if required by user
! The shift is apply to k and k+q
IF (ABS(scissor) > eps6) THEN
IF ( noncolin ) THEN
icbm = FLOOR(nelec/1.0d0) +1
ELSE
icbm = FLOOR(nelec/2.0d0) +1
ENDIF
!
DO ik = 1, nkf
ikk = 2 * ik - 1
ikq = ikk + 1
DO ibnd = icbm, nbndsub
!
etf (ibnd, ikk) = etf (ibnd, ikk) + scissor
etf (ibnd, ikq) = etf (ibnd, ikq) + scissor
ENDDO
ENDDO
IF ( iq == 1 ) THEN
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
IF ( lindabs .AND. .NOT. scattering ) THEN
etf_ks(:,:) = etf(:,:)
! We remove the scissor
etf_ks(icbm:nbndsub, :) = etf_ks(icbm:nbndsub, :) - scissor
ENDIF
!
!
! Indirect absorption
IF ( lindabs .AND. .NOT. scattering ) CALL indabs(iq)
!
......@@ -1276,7 +1274,6 @@
! User decide the carrier concentration and choose to only look at VB or CB
IF (.NOT. int_mob .AND. carrier) THEN
! SP: Determination of the Fermi level for intrinsic or doped carrier
! One also need to apply scissor before calling it.
!
ef0(itemp) = fermicarrier( etemp )
WRITE(stdout, '(5x,"Mobility Fermi level ",f10.6," eV")' ) ef0(itemp) * ryd2ev
......
......@@ -44,7 +44,7 @@
specfun_pl, use_ws, epmatkqread, selecqread
USE noncollin_module, ONLY : noncolin
USE constants_epw, ONLY : ryd2ev, ryd2mev, one, two, zero, czero, cone, &
twopi, ci, kelvin2eV, eps8
twopi, ci, kelvin2eV, eps8, eps6
USE io_files, ONLY : prefix, diropn, tmp_dir
USE io_global, ONLY : stdout, ionode
USE io_epw, ONLY : lambda_phself, linewidth_phself, iunepmatwe, &
......@@ -717,6 +717,19 @@
! identify the bands within fsthick from the Fermi level
! (in shuffle mode this actually does not depend on q)
!
! ------------------------------------------------------------
! Apply a possible shift to eigenenergies (applied later)
icbm = 0
IF (ABS(scissor) > eps6) THEN
IF ( noncolin ) THEN
icbm = FLOOR(nelec/1.0d0) +1
ELSE
icbm = FLOOR(nelec/2.0d0) +1
ENDIF
etf(icbm:nbndsub, :) = etf(icbm:nbndsub, :) + scissor
!
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
!
CALL fermiwindow
!
......@@ -933,6 +946,7 @@
ENDIF ! exst
ENDIF
! -----------------------------------------------------------------------------
! -----------------------------------------------------------------------------
!
DO iqq = iq_restart, totq
! This needs to be uncommented.
......@@ -1056,6 +1070,11 @@
( nbndsub, nrr_k, cufkk, etf(:, ikk), chw, cfac, dims)
CALL hamwan2bloch &
( nbndsub, nrr_k, cufkq, etf(:, ikq), chw, cfacq, dims)
!
! Apply a possible scissor shift
etf(icbm:nbndsub, ikk) = etf(icbm:nbndsub, ikk) + scissor
etf(icbm:nbndsub, ikq) = etf(icbm:nbndsub, ikq) + scissor
!
IF (vme) THEN
!
......@@ -1195,28 +1214,6 @@
!IF (scattering) CALL scattering_rate_q( iq )
IF (.NOT. scatread) THEN
IF (scattering) THEN
! Apply a scissor shift to CBM if required by user
! The shift is apply to k and k+q
!IF (scissor > 0.000001) THEN
IF (ABS(scissor) > 0.000001) THEN
IF ( noncolin ) THEN
icbm = FLOOR(nelec/1.0d0) +1
ELSE
icbm = FLOOR(nelec/2.0d0) +1
ENDIF
!
DO ik = 1, nkf
ikk = 2 * ik - 1
ikq = ikk + 1
DO ibnd = icbm, nbndsub
etf (ibnd, ikk) = etf (ibnd, ikk) + scissor
etf (ibnd, ikq) = etf (ibnd, ikq) + scissor
ENDDO
ENDDO
IF ( iqq == 1 ) THEN
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
ENDIF
!
! If we want to compute intrinsic mobilities, call fermicarrier to
! correctly positionned the ef0 level.
......
......@@ -22,7 +22,7 @@
USE epwcom, ONLY : nbndsub, lrepmatf, shortrange, &
fsthick, eptemp, ngaussw, degaussw, &
eps_acustic, efermi_read, fermi_energy,&
vme, omegamin, omegamax, omegastep, n_r, scissor
vme, omegamin, omegamax, omegastep, n_r
USE elph2, ONLY : etf, ibndmin, ibndmax, nkqf, xqf, &
nkf, epf17, wkf, nqtotf, wf, wqf, xkf, nkqtotf, &
sigmar_all, sigmai_all, sigmai_mode, efnew, &
......@@ -215,8 +215,8 @@
DO ibnd = 1, ibndmax-ibndmin+1
DO jbnd = 1, ibndmax-ibndmin+1
! vmef is in units of Ryd * bohr
IF (ABS(scissor) > eps6 .AND. &
ABS( etf_ks(ibndmin-1+ibnd,ikk)-etf_ks(ibndmin-1+jbnd,ikk)) > eps6 .AND. &
!IF (ABS(scissor) > eps6 .AND. &
IF( ABS( etf_ks(ibndmin-1+ibnd,ikk)-etf_ks(ibndmin-1+jbnd,ikk)) > eps6 .AND. &
ABS( etf_ks(ibndmin-1+ibnd,ikq)-etf_ks(ibndmin-1+jbnd,ikq)) > eps6 ) THEN
vkk(:,ibnd,jbnd) = vmef(:, ibndmin-1+ibnd, ibndmin-1+jbnd, ikk) &
* ( etf(ibndmin-1+ibnd,ikk) - etf(ibndmin-1+jbnd,ikk) ) &
......@@ -233,8 +233,8 @@
ELSE
DO ibnd = 1, ibndmax-ibndmin+1
DO jbnd = 1, ibndmax-ibndmin+1
IF (ABS(scissor) > eps6 .AND. &
ABS( etf_ks(ibndmin-1+ibnd,ikk)-etf_ks(ibndmin-1+jbnd,ikk)) > eps6 .AND. &
!IF (ABS(scissor) > eps6 .AND. &
IF ( ABS( etf_ks(ibndmin-1+ibnd,ikk)-etf_ks(ibndmin-1+jbnd,ikk)) > eps6 .AND. &
ABS( etf_ks(ibndmin-1+ibnd,ikq)-etf_ks(ibndmin-1+jbnd,ikq)) > eps6 ) THEN
vkk(:,ibnd,jbnd) = 2.0 * dmef(:, ibndmin-1+ibnd, ibndmin-1+jbnd, ikk) &
* ( etf(ibndmin-1+ibnd,ikk) - etf(ibndmin-1+jbnd,ikk) ) &
......
......@@ -229,7 +229,7 @@
etf_all (ibnd, ik) = etf_all (ibnd, ik) + scissor
ENDDO
ENDDO
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
!WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
!
DO iq=1, nqf
......@@ -282,7 +282,7 @@
ELSE
icbm = FLOOR(nelec/2.0d0) + 1
ENDIF
WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
!WRITE(stdout, '(5x,"Applying a scissor shift of ",f9.5," eV to the conduction states")' ) scissor * ryd2ev
ENDIF
!
! First compute the k-points eigenenergies for efficiency reasons
......@@ -620,7 +620,6 @@
! matter if fstick is large enough.
!IF ( ( minval ( abs(etf (:, ikk) - ef0(itemp)) ) .lt. fsthick ) .AND. &
! ( minval ( abs(etf (:, ikq) - ef0(itemp)) ) .lt. fsthick ) ) THEN
! If scissor = 0 then
IF ( ( minval ( abs(etf (:, ikk) - ef) ) .lt. fsthick ) .AND. &
( minval ( abs(etf (:, ikq) - ef) ) .lt. fsthick ) ) THEN
!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment