mirror of https://gitlab.com/QEF/q-e.git
Hall mobility and improvements
The following items are implemented: 1) Optimal Wigner-Seitz construction. See Appendix A of arXiv [link_to_be_added] and in particular Eq. A3. In particular the dimension of the Wigner-Seitz weights for the electron-phonon grid is reduced (ndegen_g). 2) Addition of a new way to construct the fine interpolation k-point grid based on the fstick window. At no point one need the entire homogeneous grids, thus prevening memory issues. The new subroutine is called loadkmesh_fst and can be called using the input variable etf_mem == 3 since it reduce the memory needed in case of ultra dense fine grids (e.g. 1000^3 grids). Note 1: the fine grid is also computed on the fly and never fully stored in memory, see the xqf_otf subroutine. Note 2: the kpoint_grid_fst routine is parallelized compared with kpoint_grid_epw which is not. 3) Addition of mode-resolved scattering rate which can be triggered by using iverbosity == 3 See io_transport.f90 4) Additon of quadrupole tensor while doing the interpolation. The quadrupole tensor has to be provided by the user via a file named "quadrupole.fmt" for the moment as QE cannot compute quadrupole. See rigid_epw.f90 routine. Fitting can be used to approximate the quadrupoles, see ArXiv [link_to_be_added] Eq. 40 and Fig. 23. 5) Addition of Hall mobility and Hall factor. See transport_iter.f90 and bfield.90 New input variables: bfieldx, bfieldy, bfieldz in Tesla 6) Addition of 2D treatment following Sohier's method. See system_2d input variable. All additions should be fine and correct but are not yet extensively tested. Note: 2D should not yet be considered officially supported and there are no 2D tests. Still in developement.
This commit is contained in:
parent
96cdd5ac6a
commit
be0f6e5f97
|
@ -45,6 +45,7 @@ supercond.o \
|
|||
supercond_iso.o \
|
||||
supercond_aniso.o \
|
||||
grid.o \
|
||||
bfield.o \
|
||||
rotate.o \
|
||||
transport.o \
|
||||
transport_iter.o \
|
||||
|
@ -77,16 +78,16 @@ EPWOBJS += ephblochkq.o wfc_elec.o test_tools.o
|
|||
|
||||
PHOBJS = ../../PHonon/PH/libph.a
|
||||
PWOBJS = ../../PW/src/libpw.a
|
||||
W90LIB = ../../wannier90-3.1.0/libwannier.a
|
||||
W90LIB = ../../wannier90-3.1.0/libwannier.a
|
||||
LRMODS = ../../LR_Modules/liblrmod.a
|
||||
PWOBJS = ../../PW/src/libpw.a
|
||||
PWOBJS = ../../PW/src/libpw.a
|
||||
QEMODS = ../../Modules/libqemod.a ../../KS_Solvers/libks_solvers.a ../../XClib/xc_lib.a \
|
||||
../../upflib/libupf.a ../../FFTXlib/libqefft.a ../../dft-d3/libdftd3qe.a
|
||||
LIBOBJS =../../LAXlib/libqela.a ../../UtilXlib/libutil.a ../../clib/clib.a
|
||||
|
||||
TLDEPS= pw ph
|
||||
|
||||
all : pw ph wannier libepw.a epw.x
|
||||
all : pw ph wannier libepw.a epw.x
|
||||
|
||||
libepw.a : $(EPWOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $?
|
||||
|
@ -94,13 +95,13 @@ libepw.a : $(EPWOBJS)
|
|||
|
||||
epw.x : epw.o libepw.a $(PHOBJS) $(LRMODS) $(PWOBJS) $(W90LIB) $(QEMODS) $(LIBOBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ \
|
||||
epw.o libepw.a $(PHOBJS) $(LRMODS) $(W90LIB) $(PWOBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)
|
||||
epw.o libepw.a $(PHOBJS) $(LRMODS) $(W90LIB) $(PWOBJS) $(QEMODS) $(LIBOBJS) $(QELIBS)
|
||||
- ( cd ../bin ; ln -fs ../src/epw.x . )
|
||||
|
||||
pw :
|
||||
pw :
|
||||
cd ../../ ; make pw
|
||||
|
||||
ph :
|
||||
ph :
|
||||
cd ../../ ; make ph
|
||||
|
||||
wannier :
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
assume_metal, wannier_plot_scale, reduce_unk, &
|
||||
wannier_plot_supercell, wannier_plot_radius, &
|
||||
fixsym, epw_no_t_rev, epw_tr, epw_nosym, epw_noinv, &
|
||||
epw_crysym
|
||||
epw_crysym, bfieldx, bfieldy, bfieldz
|
||||
USE elph2, ONLY : elph
|
||||
USE mp, ONLY : mp_bcast
|
||||
USE mp_world, ONLY : world_comm
|
||||
|
@ -239,6 +239,9 @@
|
|||
CALL mp_bcast(scdm_sigma , meta_ionode_id, world_comm)
|
||||
CALL mp_bcast(wannier_plot_radius, meta_ionode_id, world_comm)
|
||||
CALL mp_bcast(wannier_plot_scale, meta_ionode_id, world_comm)
|
||||
CALL mp_bcast(bfieldx , meta_ionode_id, world_comm)
|
||||
CALL mp_bcast(bfieldy , meta_ionode_id, world_comm)
|
||||
CALL mp_bcast(bfieldz , meta_ionode_id, world_comm)
|
||||
!
|
||||
! characters
|
||||
!
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -478,7 +478,7 @@
|
|||
USE kinds, ONLY : DP
|
||||
USE cell_base, ONLY : at, bg, alat
|
||||
USE ions_base, ONLY : nat, tau
|
||||
USE elph2, ONLY : rdw, epsi, zstar
|
||||
USE elph2, ONLY : rdw, epsi, zstar, qrpl
|
||||
USE epwcom, ONLY : lpolar, nqc1, nqc2, nqc3
|
||||
USE io_var, ONLY : iudecaydyn
|
||||
USE constants_epw, ONLY : bohr2ang, twopi, ci, czero
|
||||
|
@ -518,7 +518,7 @@
|
|||
!! $$ e^{-i\mathbf{r}\cdot\mathbf{k}} $$
|
||||
!
|
||||
! subtract the long-range term from D(q)
|
||||
IF (lpolar) THEN
|
||||
IF (lpolar .OR. qrpl) THEN
|
||||
DO ik = 1, nq
|
||||
!xk has to be in cart. coord.
|
||||
CALL rgd_blk(nqc1, nqc2, nqc3, nat, dynq(:, :, ik), xk(:, ik), tau, epsi, zstar, -1.d0)
|
||||
|
@ -724,19 +724,6 @@
|
|||
OPEN(iubvec, FILE = tempfile, ACTION = 'read', IOSTAT = ios)
|
||||
IF (ios /= 0) THEN
|
||||
!
|
||||
! HL 11/2020: The part below is commented since it makes sense to stop the calculation
|
||||
! in case that there is no *.bvec file with vme = .true. .
|
||||
!
|
||||
! !
|
||||
! ! if it doesn't exist, then we just set the bvec and wb to zero
|
||||
! !
|
||||
! nnb = 1
|
||||
! ALLOCATE(bvec(3, nnb, nkstot), STAT = ierr)
|
||||
! IF (ierr /= 0) CALL errore('vmebloch2wan', 'Error allocating bvec', 1)
|
||||
! ALLOCATE(wb(nnb), STAT = ierr)
|
||||
! IF (ierr /= 0) CALL errore('vmebloch2wan', 'Error allocating wb', 1)
|
||||
! bvec = zero
|
||||
! wb = zero
|
||||
CALL errore ('vmebloch2wan','You selected vme =.true. but error opening' // tempfile, 1)
|
||||
ELSE
|
||||
READ(iubvec,*) tempfile
|
||||
|
@ -1189,7 +1176,7 @@
|
|||
REAL(KIND = DP) :: rdotk
|
||||
!! $$ mathbf{r}\cdot\mathbf{k} $$
|
||||
REAL(KIND = DP) :: tmp(nrr_k, nrr_g)
|
||||
!! Max electron-phonon value
|
||||
!! Max electron-phonon value
|
||||
REAL(KIND = DP) :: rvec1(3)
|
||||
!! WS vectors
|
||||
REAL(KIND = DP) :: rvec2(3)
|
||||
|
@ -1230,27 +1217,27 @@
|
|||
! phonon - electron0 distance
|
||||
len2(ir) = DSQRT(rvec2(1)**2.d0 + rvec2(2)**2.d0 + rvec2(3)**2.d0)
|
||||
DO ire = 1, nrr_k
|
||||
tmp(ire, ir) = MAXVAL(ABS(epmatwp(:, :, ire, :, ir)))
|
||||
tmp(ire, ir) = MAXVAL(ABS(epmatwp(:, :, ire, :, ir)))
|
||||
ENDDO
|
||||
!
|
||||
ENDDO ! ir
|
||||
!
|
||||
!
|
||||
! Check spatial decay of EP matrix elements in wannier basis - electrons + phonons
|
||||
! We plot: R_e, R_p, max_{m,n,nu} |g(m,n,nu;R_e,R_p)|
|
||||
!
|
||||
! electron-electron0 distance
|
||||
! electron-electron0 distance
|
||||
DO ire = 1, nrr_k
|
||||
rvec1 = DBLE(irvec_k(1, ire)) * at(:, 1) + DBLE(irvec_k(2, ire)) * at(:, 2) + DBLE(irvec_k(3, ire)) * at(:, 3)
|
||||
len1(ire) = DSQRT(rvec1(1)**2.d0 + rvec1(2)**2.d0 + rvec1(3)**2.d0)
|
||||
ENDDO
|
||||
!
|
||||
!
|
||||
OPEN(UNIT = iuwane, FILE = 'decay.epmate', STATUS = 'unknown')
|
||||
WRITE(iuwane, '(a)') '# R_e [Ang] max_{m,n,nu} |g(m, n, nu, R_e, :)| [Ry] '
|
||||
DO ire = 1, nrr_k
|
||||
WRITE(iuwane, '(2f15.10, 1E20.10)') len1(ire) * alat * bohr2ang, MAXVAL(tmp(ire, :))
|
||||
ENDDO
|
||||
CLOSE(iuwane)
|
||||
!
|
||||
!
|
||||
OPEN(UNIT = iuwanep, FILE = 'decay.epmatp', STATUS = 'unknown')
|
||||
WRITE(iuwanep, '(a)') '# R_p [Ang] max_{m,n,nu} |g(m, n, nu, :, R_p)| [Ry] '
|
||||
DO ir = 1, nrr_g
|
||||
|
@ -1274,7 +1261,7 @@
|
|||
!! phonon-Bloch representation (coarse mesh), find the corresponding matrix
|
||||
!! electron-Wannier representation and phonon-Wannier representation
|
||||
!!
|
||||
!! SP - June 2020 - Update decays printing.
|
||||
!! SP - June 2020 - Update decays printing.
|
||||
!! SP - Apr 2020 - MPI-IO parallelization.
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
|
@ -1351,7 +1338,7 @@
|
|||
REAL(KIND = DP) :: rdotk
|
||||
!! $$ mathbf{r}\cdot\mathbf{k} $$
|
||||
REAL(KIND = DP) :: tmp(nrr_k, nrr_g)
|
||||
!! Max electron-phonon value
|
||||
!! Max electron-phonon value
|
||||
REAL(KIND = DP) :: rvec1(3)
|
||||
!! WS vectors
|
||||
REAL(KIND = DP) :: rvec2(3)
|
||||
|
@ -1486,31 +1473,31 @@
|
|||
ENDDO
|
||||
!
|
||||
ENDDO ! ir
|
||||
!
|
||||
!
|
||||
! Check spatial decay of EP matrix elements in wannier basis - electrons + phonons
|
||||
! We plot: R_e, R_p, max_{m,n,nu} |g(m,n,nu;R_e,R_p)|
|
||||
!
|
||||
CALL mp_sum(len2, world_comm)
|
||||
CALL mp_sum(tmp, world_comm)
|
||||
IF (mpime == ionode_id) THEN
|
||||
! electron-electron0 distance
|
||||
! electron-electron0 distance
|
||||
DO ire = 1, nrr_k
|
||||
rvec1 = DBLE(irvec_k(1, ire)) * at(:, 1) + DBLE(irvec_k(2, ire)) * at(:, 2) + DBLE(irvec_k(3, ire)) * at(:, 3)
|
||||
len1(ire) = DSQRT(rvec1(1)**2.d0 + rvec1(2)**2.d0 + rvec1(3)**2.d0)
|
||||
ENDDO
|
||||
!
|
||||
ENDDO
|
||||
!
|
||||
OPEN(UNIT = iuwane, FILE = 'decay.epmate', STATUS = 'unknown')
|
||||
WRITE(iuwane, '(a)') '# R_e [Ang] max_{m,n,nu} |g(m, n, nu, R_e, :)| [Ry] '
|
||||
DO ire = 1, nrr_k
|
||||
WRITE(iuwane, '(2f15.10, 1E20.10)') len1(ire) * alat * bohr2ang, MAXVAL(tmp(ire, :))
|
||||
ENDDO
|
||||
CLOSE(iuwane)
|
||||
!
|
||||
!
|
||||
OPEN(UNIT = iuwanep, FILE = 'decay.epmatp', STATUS = 'unknown')
|
||||
WRITE(iuwanep, '(a)') '# R_p [Ang] max_{m,n,nu} |g(m, n, nu, :, R_p)| [Ry] '
|
||||
DO ir = 1, nrr_g
|
||||
WRITE(iuwanep, '(2f15.10, 1E20.10)') len2(ir) * alat * bohr2ang, MAXVAL(tmp(:, ir))
|
||||
ENDDO
|
||||
ENDDO
|
||||
CLOSE(iuwanep)
|
||||
ENDIF
|
||||
!
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
!
|
||||
LOGICAL :: &!
|
||||
elph, &! Perform electron-phonon interpolation
|
||||
adapt_smearing ! Adaptative smearing
|
||||
adapt_smearing, &! Adaptative smearing
|
||||
qrpl ! If true use quadrupole during interpolation
|
||||
LOGICAL, ALLOCATABLE :: &!
|
||||
lwin(:, :), &! identify bands within outer energy windows (when disentanglement is used)
|
||||
lwinq(:, :), &! Excluded bands
|
||||
|
@ -51,7 +52,9 @@
|
|||
ig_s, &! First G index within each core in case of G parallelization
|
||||
ig_e, &! Last G index within each core in case of G parallelization
|
||||
num_wannier_plot, &! Number of Wannier functions to plot
|
||||
ng0vec ! number of inequivalent such translations (125)
|
||||
ng0vec, &! Number of inequivalent such translations (125)
|
||||
nkpt_bzfst, &! Number of full BZ points within the extended fsthick * 1.2
|
||||
nkpt_bztau_max ! In the case of B-field, max nb of kpt with non-zero inv_tau in full BZ for all temperature
|
||||
INTEGER, ALLOCATABLE :: &!
|
||||
igk(:), &! Index for k+G vector
|
||||
igkq(:), &! Index for k+q+G vector
|
||||
|
@ -66,6 +69,16 @@
|
|||
mapg(:,:,:), &! Map between FFT grid and G-vector index
|
||||
wanplotlist(:), &! List of Wannier functions to plot
|
||||
bztoibz(:), &! BZ to IBZ map
|
||||
map_fst(:), &! Maps the k-point number from the full BZ with the k-point number of the subset within the fsthick.
|
||||
nkpt_ibztau(:), &! In case of B-field, number of kpoints with non-zero inv_tau
|
||||
kpt_ibztau2ibz(:, :), &! In case of B-field, mapping index of the kpoints with non-zero inv_ta
|
||||
kpt_bztau2bz(:, :), &! In case of B-field, inverse mapping between BZ index and reordered BZ index with non-zero inv_tau
|
||||
kpt_ibztau2bz(:, :, :), &! In case of B-field, inverse mapping between BZ index and reordered BZ index with non-zero inv_tau;
|
||||
! the shape here is different: take as input a IBZ index and the id of asymmetry operation
|
||||
kpt_bz2bztau(:, :), &! In case of B-field, mapping between BZ index and reordered BZ index with non-zero inv_tau
|
||||
nsym_sp(:), &! In case of B-field, for the special points among the non-zero inv_tau points, give the number of
|
||||
! points which leaves the k-point unchanged by symmetry.
|
||||
ind_map(:, :), &! In case of B-field, for non-zero inv_tau points, give the k and k+q mapping.
|
||||
s_bztoibz(:) ! Symmetry operation map for BZ to IBZ. This could be a INTEGER(KIND = 2) but does not work on all compilers
|
||||
REAL(KIND = DP) :: &!
|
||||
efnew, &! Fermi level on the fine grid. Added globaly for efficiency reason
|
||||
|
@ -100,15 +113,17 @@
|
|||
sigmai_all(:, :, :), &! Imaginary part of the electron-phonon self-energy
|
||||
sigmai_mode(:, :, :, :), &! Mode resolved imaginary electron self-energy
|
||||
zi_all(:, :, :), &! Z renormalization factor
|
||||
eta(:, :, :), &! Adaptative smearing
|
||||
esigmar_all(:, :, :, :), &! energy of the real self-energy
|
||||
esigmai_all(:, :, :, :), &! energy of the imaginary self-energy
|
||||
jdos(:), &! j-DOS
|
||||
spectra(:, :, :, :, :, :), &! dipole absorption spectra, polarizations, nomega, nsmear, dme/vme, absorption/emission
|
||||
zstar(:, :, :), &! Born effective charges
|
||||
epsi(:, :), &! dielectric tensor
|
||||
inv_tau_all(:, :, :), &! scattering rate
|
||||
inv_tau_allcb(:, :, :), &! Second scattering rate (for both)
|
||||
eta(:, :, :), &! Adaptative smearing
|
||||
esigmar_all(:, :, :, :), &! energy of the real self-energy
|
||||
esigmai_all(:, :, :, :), &! energy of the imaginary self-energy
|
||||
jdos(:), &! j-DOS
|
||||
spectra(:, :, :, :, :, :), &! dipole absorption spectra, polarizations, nomega, nsmear, dme/vme, absorption/emission
|
||||
zstar(:, :, :), &! Born effective charges
|
||||
epsi(:, :), &! dielectric tensor
|
||||
inv_tau_all(:, :, :), &! scattering rate
|
||||
inv_tau_allcb(:, :, :), &! Conduction band scattering rate
|
||||
inv_tau_all_mode(:, :, :, :), &! mode resolved scattering rate
|
||||
inv_tau_allcb_mode(:, :, :, :), &! mode resolved conduction band scattering rate
|
||||
zi_allvb(:, :, :), &! Z-factor in scattering rate
|
||||
zi_allcb(:, :, :), &! Second Z-factor in scattering rate (for both VB and CB calculations)
|
||||
ifc(:,:,:,:,:,:,:), &! Interatomic force constant in real space
|
||||
|
@ -119,7 +134,20 @@
|
|||
gtemp(:), &! Temperature used globally (units of Ry)
|
||||
mobilityh_save(:), &! Error in the hole mobility
|
||||
mobilityel_save(:), &! Error in the electron mobility
|
||||
xkf_bz(:, :) ! Homogeneous k-point list on the full
|
||||
xkf_fst(:, :), &! Coordinate of the k-points on the IBZ within the fsthick
|
||||
wkf_fst(:), &! Weights of the k-points on the IBZ within the fsthick
|
||||
vkk_all(:, :, :), &! Velocity among all cores
|
||||
carrier_density(:), &! Carrier density for each temperature
|
||||
etf_all_b(:, :, :), &! In case of B-field, eigenenergies for non-zero inv_tau k-points on full BZ
|
||||
vkk_all_b(:, :, :, :), &! In case of B-field, velocities for non-zero inv_tau k-points on full BZ
|
||||
wkf_all_b(:), &! In case of B-field, k-point weights for non-zero inv_tau k-points on full BZ
|
||||
f_serta_b(:, :, :, :), &! In case of B-field, SERTA population for non-zero inv_tau k-points on full BZ
|
||||
f_in_b(:, :, :, :), &! In case of B-field, in population for IBTE for non-zero inv_tau k-points on full BZ
|
||||
f_out_b(:, :, :, :), &! In case of B-field, out population for IBTE for non-zero inv_tau k-points on full BZ
|
||||
inv_tau_b(:, :, :), &! In case of B-field, scattering rate for non-zero inv_tau k-points on full BZ
|
||||
df_in_b(:, :, :, :, :), &! In case of B-field, derivative of f wrt k for non-zero inv_tau k-points on full BZ
|
||||
xkf_bz(:, :), &! In case of B-field, homogeneous k-point list on the full BZ for etf_mem /= 3
|
||||
Qmat(:, :, :, :) ! Quadrupole tensor
|
||||
COMPLEX(KIND = DP), ALLOCATABLE :: &
|
||||
el_ph_mat(:, :, :, :), &! e-p matrix (nbnd, nbnd, nks, 3*nat)
|
||||
cu(:, :, :), &! rot matrix for wannier interpolation of k point, coarse mesh (nbnd*nbnd*nkstot)
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
!! on the coarse mesh and then passes the data off to [[ephwann_shuffle]]
|
||||
!! to perform the interpolation.
|
||||
!!
|
||||
!! SP - Apr 2021 - Addition of quadrupoles
|
||||
!!
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
USE kinds, ONLY : DP
|
||||
|
@ -36,7 +38,7 @@
|
|||
USE eqv, ONLY : vlocq, dmuxc
|
||||
USE ions_base, ONLY : nat, nsp, tau, ityp, amass
|
||||
USE control_flags, ONLY : iverbosity
|
||||
USE io_var, ONLY : iuepb, iuqpeig, crystal, iunpattern
|
||||
USE io_var, ONLY : iuepb, iuqpeig, crystal, iunpattern, iuquad
|
||||
USE pwcom, ONLY : nks, nbnd, nkstot, nelec
|
||||
USE cell_base, ONLY : at, bg, alat, omega, tpiba
|
||||
USE symm_base, ONLY : irt, s, nsym, ft, sname, invs, s_axis_to_cart, &
|
||||
|
@ -48,12 +50,12 @@
|
|||
USE lr_symm_base, ONLY : minus_q, rtau, gi, gimq, irotmq, nsymq, invsymq
|
||||
USE epwcom, ONLY : epbread, epbwrite, epwread, lifc, etf_mem, vme, &
|
||||
nbndsub, iswitch, kmaps, eig_read, dvscf_dir, &
|
||||
nkc1, nkc2, nkc3, nqc1, nqc2, nqc3, lpolar, system_2d, &
|
||||
fixsym, epw_noinv
|
||||
nkc1, nkc2, nkc3, nqc1, nqc2, nqc3, lpolar, &
|
||||
fixsym, epw_noinv, system_2d
|
||||
USE elph2, ONLY : epmatq, dynq, et_ks, xkq, ifc, umat, umat_all, veff,&
|
||||
zstar, epsi, cu, cuq, lwin, lwinq, bmat, nbndep, &
|
||||
ngxx, exband, wscache, area, ngxxf, ng0vec, shift, &
|
||||
gmap, g0vec_all_r
|
||||
gmap, g0vec_all_r, Qmat, qrpl
|
||||
USE klist_epw, ONLY : et_loc, et_all
|
||||
USE constants_epw, ONLY : ryd2ev, zero, two, czero, eps6, eps8
|
||||
USE fft_base, ONLY : dfftp
|
||||
|
@ -87,6 +89,8 @@
|
|||
!! Name of the directory
|
||||
CHARACTER(LEN = 256) :: filename
|
||||
!! Name of the file
|
||||
CHARACTER(LEN = 256) :: dummy
|
||||
!! Dummy character reading
|
||||
CHARACTER(LEN = 4) :: filelab
|
||||
!! Append the number of the core that works on that file
|
||||
CHARACTER(LEN = 80) :: line
|
||||
|
@ -158,6 +162,10 @@
|
|||
!! Polarization index
|
||||
INTEGER :: ierr
|
||||
!! Error index when reading/writing a file
|
||||
INTEGER :: na
|
||||
!! Atom index
|
||||
INTEGER :: idir
|
||||
!! Cartesian direction
|
||||
!INTEGER :: iunpun
|
||||
!! Unit of the file
|
||||
INTEGER, ALLOCATABLE :: gmapsym(:, :)
|
||||
|
@ -186,6 +194,8 @@
|
|||
!! Absolute value of xqc_irr
|
||||
REAL(KIND = DP) :: sumr(2, 3, nat, 3)
|
||||
!! Sum to impose the ASR
|
||||
REAL(KIND = DP) :: Qxx, Qyy, Qzz, Qyz, Qxz, Qxy
|
||||
!! Specific quadrupole value read from file.
|
||||
REAL(KIND = DP), ALLOCATABLE :: xqc_irr(:, :)
|
||||
!! The qpoints in the irr wedge
|
||||
REAL(KIND = DP), ALLOCATABLE :: xqc(:, :)
|
||||
|
@ -374,17 +384,64 @@
|
|||
ENDIF
|
||||
ENDIF ! epwread
|
||||
!
|
||||
IF (system_2d) area = omega * alat / bg(3, 3)
|
||||
! If quadrupole file exist, read it
|
||||
IF (mpime == ionode_id) THEN
|
||||
INQUIRE(FILE = 'quadrupole.fmt', EXIST = exst)
|
||||
ENDIF
|
||||
CALL mp_bcast(exst, ionode_id, world_comm)
|
||||
!
|
||||
qrpl = .FALSE.
|
||||
ALLOCATE(Qmat(nat, 3, 3, 3), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('elphon_shuffle_wrap', 'Error allocating Qmat', 1)
|
||||
Qmat(:, :, :, :) = zero
|
||||
IF (exst) THEN
|
||||
qrpl = .TRUE.
|
||||
IF (mpime == ionode_id) THEN
|
||||
OPEN(UNIT = iuquad, FILE = 'quadrupole.fmt', STATUS = 'old', IOSTAT = ios)
|
||||
READ(iuquad, *) dummy
|
||||
DO i = 1, 3 * nat
|
||||
READ(iuquad, *) na, idir, Qxx, Qyy, Qzz, Qyz, Qxz, Qxy
|
||||
Qmat(na, idir, 1, 1) = Qxx
|
||||
Qmat(na, idir, 2, 2) = Qyy
|
||||
Qmat(na, idir, 3, 3) = Qzz
|
||||
Qmat(na, idir, 2, 3) = Qyz
|
||||
Qmat(na, idir, 3, 2) = Qyz
|
||||
Qmat(na, idir, 1, 3) = Qxz
|
||||
Qmat(na, idir, 3, 1) = Qxz
|
||||
Qmat(na, idir, 1, 2) = Qxy
|
||||
Qmat(na, idir, 2, 1) = Qxy
|
||||
ENDDO
|
||||
CLOSE(iuquad)
|
||||
ENDIF ! mpime == ionode_id
|
||||
CALL mp_bcast(Qmat, ionode_id, world_comm)
|
||||
WRITE(stdout, '(a)') ' '
|
||||
WRITE(stdout, '(a)') ' ------------------------------------ '
|
||||
WRITE(stdout, '(a)') ' Quadrupole tensor is correctly read: '
|
||||
WRITE(stdout, '(a)') ' ------------------------------------ '
|
||||
WRITE(stdout, '(a)') ' atom dir Qxx Qyy Qzz Qyz Qxz Qxy'
|
||||
DO na = 1, nat
|
||||
WRITE(stdout, '(i8, a,6f10.5)' ) na, ' x ', Qmat(na, 1, 1, 1), Qmat(na, 1, 2, 2), Qmat(na, 1, 3, 3), &
|
||||
Qmat(na, 1, 2, 3), Qmat(na, 1, 1, 3), Qmat(na, 1, 1, 2)
|
||||
WRITE(stdout, '(i8, a,6f10.5)' ) na, ' y ', Qmat(na, 2, 1, 1), Qmat(na, 2, 2, 2), Qmat(na, 2, 3, 3), &
|
||||
Qmat(na, 2, 2, 3), Qmat(na, 2, 1, 3), Qmat(na, 2, 1, 2)
|
||||
WRITE(stdout, '(i8, a,6f10.5)' ) na, ' z ', Qmat(na, 3, 1, 1), Qmat(na, 3, 2, 2), Qmat(na, 3, 3, 3), &
|
||||
Qmat(na, 3, 2, 3), Qmat(na, 3, 1, 3), Qmat(na, 3, 1, 2)
|
||||
ENDDO
|
||||
WRITE(stdout, '(a)') ' '
|
||||
ENDIF ! exst
|
||||
!
|
||||
IF (system_2d) area = omega * bg(3, 3) / alat
|
||||
IF (system_2d) WRITE(stdout, * ) ' Area is [Bohr^2] ', area
|
||||
!
|
||||
IF (lifc) THEN
|
||||
ALLOCATE(ifc(nqc1, nqc2, nqc3, 3, 3, nat, nat), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('elphon_shuffle_wrap', 'Error allocating ifc', 1)
|
||||
ifc(:, :, :, :, :, :, :) = zero
|
||||
ENDIF
|
||||
!
|
||||
!
|
||||
! SP: Symmetries needs to be consistent with QE so that the order of the q in the star is the
|
||||
! same as in the .dyn files produced by QE.
|
||||
!
|
||||
!
|
||||
! Initialize symmetries and create the s matrix
|
||||
s(:, :, :) = 0 ! Symmetry in crystal axis with dim: 3,3,48
|
||||
CALL set_sym_bl()
|
||||
|
@ -396,7 +453,7 @@
|
|||
CALL find_sym(nat, tau, ityp, .FALSE., m_loc)
|
||||
IF (fixsym) CALL fix_sym(.FALSE.)
|
||||
WRITE(stdout, '(5x, a, i3)') "Symmetries of crystal: ", nsym
|
||||
!
|
||||
!
|
||||
IF (epwread .AND. .NOT. epbread) THEN
|
||||
CONTINUE
|
||||
ELSE
|
||||
|
@ -436,7 +493,7 @@
|
|||
IF (lifc) THEN
|
||||
CALL read_ifc_epw
|
||||
ENDIF
|
||||
!
|
||||
!
|
||||
! The following loop is required to propertly set up the symmetry matrix s.
|
||||
! We here copy the calls made in PHonon/PH/init_representations.f90 to have the same s as in QE 5.
|
||||
DO iq_irr = 1, nqc_irr
|
||||
|
@ -706,7 +763,7 @@
|
|||
CALL loadumat(nbndep, nbndsub, nks, nkstot, xq, cu, cuq, lwin, lwinq, exband, w_centers)
|
||||
!
|
||||
! Calculate overlap U_k+q U_k^\dagger
|
||||
IF (lpolar) CALL compute_umn_c(nbndep, nbndsub, nks, cu, cuq, bmat(:, :, :, nqc))
|
||||
IF (lpolar .OR. qrpl) CALL compute_umn_c(nbndep, nbndsub, nks, cu, cuq, bmat(:, :, :, nqc))
|
||||
!
|
||||
! calculate the sandwiches
|
||||
!
|
||||
|
@ -756,7 +813,7 @@
|
|||
CALL loadumat(nbndep, nbndsub, nks, nkstot, xq, cu, cuq, lwin, lwinq, exband, w_centers)
|
||||
!
|
||||
! Calculate overlap U_k+q U_k^\dagger
|
||||
IF (lpolar) CALL compute_umn_c(nbndep, nbndsub, nks, cu, cuq, bmat(:, :, :, nqc))
|
||||
IF (lpolar .OR. qrpl) CALL compute_umn_c(nbndep, nbndsub, nks, cu, cuq, bmat(:, :, :, nqc))
|
||||
!
|
||||
xq0 = -xq0
|
||||
!
|
||||
|
|
|
@ -58,7 +58,7 @@ CONTAINS
|
|||
!
|
||||
INTEGER, INTENT (IN) :: iq, nrr_k, nrr_q, nrr_g
|
||||
INTEGER, INTENT (IN) :: irvec_q(:,:), irvec_g(:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:)
|
||||
REAL(KIND=dp), INTENT (INOUT) :: w2(3*nat)
|
||||
COMPLEX(KIND=dp), INTENT (INOUT) :: uf ( nmodes, nmodes), epmatwef( nbndsub, nbndsub, nrr_k, nmodes)
|
||||
REAL(KIND=dp), INTENT (IN) :: irvec_r(3,nrr_k)
|
||||
|
@ -675,7 +675,7 @@ CONTAINS
|
|||
!
|
||||
INTEGER, INTENT (IN) :: iq, nrr_k, nrr_q, nrr_g
|
||||
INTEGER, INTENT (IN) :: irvec_q(:,:), irvec_g(:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:)
|
||||
REAL(KIND=dp), INTENT (INOUT) :: w2(3*nat)
|
||||
COMPLEX(KIND=dp), INTENT (INOUT) :: uf ( nmodes, nmodes), epmatwef( nbndsub, nbndsub, nrr_k, nmodes)
|
||||
REAL(KIND=dp), INTENT (IN) :: irvec_r(3,nrr_k)
|
||||
|
@ -937,7 +937,7 @@ CONTAINS
|
|||
REAL(KIND=dp), INTENT (INOUT) :: w2(3*nat)
|
||||
INTEGER, INTENT (IN) :: irvec_q(:,:), irvec_g(:,:)
|
||||
REAL(KIND=dp), ALLOCATABLE :: irvec_r(:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:,:)
|
||||
INTEGER, INTENT (IN) :: ndegen_k(:,:,:), ndegen_q(:,:,:), ndegen_g(:,:,:)
|
||||
COMPLEX(KIND=dp), INTENT (INOUT) :: uf ( nmodes, nmodes), epmatwef( nbndsub, nbndsub, nrr_k, nmodes)
|
||||
INTEGER, INTENT (IN) :: dims
|
||||
!! Dims is either nbndsub if use_ws or 1 if not
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
inv_tau_allcb, zi_allcb, exband, gamma_v_all, &
|
||||
esigmar_all, esigmai_all, lower_bnd, upper_bnd, &
|
||||
a_all, a_all_ph, wscache, lambda_v_all, threshold, &
|
||||
nktotf, gtemp, xkq, dos, nbndskip, nbndep
|
||||
nktotf, gtemp, xkq, dos, nbndskip, nbndep, &
|
||||
inv_tau_all_mode, inv_tau_allcb_mode, qrpl, Qmat
|
||||
USE wan2bloch, ONLY : dmewan2bloch, hamwan2bloch, dynwan2bloch, &
|
||||
ephwan2blochp, ephwan2bloch, vmewan2bloch, &
|
||||
dynifc2blochf, vmewan2blochp
|
||||
|
@ -66,7 +67,7 @@
|
|||
USE io_eliashberg, ONLY : write_ephmat, count_kpoints, kmesh_fine, kqmap_fine,&
|
||||
check_restart_ephwrite
|
||||
USE transport, ONLY : transport_coeffs, scattering_rate_q
|
||||
USE grid, ONLY : qwindow
|
||||
USE grid, ONLY : qwindow, loadkmesh_fst, xqf_otf
|
||||
USE printing, ONLY : print_gkk, plot_band, plot_fermisurface
|
||||
USE io_epw, ONLY : rwepmatw, epw_read, epw_write
|
||||
USE io_transport, ONLY : tau_read, iter_open, print_ibte, iter_merge
|
||||
|
@ -142,6 +143,8 @@
|
|||
!! Counter on coarse q-point grid
|
||||
INTEGER :: iq_restart
|
||||
!! Counter on coarse q-point grid
|
||||
INTEGER :: qind
|
||||
!! Index of q-point either on full q-grid or within qwindow
|
||||
INTEGER :: ik
|
||||
!! Counter on coarse k-point grid
|
||||
INTEGER :: ikk
|
||||
|
@ -209,7 +212,7 @@
|
|||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
INTEGER, ALLOCATABLE :: ndegen_q(:, :, :)
|
||||
!! Wigner-Seitz weights for the phonon grid that depend on atomic positions $R + \tau(nb) - \tau(na)$
|
||||
INTEGER, ALLOCATABLE :: ndegen_g(:, :, :, :)
|
||||
INTEGER, ALLOCATABLE :: ndegen_g(:, :, :)
|
||||
!! Wigner-Seitz weights for the electron-phonon grid that depend on
|
||||
!! atomic positions $R - \tau(na)$
|
||||
INTEGER, ALLOCATABLE :: selecq(:)
|
||||
|
@ -336,6 +339,10 @@
|
|||
WRITE(stdout, '(/,5x,a)' ) 'Computes the analytic long-range interaction for polar materials [lpolar]'
|
||||
WRITE(stdout, '(5x,a)' ) ' '
|
||||
ENDIF
|
||||
IF (.NOT. lpolar .AND. qrpl) THEN
|
||||
WRITE(stdout, '(/,5x,a)' ) 'Computes the analytic quadrupole long-range interaction for non-polar materials [Q1,Q2]'
|
||||
WRITE(stdout, '(5x,a)' ) ' '
|
||||
ENDIF
|
||||
!
|
||||
! Determine Wigner-Seitz points
|
||||
!
|
||||
|
@ -460,8 +467,9 @@
|
|||
! Electron-Phonon vertex (Bloch el and Bloch ph -> Wannier el and Bloch ph)
|
||||
!
|
||||
! Open the prefix.epmatwe file
|
||||
IF ((etf_mem == 1) .AND. ionode) THEN
|
||||
IF ((etf_mem == 1 .OR. etf_mem == 3) .AND. ionode) THEN
|
||||
lrepmatw = 2 * nbndsub * nbndsub * nrr_k * nmodes
|
||||
filint = TRIM(prefix)//'.epmatwe'
|
||||
CALL diropn(iunepmatwe, 'epmatwe', lrepmatw, exst)
|
||||
ENDIF
|
||||
!
|
||||
|
@ -492,7 +500,7 @@
|
|||
!
|
||||
ENDDO
|
||||
! Only the master node writes
|
||||
IF ((etf_mem == 1) .AND. (ionode)) THEN
|
||||
IF ((etf_mem == 1 .OR. etf_mem == 3) .AND. ionode) THEN
|
||||
! direct write of epmatwe for this iq
|
||||
CALL rwepmatw(epmatwe_mem, nbndsub, nrr_k, nmodes, iq, iunepmatwe, +1)
|
||||
!
|
||||
|
@ -501,7 +509,7 @@
|
|||
ENDDO
|
||||
WRITE(stdout, '(a)' ) ' '
|
||||
!
|
||||
IF (etf_mem == 1 .AND. ionode) CLOSE(iunepmatwe, STATUS = 'keep')
|
||||
IF ((etf_mem == 1 .OR. etf_mem == 3) .AND. ionode) CLOSE(iunepmatwe, STATUS = 'keep')
|
||||
!
|
||||
! Electron-Phonon vertex (Wannier el and Bloch ph -> Wannier el and Wannier ph)
|
||||
!
|
||||
|
@ -553,17 +561,27 @@
|
|||
! At this point, we will interpolate the Wannier rep to the Bloch rep
|
||||
! for electrons, phonons and the ep-matrix
|
||||
!
|
||||
! Load the fine-grid q and k grids.
|
||||
! nkqtotf is computed inside
|
||||
CALL loadqmesh_serial
|
||||
CALL loadkmesh_para
|
||||
! Load the fine-grid q and k grids (nkqtotf is computed inside).
|
||||
! The k-point mapping between BZ and IBZ is allocated and computed here as well bztoibz and s_bztoibz
|
||||
! etf_mem == 3 is a special optimization level to deal with ultra dense fine homogeneous grids.
|
||||
IF (etf_mem == 3) THEN
|
||||
! The fine q-grid is not create (will be generated on the fly later)
|
||||
! The fine k-grid consists of point within the fsthick window using k-point symmetry
|
||||
CALL loadkmesh_fst(nrr_k, dims, irvec_k, ndegen_k, nelec)
|
||||
nqtotf = nqf1 * nqf2 * nqf3
|
||||
nqf = nqtotf
|
||||
ELSE
|
||||
CALL loadqmesh_serial()
|
||||
CALL loadkmesh_para()
|
||||
ALLOCATE(wf(nmodes, nqtotf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating wf', 1)
|
||||
wf(:, :) = zero
|
||||
ENDIF
|
||||
! Defines the total number of k-points
|
||||
nktotf = nkqtotf / 2
|
||||
!
|
||||
ALLOCATE(epmatwef(nbndsub, nbndsub, nrr_k, nmodes), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating epmatwef', 1)
|
||||
ALLOCATE(wf(nmodes, nqf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating wf', 1)
|
||||
ALLOCATE(etf(nbndsub, nkqf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating etf', 1)
|
||||
ALLOCATE(etf_ks(nbndsub, nkqf), STAT = ierr)
|
||||
|
@ -583,7 +601,6 @@
|
|||
ALLOCATE(isk_dummy(nkqf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating isk_dummy', 1)
|
||||
epmatwef(:, :, :, :) = czero
|
||||
wf(:, :) = zero
|
||||
etf(:, :) = zero
|
||||
etf_ks(:, :) = zero
|
||||
epmatf(:, :, :) = czero
|
||||
|
@ -595,7 +612,6 @@
|
|||
isk_dummy(:) = 0
|
||||
!
|
||||
! Allocate velocity and dipole matrix elements after getting grid size
|
||||
!
|
||||
IF (vme) THEN
|
||||
ALLOCATE(vmef(3, nbndsub, nbndsub, 2 * nkf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating vmef', 1)
|
||||
|
@ -760,6 +776,7 @@
|
|||
CALL fkbounds(nktotf, lower_bnd, upper_bnd)
|
||||
!
|
||||
! Re-order the k-point according to weather they are in or out of the fshick windows
|
||||
! In the case of etf_mem == 3, we only have k-points within the fsthick (no need for re-ordering).
|
||||
IF ((iterative_bte .OR. ephwrite) .AND. mp_mesh_k .AND. etf_mem < 3) THEN
|
||||
CALL load_rebal
|
||||
ENDIF
|
||||
|
@ -784,7 +801,7 @@
|
|||
!
|
||||
! Open the ephmatwp file here
|
||||
#if defined(__MPI)
|
||||
IF (etf_mem == 1) then
|
||||
IF (etf_mem == 1 .OR. etf_mem == 3) then
|
||||
! Check for directory given by "outdir"
|
||||
!
|
||||
filint = TRIM(tmp_dir) // TRIM(prefix)//'.epmatwp'
|
||||
|
@ -793,7 +810,7 @@
|
|||
ENDIF
|
||||
#else
|
||||
lrepmatw = 2 * nbndsub * nbndsub * nrr_k * nmodes
|
||||
filint = TRIM(tmp_dir) // TRIM(prefix)//'.epmatwp'
|
||||
filint = TRIM(prefix)//'.epmatwp'
|
||||
INQUIRE(IOLENGTH = direct_io_factor) dummy(1)
|
||||
unf_recl = direct_io_factor * INT(lrepmatw, KIND = KIND(unf_recl))
|
||||
IF (unf_recl <= 0) CALL errore('epw_write', 'wrong record length', 3)
|
||||
|
@ -827,6 +844,14 @@
|
|||
inv_tau_allcb(:, :, :) = zero
|
||||
lrepmatw2_restart(:) = 0
|
||||
lrepmatw5_restart(:) = 0
|
||||
IF (iverbosity == 3) THEN
|
||||
ALLOCATE(inv_tau_all_mode(nmodes, nbndfst, nktotf, nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating inv_tau_all_mode', 1)
|
||||
ALLOCATE(inv_tau_allcb_mode(nmodes, nbndfst, nktotf, nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating inv_tau_allcb_mode', 1)
|
||||
inv_tau_all_mode(:, :, :, :) = zero
|
||||
inv_tau_allcb_mode(:, :, :, :) = zero
|
||||
ENDIF
|
||||
! We save matrix elements that are smaller than machine precision (1d-16).
|
||||
! The sum of all the elements must be smaller than that
|
||||
! nkf1 * nkf2 * nkf3 * nqf1 * nqf2 * nqf3 * (nbndfst) * (nbndfst)
|
||||
|
@ -859,6 +884,12 @@
|
|||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating inv_tau_all', 1)
|
||||
DEALLOCATE(inv_tau_allcb, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating inv_tau_allcb', 1)
|
||||
IF (iverbosity == 3) THEN
|
||||
DEALLOCATE(inv_tau_all_mode, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating inv_tau_all_mode', 1)
|
||||
DEALLOCATE(inv_tau_allcb_mode, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating inv_tau_allcb_mode', 1)
|
||||
ENDIF
|
||||
!
|
||||
ELSE ! (iterative_bte .AND. epmatkqread)
|
||||
IF (iterative_bte) THEN
|
||||
|
@ -940,6 +971,12 @@
|
|||
! Fine mesh set of g-matrices. It is large for memory storage
|
||||
ALLOCATE(epf17(nbndfst, nbndfst, nmodes, nkf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating epf17', 1)
|
||||
! We allocate the phonon frequency on the q-points within the window
|
||||
IF (etf_mem == 3) THEN
|
||||
ALLOCATE(wf(nmodes, totq), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating wf', 1)
|
||||
wf(:, :) = zero
|
||||
ENDIF
|
||||
IF (phonselfen) THEN
|
||||
ALLOCATE(lambda_all(nmodes, totq, nsmear, nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error allocating lambda_all', 1)
|
||||
|
@ -1091,7 +1128,7 @@
|
|||
CALL mp_bcast(lrepmatw2_restart, ionode_id, world_comm)
|
||||
CALL mp_bcast(lrepmatw5_restart, ionode_id, world_comm)
|
||||
IF (npool /= npool_tmp) CALL errore('ephwann_shuffle','Number of cores is different',1)
|
||||
!
|
||||
!
|
||||
IF (iterative_bte) THEN
|
||||
IF (mpime == ionode_id) THEN
|
||||
OPEN(UNIT = iuntau, FORM = 'unformatted', FILE = 'inv_tau_tmp', STATUS = 'old')
|
||||
|
@ -1158,6 +1195,11 @@
|
|||
!
|
||||
iq = selecq(iqq)
|
||||
!
|
||||
IF (etf_mem == 3) THEN
|
||||
qind = iqq
|
||||
ELSE
|
||||
qind = iq
|
||||
ENDIF
|
||||
!
|
||||
! In case of big calculation, show progression of iq (especially usefull when
|
||||
! elecselfen = true as nothing happen during the calculation otherwise.
|
||||
|
@ -1168,7 +1210,13 @@
|
|||
ENDIF
|
||||
ENDIF
|
||||
!
|
||||
xxq = xqf(:, iq)
|
||||
! xqf has to be in crystal coordinate
|
||||
IF (etf_mem == 3) THEN
|
||||
! The q-point coordinate is generate on the fly for each q-point
|
||||
CALL xqf_otf(iq, xxq)
|
||||
ELSE
|
||||
xxq = xqf(:, iq)
|
||||
ENDIF
|
||||
!
|
||||
! ------------------------------------------------------
|
||||
! dynamical matrix : Wannier -> Bloch
|
||||
|
@ -1188,9 +1236,9 @@
|
|||
! (omega on fine grid)
|
||||
!
|
||||
IF (w2(nu) > -eps8) THEN
|
||||
wf(nu, iq) = DSQRT(ABS(w2(nu)))
|
||||
wf(nu, qind) = DSQRT(ABS(w2(nu)))
|
||||
ELSE
|
||||
wf(nu, iq) = -DSQRT(ABS(w2(nu)))
|
||||
wf(nu, qind) = -DSQRT(ABS(w2(nu)))
|
||||
ENDIF
|
||||
!
|
||||
DO mu = 1, nmodes
|
||||
|
@ -1211,7 +1259,7 @@
|
|||
fermicount = 0
|
||||
!
|
||||
IF (lscreen) THEN
|
||||
IF (scr_typ == 0) CALL rpa_epsilon(xxq, wf(:, iq), nmodes, epsi, eps_rpa)
|
||||
IF (scr_typ == 0) CALL rpa_epsilon(xxq, wf(:, qind), nmodes, epsi, eps_rpa)
|
||||
IF (scr_typ == 1) CALL tf_epsilon(xxq, nmodes, epsi, eps_rpa)
|
||||
ENDIF
|
||||
!
|
||||
|
@ -1220,7 +1268,7 @@
|
|||
! -------------------------------------------------------------
|
||||
!
|
||||
IF (adapt_smearing) THEN
|
||||
CALL vmewan2blochp(xxq, nmodes, nrr_q, irvec_q, ndegen_q, uf, vmefp(:, :, :), wf(:, iq), rws, nrws)
|
||||
CALL vmewan2blochp(xxq, nmodes, nrr_q, irvec_q, ndegen_q, uf, vmefp(:, :, :), wf(:, qind), rws, nrws)
|
||||
ENDIF
|
||||
!
|
||||
! This is a loop over k blocks in the pool (size of the local k-set)
|
||||
|
@ -1325,7 +1373,7 @@
|
|||
!
|
||||
IF (adapt_smearing) THEN
|
||||
! Return the value of the adaptative broadening eta
|
||||
CALL broadening(ik, ikk, ikq, wf(:, iq), vmefp, eta)
|
||||
CALL broadening(ik, ikk, ikq, wf(:, qind), vmefp, eta)
|
||||
!
|
||||
ENDIF ! adapt_smearing
|
||||
!
|
||||
|
@ -1350,7 +1398,7 @@
|
|||
!
|
||||
ENDIF
|
||||
!
|
||||
IF (lpolar) THEN
|
||||
IF (lpolar .OR. qrpl) THEN
|
||||
!
|
||||
CALL compute_umn_f(nbndsub, cufkk, cufkq, bmatf)
|
||||
!
|
||||
|
@ -1460,7 +1508,7 @@
|
|||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
IF (.NOT. iterative_bte) THEN
|
||||
IF (.NOT. iterative_bte .AND. etf_mem < 3) THEN
|
||||
CALL scattering_rate_q(iqq, iq, totq, ef0, efcb, first_cycle)
|
||||
! Computes the SERTA mobility
|
||||
IF (iqq == totq) CALL transport_coeffs(ef0, efcb)
|
||||
|
@ -1468,7 +1516,7 @@
|
|||
!
|
||||
IF (iterative_bte) THEN
|
||||
CALL start_clock('print_ibte')
|
||||
CALL print_ibte(iqq, iq, totq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
CALL print_ibte(iqq, iq, totq, xxq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
lrepmatw2_restart, lrepmatw5_restart, ctype)
|
||||
CALL stop_clock('print_ibte')
|
||||
!
|
||||
|
@ -1730,7 +1778,7 @@
|
|||
!
|
||||
ENDIF ! (iterative_bte .AND. epmatkqread)
|
||||
!
|
||||
IF ((iterative_bte .OR. ephwrite) .AND. mp_mesh_k) THEN
|
||||
IF ((iterative_bte .OR. ephwrite) .AND. mp_mesh_k .AND. etf_mem < 3) THEN
|
||||
DEALLOCATE(map_rebal, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating map_rebal', 1)
|
||||
DEALLOCATE(map_rebal_inv, STAT = ierr)
|
||||
|
@ -1764,8 +1812,10 @@
|
|||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating zstar', 1)
|
||||
DEALLOCATE(epmatwef, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating epmatwef', 1)
|
||||
DEALLOCATE(wf, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating wf', 1)
|
||||
IF (.NOT. epmatkqread) THEN
|
||||
DEALLOCATE(wf, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating wf', 1)
|
||||
ENDIF
|
||||
DEALLOCATE(etf, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating etf', 1)
|
||||
DEALLOCATE(etf_ks, STAT = ierr)
|
||||
|
@ -1821,13 +1871,14 @@
|
|||
DEALLOCATE(gtemp, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating gtemp', 1)
|
||||
ENDIF
|
||||
!
|
||||
DEALLOCATE(et_ks, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating et_ks', 1)
|
||||
IF (assume_metal) THEN
|
||||
DEALLOCATE(dos, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating dos', 1)
|
||||
ENDIF
|
||||
DEALLOCATE(Qmat, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ephwann_shuffle', 'Error deallocating Qmat', 1)
|
||||
!
|
||||
CALL stop_clock('ephwann')
|
||||
!
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
INTEGER, ALLOCATABLE :: ndegen_q(:, :, :)
|
||||
!! Wigner-Seitz weights for the phonon grid that depend on atomic positions $R + \tau(nb) - \tau(na)$
|
||||
INTEGER, ALLOCATABLE :: ndegen_g(:, :, :, :)
|
||||
INTEGER, ALLOCATABLE :: ndegen_g(:, :, :)
|
||||
!! Wigner-Seitz weights for the electron-phonon grid that depend on
|
||||
!! atomic positions $R - \tau(na)$
|
||||
INTEGER, ALLOCATABLE :: selecq(:)
|
||||
|
@ -439,6 +439,7 @@
|
|||
! Open the prefix.epmatwe file
|
||||
IF (ionode) THEN
|
||||
lrepmatw = 2 * nbndsub * nbndsub * nrr_k * nmodes
|
||||
filint = TRIM(prefix)//'.epmatwe'
|
||||
CALL diropn(iunepmatwe, 'epmatwe', lrepmatw, exst)
|
||||
ENDIF
|
||||
!
|
||||
|
@ -1002,7 +1003,7 @@
|
|||
CALL mp_bcast(lrepmatw2_restart, ionode_id, world_comm)
|
||||
CALL mp_bcast(lrepmatw5_restart, ionode_id, world_comm)
|
||||
IF (npool /= npool_tmp) CALL errore('ephwann_shuffle','Number of cores is different',1)
|
||||
!
|
||||
!
|
||||
IF (iterative_bte) THEN
|
||||
IF (mpime == ionode_id) THEN
|
||||
OPEN(UNIT = iuntau, FORM = 'unformatted', FILE = 'inv_tau_tmp', STATUS = 'old')
|
||||
|
@ -1366,7 +1367,7 @@
|
|||
!
|
||||
IF (iterative_bte) THEN
|
||||
CALL start_clock('print_ibte')
|
||||
CALL print_ibte(iqq, iq, totq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
CALL print_ibte(iqq, iq, totq, xxq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
lrepmatw2_restart, lrepmatw5_restart, ctype)
|
||||
CALL stop_clock('print_ibte')
|
||||
!
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
!! @Note:
|
||||
!! SP: Image parallelization added
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE ions_base, ONLY : nat, ntyp => nsp
|
||||
USE cell_base, ONLY : at
|
||||
USE mp, ONLY : mp_bcast
|
||||
|
@ -59,10 +60,11 @@
|
|||
wannier_plot_supercell, wannier_plot_scale, reduce_unk, &
|
||||
wannier_plot_radius, fermi_plot, &
|
||||
fixsym, epw_no_t_rev, epw_tr, epw_nosym, epw_noinv, &
|
||||
epw_crysym
|
||||
epw_crysym, bfieldx, bfieldy, bfieldz
|
||||
USE klist_epw, ONLY : xk_all, xk_loc, xk_cryst, isk_all, isk_loc, et_all, et_loc
|
||||
USE elph2, ONLY : elph, num_wannier_plot, wanplotlist, gtemp
|
||||
USE constants_epw, ONLY : ryd2mev, ryd2ev, ev2cmm1, kelvin2eV, zero, eps20, ang2m
|
||||
USE constants, ONLY : electron_si
|
||||
USE io_files, ONLY : tmp_dir, prefix
|
||||
USE control_flags, ONLY : iverbosity, modenum, gamma_only
|
||||
USE ions_base, ONLY : amass
|
||||
|
@ -126,25 +128,24 @@
|
|||
!! temp vars for saving kgrid info
|
||||
INTEGER :: ierr
|
||||
!! Error status
|
||||
INTEGER :: unit_loc = 5
|
||||
!! Unit for input file
|
||||
REAL(kind = DP) :: b_abs
|
||||
!! Absolute magnetic field
|
||||
!
|
||||
NAMELIST / inputepw / &
|
||||
amass, outdir, prefix, iverbosity, fildvscf, &
|
||||
elph, nq1, nq2, nq3, nk1, nk2, nk3, nbndsub, &
|
||||
filukk, epbread, epbwrite, epwread, epwwrite, etf_mem, kmaps, &
|
||||
eig_read, wepexst, epexst, vme, &
|
||||
degaussw, fsthick, nsmear, delta_smear, &
|
||||
dvscf_dir, ngaussw, epmatkqread, selecqread, &
|
||||
wannierize, dis_win_max, dis_win_min, dis_froz_min, dis_froz_max, &
|
||||
num_iter, proj, bands_skipped, wdata, iprint, write_wfn, &
|
||||
wmin, wmax, nw, eps_acustic, a2f, nest_fn, plselfen, &
|
||||
elecselfen, phonselfen, use_ws, nc, &
|
||||
rand_q, rand_nq, rand_k, rand_nk, specfun_pl, &
|
||||
nqf1, nqf2, nqf3, nkf1, nkf2, nkf3, &
|
||||
mp_mesh_k, mp_mesh_q, filqf, filkf, ephwrite, &
|
||||
band_plot, fermi_plot, degaussq, delta_qsmear, nqsmear, nqstep, &
|
||||
nswfc, nswc, nswi, pwc, wsfc, wscut, system_2d, &
|
||||
broyden_beta, broyden_ndim, nstemp, temps, &
|
||||
conv_thr_raxis, conv_thr_iaxis, conv_thr_racon, &
|
||||
amass, outdir, prefix, iverbosity, fildvscf, rand_q, rand_nq, rand_k, &
|
||||
elph, nq1, nq2, nq3, nk1, nk2, nk3, nbndsub, rand_nk, specfun_pl, nswc, &
|
||||
filukk, epbread, epbwrite, epwread, epwwrite, etf_mem, kmaps, nswfc, &
|
||||
eig_read, wepexst, epexst, vme, elecselfen, phonselfen, use_ws, nc, &
|
||||
degaussw, fsthick, nsmear, delta_smear, nqf1, nqf2, nqf3, nkf1, nkf2, &
|
||||
dvscf_dir, ngaussw, epmatkqread, selecqread, nkf3, mp_mesh_k, mp_mesh_q,&
|
||||
wannierize, dis_win_max, dis_win_min, dis_froz_min, dis_froz_max, nswi, &
|
||||
num_iter, proj, bands_skipped, wdata, iprint, write_wfn, ephwrite, &
|
||||
wmin, wmax, nw, eps_acustic, a2f, nest_fn, plselfen, filqf, filkf, &
|
||||
band_plot, fermi_plot, degaussq, delta_qsmear, nqsmear, nqstep, pwc, &
|
||||
broyden_beta, broyden_ndim, nstemp, temps, bfieldx, bfieldy, bfieldz, &
|
||||
conv_thr_raxis, conv_thr_iaxis, conv_thr_racon, wsfc, wscut, system_2d, &
|
||||
gap_edge, nsiter, muc, lreal, limag, lpade, lacon, liso, laniso, lpolar,&
|
||||
npade, lscreen, scr_typ, fermi_diff, smear_rpa, cumulant, bnd_cum, &
|
||||
lifc, asr_typ, lunif, kerwrite, kerread, imag_read, eliashberg, &
|
||||
|
@ -173,14 +174,14 @@
|
|||
! tphases, fildvscf0
|
||||
!
|
||||
! amass : atomic masses
|
||||
! iverbosity : verbosity control
|
||||
! iverbosity : verbosity control
|
||||
! outdir : directory where input, output, temporary files reside
|
||||
! elph : if true calculate electron-phonon coefficients
|
||||
! prefix : the prefix of files produced by pwscf
|
||||
! fildvscf : output file containing deltavsc
|
||||
! fildrho : output file containing deltarho
|
||||
!
|
||||
! added by @ FG
|
||||
! added by FG
|
||||
!
|
||||
! ngaussw : smearing type after wann interp
|
||||
! (n >= 0) : Methfessel-Paxton case. See PRB 40, 3616 (1989)
|
||||
|
@ -208,7 +209,7 @@
|
|||
! epwread : read all quantities in Wannier representation from file epwdata.fmt
|
||||
! epwwrite : write all quantities in Wannier representation to file epwdata.fmt
|
||||
!
|
||||
! added by @jn
|
||||
! added by jn
|
||||
!
|
||||
! wannierize : if .TRUE. run the wannier90 code to maximally localize the WFs
|
||||
! dis_win_min : lower bound on wannier90 disentanglement window
|
||||
|
@ -235,7 +236,7 @@
|
|||
! nsmear : number of smearing values to use for the selfen_phon call
|
||||
! delta_smear : change in energy for each additional nsmear ( units of eV)
|
||||
!
|
||||
! added by @ RM
|
||||
! added by RM
|
||||
!
|
||||
! ephwrite : if true write el-phonon matrix elements on the fine mesh to file
|
||||
! eps_acustic : min phonon frequency for e-p and a2f calculations (units of cm-1)
|
||||
|
@ -288,6 +289,7 @@
|
|||
! delta_approx : if .TRUE. the double delta approximation is used to compute the phonon self-energy
|
||||
!
|
||||
! added by CV & SP
|
||||
!
|
||||
! lpolar : if .TRUE. enable the correct Wannier interpolation in the case of polar material.
|
||||
! lifc : if .TRUE. reads interatomic force constants produced by q2r.x for phonon interpolation
|
||||
! asr_typ : select type of ASR if lifc=.TRUE. (as in matdyn); otherwise it is the usual simple sum rule
|
||||
|
@ -300,7 +302,6 @@
|
|||
! bnd_cum : band index for which the cumulant calculation is done
|
||||
! (for more than one band, perform multiple calculations and add the results together)
|
||||
!
|
||||
!
|
||||
! Added by SP
|
||||
!
|
||||
! specfun_el : if .TRUE. calculate electron spectral function due to e-p interaction
|
||||
|
@ -340,6 +341,7 @@
|
|||
! epmatkqread : If .TRUE., restart an IBTE calculation from scattering written to files.
|
||||
! selecqread : If .TRUE., restart from the selecq.fmt file
|
||||
! nc : Number of carrier for the Ziman resistivity formula (can be fractional)
|
||||
! bfieldx, y, z : Value of the magnetic field in Tesla along x, y, z direction.
|
||||
!
|
||||
! Added by Manos Kioupakis
|
||||
! omegamin : Photon energy minimum
|
||||
|
@ -553,9 +555,9 @@
|
|||
lindabs = .FALSE.
|
||||
mob_maxiter= 50
|
||||
use_ws = .FALSE.
|
||||
epmatkqread = .FALSE.
|
||||
selecqread = .FALSE.
|
||||
nc = 4.0d0
|
||||
epmatkqread = .FALSE.
|
||||
selecqread = .FALSE.
|
||||
nc = 4.0d0
|
||||
assume_metal = .FALSE. ! default is we deal with an insulator
|
||||
fixsym = .FALSE.
|
||||
epw_no_t_rev = .TRUE.
|
||||
|
@ -563,6 +565,9 @@
|
|||
epw_nosym = .FALSE.
|
||||
epw_noinv = .FALSE.
|
||||
epw_crysym = .FALSE.
|
||||
bfieldx = 0.d0 ! Tesla
|
||||
bfieldy = 0.d0 ! Tesla
|
||||
bfieldz = 0.d0 ! Tesla
|
||||
!
|
||||
! --------------------------------------------------------------------------------
|
||||
! Added for polaron calculations. Originally by Danny Sio, modified by Chao Lian.
|
||||
|
@ -621,8 +626,8 @@
|
|||
': "'//TRIM(line)//'" (error could be in the previous line)', 1)
|
||||
ENDIF
|
||||
ios = close_input_file ( )
|
||||
ENDIF ! meta_ionode
|
||||
!
|
||||
ENDIF ! meta_ionode
|
||||
!
|
||||
IF (meta_ionode) THEN
|
||||
IF (wannier_plot) THEN
|
||||
IF (wannier_plot_radius < 0.0d0) &
|
||||
|
@ -746,9 +751,20 @@
|
|||
IF (lscreen .AND. etf_mem == 2) CALL errore('epw_readin', 'Error: lscreen not implemented with etf_mem=2', 1)
|
||||
IF (ABS(degaussw) < eps16 .AND. etf_mem == 2) CALL errore('epw_readin', &
|
||||
'Error: adapt_smearing not implemented with etf_mem=2', 1)
|
||||
!
|
||||
IF (etf_mem == 3) THEN
|
||||
IF (.NOT. mp_mesh_k) CALL errore('epw_readin', 'When etf_mem == 3, you have to use mp_mesh_k == .true.', 1)
|
||||
IF (.NOT. efermi_read) CALL errore('epw_readin', 'When etf_mem == 3, you have to use efermi_read == .true.', 1)
|
||||
IF (int_mob) CALL errore('epw_readin', 'When etf_mem == 3, you have to use int_mob == .false.', 1)
|
||||
IF (.NOT. carrier) CALL errore('epw_readin', 'When etf_mem == 3, you have to use carrier == .true.', 1)
|
||||
IF (phonselfen) CALL errore('epw_readin', 'phonselfen is not implemented with etf_mem == 3', 1)
|
||||
IF (filkf /= ' ' .OR. filqf /= ' ' .OR. rand_k .OR. rand_q) THEN
|
||||
CALL errore('epw_readin', 'etf_mem == 3 requires homogeneous grids', 1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
!
|
||||
IF (etf_mem > 3 .OR. etf_mem < 0) CALL errore('epw_readin', 'etf_mem can only be 0, 1, 2 or 3.', 1)
|
||||
! Make sure the files exists
|
||||
!
|
||||
!
|
||||
IF (meta_ionode) THEN
|
||||
IF (filkf /= ' ') THEN
|
||||
OPEN(UNIT = iunkf, FILE = filkf, STATUS = 'old', FORM = 'formatted', ERR = 100, IOSTAT = ios)
|
||||
|
@ -778,7 +794,19 @@
|
|||
WRITE(stdout, '(5x,a)') " to control the lower bound of band manifold."
|
||||
ENDIF
|
||||
!
|
||||
! Setup temperature array
|
||||
b_abs = ABS(bfieldx) + ABS(bfieldy) + ABS(bfieldz)
|
||||
IF (b_abs > eps20 .AND. (.NOT. mp_mesh_k)) THEN
|
||||
WRITE(stdout,'(5x,a)') 'WARNING: Finite magnetic field is much more stable with k-point symmetry: mp_mesh_k == .true.'
|
||||
CALL errore('epw_readin', 'Error: Finite magnetic field only implemented with k-point symmetry: mp_mesh_k == .true.', 1)
|
||||
ENDIF
|
||||
IF (b_abs > eps20 .AND. (filkf /= ' ')) THEN
|
||||
CALL errore('epw_readin', 'Error: Finite magnetic field only implemented with homogeneous k-grids', 1)
|
||||
ENDIF
|
||||
IF (b_abs > eps20 .AND. (filqf /= ' ')) THEN
|
||||
CALL errore('epw_readin', 'Error: Finite magnetic field only implemented with homogeneous k-grids', 1)
|
||||
ENDIF
|
||||
!
|
||||
! setup temperature array
|
||||
DO itemp = 1, ntempxx
|
||||
IF (temps(itemp) > 0.d0) THEN
|
||||
nstemp_hold = itemp
|
||||
|
@ -788,12 +816,12 @@
|
|||
! Case of nstemp > 0 but temps(:) = 0 is caught above
|
||||
IF (nstemp_hold == 0 .AND. nstemp == 0) THEN !default mode (nstemp_hold == 0 if temps(:) = 0)
|
||||
nstemp = 1
|
||||
temps(1) = 300
|
||||
temps(1) = 300
|
||||
WRITE(stdout, '(/,5x,a)') 'No temperature supplied. Setting temps(:) to 300 K.'
|
||||
ELSE IF (nstemp == 0 .OR. nstemp_hold == nstemp) THEN !list mode
|
||||
nstemp = nstemp_hold !catches if nstemp not supplied, no effect if it is
|
||||
WRITE(stdout, '(/,5x,a)') 'Reading supplied temperature list.'
|
||||
ELSE IF (nstemp_hold < nstemp .AND. nstemp_hold == 2) THEN !even spacing mode
|
||||
ELSE IF (nstemp_hold < nstemp .AND. nstemp_hold == 2) THEN !even spacing mode
|
||||
tempsmin = temps(1)
|
||||
tempsmax = temps(2)
|
||||
IF (tempsmin >= tempsmax) THEN !bad start and end points
|
||||
|
@ -842,6 +870,11 @@
|
|||
IF (efermi_read) THEN
|
||||
fermi_energy = fermi_energy / ryd2ev
|
||||
ENDIF
|
||||
! bfield: input in Tesla=[V/(m^2/s)] , convert in [eV/(Ang^2/s)]
|
||||
bfieldx = bfieldx * electron_si * ang2m**(-2)
|
||||
bfieldy = bfieldy * electron_si * ang2m**(-2)
|
||||
bfieldz = bfieldz * electron_si * ang2m**(-2)
|
||||
!
|
||||
! eptemp : temperature for the electronic Fermi occupations in the e-p calculation (units of Kelvin)
|
||||
! 1 K in eV = 8.6173423e-5
|
||||
! Out-of bound issue with GCC compiler. Multiple Fermi temp is not used anyway.
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
INTEGER :: nsiter
|
||||
!! nr. of iterations for self-consistency
|
||||
INTEGER :: npade
|
||||
!! percentange of Matsubara points used in Pade continuation
|
||||
!! percentange of Matsubara points used in Pade continuation
|
||||
INTEGER :: broyden_ndim
|
||||
!! nr. of iterations used in broyden mixing scheme
|
||||
INTEGER :: nw_specfun
|
||||
|
@ -332,6 +332,12 @@
|
|||
!! Amount of carrier concentration in cm^-3 when doping a semiconductors
|
||||
REAL(KIND = DP) :: nc
|
||||
!! Number of carrier per unit cell that participate to the conduction in the Ziman resistivity formula
|
||||
REAL(KIND = DP) :: bfieldx
|
||||
!! Magnetic field along the x-direction
|
||||
REAL(KIND = DP) :: bfieldy
|
||||
!! Magnetic field along the y-direction
|
||||
REAL(KIND = DP) :: bfieldz
|
||||
!! Magnetic field along the z-direction
|
||||
!
|
||||
! Plasmon
|
||||
REAL(KIND = DP) :: nel
|
||||
|
|
863
EPW/src/grid.f90
863
EPW/src/grid.f90
|
@ -622,13 +622,163 @@
|
|||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE kpoint_grid_epw(n_sym, time_reversal, s, t_rev, nkc1, nkc2, nkc3, n_irr)
|
||||
SUBROUTINE loadkmesh_fst(nrr_k, dims, irvec_k, ndegen_k, nelec)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! Load fine k mesh and distribute among pools
|
||||
!! We only load the k-points that fall within the fsthick
|
||||
!! This is useful to reduce computational cost in mobility calculations for example
|
||||
!! Only support homogeneous grids.
|
||||
!!
|
||||
!-----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
USE io_global, ONLY : ionode_id, stdout
|
||||
USE mp_global, ONLY : inter_pool_comm, my_pool_id, npool
|
||||
USE mp, ONLY : mp_bcast, mp_sum, mp_barrier
|
||||
USE epwcom, ONLY : nkf1, nkf2, nkf3, iterative_bte
|
||||
USE elph2, ONLY : wkf_fst, xkf_fst, nkqf, xkf, wkf, nkf, nkqtotf
|
||||
USE symm_base, ONLY : s, t_rev, nrot
|
||||
USE constants_epw, ONLY : byte2Mb, eps4, zero
|
||||
USE noncollin_module, ONLY : noncolin
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: nrr_k
|
||||
!! Number of WS points for electrons
|
||||
INTEGER, INTENT(in) :: dims
|
||||
!! Dims is either nbndsub if use_ws or 1 if not
|
||||
INTEGER, INTENT(in) :: irvec_k(3, nrr_k)
|
||||
!! Coordinates of real space vector for electrons
|
||||
INTEGER, INTENT(in) :: ndegen_k(nrr_k, dims, dims)
|
||||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
REAL(KIND = DP), INTENT(in) :: nelec
|
||||
!! Number of electrons
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: ik
|
||||
!! Counter on the k-point index
|
||||
INTEGER :: ikk
|
||||
!! k-point index
|
||||
INTEGER :: ikq
|
||||
!! q-point index
|
||||
INTEGER :: idir
|
||||
!! Crystal direction (G-vector)
|
||||
INTEGER :: lower_bnd
|
||||
!! Lower bounds index after k paral
|
||||
INTEGER :: upper_bnd
|
||||
!! Upper bounds index after k paral
|
||||
INTEGER :: rest
|
||||
!! rest from the division of nr of q-points over pools
|
||||
INTEGER :: ierr
|
||||
!! Error status
|
||||
REAL(KIND = DP), ALLOCATABLE :: xkf_(:, :)
|
||||
!! coordinates k-points
|
||||
REAL(KIND = DP), ALLOCATABLE :: wkf_(:)
|
||||
!! weights k-points
|
||||
!
|
||||
! This routine select the k-points with eigenvalues within the fsthick and
|
||||
! then create a bztoibz mapping of those points and their symmetry operation s_bztoibz
|
||||
! xkf_fst and wkf_fst are allocated inside
|
||||
CALL kpoint_grid_fst(nrot, s, t_rev, nrr_k, dims, &
|
||||
irvec_k, ndegen_k, nkf1, nkf2, nkf3, nkqtotf, nelec)
|
||||
!
|
||||
ALLOCATE(xkf_(3, 2 * nkqtotf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error allocating xkf_', 1)
|
||||
ALLOCATE(wkf_(2 * nkqtotf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error allocating wkf_', 1)
|
||||
!
|
||||
xkf_(:,:) = zero
|
||||
DO ik = 1, nkqtotf
|
||||
ikk = 2 * ik - 1
|
||||
ikq = ikk + 1
|
||||
xkf_(:,ikk) = xkf_fst(:, ik)
|
||||
xkf_(:,ikq) = xkf_fst(:, ik)
|
||||
wkf_(ikk) = 2.d0 * wkf_fst(ik)
|
||||
wkf_(ikq) = 0.d0
|
||||
ENDDO
|
||||
DEALLOCATE(xkf_fst, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error deallocating wkf_fst', 1)
|
||||
DEALLOCATE(wkf_fst, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error deallocating wkf_fst', 1)
|
||||
!
|
||||
IF (iterative_bte) THEN
|
||||
! Fold the points in the region [0-1] from the region -0.5,0.5
|
||||
DO ik = 1, 2 * nkqtotf
|
||||
DO idir = 1, 3
|
||||
IF (xkf_(idir, ik) < 0.0d0 ) THEN
|
||||
xkf_(idir, ik) = xkf_(idir, ik) + 1.0d0
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
! redefine nkqtotf to include the k+q points
|
||||
!
|
||||
nkqtotf = 2 * nkqtotf
|
||||
!
|
||||
#if defined(__MPI)
|
||||
CALL mp_bcast(nkqtotf, ionode_id, inter_pool_comm)
|
||||
!
|
||||
! scatter the k points of the fine mesh across the pools
|
||||
!
|
||||
nkqf = 2 * (nkqtotf / (2 * npool))
|
||||
rest = (nkqtotf - nkqf * npool) / 2
|
||||
IF (my_pool_id < rest) THEN
|
||||
nkqf = nkqf + 2
|
||||
lower_bnd = my_pool_id * nkqf + 1
|
||||
upper_bnd = lower_bnd + nkqf - 1
|
||||
ELSE
|
||||
lower_bnd = rest * (nkqf + 2) + (my_pool_id - rest) * nkqf + 1
|
||||
upper_bnd = lower_bnd + nkqf - 1
|
||||
ENDIF
|
||||
!
|
||||
nkf = nkqf / 2
|
||||
CALL mp_bcast(xkf_, ionode_id, inter_pool_comm)
|
||||
CALL mp_bcast(wkf_, ionode_id, inter_pool_comm)
|
||||
!
|
||||
#else
|
||||
!
|
||||
nkqf = nkqtotf
|
||||
nkf = nkqf / 2
|
||||
lower_bnd = 1
|
||||
upper_bnd = nkqf
|
||||
!
|
||||
#endif
|
||||
!
|
||||
! Assign the weights and vectors to the correct bounds
|
||||
!
|
||||
ALLOCATE(xkf(3, nkqf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error allocating xkf', 1)
|
||||
ALLOCATE(wkf(nkqf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error allocating wkf', 1)
|
||||
xkf(:,:) = xkf_(:, lower_bnd:upper_bnd)
|
||||
!
|
||||
IF (noncolin) THEN
|
||||
wkf(:) = wkf_(lower_bnd:upper_bnd) / 2.d0
|
||||
ELSE
|
||||
wkf(:) = wkf_(lower_bnd:upper_bnd)
|
||||
ENDIF
|
||||
!
|
||||
WRITE(stdout, '(5x,"Size of k point mesh for interpolation: ",i10)' ) nkqtotf
|
||||
WRITE(stdout, '(5x,"Max number of k points per pool:",7x,i10)' ) nkqf
|
||||
!
|
||||
DEALLOCATE(xkf_, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error deallocating xkf_', 1)
|
||||
DEALLOCATE(wkf_, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('loadkmesh_fst', 'Error deallocating wkf_', 1)
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE loadkmesh_fst
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE kpoint_grid_epw(n_sym, time_reversal, s, t_rev, nkc1, nkc2, nkc3, n_irr)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! Automatic generation of a uniform grid of k-points with symmetry.
|
||||
!! Routine copied from PW/src/kpoint_grid.f90.
|
||||
!! We had to duplicate because the bztoibz array was deallocated and is needed in
|
||||
!! EPW
|
||||
!! We had to duplicate because the bztoibz array was deallocated and is needed in EPW
|
||||
!! This routine is sequential. For parallelized routine, see kpoint_grid_fst
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE division, ONLY : fkbounds
|
||||
|
@ -829,6 +979,525 @@
|
|||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE kpoint_grid_fst(nrot, s, t_rev, nrr_k, dims, &
|
||||
irvec_k, ndegen_k, nkf1, nkf2, nkf3, n_irr, nelec)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! Automatic generation of a uniform fine grid of k-points in the IBZ
|
||||
!! parallelized over k-points.
|
||||
!! Only points within the fsthick are kept.
|
||||
!! bztoibz and s_bztoibz are allocated and computed here with dimension
|
||||
!! nkpt_bzfst = number of point in the full BZ within the fsthick.
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE division, ONLY : fkbounds
|
||||
USE mp, ONLY : mp_barrier, mp_sum, mp_bcast
|
||||
USE mp_world, ONLY : mpime, world_comm
|
||||
USE mp_global, ONLY : my_pool_id, npool
|
||||
USE io_global, ONLY : stdout
|
||||
USE epwcom, ONLY : fsthick, fermi_energy, nbndsub, scissor
|
||||
USE constants_epw, ONLY : zero, twopi, ci, eps6, eps2, ryd2ev, czero
|
||||
USE elph2, ONLY : chw, wkf_fst, xkf_fst, s_bztoibz, bztoibz, map_fst, &
|
||||
nkpt_bzfst, nbndskip
|
||||
USE wan2bloch, ONLY : hamwan2bloch
|
||||
USE wigner, ONLY : wigner_seitz_wrap, backtoWS
|
||||
USE noncollin_module, ONLY : noncolin
|
||||
USE constants_epw, ONLY : one, two, eps8
|
||||
# if defined(__MPI)
|
||||
USE parallel_include, ONLY : MPI_INTEGER, MPI_SUM, MPI_IN_PLACE, MPI_INTEGER2
|
||||
# endif
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: nrot
|
||||
!! Number of Bravais symmetry
|
||||
INTEGER, INTENT(in) :: nkf1, nkf2, nkf3
|
||||
!! Fine k-point grid
|
||||
INTEGER, INTENT(in) :: t_rev(48)
|
||||
!! Time-reversal symmetry operation
|
||||
INTEGER, INTENT(in) :: s(3,3,48)
|
||||
!! Symmetry matrix of the crystal
|
||||
INTEGER, INTENT(in) :: nrr_k
|
||||
!! Number of WS points for electrons
|
||||
INTEGER, INTENT(in) :: dims
|
||||
!! Dims is either nbndsub if use_ws or 1 if not
|
||||
INTEGER, INTENT(in) :: irvec_k(3, nrr_k)
|
||||
!! Coordinates of real space vector for electrons
|
||||
INTEGER, INTENT(in) :: ndegen_k(nrr_k, dims, dims)
|
||||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
REAL(KIND = DP), INTENT(in) :: nelec
|
||||
!! Number of electrons
|
||||
INTEGER, INTENT(out) :: n_irr
|
||||
!! Number of IBZ k-points
|
||||
!
|
||||
! Local variables
|
||||
LOGICAL :: in_the_list
|
||||
!! .true. if point is in the list
|
||||
LOGICAL :: found
|
||||
!! Is the reconstructed k-point part of the original set.
|
||||
LOGICAL :: low_core
|
||||
!! Are you the lowest rank core with that symmetric k-point
|
||||
INTEGER :: nkft
|
||||
!! Total number of fine k-points
|
||||
INTEGER :: lower_bnd
|
||||
!! Lower bound for the k-depend index among the mpi pools
|
||||
INTEGER :: upper_bnd
|
||||
!! Upper bound for the k-depend index among the mpi pools
|
||||
INTEGER :: i, j, k
|
||||
!! Index of x,y,z k-points
|
||||
INTEGER :: nkpt
|
||||
!! Number of k-points per core
|
||||
INTEGER :: nkpt_tmp
|
||||
!! Number of k-points up to that core
|
||||
INTEGER :: nk_inside(npool)
|
||||
!! Number of k-points inside the fsthick window
|
||||
INTEGER :: ik, jk
|
||||
!! K-point index
|
||||
INTEGER :: n
|
||||
!! Id of the point
|
||||
INTEGER(KIND = 2) :: ns
|
||||
!! Counter on symmetries
|
||||
INTEGER :: iw
|
||||
!! Counter on WS dimension
|
||||
INTEGER :: iw2
|
||||
!! Counter on WS dimension
|
||||
INTEGER :: ir
|
||||
!! Counter on real-space variable
|
||||
INTEGER :: icbm
|
||||
!! Index of the CBM
|
||||
INTEGER :: pos
|
||||
!! Position of the minimum in a vector
|
||||
INTEGER :: ierr
|
||||
!! Error status
|
||||
INTEGER :: nb
|
||||
!! Rotation index
|
||||
INTEGER :: n_check
|
||||
!! Number of full BZ points within the strickt fst
|
||||
INTEGER int2type
|
||||
!! 2 byte integer type MPI
|
||||
INTEGER :: ks(nrot)
|
||||
!! Position of k-point equal by symmetry on the full BZ
|
||||
INTEGER :: ks_in(nrot)
|
||||
!! Position of k-point equal by symmetry within the fsthick.
|
||||
INTEGER :: val(nrot)
|
||||
!! Minimal value of the equivalent k-point
|
||||
INTEGER, ALLOCATABLE :: equiv(:)
|
||||
!! k-point equivalence to find IBZ per core
|
||||
INTEGER, ALLOCATABLE :: equiv_loc(:)
|
||||
!! Local equiv on the full grid of k-points
|
||||
INTEGER, ALLOCATABLE :: map_tmp(:)
|
||||
!! Temporary map per core inside fsthick
|
||||
INTEGER, ALLOCATABLE :: map_para(:)
|
||||
!! map of the full BZ homogeneous grid
|
||||
INTEGER, ALLOCATABLE :: wkf_in(:)
|
||||
!! Global k-point weights of the full BZ inside [fsthick * 1.1] per core
|
||||
INTEGER(KIND = 2), ALLOCATABLE :: s_save(:)
|
||||
!! Save the rotation index
|
||||
REAL(KIND = DP) :: etf(nbndsub)
|
||||
!! Eigen-energies for a given k-point
|
||||
REAL(KIND = DP) :: xkr(3)
|
||||
!! Rotated current k-point
|
||||
REAL(KIND = DP) :: xx, yy, zz
|
||||
!! Current k-points
|
||||
REAL(KIND = DP) :: rdotk(nrr_k)
|
||||
!! $r\cdot k$
|
||||
REAL(KIND = DP) :: irvec_r(3, nrr_k)
|
||||
!! Wigner-Size supercell vectors, store in real instead of integer
|
||||
REAL(KIND = DP) :: nelec_aux
|
||||
!! Temporary nelec, used if etf_mem == 3
|
||||
REAL(KIND = DP) :: xkf_rot(3)
|
||||
!! Current k-point coordinate rotated with symmetry
|
||||
REAL(KIND = DP) :: sa(3, 3)
|
||||
!! Symmetry matrix in crystal
|
||||
REAL(KIND = DP), ALLOCATABLE :: xkf_para(:,:)
|
||||
!! part of the full BZ homogeneous grid
|
||||
REAL(KIND = DP), ALLOCATABLE :: xkf_tmp(:,:)
|
||||
!! Temporary k-point per core inside fsthick
|
||||
REAL(KIND = DP), ALLOCATABLE :: xkf_in(:,:)
|
||||
!! Global k-point coordinate of the full BZ inside [fsthick * 1.1]
|
||||
COMPLEX(KIND = DP) :: cufkk(nbndsub, nbndsub)
|
||||
!! Rotation matrix, fine mesh, points k
|
||||
COMPLEX(KIND = DP) :: cfac(nrr_k, dims, dims)
|
||||
!! Used to store $e^{2\pi r \cdot k}$ exponential
|
||||
!
|
||||
! Total number of k-points in the full BZ
|
||||
nkft = nkf1 * nkf2 * nkf3
|
||||
nk_inside(:) = 0
|
||||
cfac(:, :, :) = czero
|
||||
!
|
||||
! Split the total points among cores
|
||||
CALL fkbounds(nkft, lower_bnd, upper_bnd)
|
||||
nkpt = upper_bnd - lower_bnd + 1
|
||||
!
|
||||
! 1) First we find all the points within the fsthick in the full BZ
|
||||
ALLOCATE(xkf_para(3, nkpt), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating xkf_para', 1)
|
||||
ALLOCATE(map_para(nkpt), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating map_para', 1)
|
||||
ALLOCATE(xkf_tmp(3, nkpt), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating xkf_tmp', 1)
|
||||
ALLOCATE(map_tmp(nkpt), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating map_tmp', 1)
|
||||
xkf_para(:,:) = zero
|
||||
xkf_tmp(:,:) = zero
|
||||
map_para(:) = 0
|
||||
map_tmp(:) = 0
|
||||
!
|
||||
! Create a parallelized k-point grids containing all the points in the full BZ.
|
||||
DO i = 1, nkf1
|
||||
DO j = 1, nkf2
|
||||
DO k = 1, nkf3
|
||||
! this is nothing but consecutive ordering
|
||||
n = (k - 1) + (j - 1) * nkf3 + (i - 1) * nkf2 * nkf3 + 1
|
||||
IF ((n >= lower_bnd) .AND. (n <= upper_bnd)) THEN
|
||||
! xkg are the components of the complete grid in crystal axis
|
||||
xkf_para(1, n - lower_bnd + 1) = DBLE(i - 1) / nkf1
|
||||
xkf_para(2, n - lower_bnd + 1) = DBLE(j - 1) / nkf2
|
||||
xkf_para(3, n - lower_bnd + 1) = DBLE(k - 1) / nkf3
|
||||
map_para(n - lower_bnd + 1) = n
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! Compute Hamiltonian : Wannier -> Bloch
|
||||
! We select the k-points for which the eigenenergy is within the fsthick
|
||||
IF (nbndskip > 0) THEN
|
||||
IF (noncolin) THEN
|
||||
nelec_aux = nelec - one * nbndskip
|
||||
ELSE
|
||||
nelec_aux = nelec - two * nbndskip
|
||||
ENDIF
|
||||
ELSE
|
||||
nelec_aux = nelec
|
||||
ENDIF
|
||||
!
|
||||
icbm = 1
|
||||
IF (ABS(scissor) > eps6) THEN
|
||||
IF (noncolin) THEN
|
||||
icbm = FLOOR(nelec_aux / 1.0d0) + 1
|
||||
ELSE
|
||||
icbm = FLOOR(nelec_aux / 2.0d0) + 1
|
||||
ENDIF
|
||||
ENDIF
|
||||
! This is simply because dgemv take only real number (not integer)
|
||||
irvec_r = REAL(irvec_k, KIND = DP)
|
||||
DO ik = 1, nkpt
|
||||
CALL DGEMV('t', 3, nrr_k, twopi, irvec_r, 3, xkf_para(:, ik), 1, 0.0_DP, rdotk, 1 )
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO ir = 1, nrr_k
|
||||
IF (ndegen_k(ir, iw2, iw) > 0) cfac(ir, iw2, iw) = EXP(ci * rdotk(ir)) / ndegen_k(ir, iw2, iw)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
CALL hamwan2bloch(nbndsub, nrr_k, cufkk, etf(:), chw, cfac, dims)
|
||||
!
|
||||
! Apply scissor shift
|
||||
etf(icbm:nbndsub) = etf(icbm:nbndsub) + scissor
|
||||
!
|
||||
! We take a slightly bigger fsthick as some point do not fully respect crystal symmetry.
|
||||
IF (MINVAL(ABS(etf(:) - fermi_energy)) < fsthick * 1.2) THEN
|
||||
nk_inside(my_pool_id + 1) = nk_inside(my_pool_id + 1) + 1
|
||||
xkf_tmp(:, nk_inside(my_pool_id + 1)) = xkf_para(:, ik)
|
||||
map_tmp(nk_inside(my_pool_id + 1)) = map_para(ik)
|
||||
ENDIF
|
||||
ENDDO ! ik
|
||||
!
|
||||
CALL mp_sum(nk_inside, world_comm)
|
||||
!
|
||||
! Total number of points inside the fsthick
|
||||
nkpt_bzfst = SUM(nk_inside)
|
||||
!
|
||||
WRITE(stdout, '(5x,a,i9)') 'Number of k-points inside fsthick * 1.2 in the full BZ: ', nkpt_bzfst
|
||||
!
|
||||
! Total k-point array with all the kpoints inside fsthick
|
||||
ALLOCATE(xkf_in(3, nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating xkf_in', 1)
|
||||
ALLOCATE(wkf_in(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating wkf_in', 1)
|
||||
ALLOCATE(map_fst(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating map_fst', 1)
|
||||
ALLOCATE(s_save(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating s_save', 1)
|
||||
xkf_in(:, :) = zero
|
||||
wkf_in(:) = 0
|
||||
map_fst(:) = 0
|
||||
s_save(:) = 0
|
||||
!
|
||||
! Number of points up to the current core
|
||||
IF (my_pool_id == 0) THEN
|
||||
nkpt_tmp = 0
|
||||
ELSE
|
||||
nkpt_tmp = SUM(nk_inside(1:my_pool_id))
|
||||
ENDIF
|
||||
!
|
||||
! We create a global list containg all the k-points inside the fsthick (xfk_in)
|
||||
! as well as a map between the full BZ k-grid and the reduced inside fsthick.
|
||||
! Every cores fill it in parallel
|
||||
DO ik = 1, nk_inside(my_pool_id + 1)
|
||||
xkf_in(:, nkpt_tmp + ik) = xkf_tmp(:, ik)
|
||||
map_fst(nkpt_tmp + ik) = map_tmp(ik)
|
||||
ENDDO ! ik
|
||||
!
|
||||
! Now merge everything accross cores
|
||||
CALL mp_sum(xkf_in, world_comm)
|
||||
CALL mp_sum(map_fst, world_comm)
|
||||
!
|
||||
DEALLOCATE(xkf_para, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating xkf_para', 1)
|
||||
DEALLOCATE(xkf_tmp, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating xkf_tmp', 1)
|
||||
DEALLOCATE(map_para, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating map_para', 1)
|
||||
DEALLOCATE(map_tmp, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating map_tmp', 1)
|
||||
!
|
||||
! 2) We reduce those points to the IBZ using symmetry
|
||||
!
|
||||
! equiv(ik) =ik : k-point ik is not equivalent to any previous k-point
|
||||
! equiv(ik)!=ik : k-point ik is equivalent to k-point equiv(ik)
|
||||
ALLOCATE(equiv(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating equiv', 1)
|
||||
ALLOCATE(equiv_loc(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating equiv_loc', 1)
|
||||
equiv(:) = 0
|
||||
equiv_loc(:) = 0
|
||||
!
|
||||
! Parallelize the the k-point inside the fsthick
|
||||
CALL fkbounds(nkpt_bzfst, lower_bnd, upper_bnd)
|
||||
!
|
||||
! Number of k-points on that core
|
||||
nkpt = upper_bnd - lower_bnd + 1
|
||||
!
|
||||
DO ik = 1, nkpt
|
||||
equiv(ik + lower_bnd - 1) = ik + lower_bnd - 1
|
||||
ENDDO
|
||||
DO ik = 1, nkpt_bzfst
|
||||
equiv_loc(ik) = ik
|
||||
ENDDO
|
||||
!
|
||||
DO ik = 1, nkpt
|
||||
! Check if this k-point has already been found equivalent to another
|
||||
IF (equiv(ik + lower_bnd - 1) == ik + lower_bnd - 1) THEN
|
||||
wkf_in(ik + lower_bnd - 1) = 1
|
||||
! Position of the k-points equivalent by symmetry to the current kpoint
|
||||
ks(:) = 0
|
||||
ks_in(:) = 0
|
||||
DO ns = 1, nrot
|
||||
DO i = 1, 3
|
||||
xkr(i) = s(i, 1, ns) * xkf_in(1, ik + lower_bnd - 1) &
|
||||
+ s(i, 2, ns) * xkf_in(2, ik + lower_bnd - 1) &
|
||||
+ s(i, 3, ns) * xkf_in(3, ik + lower_bnd - 1)
|
||||
xkr(i) = xkr(i) - NINT(xkr(i))
|
||||
ENDDO
|
||||
IF(t_rev(ns) == 1) xkr = -xkr
|
||||
xx = xkr(1) * nkf1
|
||||
yy = xkr(2) * nkf2
|
||||
zz = xkr(3) * nkf3
|
||||
in_the_list = ABS(xx - NINT(xx)) <= eps6 .AND. &
|
||||
ABS(yy - NINT(yy)) <= eps6 .AND. &
|
||||
ABS(zz - NINT(zz)) <= eps6
|
||||
IF (in_the_list) THEN
|
||||
i = MOD(NINT(xkr(1) * nkf1 + 2 * nkf1), nkf1) + 1
|
||||
j = MOD(NINT(xkr(2) * nkf2 + 2 * nkf2), nkf2) + 1
|
||||
k = MOD(NINT(xkr(3) * nkf3 + 2 * nkf3), nkf3) + 1
|
||||
n = (k - 1) + (j - 1) * nkf3 + (i - 1) * nkf2 * nkf3 + 1
|
||||
!
|
||||
pos = MINLOC(ABS(map_fst - n), 1)
|
||||
!
|
||||
ks(ns) = n ! Position in the full BZ
|
||||
ks_in(ns) = pos ! Position in the nkpt_bzfst subset.
|
||||
val(ns) = ABS(map_fst(pos) - n) ! If val is not 0, this means the point is not within fsthick
|
||||
!
|
||||
ENDIF ! in_the_list
|
||||
ENDDO ! nrot
|
||||
!
|
||||
low_core = .TRUE.
|
||||
DO ns = 1, nrot
|
||||
! Not the lowest core with that set of equiv. k-points ==> nullify that current k-point position
|
||||
! Note: There is a specific case where we need to keep the point.
|
||||
! If the current k-point has symmetric friend that are outside
|
||||
! the scope of the current core but also outside the fsthick. We
|
||||
! need to have found the point with val(ns) == 0
|
||||
IF (ks_in(ns) < lower_bnd .AND. val(ns) == 0) THEN
|
||||
equiv(ik + lower_bnd - 1) = 0
|
||||
wkf_in(ik + lower_bnd - 1) = 0
|
||||
low_core = .FALSE.
|
||||
EXIT ! exit the loop
|
||||
ENDIF
|
||||
ENDDO
|
||||
!
|
||||
! If you are the lowest core
|
||||
IF (low_core) THEN
|
||||
DO ns = 1, nrot
|
||||
IF (ks(ns) > map_fst(ik + lower_bnd - 1) .AND. equiv_loc(ks_in(ns)) == ks_in(ns) .AND. val(ns) == 0) THEN
|
||||
equiv_loc(ks_in(ns)) = ik + lower_bnd - 1
|
||||
equiv(ks_in(ns)) = ik + lower_bnd - 1
|
||||
s_save(ks_in(ns)) = ns
|
||||
wkf_in(ik + lower_bnd - 1) = wkf_in(ik + lower_bnd - 1) + 1
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
ENDIF ! equiv
|
||||
!
|
||||
ENDDO ! ik
|
||||
!
|
||||
CALL mp_sum(equiv, world_comm)
|
||||
CALL mp_sum(wkf_in, world_comm)
|
||||
# if defined(__MPI)
|
||||
!CALL MPI_TYPE_CREATE_F90_INTEGER(SIK2, int2type, ierr)
|
||||
!CALL MPI_ALLreduce(MPI_IN_PLACE, s_save, nkpt_bzfst, int2type, MPI_SUM, world_comm, ierr)
|
||||
CALL MPI_ALLreduce(MPI_IN_PLACE, s_save, nkpt_bzfst, MPI_INTEGER2, MPI_SUM, world_comm, ierr)
|
||||
#endif
|
||||
!
|
||||
DEALLOCATE(equiv_loc, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating equiv_loc', 1)
|
||||
!
|
||||
! Check that the sum of the weights correctly give the total number of point inside fsthick in the full BZ
|
||||
IF (nkpt_bzfst /= SUM(wkf_in)) THEN
|
||||
WRITE(stdout,'(5x,a,i9)') 'Reconstituded number of points inside the fsthick in the full BZ from weights ', SUM(wkf_in)
|
||||
CALL errore('kpoint_grid_fst', 'The weights do not sum correctly to the number of points.', 1)
|
||||
ENDIF
|
||||
!
|
||||
ALLOCATE(bztoibz(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating bztoibz', 1)
|
||||
ALLOCATE(s_bztoibz(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating s_bztoibz', 1)
|
||||
ALLOCATE(map_tmp(nkpt_bzfst), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating map_tmp', 1)
|
||||
bztoibz(:) = 0
|
||||
s_bztoibz(:) = 0
|
||||
map_tmp(:) = 0
|
||||
!
|
||||
DO ik = 1, nkpt_bzfst
|
||||
bztoibz(ik) = equiv(ik)
|
||||
ENDDO
|
||||
!
|
||||
! Number of IBZ point within the fsthick * 1.2
|
||||
n_irr = 0
|
||||
DO ik = 1, nkpt_bzfst
|
||||
IF (equiv(ik) == ik) THEN
|
||||
n_irr = n_irr + 1
|
||||
bztoibz(ik) = n_irr
|
||||
DO jk = ik, nkpt_bzfst
|
||||
IF (equiv(jk) == ik) THEN
|
||||
bztoibz(jk) = n_irr
|
||||
ENDIF
|
||||
ENDDO ! jk
|
||||
map_tmp(n_irr) = ik
|
||||
ENDIF ! equiv(ik) == ik
|
||||
ENDDO
|
||||
!
|
||||
! Now do the symmetry mapping.
|
||||
DO ik = 1, nkpt_bzfst
|
||||
! If its an irreducible point
|
||||
IF (equiv(ik) == ik) THEN
|
||||
! Then you have the identity matrix
|
||||
s_bztoibz(ik) = 1
|
||||
ELSE
|
||||
s_bztoibz(ik) = s_save(ik)
|
||||
ENDIF
|
||||
ENDDO
|
||||
!
|
||||
! 3) Find irreducible k points and weights
|
||||
!
|
||||
ALLOCATE(xkf_fst(3, n_irr), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating xkf_fst', 1)
|
||||
ALLOCATE(wkf_fst(n_irr), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating wkf_fst', 1)
|
||||
xkf_fst(:, :) = zero
|
||||
wkf_fst(:) = zero
|
||||
!
|
||||
DO ik = 1, n_irr
|
||||
xkf_fst(:, ik) = xkf_in(:, map_tmp(ik))
|
||||
wkf_fst(ik) = REAL(wkf_in(map_tmp(ik)), KIND = DP)
|
||||
ENDDO
|
||||
wkf_fst(:) = wkf_fst(:) / (nkf1 * nkf2 * nkf3)
|
||||
!
|
||||
DEALLOCATE(wkf_in, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating wkf_in', 1)
|
||||
DEALLOCATE(equiv, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating equiv', 1)
|
||||
DEALLOCATE(map_tmp, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating map_tmp', 1)
|
||||
!
|
||||
!DBSP
|
||||
!DO ik = 1, n_irr
|
||||
! print*,'ik xkf_fst wkf ',ik, xkf_fst(:, ik), wkf_fst(ik), map_fst(ik)
|
||||
!ENDDO
|
||||
!
|
||||
! 4) Check that fsthick * 1.2 was enough to take all the symmetry equivalent points
|
||||
!
|
||||
! First we take only the IBZ points that are within the strick fsthick for cheking
|
||||
n_check = 0
|
||||
ALLOCATE(xkf_tmp(3, n_irr), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error allocating xkf_tmp', 1)
|
||||
xkf_tmp(:, :) = zero
|
||||
!
|
||||
DO ik = 1, n_irr
|
||||
CALL DGEMV('t', 3, nrr_k, twopi, irvec_r, 3, xkf_fst(:, ik), 1, 0.0_DP, rdotk, 1 )
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO ir = 1, nrr_k
|
||||
IF (ndegen_k(ir, iw2, iw) > 0) cfac(ir, iw2, iw) = EXP(ci * rdotk(ir)) / ndegen_k(ir, iw2, iw)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
CALL hamwan2bloch(nbndsub, nrr_k, cufkk, etf(:), chw, cfac, dims)
|
||||
!
|
||||
! Apply scissor shift
|
||||
etf(icbm:nbndsub) = etf(icbm:nbndsub) + scissor
|
||||
!
|
||||
IF (MINVAL(ABS(etf(:) - fermi_energy)) < fsthick) THEN
|
||||
n_check = n_check + 1
|
||||
xkf_tmp(:, n_check) = xkf_fst(:, ik)
|
||||
ENDIF
|
||||
ENDDO
|
||||
!
|
||||
! Split the total n_check points strictly inside fsthick among cores
|
||||
CALL fkbounds(n_check, lower_bnd, upper_bnd)
|
||||
nkpt = upper_bnd - lower_bnd + 1
|
||||
!
|
||||
! Use symmetries to reconstruct the BZ from IBZ and check that all points were in xkf_in
|
||||
DO ik = 1, nkpt
|
||||
DO nb = 1, nrot
|
||||
! Note that s is in crystal
|
||||
sa(:, :) = DBLE(s(:, :, nb))
|
||||
xkf_rot = MATMUL(sa, xkf_tmp(:, ik + lower_bnd - 1))
|
||||
!
|
||||
DO i = 1, 3
|
||||
IF (xkf_rot(1) < - eps8) xkf_rot(1) = xkf_rot(1) + 1.0d0
|
||||
IF (xkf_rot(2) < - eps8) xkf_rot(2) = xkf_rot(2) + 1.0d0
|
||||
IF (xkf_rot(3) < - eps8) xkf_rot(3) = xkf_rot(3) + 1.0d0
|
||||
ENDDO
|
||||
!
|
||||
! Check that the point xkf_rot is part of the orginal xkf_in
|
||||
found = .FALSE.
|
||||
DO jk = 1, nkpt_bzfst
|
||||
IF ((ABS(xkf_rot(1) - xkf_in(1, jk)) < eps8) .AND. &
|
||||
(ABS(xkf_rot(2) - xkf_in(2, jk)) < eps8) .AND. &
|
||||
(ABS(xkf_rot(3) - xkf_in(3, jk)) < eps8)) THEN
|
||||
found = .TRUE.
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
!
|
||||
IF (found .eqv. .FALSE.) CALL errore('kpoint_grid_fst', 'K-point not found. Increase fsthick factor 1.2', 1)
|
||||
ENDDO ! nb
|
||||
ENDDO ! ik
|
||||
!
|
||||
DEALLOCATE(xkf_in, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating xkf_in', 1)
|
||||
DEALLOCATE(xkf_tmp, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('kpoint_grid_fst', 'Error deallocating xkf_in', 1)
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE kpoint_grid_fst
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE loadqmesh_para()
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
|
@ -1222,6 +1891,86 @@
|
|||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE xqf_otf(iq, xxq)
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!! This routine computes the q-point coordinate on the fly.
|
||||
!! Indeed for very large grids, having all the points in memory is a bottlneck.
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
USE epwcom, ONLY : nqf1, nqf2, nqf3
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: iq
|
||||
!! qvectors index
|
||||
REAL(KIND = DP), INTENT(inout) :: xxq(3)
|
||||
!! Output qvector, in crystal coordinates
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: iq1
|
||||
!! x-crystal coordinate
|
||||
INTEGER :: iq2
|
||||
!! y-crystal coordinate
|
||||
INTEGER :: iq3
|
||||
!! z-crystal coordinate
|
||||
!
|
||||
! Integer division from iq = iq3 + iq2 * nqf3 + iq1 * nkqf2 * nkqf3 + 1
|
||||
iq1 = (iq - 1) / (nqf2 * nqf3)
|
||||
iq2 = ((iq - 1) / nqf3) - iq1 * nqf2
|
||||
iq3 = (iq - 1) - iq1 * nqf2 * nqf3 - iq2 * nqf3
|
||||
!
|
||||
xxq(1) = REAL(iq1, KIND = DP) / REAL(nqf1, KIND = DP)
|
||||
xxq(2) = REAL(iq2, KIND = DP) / REAL(nqf2, KIND = DP)
|
||||
xxq(3) = REAL(iq3, KIND = DP) / REAL(nqf3, KIND = DP)
|
||||
!
|
||||
RETURN
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE xqf_otf
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE xkf_otf(ik, xxk)
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!! This routine computes the k-point coordinate on the fly.
|
||||
!! Indeed for very large grids, having all the points in memory is a bottlneck.
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
USE epwcom, ONLY : nkf1, nkf2, nkf3
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: ik
|
||||
!! qvectors index
|
||||
REAL(KIND = DP), INTENT(inout) :: xxk(3)
|
||||
!! Output qvector, in crystal coordinates
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: ik1
|
||||
!! x-crystal coordinate
|
||||
INTEGER :: ik2
|
||||
!! y-crystal coordinate
|
||||
INTEGER :: ik3
|
||||
!! z-crystal coordinate
|
||||
!
|
||||
! Integer division from ik = ik3 + ik2 * nkf3 + ik1 * nkkf2 * nkkf3 + 1
|
||||
ik1 = (ik - 1) / (nkf2 * nkf3)
|
||||
ik2 = ((ik - 1) / nkf3) - ik1 * nkf2
|
||||
ik3 = (ik - 1) - ik1 * nkf2 * nkf3 - ik2 * nkf3
|
||||
!
|
||||
xxk(1) = REAL(ik1, KIND = DP) / REAL(nkf1, KIND = DP)
|
||||
xxk(2) = REAL(ik2, KIND = DP) / REAL(nkf2, KIND = DP)
|
||||
xxk(3) = REAL(ik3, KIND = DP) / REAL(nkf3, KIND = DP)
|
||||
!
|
||||
RETURN
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE xkf_otf
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE qwindow(exst, nrr_k, dims, totq, selecq, irvec_r, ndegen_k, &
|
||||
cufkk, cufkq, homogeneous)
|
||||
!-----------------------------------------------------------------------
|
||||
|
@ -1233,7 +1982,7 @@
|
|||
!-----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
USE elph2, ONLY : nqf, xqf, xkf, chw, nkf, nqtotf, &
|
||||
map_rebal, nktotf, bztoibz
|
||||
map_rebal, nktotf, bztoibz, map_fst
|
||||
USE io_global, ONLY : ionode_id, stdout
|
||||
USE io_var, ONLY : iunselecq
|
||||
USE mp_global, ONLY : npool, world_comm, my_pool_id
|
||||
|
@ -1247,6 +1996,7 @@
|
|||
USE pwcom, ONLY : ef, nelec
|
||||
USE wan2bloch, ONLY : hamwan2bloch
|
||||
USE poolgathering, ONLY : poolgather
|
||||
USE low_lvl, ONLY : create_interval, bisection
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -1304,10 +2054,16 @@
|
|||
!! number of k-point selected on that cpu
|
||||
INTEGER :: kmap(nkf)
|
||||
!! k-point that are selected for that cpu
|
||||
INTEGER :: n_intval
|
||||
!! Number of intervals
|
||||
INTEGER, ALLOCATABLE :: bztoibz_tmp(:)
|
||||
!! Temporary mapping
|
||||
!! Temporary mapping when etf_mem < 3
|
||||
INTEGER, ALLOCATABLE :: selecq_tmp(:)
|
||||
!! Temporary list of selected q-points
|
||||
INTEGER, ALLOCATABLE :: val_intval(:)
|
||||
!! Value of the first element of each intervals
|
||||
INTEGER, ALLOCATABLE :: pos_intval(:)
|
||||
!! Position of the first element of each intervals
|
||||
REAL(KIND = DP) :: xxq(3)
|
||||
!! Current q-point
|
||||
REAL(KIND = DP) :: xkk(3)
|
||||
|
@ -1358,7 +2114,7 @@
|
|||
CALL errore('qwindow', 'Cannot read from selecq.fmt, the q-point grid or &
|
||||
& fsthick window are different from read one. Remove the selecq.fmt file and restart.', 1 )
|
||||
ENDIF
|
||||
!
|
||||
!
|
||||
IF (homogeneous) THEN
|
||||
! In case of k-point symmetry
|
||||
IF (mp_mesh_k .AND. etf_mem < 3) THEN
|
||||
|
@ -1409,7 +2165,7 @@
|
|||
!
|
||||
! In case of k-point symmetry
|
||||
IF (mp_mesh_k .AND. etf_mem < 3) THEN
|
||||
IF (iterative_bte .OR. ephwrite) THEN
|
||||
IF (iterative_bte .OR. ephwrite) THEN
|
||||
ALLOCATE(bztoibz_tmp(nkf1 * nkf2 * nkf3), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('qwindow', 'Error allocating bztoibz_tmp', 1)
|
||||
bztoibz_tmp(:) = 0
|
||||
|
@ -1438,9 +2194,31 @@
|
|||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
! Note 1: To find if a k+q point is within the fsthick we need to obtain the mapping
|
||||
! between the index of the point within the fsthick and the index of the point
|
||||
! within the full BZ. This is most efficiently done with bisection.
|
||||
! Note 2: When the number of points within the fshtick window is large, the bissection
|
||||
! is slow. One can speed this up by doing a pre-search since the map_fst is
|
||||
! composed of monotonically increasing numbers (ordered list).
|
||||
IF (etf_mem == 3) THEN
|
||||
! We divide map_fst into n_intval intervals
|
||||
n_intval = NINT(SQRT(REAL(SIZE(map_fst, 1), KIND = DP)))
|
||||
ALLOCATE(val_intval(n_intval), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('qwindow', 'Error allocating val_intval', 1)
|
||||
ALLOCATE(pos_intval(n_intval), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('qwindow', 'Error allocating pos_intval', 1)
|
||||
! We select 1 point every n_interval
|
||||
CALL create_interval(SIZE(map_fst, 1), map_fst, n_intval, val_intval, pos_intval)
|
||||
ENDIF
|
||||
!
|
||||
DO iq = 1, nqf
|
||||
! xqf has to be in crystal coordinate
|
||||
xxq = xqf(:, iq)
|
||||
IF (etf_mem == 3) THEN
|
||||
! The q-point coordinate is generate on the fly for each q-point
|
||||
CALL xqf_otf(iq, xxq)
|
||||
ELSE
|
||||
xxq = xqf(:, iq)
|
||||
ENDIF
|
||||
!
|
||||
found(:) = 0
|
||||
DO ik = 1, nkf
|
||||
|
@ -1452,6 +2230,15 @@
|
|||
CALL kpmq_map(xkk, xxq, 1, ind2)
|
||||
IF (ind1 == 0 .OR. ind2 == 0) CALL errore ('qwindow', 'ind1 or ind2 cannot be 0', 1)
|
||||
!
|
||||
IF (etf_mem == 3) THEN
|
||||
! Bisection method to find the index on the grid of the points inside fsthick
|
||||
! from the index on the full BZ grid.
|
||||
CALL bisection(SIZE(map_fst, 1), map_fst, ind1, n_intval, val_intval, pos_intval)
|
||||
IF (ind1 == 0) CYCLE
|
||||
CALL bisection(SIZE(map_fst, 1), map_fst, ind2, n_intval, val_intval, pos_intval)
|
||||
IF (ind2 == 0) CYCLE
|
||||
ENDIF
|
||||
!
|
||||
! Use k-point symmetry
|
||||
IF (mp_mesh_k) THEN
|
||||
IF ((MINVAL(ABS(etf_all(:, bztoibz(ind1)) - ef)) < fsthick) .AND. &
|
||||
|
@ -1529,7 +2316,12 @@
|
|||
! Now compute the q-loop doing WS separately for efficiency
|
||||
IF (use_ws) THEN
|
||||
DO iq = 1, nqf
|
||||
xxq = xqf(:, iq)
|
||||
IF (etf_mem == 3) THEN
|
||||
! The q-point coordinate is generate on the fly for each q-point
|
||||
CALL xqf_otf(iq, xxq)
|
||||
ELSE
|
||||
xxq = xqf(:, iq)
|
||||
ENDIF
|
||||
etf_tmp(:) = zero
|
||||
found(:) = 0
|
||||
DO ikl = 1, nkloc
|
||||
|
@ -1572,7 +2364,12 @@
|
|||
ENDDO ! iq
|
||||
ELSE ! use_ws
|
||||
DO iq = 1, nqf
|
||||
xxq = xqf(:, iq)
|
||||
IF (etf_mem == 3) THEN
|
||||
! The q-point coordinate is generate on the fly for each q-point
|
||||
CALL xqf_otf(iq, xxq)
|
||||
ELSE
|
||||
xxq = xqf(:, iq)
|
||||
ENDIF
|
||||
etf_tmp(:) = zero
|
||||
found(:) = 0
|
||||
DO ikl = 1, nkloc
|
||||
|
@ -1799,8 +2596,9 @@
|
|||
USE io_global, ONLY : stdout
|
||||
USE symm_base, ONLY : nrot
|
||||
USE elph2, ONLY : bztoibz, nktotf, ixkqf_tr, s_bztoibz_full, xqf, &
|
||||
s_bztoibz, map_rebal
|
||||
nkpt_bzfst, map_fst, s_bztoibz, map_rebal
|
||||
USE epwcom, ONLY : etf_mem, nkf1, nkf2, nkf3, epmatkqread
|
||||
USE low_lvl, ONLY : create_interval, bisection
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -1833,7 +2631,7 @@
|
|||
INTEGER :: nsym(nktotf)
|
||||
!! Temporary matrix used to count how many symmetry for that k-point
|
||||
INTEGER :: bztoibz_tmp(nkf1 * nkf2 * nkf3)
|
||||
!! Temporary mapping
|
||||
!! Temporary mapping
|
||||
INTEGER, ALLOCATABLE :: val_intval(:)
|
||||
!! Value of the first element of each intervals
|
||||
INTEGER, ALLOCATABLE :: pos_intval(:)
|
||||
|
@ -1843,17 +2641,48 @@
|
|||
!
|
||||
nsym(:) = 0
|
||||
!
|
||||
IF (etf_mem < 3) THEN
|
||||
! This call is required because for a epmatkqread restart because then
|
||||
! qwindow is not called and therefore the map_rebal is not applied
|
||||
IF (epmatkqread) THEN
|
||||
IF (etf_mem == 3) THEN
|
||||
!
|
||||
DO ikbz = 1, nkpt_bzfst
|
||||
ik = bztoibz(ikbz)
|
||||
nsym(ik) = nsym(ik) + 1
|
||||
bztoibz_mat(nsym(ik), ik) = ikbz
|
||||
ENDDO
|
||||
!
|
||||
! We divide map_fst into n_intval intervals
|
||||
n_intval = NINT(SQRT(REAL(SIZE(map_fst, 1), KIND = DP)))
|
||||
ALLOCATE(val_intval(n_intval), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('symm_mapping', 'Error allocating val_intval', 1)
|
||||
ALLOCATE(pos_intval(n_intval), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('symm_mapping', 'Error allocating pos_intval', 1)
|
||||
! We select 1 point every n_interval
|
||||
CALL create_interval(SIZE(map_fst, 1), map_fst, n_intval, val_intval, pos_intval)
|
||||
DO ind = 1, nind
|
||||
iq = sparse_q(ind)
|
||||
ik = sparse_k(ind)
|
||||
! The q-point coordinate is generate on the fly for each q-point
|
||||
CALL xqf_otf(iq, xxq)
|
||||
!
|
||||
CALL kpmq_map(xkf_all(:, ik), xxq, +1, nkq_abs)
|
||||
!
|
||||
CALL bisection(SIZE(map_fst, 1), map_fst, nkq_abs, n_intval, val_intval, pos_intval)
|
||||
! k + q cannot fall outside the points inside fsthick
|
||||
IF (nkq_abs == 0) CALL errore('ibte', 'Error in mapping the vectors', 1)
|
||||
!
|
||||
s_bztoibz_full(ind) = s_bztoibz(nkq_abs)
|
||||
ixkqf_tr(ind) = bztoibz(nkq_abs)
|
||||
ENDDO
|
||||
ELSE
|
||||
! This call is required because for a epmatkqread restart because then
|
||||
! qwindow is not called and therefore the map_rebal is not applied
|
||||
IF (epmatkqread) THEN
|
||||
bztoibz_tmp(:) = 0
|
||||
DO ikbz = 1, nkf1 * nkf2 * nkf3
|
||||
bztoibz_tmp(ikbz) = map_rebal(bztoibz(ikbz))
|
||||
ENDDO
|
||||
bztoibz(:) = bztoibz_tmp(:)
|
||||
ENDIF ! epmatkqread
|
||||
!
|
||||
!
|
||||
! Now create the mapping matrix
|
||||
DO ikbz = 1, nkf1 * nkf2 * nkf3
|
||||
ik = bztoibz(ikbz)
|
||||
|
|
|
@ -553,7 +553,7 @@
|
|||
! ionode = .TRUE.
|
||||
!ELSE
|
||||
! ionode = .FALSE.
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
!
|
||||
! pass the 'tempfile' as the '.xml' extension is added in the next routine
|
||||
CALL read_dyn_mat_param(tempfile, ntyp_, nat_)
|
||||
|
@ -573,7 +573,7 @@
|
|||
IF (ierr /= 0) CALL errore('read_ifc_epw', 'Error deallocating atm', 1)
|
||||
!
|
||||
ELSE ! is_xml_file
|
||||
IF (mpime == ionode_id) THEN
|
||||
IF (mpime == ionode_id) THEN
|
||||
!
|
||||
OPEN(UNIT = iunifc, FILE = tempfile, STATUS = 'old', IOSTAT = ios)
|
||||
IF (ios /= 0) call errore ('read_ifc_epw', 'error opening ifc.q2r', iunifc)
|
||||
|
@ -637,7 +637,7 @@
|
|||
CALL mp_bcast(tau_, ionode_id, world_comm)
|
||||
CALL mp_bcast(ibrav_, ionode_id, world_comm)
|
||||
ENDIF ! has_xml
|
||||
!
|
||||
!
|
||||
WRITE(stdout,'(5x,"IFC last ", 1f12.7)') ifc(nqc1, nqc2, nqc3, 3, 3, nat, nat)
|
||||
!
|
||||
CALL set_asr2(asr_typ, nqc1, nqc2, nqc3, ifc, zstar, nat, ibrav_, tau_)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
CONTAINS
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE print_ibte(iqq, iq, totq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
SUBROUTINE print_ibte(iqq, iq, totq, xxq, ef0, efcb, first_cycle, ind_tot, ind_totcb, &
|
||||
lrepmatw2_restart, lrepmatw5_restart, ctype)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
|
@ -26,25 +26,27 @@
|
|||
!! Only the elements larger than threshold are saved on file.
|
||||
!!
|
||||
USE kinds, ONLY : DP, i4b, i8b
|
||||
USE cell_base, ONLY : omega
|
||||
USE cell_base, ONLY : omega, at, alat
|
||||
USE io_global, ONLY : stdout
|
||||
USE modes, ONLY : nmodes
|
||||
USE epwcom, ONLY : fsthick, eps_acustic, degaussw, nstemp, vme, ncarrier, &
|
||||
assume_metal
|
||||
assume_metal, etf_mem, nqf1, nqf2, nqf3, system_2d
|
||||
USE pwcom, ONLY : ef
|
||||
USE elph2, ONLY : ibndmin, etf, nkf, dmef, vmef, wf, wqf, &
|
||||
epf17, inv_tau_all, inv_tau_allcb, adapt_smearing, &
|
||||
wkf, dmef, vmef, eta, gtemp, lower_bnd, dos, &
|
||||
nbndfst, nktotf
|
||||
USE constants_epw, ONLY : zero, one, two, ryd2mev, kelvin2eV, ryd2ev, eps4, eps8, &
|
||||
eps6, eps10, bohr2ang, ang2cm
|
||||
USE constants, ONLY : pi
|
||||
wkf, dmef, vmef, eta, gtemp, lower_bnd, dos, &
|
||||
nbndfst, nktotf, vkk_all, carrier_density, &
|
||||
inv_tau_all_mode, inv_tau_allcb_mode
|
||||
USE constants_epw, ONLY : zero, one, two, pi, ryd2mev, kelvin2eV, ryd2ev, eps4, eps8, &
|
||||
eps6, eps20, bohr2ang, ang2cm, hbarJ, eps160
|
||||
USE constants, ONLY : electronvolt_si
|
||||
USE io_files, ONLY : diropn
|
||||
USE control_flags, ONLY : iverbosity
|
||||
USE mp, ONLY : mp_barrier, mp_sum, mp_bcast
|
||||
USE mp_global, ONLY : world_comm, my_pool_id, npool
|
||||
USE io_global, ONLY : ionode_id
|
||||
USE io_var, ONLY : iunepmat, iunepmatcb, iufilibtev_sup, iunrestart, iuntau, &
|
||||
iunsparseq, iunsparseqcb, iuntaucb
|
||||
iunsparseq, iunsparseqcb, iuntaucb, iufilmu_q
|
||||
USE elph2, ONLY : lrepmatw2_merge, lrepmatw5_merge, threshold
|
||||
#if defined(__MPI)
|
||||
USE parallel_include, ONLY : MPI_OFFSET_KIND, MPI_SEEK_SET, MPI_INTEGER8, &
|
||||
|
@ -79,6 +81,8 @@
|
|||
#endif
|
||||
INTEGER, INTENT(in) :: ctype
|
||||
!! Calculation type: -1 = hole, +1 = electron and 0 = both.
|
||||
REAL(KIND = DP), INTENT(in) :: xxq(3)
|
||||
!! Current q-point in crystal coordinate.
|
||||
REAL(KIND = DP), INTENT(in) :: ef0(nstemp)
|
||||
!! Fermi level for the temperature itemp
|
||||
REAL(KIND = DP), INTENT(in) :: efcb(nstemp)
|
||||
|
@ -111,6 +115,8 @@
|
|||
!! Error
|
||||
INTEGER :: ipool
|
||||
!! Pool index
|
||||
INTEGER :: i,j
|
||||
!! Cartesian index
|
||||
INTEGER :: ind(npool)
|
||||
!! Nb of Matrix elements that are non-zero
|
||||
INTEGER :: indcb(npool)
|
||||
|
@ -172,8 +178,6 @@
|
|||
!! Temporary array to store the scattering rates
|
||||
REAL(KIND = DP) :: wkf_all(nktotf)
|
||||
!! Weights from all the cores
|
||||
REAL(KIND = DP) :: vkk_all(3, nbndfst, nktotf)
|
||||
!! Velocities from all the cores
|
||||
REAL(KIND = DP) :: inv_eta(nmodes, nbndfst, nktotf)
|
||||
!! Inverse of the eta for speed purposes
|
||||
REAL(KIND = DP) :: etf_all(nbndfst, nktotf)
|
||||
|
@ -184,12 +188,18 @@
|
|||
!! Temporary electronic energy
|
||||
REAL(KIND = DP) :: w_2
|
||||
!! Temporary electronic energy
|
||||
REAL(KIND = DP) :: carrier_density
|
||||
!! Carrier concentration
|
||||
REAL(KIND = DP) :: fnk
|
||||
!! Fermi-Dirac
|
||||
REAL(KIND = DP) :: tmpq(nmodes)
|
||||
!! Temporary file for mode resolved scattering rates
|
||||
REAL(KIND = DP) :: mobilityq(3, 3, nmodes, nstemp)
|
||||
!! Mode-resolved mobility
|
||||
REAL(KIND = DP) :: inv_cell
|
||||
!! cell volume
|
||||
REAL(KIND = DP) :: mob(3, 3, nmodes)
|
||||
!! Temporary inverse mobility
|
||||
REAL(KIND = DP) :: wqf_loc
|
||||
!! Local q-point weight
|
||||
REAL(KIND = DP) :: inv_tau_all_MPI(nbndfst, nktotf, nstemp)
|
||||
!! Auxiliary variables
|
||||
REAL(KIND = DP) :: inv_tau_allcb_MPI(nbndfst, nktotf, nstemp)
|
||||
|
@ -202,6 +212,15 @@
|
|||
!! The derivative of wgauss: an approximation to the delta function
|
||||
!
|
||||
inv_cell = 1.0d0 / omega
|
||||
! for 2d system need to divide by area (vacuum in z-direction)
|
||||
IF (system_2d) inv_cell = inv_cell * at(3, 3) * alat
|
||||
!
|
||||
! Weight of the q-points
|
||||
IF (etf_mem == 3) THEN
|
||||
wqf_loc = 1.0d0 / REAL(nqf1 * nqf2 * nqf3, KIND = DP)
|
||||
ELSE
|
||||
wqf_loc = wqf(iq)
|
||||
ENDIF
|
||||
!
|
||||
IF (iqq == 1) THEN
|
||||
!
|
||||
|
@ -223,7 +242,48 @@
|
|||
WRITE(stdout,'(5x,a,1E20.12)') 'Save matrix elements larger than threshold: ', threshold
|
||||
WRITE(stdout,'(5x," ")')
|
||||
!
|
||||
ENDIF
|
||||
IF (iverbosity == 3) THEN
|
||||
ALLOCATE(vkk_all(3, nbndfst, nktotf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error allocating vkk_all', 1)
|
||||
wkf_all(:) = zero
|
||||
vkk_all(:, :, :) = zero
|
||||
etf_all(:, :) = zero
|
||||
! Computes the k-velocity
|
||||
DO ik = 1, nkf
|
||||
ikk = 2 * ik - 1
|
||||
wkf_all(ik + lower_bnd -1 ) = wkf(ikk)
|
||||
DO ibnd = 1, nbndfst
|
||||
IF (vme) THEN
|
||||
vkk_all(:, ibnd, ik + lower_bnd - 1) = REAL(vmef(:, ibndmin - 1 + ibnd, ibndmin - 1 + ibnd, ikk))
|
||||
ELSE
|
||||
vkk_all(:,ibnd, ik + lower_bnd -1) = 2.0 * REAL(dmef(:, ibndmin - 1 + ibnd, ibndmin - 1 + ibnd, ikk))
|
||||
ENDIF
|
||||
etf_all(ibnd, ik + lower_bnd - 1) = etf(ibndmin - 1 + ibnd, ikk)
|
||||
ENDDO
|
||||
ENDDO
|
||||
CALL mp_sum(vkk_all, world_comm)
|
||||
CALL mp_sum(etf_all, world_comm)
|
||||
CALL mp_sum(wkf_all, world_comm)
|
||||
!
|
||||
IF (.NOT. assume_metal) THEN
|
||||
ALLOCATE(carrier_density(nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error allocating carrier_density', 1)
|
||||
carrier_density(:) = zero
|
||||
IF (ncarrier < 0.0) THEN ! VB
|
||||
CALL carr_density(carrier_density, etf_all, wkf_all, ef0)
|
||||
ELSE ! CB
|
||||
CALL carr_density(carrier_density, etf_all, wkf_all, efcb)
|
||||
ENDIF ! ncarrier
|
||||
ENDIF ! assume_metal
|
||||
!
|
||||
IF (my_pool_id == 0) THEN
|
||||
OPEN(UNIT = iufilmu_q, FILE = 'mobility_nuq.fmt')
|
||||
WRITE(iufilmu_q, '(a)') '# Mode-resolved contribution in limiting the carrier mobility (Vs/(cm^2))'
|
||||
WRITE(iufilmu_q, '(a)') '# \mu(alpha,beta) = 1.0 / (sum_{\nu q} T_{\nu q}(alpha,beta))'
|
||||
ENDIF
|
||||
ENDIF ! iverbosity
|
||||
ENDIF ! iqq == 1
|
||||
IF (iverbosity == 3) mobilityq(:, :, :, :) = zero
|
||||
!
|
||||
! In the case of a restart do not add the first step
|
||||
IF (first_cycle) THEN
|
||||
|
@ -314,7 +374,6 @@
|
|||
sparsecb_j(:) = zero
|
||||
sparsecb_t(:) = zero
|
||||
etf_all(:, :) = zero
|
||||
vkk_all(:, :, :) = zero
|
||||
ind(:) = 0
|
||||
indcb(:) = 0
|
||||
! loop over temperatures
|
||||
|
@ -328,7 +387,11 @@
|
|||
! Treat phonon frequency and Bose occupation
|
||||
wq(:) = zero
|
||||
DO imode = 1, nmodes
|
||||
wq(imode) = wf(imode, iq)
|
||||
IF (etf_mem == 3) THEN
|
||||
wq(imode) = wf(imode, iqq)
|
||||
ELSE
|
||||
wq(imode) = wf(imode, iq)
|
||||
ENDIF
|
||||
IF (wq(imode) > eps_acustic) THEN
|
||||
g2_tmp(imode) = 1.0d0
|
||||
wgq(imode) = wgauss(-wq(imode) * inv_etemp, -99)
|
||||
|
@ -383,16 +446,16 @@
|
|||
!
|
||||
! Transition probability - See Eq. 41 of arXiv:1908.01733 (2019).
|
||||
! (2 pi/hbar) * (k+q-point weight) * g2 *
|
||||
! { [f(E_k+q) + n(w_q)] * delta[E_k - E_k+q + w_q] +
|
||||
! [1 - f(E_k+q) + n(w_q)] * delta[E_k - E_k+q - w_q] }
|
||||
! { [f(E_k) + n(w_q)] * delta[E_k - E_k+q - w_q] +
|
||||
! [1 - f(E_k) + n(w_q)] * delta[E_k - E_k+q + w_q] }
|
||||
!
|
||||
! This is summed over modes
|
||||
tmp = tmp + two * pi * wqf(iq) * g2 * ((fnk + wgq(imode)) * w0g2 + (one - fnk + wgq(imode)) * w0g1)
|
||||
tmp = tmp + two * pi * wqf_loc * g2 * ((fnk + wgq(imode)) * w0g2 + (one - fnk + wgq(imode)) * w0g1)
|
||||
!
|
||||
! Here we compute the scattering rate - Eq. 64 of arXiv:1908.01733 (2019).
|
||||
! inv_tau = (2 pi/hbar) * (k+q-point weight) * g2 *
|
||||
! { [f(E_k+q) + n(w_q)] * delta[E_k - E_k+q + w_q] + [1 - f(E_k+q) + n(w_q)] * delta[E_k - E_k+q - w_q] }
|
||||
tmp2 = tmp2 + two * pi * wqf(iq) * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
tmp2 = tmp2 + two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
!
|
||||
ENDDO !imode
|
||||
inv_tau_all(ibnd, ik + lower_bnd - 1, itemp) = inv_tau_all(ibnd, ik + lower_bnd - 1, itemp) + tmp2
|
||||
|
@ -412,6 +475,41 @@
|
|||
ENDIF
|
||||
ENDDO !jbnd
|
||||
ENDDO ! ibnd
|
||||
!
|
||||
! Compute the mode-resolved scattering
|
||||
IF (iverbosity == 3) THEN
|
||||
DO ibnd = 1, nbndfst
|
||||
ekk = etf(ibndmin - 1 + ibnd, ikk) - ef0(itemp)
|
||||
fnk = wgauss(-ekk * inv_etemp, -99)
|
||||
dfnk = w0gauss(ekk * inv_etemp, -99 ) * inv_etemp
|
||||
tmpq(:) = zero
|
||||
DO jbnd = 1, nbndfst
|
||||
ekq = etf(ibndmin - 1 + jbnd, ikq) - ef0(itemp)
|
||||
fmkq = wgauss(-ekq * inv_etemp, -99)
|
||||
DO imode = 1, nmodes
|
||||
g2 = REAL(epf17(jbnd, ibnd, imode, ik)) * inv_wq(imode) * g2_tmp(imode)
|
||||
w0g1 = w0gauss((ekk - ekq + wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
w0g2 = w0gauss((ekk - ekq - wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
tmpq(imode) = tmpq(imode) &
|
||||
+ two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
inv_tau_all_mode(imode, ibnd, ik + lower_bnd - 1, itemp) = &
|
||||
inv_tau_all_mode(imode, ibnd, ik + lower_bnd - 1, itemp) + &
|
||||
two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
ENDDO !imode
|
||||
ENDDO ! jbnd
|
||||
DO j = 1, 3
|
||||
DO i = 1, 3
|
||||
tmp = dfnk * vkk_all(i, ibnd, ik + lower_bnd - 1) * vkk_all(j, ibnd, ik + lower_bnd - 1)
|
||||
IF (ABS(tmp) > eps20) THEN
|
||||
DO imode = 1, nmodes
|
||||
mobilityq(i, j, imode, itemp) = mobilityq(i, j, imode, itemp) + &
|
||||
wkf_all(ik + lower_bnd - 1) * tmpq(imode) / tmp
|
||||
ENDDO
|
||||
ENDIF
|
||||
ENDDO ! i
|
||||
ENDDO ! j
|
||||
ENDDO ! ibnd
|
||||
ENDIF ! iverbsoity
|
||||
ENDIF ! ctype
|
||||
!
|
||||
! In this case we are also computing the scattering rate for another Fermi level position
|
||||
|
@ -440,8 +538,8 @@
|
|||
g2 = REAL(epf17(jbnd, ibnd, imode, ik)) * inv_wq(imode) * g2_tmp(imode)
|
||||
w0g1 = w0gauss((ekk - ekq + wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
w0g2 = w0gauss((ekk - ekq - wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
tmp = tmp + two * pi * wqf(iq) * g2 * ((fnk + wgq(imode)) * w0g2 + (one - fnk + wgq(imode)) * w0g1)
|
||||
tmp2 = tmp2 + two * pi * wqf(iq) * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
tmp = tmp + two * pi * wqf_loc * g2 * ((fnk + wgq(imode)) * w0g2 + (one - fnk + wgq(imode)) * w0g1)
|
||||
tmp2 = tmp2 + two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
ENDDO ! imode
|
||||
inv_tau_allcb(ibnd, ik + lower_bnd - 1, itemp) = inv_tau_allcb(ibnd, ik + lower_bnd - 1, itemp) + tmp2
|
||||
!
|
||||
|
@ -456,6 +554,40 @@
|
|||
ENDIF
|
||||
ENDDO !jbnd
|
||||
ENDDO !ibnd
|
||||
! Compute the mode-resolved scattering
|
||||
IF (iverbosity == 3) THEN
|
||||
DO ibnd = 1, nbndfst
|
||||
ekk = etf(ibndmin - 1 + ibnd, ikk) - efcb(itemp)
|
||||
fnk = wgauss(-ekk * inv_etemp, -99)
|
||||
dfnk = w0gauss(ekk * inv_etemp, -99 ) * inv_etemp
|
||||
tmpq(:) = zero
|
||||
DO jbnd = 1, nbndfst
|
||||
ekq = etf(ibndmin - 1 + jbnd, ikq) - efcb(itemp)
|
||||
fmkq = wgauss(-ekq * inv_etemp, -99)
|
||||
DO imode = 1, nmodes
|
||||
g2 = REAL(epf17(jbnd, ibnd, imode, ik)) * inv_wq(imode) * g2_tmp(imode)
|
||||
w0g1 = w0gauss((ekk - ekq + wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
w0g2 = w0gauss((ekk - ekq - wq(imode)) * inv_eta(imode, ibnd, ik), 0) * inv_eta(imode, ibnd, ik)
|
||||
tmpq(imode) = tmpq(imode) &
|
||||
+ two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
inv_tau_allcb_mode(imode, ibnd, ik + lower_bnd - 1, itemp) = &
|
||||
inv_tau_allcb_mode(imode, ibnd, ik + lower_bnd - 1, itemp) + &
|
||||
two * pi * wqf_loc * g2 * ((fmkq + wgq(imode)) * w0g1 + (one - fmkq + wgq(imode)) * w0g2)
|
||||
ENDDO !imode
|
||||
ENDDO ! jbnd
|
||||
DO j = 1, 3
|
||||
DO i = 1, 3
|
||||
tmp = dfnk * vkk_all(i, ibnd, ik + lower_bnd - 1) * vkk_all(j, ibnd, ik + lower_bnd - 1)
|
||||
IF (ABS(tmp) > eps20) THEN
|
||||
DO imode = 1, nmodes
|
||||
mobilityq(i, j, imode, itemp) = mobilityq(i, j, imode, itemp) &
|
||||
+ wkf_all(ik + lower_bnd - 1) * tmpq(imode) / tmp
|
||||
ENDDO
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO ! ibnd
|
||||
ENDIF ! iverbsoity
|
||||
ENDIF ! ctype
|
||||
ENDIF ! endif fsthick
|
||||
ENDDO ! end loop on k
|
||||
|
@ -464,10 +596,37 @@
|
|||
CALL mp_sum(ind, world_comm)
|
||||
CALL mp_sum(indcb, world_comm)
|
||||
!
|
||||
IF (iverbosity == 3) THEN
|
||||
CALL mp_sum(mobilityq, world_comm)
|
||||
IF (my_pool_id == 0) THEN
|
||||
WRITE(iufilmu_q, '(a, 3f12.8)') '# q-point (crystal)', xxq(:)
|
||||
WRITE(iufilmu_q, '(a)') &
|
||||
'# Temp (K) Mode Phonon freq (meV) T_nuq(alpha, beta) (Vs/cm^2)'
|
||||
mob(:, :, :) = zero
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
mob(:, :, :) = mobilityq(:, :, :, itemp) * (hbarJ * carrier_density(itemp)) &
|
||||
/ (electronvolt_si * (bohr2ang * ang2cm) ** 2)
|
||||
DO imode = 1, nmodes
|
||||
WRITE(iufilmu_q, '(1f12.6, i6, 1f14.8, 3E18.8)') etemp * ryd2ev / kelvin2eV, imode, wq(imode) * ryd2mev, &
|
||||
mob(1, 1, imode), mob(1, 2, imode), mob(1, 3, imode)
|
||||
WRITE(iufilmu_q, '(32x, 3E18.8)') mob(2, 1, imode), mob(2, 2, imode), mob(2, 3, imode)
|
||||
WRITE(iufilmu_q, '(32x, 3E18.8)') mob(3, 1, imode), mob(3, 2, imode), mob(3, 3, imode)
|
||||
ENDDO
|
||||
ENDDO
|
||||
IF (iqq == totq) CLOSE(iufilmu_q)
|
||||
ENDIF ! my_pool_id
|
||||
IF (iqq == totq) THEN
|
||||
DEALLOCATE(vkk_all, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating vkk_all', 1)
|
||||
DEALLOCATE(carrier_density, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating carrier_density', 1)
|
||||
ENDIF ! iqq
|
||||
ENDIF ! iverbosity
|
||||
! SP - IBTE only with if EPW compiled with MPI
|
||||
IF (SUM(ind) > 0) THEN
|
||||
!
|
||||
IF (my_pool_id == 0 ) ind_tot = ind_tot + SUM(ind)
|
||||
IF (my_pool_id == 0) ind_tot = ind_tot + SUM(ind)
|
||||
#if defined(__MPI)
|
||||
CALL MPI_BCAST(ind_tot, 1, MPI_OFFSET, ionode_id, world_comm, ierr)
|
||||
#endif
|
||||
|
@ -553,6 +712,9 @@
|
|||
ENDIF ! first_cycle
|
||||
!
|
||||
IF (iqq == totq) THEN
|
||||
ALLOCATE(vkk_all(3, nbndfst, nktotf), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error allocating vkk_all', 1)
|
||||
vkk_all(:, :, :) = zero
|
||||
wkf_all(:) = zero
|
||||
! Computes the k-velocity
|
||||
DO ik = 1, nkf
|
||||
|
@ -575,6 +737,10 @@
|
|||
CALL mp_sum(wkf_all, world_comm)
|
||||
CALL mp_sum(inv_tau_all, world_comm)
|
||||
CALL mp_sum(inv_tau_allcb, world_comm)
|
||||
IF (iverbosity == 3) THEN
|
||||
CALL mp_sum(inv_tau_all_mode, world_comm)
|
||||
CALL mp_sum(inv_tau_allcb_mode, world_comm)
|
||||
ENDIF
|
||||
!
|
||||
IF (my_pool_id == 0) THEN
|
||||
! Now write total number of q-point inside and k-velocity
|
||||
|
@ -611,6 +777,24 @@
|
|||
ENDDO
|
||||
CLOSE(iufilibtev_sup)
|
||||
!
|
||||
! Save the mode resolvedinv_tau and inv_tau_all_mode on file (formatted)
|
||||
IF (iverbosity == 3) THEN
|
||||
OPEN(iufilibtev_sup, FILE = 'inv_tau_mode.fmt', FORM = 'formatted')
|
||||
WRITE(iufilibtev_sup, '(a)') '# Hole relaxation time [Multiply the relaxation time by 20670.6944033 to get 1/ps] '
|
||||
WRITE(iufilibtev_sup, '(a)') '# itemp kpt ibnd imode energy [Ry] relaxation time [Ry]'
|
||||
DO itemp = 1, nstemp
|
||||
DO ik = 1, nktotf
|
||||
DO ibnd = 1, nbndfst
|
||||
DO imode = 1, nmodes
|
||||
WRITE(iufilibtev_sup, '(i5,i8,i6,i6,2E22.12)') itemp, ik, ibnd, imode, etf_all(ibnd, ik), &
|
||||
inv_tau_all_mode(imode, ibnd, ik, itemp)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
CLOSE(iufilibtev_sup)
|
||||
ENDIF
|
||||
!
|
||||
! Save the inv_tau and inv_tau_all on file (formatted)
|
||||
OPEN(iufilibtev_sup, FILE = 'inv_taucb.fmt', FORM = 'formatted')
|
||||
WRITE(iufilibtev_sup, '(a)') '# Electron relaxation time [Multiply the relaxation time by 20670.6944033 to get 1/ps] '
|
||||
|
@ -624,49 +808,58 @@
|
|||
ENDDO
|
||||
CLOSE(iufilibtev_sup)
|
||||
!
|
||||
IF (iverbosity == 3) THEN
|
||||
OPEN(iufilibtev_sup, FILE = 'inv_taucb_mode.fmt', FORM = 'formatted')
|
||||
WRITE(iufilibtev_sup, '(a)') '# Electron relaxation time [Multiply the relaxation time by 20670.6944033 to get 1/ps] '
|
||||
WRITE(iufilibtev_sup, '(a)') '# itemp kpt ibnd imode energy [Ry] relaxation time [Ry]'
|
||||
DO itemp = 1, nstemp
|
||||
DO ik = 1, nktotf
|
||||
DO ibnd = 1, nbndfst
|
||||
DO imode = 1, nmodes
|
||||
WRITE(iufilibtev_sup, '(i5,i8,i6,i6,2E22.12)') itemp, ik, ibnd, imode, etf_all(ibnd, ik), &
|
||||
inv_tau_allcb_mode(imode, ibnd, ik, itemp)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
CLOSE(iufilibtev_sup)
|
||||
ENDIF
|
||||
!
|
||||
ENDIF ! master
|
||||
!
|
||||
! Now print the carrier density for checking (for non-metals)
|
||||
IF (.NOT. assume_metal) THEN
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
carrier_density = 0.0
|
||||
!
|
||||
IF (ncarrier < 0.0) THEN ! VB
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndfst
|
||||
! This selects only valence bands for hole conduction
|
||||
IF (etf_all(ibnd, ik + lower_bnd - 1 ) < ef0(itemp)) THEN
|
||||
! Energy at k (relative to Ef)
|
||||
ekk = etf_all(ibnd, ik + lower_bnd - 1 ) - ef0(itemp)
|
||||
fnk = wgauss(-ekk / etemp, -99)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density = carrier_density + wkf_all(ik + lower_bnd - 1) * (1.0d0 - fnk)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
CALL mp_sum(carrier_density, world_comm)
|
||||
ALLOCATE(carrier_density(nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error allocating carrier_density', 1)
|
||||
carrier_density(:) = zero
|
||||
IF (ncarrier < 0.0) THEN ! VB
|
||||
CALL carr_density(carrier_density, etf_all, wkf_all, ef0)
|
||||
IF (system_2d) THEN
|
||||
carrier_density = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-2.0d0)
|
||||
ELSE
|
||||
carrier_density = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
WRITE(stdout,'(5x, 1f8.3, 1f12.4, 1E19.6)') etemp * ryd2ev / kelvin2eV, ef0(itemp) * ryd2ev, carrier_density
|
||||
ELSE ! CB
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndfst
|
||||
! This selects only valence bands for hole conduction
|
||||
IF (etf_all (ibnd, ik + lower_bnd - 1) > efcb(itemp)) THEN
|
||||
! energy at k (relative to Ef)
|
||||
ekk = etf_all(ibnd, ik + lower_bnd - 1) - efcb(itemp)
|
||||
fnk = wgauss(-ekk / etemp, -99)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density = carrier_density + wkf_all(ik + lower_bnd - 1) * fnk
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
CALL mp_sum(carrier_density, world_comm)
|
||||
ENDIF
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
WRITE(stdout, '(5x, 1f8.3, 1f12.4, 1E19.6)') etemp * ryd2ev / kelvin2eV, ef0(itemp) * ryd2ev, carrier_density(itemp)
|
||||
ENDDO
|
||||
ELSE ! CB
|
||||
CALL carr_density(carrier_density, etf_all, wkf_all, efcb)
|
||||
IF (system_2d) THEN
|
||||
carrier_density = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-2.0d0)
|
||||
ELSE
|
||||
carrier_density = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
WRITE(stdout,'(5x, 1f8.3, 1f12.4, 1E19.6)') etemp * ryd2ev / kelvin2eV, efcb(itemp) * ryd2ev, carrier_density
|
||||
ENDIF ! ncarrier
|
||||
ENDDO
|
||||
ENDIF
|
||||
ENDIF
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
WRITE(stdout, '(5x, 1f8.3, 1f12.4, 1E19.6)') etemp * ryd2ev / kelvin2eV, efcb(itemp) * ryd2ev, carrier_density(itemp)
|
||||
ENDDO
|
||||
ENDIF ! ncarrier
|
||||
DEALLOCATE(carrier_density, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error deallocating carrier_density', 1)
|
||||
ENDIF ! assume_metal
|
||||
DEALLOCATE(vkk_all, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('print_ibte', 'Error deallocating vkk_all', 1)
|
||||
ENDIF ! iqq
|
||||
!
|
||||
RETURN
|
||||
|
@ -674,6 +867,82 @@
|
|||
END SUBROUTINE print_ibte
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE carr_density(carrier_density, etf_all, wkf_all, ef0)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! This routine computes the carrier density (in a.u.)
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE epwcom, ONLY : ncarrier, nstemp
|
||||
USE elph2, ONLY : nbndfst, gtemp, nktotf, lower_bnd, nkf
|
||||
USE mp, ONLY : mp_sum
|
||||
USE mp_global, ONLY : world_comm
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
REAL(KIND = DP), INTENT(inout) :: carrier_density(nstemp)
|
||||
!! Carrier density
|
||||
REAL(KIND = DP), INTENT(in) :: etf_all(nbndfst, nktotf)
|
||||
!! Eigen-energies on the fine grid collected from all pools in parallel case
|
||||
REAL(KIND = DP), INTENT(in) :: wkf_all(nktotf)
|
||||
!! Weights from all the cores
|
||||
REAL(KIND = DP), INTENT(in) :: ef0(nstemp)
|
||||
!! Fermi level for the temperature itemp
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: itemp
|
||||
!! temperature index
|
||||
INTEGER :: ik
|
||||
!! k-point index
|
||||
INTEGER :: ibnd
|
||||
!! band index
|
||||
REAL(KIND = DP) :: etemp
|
||||
!! Temperature in Ry (this includes division by kb)
|
||||
REAL(KIND = DP) :: ekk
|
||||
!! Energy relative to Fermi level: $$\varepsilon_{n\mathbf{k}}-\varepsilon_F$$
|
||||
REAL(KIND = DP) :: fnk
|
||||
!! Fermi-Dirac occupation function
|
||||
REAL(KIND = DP), EXTERNAL :: wgauss
|
||||
!! Compute the approximate theta function. Here computes Fermi-Dirac
|
||||
!
|
||||
carrier_density(:) = 0.0
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
IF (ncarrier < 0.0) THEN ! VB
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndfst
|
||||
! This selects only valence bands for hole conduction
|
||||
IF (etf_all(ibnd, ik + lower_bnd - 1) < ef0(itemp)) THEN
|
||||
! Energy at k (relative to Ef)
|
||||
ekk = etf_all(ibnd, ik + lower_bnd - 1) - ef0(itemp)
|
||||
fnk = wgauss(-ekk / etemp, -99)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density(itemp) = carrier_density(itemp) + wkf_all(ik + lower_bnd - 1) * (1.0d0 - fnk)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ELSE ! CB
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndfst
|
||||
! This selects only valence bands for hole conduction
|
||||
IF (etf_all(ibnd, ik + lower_bnd - 1) > ef0(itemp)) THEN
|
||||
! energy at k (relative to Ef)
|
||||
ekk = etf_all(ibnd, ik + lower_bnd - 1) - ef0(itemp)
|
||||
fnk = wgauss(-ekk / etemp, -99)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density(itemp) = carrier_density(itemp) + wkf_all(ik + lower_bnd - 1) * fnk
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDIF ! ncarrier
|
||||
ENDDO
|
||||
CALL mp_sum(carrier_density, world_comm)
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE carr_density
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!----------------------------------------------------------------------------
|
||||
SUBROUTINE fin_write(iter, F_in, av_mob_old, elec)
|
||||
!----------------------------------------------------------------------------
|
||||
|
@ -1282,7 +1551,7 @@
|
|||
IF (exst) THEN
|
||||
! Hole (or metals)
|
||||
IF ((int_mob .AND. carrier) .OR. ((.NOT. int_mob .AND. carrier) .AND. (ncarrier < 1E5)) &
|
||||
.OR. assume_metal) THEN
|
||||
.OR. assume_metal) THEN
|
||||
!
|
||||
filint = './' // ADJUSTL(TRIM(dirname(1))) // '/'//TRIM(prefix) // '.epmatkq1' // '_' // TRIM(my_pool_id_ch)
|
||||
INQUIRE(FILE = filint, EXIST = exst2)
|
||||
|
|
|
@ -20,26 +20,27 @@
|
|||
PRIVATE
|
||||
SAVE
|
||||
!
|
||||
PUBLIC :: lambda_phself, linewidth_phself, linewidth_elself, iospectral, &
|
||||
iua2ffil, iudosfil, iufillambda, iuqdos, iufe, iufilker, &
|
||||
iufilgap, iospectral_sup, iua2ftrfil, iufilgapFS, iufillambdaFS, &
|
||||
PUBLIC :: lambda_phself, linewidth_phself, linewidth_elself, iospectral, &
|
||||
iua2ffil, iudosfil, iufillambda, iuqdos, iufe, iufilker, iuquad, &
|
||||
iufilgap, iospectral_sup, iua2ftrfil, iufilgapFS, iufillambdaFS, &
|
||||
iospectral_cum, iuwanep, iuwane, iunukk, iudvscf, iuqpeig, iures, &
|
||||
iuint3paw
|
||||
PUBLIC :: epwdata, iundmedata, iunvmedata, iunksdata, iudyn, iukgmap, iuepb,&
|
||||
PUBLIC :: epwdata, iundmedata, iunvmedata, iunksdata, iudyn, iukgmap, iuepb, &
|
||||
iufilfreq, iufilegnv, iufileph, iufilkqmap, iunpattern, iufilmu_q, &
|
||||
iufilikmap, iueig, iunepmatwp, iunepmatwe, iunkf, iunqf, &
|
||||
iufileig, iukmap, crystal, iunifc, iunimem, iunepmatwp2, iufilFS
|
||||
iufilikmap, iueig, iunepmatwp, iunepmatwe, iunkf, iunqf, iufilFS, &
|
||||
iufileig, iukmap, crystal, iunifc, iunimem, iunepmatwp2
|
||||
PUBLIC :: iuwinfil, iun_plot, iuprojfil, iudecayH, iudecayP, &
|
||||
iudecaydyn, iudecayv, iunnkp, iuamn, iummn, iubvec
|
||||
PUBLIC :: iufilsigma, iufilseebeck, iufilkappael, iufilkappa, iufilscatt_rate,&
|
||||
PUBLIC :: iufilsigma, iufilseebeck, iufilkappael, iufilkappa, iufilscatt_rate, &
|
||||
iufilFi_all, iufilsigma_all, iufiltau_all, iuindabs, iuntau, iuntaucb, &
|
||||
iufilesigma_all, epwbib
|
||||
PUBLIC :: iunsparseq, iunsparsek, iunsparsei, iunsparsej, iunsparset, iunselecq, &
|
||||
iunsparseqcb, iunsparsekcb, iunsparseicb, iunsparsejcb, iunsparsetcb, &
|
||||
iunrestart, iufilibtev_sup, iunepmat, iunepmatcb, iufilF, iufilmu_nk, iunepmat_merge,&
|
||||
iunsparseqcb, iunsparsekcb, iunsparseicb, iunsparsejcb, iunsparsetcb, &
|
||||
iunrestart, iufilibtev_sup, iunepmat, iunepmatcb, iufilF, iufilmu_nk, &
|
||||
iunsparseq_merge, iunsparsek_merge, iunsparsei_merge,iunsparsej_merge, &
|
||||
iunsparset_merge, iunepmatcb_merge, iunsparseqcb_merge, iunsparsekcb_merge,&
|
||||
iunsparseicb_merge, iunsparsejcb_merge, iunsparsetcb_merge
|
||||
iunsparset_merge, iunepmatcb_merge, iunsparseqcb_merge, &
|
||||
iunsparseicb_merge, iunsparsejcb_merge, iunsparsetcb_merge, &
|
||||
iunsparsekcb_merge, iunepmat_merge
|
||||
|
||||
!
|
||||
! Output of physically relevant quantities (60-100)
|
||||
|
@ -67,9 +68,8 @@
|
|||
INTEGER :: iufillambdaFS = 74 ! Electron-phonon coupling strength on FS with k-points
|
||||
INTEGER :: iospectral_cum = 75 ! Electronic spectral function with the cumulant method
|
||||
! [specfun_cum##.elself]
|
||||
!DBSP : iukgmap was 96. Should be the same as set_kplusq.f90.
|
||||
INTEGER :: iunukk = 77 ! Unit with rotation matrix U(k) from wannier code
|
||||
INTEGER :: iures = 78 ! Resistivity in metals using Ziman formula [.res]
|
||||
INTEGER :: iuquad = 78 ! Unit to read the quadrupole tensor from file
|
||||
INTEGER :: iudvscf = 80 ! Unit for the dvscf_q file
|
||||
INTEGER :: iudyn = 81 ! Unit for the dynamical matrix file
|
||||
INTEGER :: iufilkqmap = 82 ! Map of k+q
|
||||
|
@ -159,12 +159,13 @@
|
|||
INTEGER :: iufilesigma_all = 260 ! Sigmar_all and Sigmai_all file to retart spectral calculation
|
||||
INTEGER :: iufilmu_nk = 261 ! $\mu_{nk}^{\alpha\beta}$ in mobility_nk.fmt file
|
||||
INTEGER :: iufilmu_q = 262 ! $\mu_{\nu q}^{\alpha\beta}$ in mobility_nuq.fmt mode
|
||||
INTEGER :: iures = 263 ! Resistivity in metals using Ziman formula [.res]
|
||||
!
|
||||
! Output quantities related to Indirect absorption (301-325)
|
||||
INTEGER :: iuindabs = 301 ! Indirect absorption data
|
||||
!
|
||||
!
|
||||
! Miscellaneous (326-350)
|
||||
INTEGER :: epwbib = 326 ! EPW bibliographic file.
|
||||
INTEGER :: epwbib = 326 ! EPW bibliographic file.
|
||||
!
|
||||
! Merging of files (400-450)
|
||||
INTEGER :: iunepmat_merge = 400
|
||||
|
|
|
@ -1121,8 +1121,6 @@
|
|||
rmelt = DBLE(imelt) * 4.d0 / 1073741824.d0 ! 4 bytes per number, value in Gb
|
||||
IF (vmelt == 2) &
|
||||
rmelt = 2.d0 * rmelt ! 8 bytes per number, value in Gb
|
||||
!WRITE(stdout, '(/, 5x, a, a, f9.6, a)') "Memory added/subtracted in mem_size:", &
|
||||
! " ~= ", rmelt, " Gb"
|
||||
rmelt = rmelt + memlt_pool(my_pool_id + 1)
|
||||
!
|
||||
memlt_pool(:) = zero
|
||||
|
@ -1200,8 +1198,6 @@
|
|||
imelt = imelt * nqstep
|
||||
ENDIF
|
||||
rmelt = DBLE(imelt) * 8.d0 / 1073741824.d0 ! 8 bytes per number, value in Gb
|
||||
!WRITE(stdout, '(/, 5x, a, a, f9.6, a)') "Memory added/subtracted in memlt:", &
|
||||
! " ~= ", rmelt, " Gb"
|
||||
rmelt = rmelt + memlt_pool(my_pool_id + 1)
|
||||
!
|
||||
memlt_pool(:) = zero
|
||||
|
@ -1237,6 +1233,292 @@
|
|||
END SUBROUTINE memlt_eliashberg
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!--------------------------------------------------------------------------
|
||||
SUBROUTINE create_interval(size_v, v, n_intval, val_intval, pos_intval)
|
||||
!--------------------------------------------------------------------------
|
||||
!!
|
||||
!! This routine divide an integer vector "v" of size "size_v" into "n_intval" intervals
|
||||
!! The routine then store the first element of each intervals into "val_intval"
|
||||
!! and store their position in "pos_intval".
|
||||
!!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: size_v
|
||||
!! Size of vector to bisect
|
||||
INTEGER, INTENT(in) :: v(size_v)
|
||||
!! Vector to bisect
|
||||
INTEGER, INTENT(in) :: n_intval
|
||||
!! Number of intervals
|
||||
INTEGER, INTENT(out) :: val_intval(n_intval)
|
||||
!! Value of the first element of each intervals
|
||||
INTEGER, INTENT(out) :: pos_intval(n_intval)
|
||||
!! Position of the first element of each intervals
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: nkl
|
||||
!! Size of each intervals
|
||||
INTEGER :: nkr
|
||||
!! Remaining of the division of the full vector by nkl
|
||||
INTEGER :: i
|
||||
!! Index looping on the invervals
|
||||
!
|
||||
! Initialize
|
||||
val_intval(:) = 0
|
||||
pos_intval(:) = 0
|
||||
!
|
||||
! We want to have n_intval indexes, i.e. n_intval-1 intervals
|
||||
nkl = size_v / (n_intval - 1)
|
||||
nkr = size_v - nkl * (n_intval - 1)
|
||||
!
|
||||
! the reminder goes to the first nkr intervals (0...nkr-1)
|
||||
!
|
||||
DO i = 1, n_intval
|
||||
pos_intval(i) = nkl * (i - 1)
|
||||
IF (i < nkr) pos_intval(i) = pos_intval(i) + i
|
||||
IF (i >= nkr) pos_intval(i) = pos_intval(i) + nkr
|
||||
ENDDO
|
||||
!
|
||||
DO i = 1, n_intval
|
||||
val_intval(i) = v(pos_intval(i))
|
||||
ENDDO
|
||||
!
|
||||
!--------------------------------------------------------------------------
|
||||
END SUBROUTINE create_interval
|
||||
!--------------------------------------------------------------------------
|
||||
!
|
||||
!--------------------------------------------------------------------------
|
||||
SUBROUTINE bisection(size_v, v, ind, n_intval, val_intval, pos_intval)
|
||||
!--------------------------------------------------------------------------
|
||||
!!
|
||||
!! The subroutine first perform a pre-serach to determine in which intervals
|
||||
!! the index "ind" lies.
|
||||
!! Then the subroutines find the position of the index "ind" within that interaval.
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: size_v
|
||||
!! Size of vector to bisect
|
||||
INTEGER, INTENT(in) :: v(size_v)
|
||||
!! Vector to bisect
|
||||
INTEGER, INTENT(in) :: n_intval
|
||||
!! Number of intervals for the pre search
|
||||
INTEGER, INTENT(in) :: val_intval(n_intval)
|
||||
!! Value of the first element of each intervals
|
||||
INTEGER, INTENT(in) :: pos_intval(n_intval)
|
||||
!! Position of the first element of each intervals
|
||||
INTEGER, INTENT(inout) :: ind
|
||||
!! In entry, index to find in the vector; on exit, position of the element;
|
||||
!! If 0 on RETURN, the element is not present in the list
|
||||
!
|
||||
! Local variable
|
||||
INTEGER :: it
|
||||
!! Iteration index
|
||||
INTEGER :: lp
|
||||
!! Left pointer
|
||||
INTEGER :: rp
|
||||
!! Right pointer
|
||||
INTEGER :: cp
|
||||
!! Center pointer
|
||||
INTEGER :: nit
|
||||
!! Number of iterations
|
||||
INTEGER :: prod
|
||||
!! Product to determine on which side of the interval we are
|
||||
INTEGER :: prod_2
|
||||
!! Product
|
||||
INTEGER :: ierr
|
||||
!! Error number
|
||||
INTEGER :: subsize
|
||||
!! Size of the chunk of v we are considering
|
||||
INTEGER :: pre_minloc
|
||||
!! Minimum location of presearch
|
||||
INTEGER :: pre_minval
|
||||
!! Minimum value of presearch
|
||||
INTEGER, ALLOCATABLE :: v_red(:)
|
||||
!! Reduced vector for bisection
|
||||
INTEGER, ALLOCATABLE :: v_sgn(:)
|
||||
!! v - ind
|
||||
!
|
||||
! 1) Deal with special cases
|
||||
!
|
||||
! The point is not within the fsthick window ==> return 0
|
||||
IF (ind > v(size_v) .OR. (ind < v(1))) THEN
|
||||
ind = 0
|
||||
RETURN
|
||||
ENDIF
|
||||
!
|
||||
! Look at the first element of each intervals.
|
||||
pre_minloc = MINLOC(ABS(val_intval(:) - ind), 1)
|
||||
pre_minval = MINVAL(ABS(val_intval(:) - ind), 1)
|
||||
!
|
||||
! The ind is one of those first element (special case) - we are done
|
||||
IF (pre_minval == 0) THEN
|
||||
ind = pos_intval(pre_minloc)
|
||||
RETURN
|
||||
ENDIF
|
||||
!
|
||||
! The ind is the second or one before last element (special case treated here because the
|
||||
! algo below cannot deal with the two extreme cases.
|
||||
! We compute the lower left bound and upper right bound. The ind is between those two bounds.
|
||||
IF (pre_minloc == 1) THEN
|
||||
lp = pos_intval(1)
|
||||
rp = pos_intval(2)
|
||||
ELSEIF (pre_minloc == n_intval) THEN
|
||||
lp = pos_intval(n_intval - 1)
|
||||
rp = pos_intval(n_intval)
|
||||
ELSE
|
||||
!
|
||||
! 2) Do a pre-search to deterine in which intervals the index lies.
|
||||
!
|
||||
! The sign of the product tels us on which side of the interval does the index ind lies.
|
||||
IF ( val_intval(pre_minloc) - ind /= 0 .AND. val_intval(pre_minloc - 1) - ind /= 0) THEN
|
||||
prod = (val_intval(pre_minloc) - ind) / ABS(val_intval(pre_minloc) - ind) &
|
||||
* (val_intval(pre_minloc - 1) - ind) / ABS(val_intval(pre_minloc - 1) - ind)
|
||||
ELSE
|
||||
prod = 0
|
||||
ENDIF
|
||||
!
|
||||
IF (prod < 0) THEN
|
||||
! Then the correspondence is in between pos_intval(pre_minloc-1) and pos_intval(pre_minloc)
|
||||
lp = pos_intval(pre_minloc - 1)
|
||||
rp = pos_intval(pre_minloc)
|
||||
ELSEIF (prod > 0) THEN
|
||||
! Then the correspondence is in between pos_intval(pre_minloc) and pos_intval(pre_minloc+1)
|
||||
lp = pos_intval(pre_minloc)
|
||||
rp = pos_intval(pre_minloc + 1)
|
||||
ELSEIF (prod == 0) THEN
|
||||
! It cannot be that val_intval(pre_minloc)-ind) == 0 because we already checked
|
||||
ind = pos_intval(pre_minloc - 1)
|
||||
RETURN
|
||||
ENDIF
|
||||
ENDIF
|
||||
!
|
||||
subsize = rp - lp + 1
|
||||
ALLOCATE(v_red(subsize), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('bisection', 'Error allocating v_red', 1)
|
||||
ALLOCATE(v_sgn(subsize), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('bisection', 'Error allocating v_sgn', 1)
|
||||
!
|
||||
!Shift lp to 1 and rp to subsize
|
||||
IF (pre_minloc == 1) THEN
|
||||
v_red(:) = v(pos_intval(1):pos_intval(2))
|
||||
lp = lp - pos_intval(1) + 1
|
||||
rp = rp - pos_intval(1) + 1
|
||||
ELSEIF (pre_minloc == n_intval) THEN
|
||||
v_red(:) = v(pos_intval(n_intval - 1):pos_intval(n_intval))
|
||||
lp = lp - pos_intval(n_intval - 1) + 1
|
||||
rp = rp - pos_intval(n_intval - 1) + 1
|
||||
ELSE
|
||||
IF (prod < 0) THEN
|
||||
v_red(:) = v(pos_intval(pre_minloc - 1):pos_intval(pre_minloc))
|
||||
lp = lp - pos_intval(pre_minloc - 1) + 1
|
||||
rp = rp - pos_intval(pre_minloc - 1) + 1
|
||||
ELSEIF (prod > 0) THEN
|
||||
v_red(:) = v(pos_intval(pre_minloc):pos_intval(pre_minloc + 1))
|
||||
lp = lp - pos_intval(pre_minloc) + 1
|
||||
rp = rp - pos_intval(pre_minloc) + 1
|
||||
ENDIF
|
||||
ENDIF
|
||||
!
|
||||
! 3) Do a bisection on the interval
|
||||
!
|
||||
v_sgn(:) = v_red(:) - ind
|
||||
!
|
||||
! Each iteration of the bisection method divide the range by 2 so that the
|
||||
! maximum number of iteration is log2(subsize). We multiply by 2 for safety.
|
||||
nit = (NINT(LOG(REAL(subsize, KIND = DP)) / LOG(2.0d0)) + 1) * 2 !Safe range
|
||||
! Add call errore if it == nit
|
||||
!
|
||||
bisec : DO it = 1, nit
|
||||
!
|
||||
IF (it == nit) CALL errore('bisection', 'Maximum number of iteration reached in bisection', 1)
|
||||
!
|
||||
! Check if we found a correspondence
|
||||
IF (v_sgn(lp) == 0) THEN
|
||||
ind = lp
|
||||
IF (pre_minloc == 1) THEN
|
||||
ind = ind + pos_intval(1) - 1
|
||||
EXIT bisec
|
||||
ELSEIF (pre_minloc == n_intval) THEN
|
||||
ind = ind + pos_intval(n_intval - 1) - 1
|
||||
EXIT bisec
|
||||
ELSE
|
||||
IF (prod < 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc - 1) - 1
|
||||
ELSEIF (prod > 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc) - 1
|
||||
ENDIF
|
||||
EXIT bisec
|
||||
ENDIF
|
||||
ELSEIF (v_sgn(rp) == 0) THEN
|
||||
ind = rp
|
||||
IF (pre_minloc == 1) THEN
|
||||
ind = ind + pos_intval(1) - 1
|
||||
EXIT bisec
|
||||
ELSEIF (pre_minloc == n_intval) THEN
|
||||
ind = ind + pos_intval(n_intval - 1) - 1
|
||||
EXIT bisec
|
||||
ELSE
|
||||
IF (prod < 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc - 1) - 1
|
||||
ELSEIF (prod > 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc) - 1
|
||||
ENDIF
|
||||
EXIT bisec
|
||||
ENDIF
|
||||
ENDIF
|
||||
! v_sgn(lp) and v_sgn(rp) cannot be 0 at this point
|
||||
prod_2 = (v_sgn(lp) / ABS(v_sgn(lp))) * (v_sgn(rp) / ABS(v_sgn(rp)))
|
||||
!
|
||||
! If prod not 0 but they are contiguous, ind = 0
|
||||
IF (lp + 1 == rp) THEN
|
||||
ind = 0
|
||||
EXIT bisec
|
||||
ENDIF
|
||||
! Check for the case prod > 0
|
||||
IF (prod_2 > 0) THEN
|
||||
CALL errore('bisection', 'Error in bisection algorithm', 1)
|
||||
ENDIF
|
||||
! After the checks, move lp or rp
|
||||
IF (MOD(subsize, 2) == 0) THEN
|
||||
cp = lp + subsize / 2 - 1
|
||||
ELSE
|
||||
cp = lp + (subsize + 1) / 2 - 1
|
||||
ENDIF
|
||||
IF (v_sgn(cp) == 0) THEN
|
||||
ind = cp
|
||||
IF (pre_minloc == 1) THEN
|
||||
ind = ind + pos_intval(1) - 1
|
||||
EXIT bisec
|
||||
ELSEIF (pre_minloc == n_intval) THEN
|
||||
ind = ind + pos_intval(n_intval - 1) - 1
|
||||
EXIT bisec
|
||||
ELSE
|
||||
IF (prod < 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc - 1) - 1
|
||||
ELSEIF (prod > 0) THEN
|
||||
ind = ind + pos_intval(pre_minloc) - 1
|
||||
ENDIF
|
||||
EXIT bisec
|
||||
ENDIF
|
||||
ELSE
|
||||
! v_sgn(lp) and v_sgn(cp) cannot be 0 at this point
|
||||
prod_2 = (v_sgn(lp) / ABS(v_sgn(lp))) * (v_sgn(cp) / ABS(v_sgn(cp)))
|
||||
ENDIF
|
||||
IF (prod_2 < 0) THEN
|
||||
rp = cp
|
||||
ELSE
|
||||
lp = cp
|
||||
ENDIF
|
||||
subsize = rp - lp + 1
|
||||
IF (rp < lp) CALL errore('bisection', 'Error in bisection algorithm', 1)
|
||||
ENDDO bisec
|
||||
!
|
||||
!--------------------------------------------------------------------------
|
||||
END SUBROUTINE bisection
|
||||
!--------------------------------------------------------------------------
|
||||
!
|
||||
!----------------------------------------------------------------------
|
||||
SUBROUTINE s_crystocart(s, sr, at, bg)
|
||||
!----------------------------------------------------------------------
|
||||
|
|
|
@ -559,7 +559,8 @@
|
|||
SUBROUTINE compute_sigma(f_out, vkk_all, wkf_all, sigma, fi_check)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! Computes the conductivity tensor without using symetries
|
||||
!! Computes the conductivity tensor without using symetries
|
||||
!! With or without B-field
|
||||
!!
|
||||
!----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
|
@ -600,7 +601,7 @@
|
|||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE compute_sigma
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE prtmob(itemp, sigma, carrier_density, fi_check, ef0, etemp, max_mob)
|
||||
!-----------------------------------------------------------------------
|
||||
|
@ -1281,6 +1282,296 @@
|
|||
!----------------------------------------------------------------------------
|
||||
END SUBROUTINE plot_fermisurface
|
||||
!----------------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE print_mob_b(f_out_b, vkk_all_b, etf_all_b, wkf_all_b, ef0, &
|
||||
carrier_density, sigma, max_mob)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! This routine prints the mobility without k-point symmetry with finite B-field
|
||||
!!
|
||||
!-----------------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
USE epwcom, ONLY : ncarrier, nstemp, assume_metal
|
||||
USE elph2, ONLY : nbndfst, nkpt_bztau_max, gtemp
|
||||
USE constants_epw, ONLY : zero, two, pi, kelvin2eV, ryd2ev, eps10, &
|
||||
bohr2ang, ang2cm, hbarJ
|
||||
USE constants, ONLY : electron_si
|
||||
USE mp, ONLY : mp_sum
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
REAL(KIND = DP), INTENT(in) :: f_out_b(3, nbndfst, nkpt_bztau_max, nstemp)
|
||||
!! Occupation function produced by SERTA or IBTE
|
||||
REAL(KIND = DP), INTENT(in) :: vkk_all_b(3, nbndfst, nkpt_bztau_max)
|
||||
!! Velocity
|
||||
REAL(KIND = DP), INTENT(in) :: etf_all_b(nbndfst, nkpt_bztau_max)
|
||||
!! Eigenenergies of k
|
||||
REAL(KIND = DP), INTENT(in) :: wkf_all_b(nkpt_bztau_max)
|
||||
!! Weight of k
|
||||
REAL(KIND = DP), INTENT(in) :: ef0(nstemp)
|
||||
!! The Fermi level
|
||||
REAL(KIND = DP), INTENT(inout) :: carrier_density(nstemp)
|
||||
!! Carrier density [nb of carrier per unit cell]
|
||||
REAL(KIND = DP), INTENT(inout) :: sigma(3, 3, nstemp)
|
||||
!! Conductivity
|
||||
REAL(KIND = DP), INTENT(inout), OPTIONAL :: max_mob(nstemp)
|
||||
!! The maximum mobility computed by thr prtmob routine.
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: itemp
|
||||
!! temperature index
|
||||
INTEGER :: ik
|
||||
!! k-point index
|
||||
INTEGER :: ibnd
|
||||
!! band index
|
||||
REAL(KIND = DP) :: etemp
|
||||
!! Temperature in Ry (this includes division by kb)
|
||||
REAL(KIND = DP) :: sigma_tmp(3, 3)
|
||||
!! Electrical conductivity
|
||||
REAL(KIND = DP) :: ekk
|
||||
!! Energy relative to Fermi level: $$\varepsilon_{n\mathbf{k}}-\varepsilon_F$$
|
||||
REAL(KIND = DP) :: fnk
|
||||
!! Fermi-Dirac occupation function
|
||||
REAL(KIND = DP) :: Fi_check(3)
|
||||
!! Sum rule on population
|
||||
REAL(KIND = DP), EXTERNAL :: wgauss
|
||||
!! Compute the approximate theta function. Here computes Fermi-Dirac
|
||||
REAL(KIND = DP), EXTERNAL :: w0gauss
|
||||
!! The derivative of wgauss: an approximation to the delta function
|
||||
!
|
||||
IF (PRESENT(max_mob)) THEN
|
||||
max_mob(:) = zero
|
||||
ENDIF
|
||||
CALL prtheader_mob()
|
||||
DO itemp = 1, nstemp
|
||||
carrier_density(itemp) = 0.0
|
||||
etemp = gtemp(itemp)
|
||||
sigma_tmp(:, :) = zero
|
||||
fi_check(:) = zero
|
||||
DO ik = 1, nkpt_bztau_max
|
||||
DO ibnd = 1, nbndfst
|
||||
! energy at k (relative to Ef)
|
||||
ekk = etf_all_b(ibnd, ik) - ef0(itemp)
|
||||
fnk = wgauss(-ekk / etemp, -99)
|
||||
IF (etf_all_b(ibnd, ik) < ef0(itemp) .AND. ncarrier < -1E5 .AND. .NOT. assume_metal) THEN
|
||||
CALL compute_sigma(f_out_b(:, ibnd, ik, itemp), vkk_all_b(:, ibnd, ik), wkf_all_b(ik), sigma_tmp, fi_check)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density(itemp) = carrier_density(itemp) + wkf_all_b(ik) * (1.0d0 - fnk)
|
||||
ELSEIF (etf_all_b(ibnd, ik) > ef0(itemp) .AND. ncarrier > 1E5 .AND. .NOT. assume_metal) THEN
|
||||
CALL compute_sigma(f_out_b(:, ibnd, ik, itemp), vkk_all_b(:, ibnd, ik), wkf_all_b(ik), sigma_tmp, fi_check)
|
||||
! The wkf(ikk) already include a factor 2
|
||||
carrier_density(itemp) = carrier_density(itemp) + wkf_all_b(ik) * fnk
|
||||
ELSEIF (assume_metal) THEN
|
||||
! sum on all bands for metals
|
||||
CALL compute_sigma(f_out_b(:, ibnd, ik, itemp), vkk_all_b(:, ibnd, ik), wkf_all_b(ik), sigma_tmp, fi_check)
|
||||
carrier_density(itemp) = carrier_density(itemp) + wkf_all_b(ik) * fnk
|
||||
ENDIF
|
||||
ENDDO ! ibnd
|
||||
ENDDO ! ik
|
||||
IF (PRESENT(max_mob)) THEN
|
||||
CALL prtmob(itemp, sigma_tmp, carrier_density(itemp), fi_check, ef0(itemp), etemp, max_mob(itemp))
|
||||
ELSE
|
||||
CALL prtmob(itemp, sigma_tmp, carrier_density(itemp), fi_check, ef0(itemp), etemp)
|
||||
ENDIF
|
||||
sigma(:, :, itemp) = sigma_tmp(:, :)
|
||||
ENDDO ! itemp
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE print_mob_b
|
||||
!-----------------------------------------------------------------------
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
SUBROUTINE print_hall(carrier_density, sigma_serta, sigma_bte, sigmab_serta, sigmab_bte)
|
||||
!-----------------------------------------------------------------------
|
||||
!!
|
||||
!! This routine print the final conductivity, mobility and Hall factor
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE epwcom, ONLY : system_2d, nstemp, bfieldx, bfieldy, bfieldz
|
||||
USE low_lvl, ONLY : matinv3
|
||||
USE io_global, ONLY : stdout
|
||||
USE cell_base, ONLY : omega, at, alat
|
||||
USE elph2, ONLY : gtemp
|
||||
USE constants_epw, ONLY : zero, kelvin2eV, ryd2ev, eps80, cm2m, &
|
||||
bohr2ang, ang2cm, hbarJ
|
||||
USE constants, ONLY : electron_si
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
REAL(KIND = DP), INTENT(in) :: carrier_density(nstemp)
|
||||
!! Carrier density [nb of carrier per unit cell]
|
||||
REAL(KIND = DP), INTENT(in) :: sigma_serta(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor without Magnetic field.
|
||||
REAL(KIND = DP), INTENT(in) :: sigma_bte(3, 3, nstemp)
|
||||
!! BTE conductivity tensor without Magnetic field.
|
||||
REAL(KIND = DP), INTENT(in) :: sigmab_serta(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor with Magnetic field.
|
||||
REAL(KIND = DP), INTENT(in) :: sigmab_bte(3, 3, nstemp)
|
||||
!! BTE conductivity tensor with Magnetic field.
|
||||
!
|
||||
! Local variables
|
||||
INTEGER :: itemp
|
||||
!! Temperature index
|
||||
REAL(KIND = DP) :: carrier_density_cm(nstemp)
|
||||
!! Carrier density (cm^(-d))
|
||||
REAL(KIND = DP) :: etemp
|
||||
!! Temperature value in Ry
|
||||
REAL(KIND = DP) :: b_norm
|
||||
!! Norm of the B-field
|
||||
REAL(KIND = DP) :: inv_cell
|
||||
!! Inverse of the volume or Area
|
||||
REAL(KIND = DP) :: mob_serta(3, 3, nstemp)
|
||||
!! SERTA mobility tensor without Magnetic field.
|
||||
REAL(KIND = DP) :: mob_bte(3, 3, nstemp)
|
||||
!! BTE mobility tensor without Magnetic field.
|
||||
REAL(KIND = DP) :: mobb_serta(3, 3, nstemp)
|
||||
!! SERTA mobility tensor with Magnetic field.
|
||||
REAL(KIND = DP) :: mobb_bte(3, 3, nstemp)
|
||||
!! BTE mobility tensor with Magnetic field.
|
||||
REAL(KIND = DP) :: sigma_serta_si(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor without Magnetic field in SI unit.
|
||||
REAL(KIND = DP) :: sigma_bte_si(3, 3, nstemp)
|
||||
!! BTE conductivity tensor without Magnetic field in SI unit.
|
||||
REAL(KIND = DP) :: sigmab_serta_si(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor with Magnetic field in SI unit.
|
||||
REAL(KIND = DP) :: sigmab_bte_si(3, 3, nstemp)
|
||||
!! BTE conductivity tensor with Magnetic field in SI unit.
|
||||
REAL(KIND = DP) :: hall_serta(3, 3, nstemp)
|
||||
!! Hall factor
|
||||
REAL(KIND = DP) :: hall(3, 3, nstemp)
|
||||
!! Hall factor
|
||||
REAL(KIND = DP) :: sigma_inv(3, 3, nstemp)
|
||||
!! Inverse conductivity tensor
|
||||
REAL(KIND = DP) :: mob_inv(3, 3, nstemp)
|
||||
!! Inverse mobility tensor
|
||||
!
|
||||
! Convert carrier number in true carrier density
|
||||
carrier_density_cm(:) = zero
|
||||
DO itemp = 1, nstemp
|
||||
IF (system_2d) THEN
|
||||
inv_cell = (at(3, 3) * alat) / omega
|
||||
carrier_density_cm(itemp) = carrier_density(itemp) * (inv_cell * (bohr2ang * ang2cm)**(-2))
|
||||
ELSE
|
||||
inv_cell = 1.0d0 / omega
|
||||
carrier_density_cm(itemp) = carrier_density(itemp) * (inv_cell * (bohr2ang * ang2cm)**(-3))
|
||||
ENDIF
|
||||
!
|
||||
mob_serta(:, :, itemp) = (sigma_serta(:, :, itemp) * electron_si * (bohr2ang * ang2cm)**2) &
|
||||
/ (carrier_density(itemp) * hbarJ)
|
||||
mob_bte(:, :, itemp) = (sigma_bte(:, :, itemp) * electron_si * (bohr2ang * ang2cm)**2) &
|
||||
/ (carrier_density(itemp) * hbarJ)
|
||||
mobb_serta(:, :, itemp) = (sigmab_serta(:, :, itemp) * electron_si * (bohr2ang * ang2cm)**2) &
|
||||
/ (carrier_density(itemp) * hbarJ)
|
||||
mobb_bte(:, :, itemp) = (sigmab_bte(:, :, itemp) * electron_si * (bohr2ang * ang2cm)**2) &
|
||||
/ (carrier_density(itemp) * hbarJ)
|
||||
!
|
||||
! Convert conductivity tensor in SI units [Siemens m^-1=Coulomb s^-1 V^-1 m^-d ]
|
||||
! in 3d: cm^2 s^-1 V^-1 * (cm ^-2 cmtom^-1 C) = Coulomb s^-1 V^-1
|
||||
IF (system_2d) THEN
|
||||
sigma_serta_si(:, :, itemp) = mob_serta(:, :, itemp) * (electron_si * carrier_density_cm(itemp))
|
||||
sigma_bte_si(:, :, itemp) = mob_bte(:, :, itemp) * (electron_si * carrier_density_cm(itemp))
|
||||
sigmab_serta_si(:, :, itemp) = mobb_serta(:, :, itemp) * (electron_si * carrier_density_cm(itemp))
|
||||
sigmab_bte_si(:, :, itemp) = mobb_bte(:, :, itemp) * (electron_si * carrier_density_cm(itemp))
|
||||
ELSE
|
||||
sigma_serta_si(:, :, itemp) = mob_serta(:, :, itemp) * (electron_si * carrier_density_cm(itemp) * cm2m**(-1))
|
||||
sigma_bte_si(:, :, itemp) = mob_bte(:, :, itemp) * (electron_si * carrier_density_cm(itemp) * cm2m**(-1))
|
||||
sigmab_serta_si(:, :, itemp) = mobb_serta(:, :, itemp) * (electron_si * carrier_density_cm(itemp) * cm2m**(-1))
|
||||
sigmab_bte_si(:, :, itemp) = mobb_bte(:, :, itemp) * (electron_si * carrier_density_cm(itemp) * cm2m**(-1))
|
||||
ENDIF
|
||||
ENDDO ! itemp
|
||||
!
|
||||
b_norm = SQRT(bfieldx**2 + bfieldy**2 + bfieldz**2)
|
||||
WRITE(stdout, '(/5x, a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x, a)') 'BTE in the self-energy relaxation time approximation (SERTA)'
|
||||
WRITE(stdout, '(5x, a)') REPEAT('=',93)
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
WRITE(stdout, '(5x,a)') ' '
|
||||
WRITE(stdout, '(5x,a,1f10.4,a)') 'Temperature: ', etemp * ryd2ev / kelvin2eV, ' K'
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,a,1E18.6)') 'Conductivity tensor without magnetic field | with magnetic field [Siemens]'
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,a,1E18.6)') 'Conductivity tensor without magnetic field | with magnetic field [Siemens/m]'
|
||||
ENDIF
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_serta_si(:, 1, itemp), ' |', sigmab_serta_si(:, 1, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_serta_si(:, 2, itemp), ' |', sigmab_serta_si(:, 2, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_serta_si(:, 3, itemp), ' |', sigmab_serta_si(:, 3, itemp)
|
||||
!
|
||||
WRITE(stdout, '(5x,a)') 'Mobility tensor without magnetic field | with magnetic field [cm^2/Vs]'
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_serta(:, 1, itemp), ' |', mobb_serta(:, 1, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_serta(:, 2, itemp), ' |', mobb_serta(:, 2, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_serta(:, 3, itemp), ' |', mobb_serta(:, 3, itemp)
|
||||
!
|
||||
sigma_inv(:, :, itemp) = matinv3(sigma_serta(:, :, itemp))
|
||||
IF (system_2d) THEN ! We suppose vacuum is in the z direction
|
||||
mob_serta(3, 3, :) = 1d0
|
||||
mob_inv(:, :, itemp) = matinv3(mob_serta(:, :, itemp))
|
||||
mob_inv(3, 3, :) = 0d0
|
||||
ELSE
|
||||
mob_inv(:, :, itemp) = matinv3(mob_serta(:, :, itemp))
|
||||
ENDIF
|
||||
hall_serta(:, :, itemp) = MATMUL(MATMUL(mobb_serta(:, :, itemp), mob_inv(:, :, itemp)), &
|
||||
mob_inv(:, :, itemp)) / (b_norm * hbarJ ) * electron_si * (bohr2ang * ang2cm)**2
|
||||
!
|
||||
! bfield is energy*sec/lenght**2, mobility is in cm**2 V**-1 sec**-1.
|
||||
! To convert bfield to the same units of the mobility I do the same conversion as passing from the sigma
|
||||
! tensor to the mobility: the energy is converted with electron_SI/hbarJ and the lenght**2 with (bohr2ang * ang2cm)**2
|
||||
WRITE(stdout, '(5x, a, 1E18.6)') 'Hall factor'
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall_serta(:, 1, itemp)
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall_serta(:, 2, itemp)
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall_serta(:, 3, itemp)
|
||||
ENDDO
|
||||
!
|
||||
WRITE(stdout, '(/5x, a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x, a)') 'BTE'
|
||||
WRITE(stdout, '(5x, a)') REPEAT('=',93)
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
WRITE(stdout, '(5x,a)') ' '
|
||||
WRITE(stdout, '(5x,a,1f10.4,a)') 'Temperature: ', etemp * ryd2ev / kelvin2eV, ' K'
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,a,1E18.6)') 'Conductivity tensor without magnetic field | with magnetic field [Siemens]'
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,a,1E18.6)') 'Conductivity tensor without magnetic field | with magnetic field [Siemens/m]'
|
||||
ENDIF
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_bte_si(:, 1, itemp), ' |', sigmab_bte_si(:, 1, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_bte_si(:, 2, itemp), ' |', sigmab_bte_si(:, 2, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') sigma_bte_si(:, 3, itemp), ' |', sigmab_bte_si(:, 3, itemp)
|
||||
!
|
||||
WRITE(stdout, '(5x,a)') 'Mobility tensor without magnetic field | with magnetic field [cm^2/Vs]'
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_bte(:, 1, itemp), ' |', mobb_bte(:, 1, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_bte(:, 2, itemp), ' |', mobb_bte(:, 2, itemp)
|
||||
WRITE(stdout, '(4x,3E14.5,a,3E14.5)') mob_bte(:, 3, itemp), ' |', mobb_bte(:, 3, itemp)
|
||||
!
|
||||
sigma_inv(:, :, itemp) = matinv3(sigma_bte(:, :, itemp))
|
||||
IF (system_2d) THEN ! We suppose vacuum is in the z direction
|
||||
mob_bte(3, 3, :) = 1d0
|
||||
mob_inv(:, :, itemp) = matinv3(mob_bte(:, :, itemp))
|
||||
mob_inv(3, 3, :) = 0d0
|
||||
ELSE
|
||||
mob_inv(:, :, itemp) = matinv3(mob_bte(:, :, itemp))
|
||||
ENDIF
|
||||
hall(:, :, itemp) = MATMUL(MATMUL(mobb_bte(:, :, itemp), mob_inv(:, :, itemp)), &
|
||||
mob_inv(:, :, itemp)) / (b_norm * hbarJ ) * electron_si * (bohr2ang * ang2cm)**2
|
||||
!
|
||||
! bfield is energy*sec/lenght**2, mobility is in cm**2 V**-1 sec**-1.
|
||||
! To convert bfield to the same units of the mobility I do the same conversion as passing from the sigma
|
||||
! tensor to the mobility: the energy is converted with electron_SI/hbarJ and the lenght**2 with (bohr2ang * ang2cm)**2
|
||||
WRITE(stdout, '(5x, a, 1E18.6)') 'Hall factor'
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall(:, 1, itemp)
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall(:, 2, itemp)
|
||||
WRITE(stdout, '(3x, 3E16.6)') hall(:, 3, itemp)
|
||||
ENDDO
|
||||
!
|
||||
! SP: To be removed when adding to the main QE repo.
|
||||
!WRITE(stdout, '(5x, a)')'---------------------------------------'
|
||||
!WRITE(stdout, '(5x, a)')' '
|
||||
!WRITE(stdout, '(4x, 2f12.2, 2f12.3)') mob_serta(1, 1, 1), mob_bte(1, 1, 1), hall_serta(1, 2, 1), hall(1, 2, 1)
|
||||
!WRITE(stdout, '(4x, 2f12.2, 2f12.3)') mob_serta(1, 1, 2), mob_bte(1, 1, 2), hall_serta(1, 2, 2), hall(1, 2, 2)
|
||||
!
|
||||
!-----------------------------------------------------------------------
|
||||
END SUBROUTINE print_hall
|
||||
!-----------------------------------------------------------------------
|
||||
!-------------------------------------------------------------------------
|
||||
END MODULE printing
|
||||
!-------------------------------------------------------------------------
|
||||
|
|
|
@ -58,19 +58,20 @@
|
|||
!! This implements Eq. 98 of Rev. Mod. Phys., 73, 515 (2001)
|
||||
!! SP: 04/2019 - Using nrx1 is overkill.
|
||||
!! SP: 11/2019 - Addition of system_2d (we assume z is the vacuum direction).
|
||||
!! SP: 08/2020 - Restoration of nrx and parallelization.
|
||||
!! SP: 08/2020 - Restoration of nrx and parallelization.
|
||||
!! SP: 04/2021 - Addition of quadrupoles
|
||||
!!
|
||||
USE kinds, ONLY : DP
|
||||
USE constants_epw, ONLY : fpi, e2
|
||||
USE constants, ONLY : pi
|
||||
USE cell_base, ONLY : bg, omega
|
||||
USE constants_epw, ONLY : eps6, czero
|
||||
USE epwcom, ONLY : system_2d
|
||||
USE constants_epw, ONLY : pi, fpi, e2
|
||||
USE cell_base, ONLY : bg, omega, alat
|
||||
USE constants_epw, ONLY : eps6, ci, zero, czero, twopi, eps8
|
||||
USE io_global, ONLY : ionode_id
|
||||
USE mp_world, ONLY : mpime
|
||||
USE mp_global, ONLY : world_comm
|
||||
USE division, ONLY : para_bounds
|
||||
USE mp, ONLY : mp_bcast, mp_sum
|
||||
USE epwcom, ONLY : lpolar, system_2d
|
||||
USE elph2, ONLY : area, Qmat
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -86,7 +87,7 @@
|
|||
!! q-vector from the full coarse or fine grid.
|
||||
REAL(KIND = DP), INTENT(in) :: epsil(3, 3)
|
||||
!! dielectric constant tensor
|
||||
REAL(KIND = DP), INTENT(in) :: zeu(3, 3, nat)
|
||||
REAL(KIND = DP), INTENT(inout) :: zeu(3, 3, nat)
|
||||
!! effective charges tensor
|
||||
REAL(KIND = DP), INTENT(in) :: signe
|
||||
!! signe=+/-1.0 ==> add/subtract rigid-ion term
|
||||
|
@ -104,6 +105,8 @@
|
|||
!! Cartesian direction 1
|
||||
INTEGER :: j
|
||||
!! Cartesian direction 1
|
||||
INTEGER :: ipol, jpol, kpol, lpol
|
||||
!! Polarization direction
|
||||
INTEGER :: mm, m1, m2, m3
|
||||
!! Loop over q-points
|
||||
INTEGER :: mmax
|
||||
|
@ -113,56 +116,79 @@
|
|||
INTEGER :: mm_start
|
||||
!! Starting ir for this cores
|
||||
INTEGER :: mm_stop
|
||||
!! Ending ir for this pool
|
||||
!! Ending ir for this pool
|
||||
INTEGER :: diff
|
||||
!! Difference between starting and ending on master core
|
||||
INTEGER :: add
|
||||
!! Additional element
|
||||
!! Additional element
|
||||
REAL(KIND = DP):: geg
|
||||
!! <q+G| epsil | q+G>
|
||||
REAL(KIND = DP) :: alph
|
||||
!! Ewald parameter
|
||||
REAL(KIND = DP) :: fac
|
||||
!! Missing definition
|
||||
REAL(KIND = DP) :: g1, g2, g3
|
||||
!! Missing definition
|
||||
REAL(KIND = DP) :: gg(3)
|
||||
!! G-vectors
|
||||
REAL(KIND = DP) :: facgd
|
||||
!! fac * EXP(-geg / (alph * 4.0d0)) / geg
|
||||
REAL(KIND = DP) :: arg
|
||||
!! Missing definition
|
||||
!! Argument of the exponential
|
||||
REAL(KIND = DP) :: gmax
|
||||
!! Maximum G
|
||||
REAL(KIND = DP) :: zag(3)
|
||||
!! Z * G
|
||||
REAL(KIND = DP) :: qag(3)
|
||||
!! Q * G
|
||||
REAL(KIND = DP) :: zbg(3)
|
||||
!! Z * G
|
||||
REAL(KIND = DP) :: zcg(3)
|
||||
!! Z * G
|
||||
REAL(KIND = DP) :: fnat(3)
|
||||
!! Missing definition
|
||||
REAL(KIND = DP) :: qcg(3)
|
||||
!! Q * G
|
||||
COMPLEX(KIND = DP) :: fnat(3)
|
||||
!! Z with \delta_kk' summed
|
||||
COMPLEX(KIND = DP) :: qnat(3)
|
||||
!! Q with \delta_kk' summed
|
||||
REAL(KIND = DP) :: reff(2, 2)
|
||||
!! Effective screening length for 2D materials
|
||||
REAL(KIND = DP) :: grg
|
||||
!! G-vector * reff * G-vector
|
||||
COMPLEX(KIND = DP) :: Qqq
|
||||
!! Quadrupole-quadrupole term
|
||||
COMPLEX(KIND = DP) :: Qdq
|
||||
!! Quadrupole-dipole term
|
||||
COMPLEX(KIND = DP) :: Qdd
|
||||
!! Dipole-dipole term
|
||||
COMPLEX(KIND = DP) :: facg
|
||||
!! Missing definition
|
||||
COMPLEX(KIND = DP) :: dyn_tmp(3 * nat, 3 * nat)
|
||||
!! Temporary dyn. matrice
|
||||
!
|
||||
! In case you have a non polar materials but you want quadrupole effects
|
||||
! Enforce 0 Born effective charges
|
||||
IF (.NOT. lpolar) THEN
|
||||
zeu(:, :, :) = zero
|
||||
ENDIF
|
||||
Qqq = zero
|
||||
Qdq = zero
|
||||
Qdd = zero
|
||||
!
|
||||
! alph is the Ewald parameter, geg is an estimate of G^2
|
||||
! such that the G-space sum is convergent for that alph
|
||||
! very rough estimate: geg/4/alph > gmax = 14
|
||||
! (exp (-14) = 10^-6)
|
||||
!
|
||||
IF (ABS(ABS(signe) - 1.0) > eps6) CALL errore('rgd_blk', ' wrong value for signe ', 1)
|
||||
!
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
!fac = (signe * e2 * fpi) / omega*0.5d0*alat/bg(3,3)
|
||||
!reff=0.0d0
|
||||
!DO i=1,2
|
||||
! DO j=1,2
|
||||
! reff(i,j)=epsil(i,j)*0.5d0*tpi/bg(3,3) ! (eps)*c/2 in 2pi/a units
|
||||
! ENDDO
|
||||
!ENDDO
|
||||
!DO i=1,2
|
||||
! reff(i,i)=reff(i,i)-0.5d0*tpi/bg(3,3) ! (-1)*c/2 in 2pi/a units
|
||||
!ENDDO
|
||||
! (e^2 * 2\pi) / Area
|
||||
fac = (signe * e2 * twopi) / area
|
||||
! Effective screening length
|
||||
! reff = (epsil - 1) * c/2
|
||||
reff(:, :) = zero
|
||||
reff(:, :) = epsil(1:2, 1:2) * 0.5d0 * twopi / bg(3, 3) ! (eps)*c/2 in 2pi/a units
|
||||
reff(1, 1) = reff(1, 1) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
reff(2, 2) = reff(2, 2) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
ELSE
|
||||
! (e^2 * 4\pi) / Volume
|
||||
fac = (signe * e2 * fpi) / omega
|
||||
|
@ -193,7 +219,7 @@
|
|||
ENDIF
|
||||
!
|
||||
mmax = (2 * nr1x + 1) * (2 * nr2x + 1) * (2 * nr3x + 1)
|
||||
!
|
||||
!
|
||||
! Distribute the cpu
|
||||
CALL para_bounds(mm_start, mm_stop, mmax)
|
||||
!
|
||||
|
@ -208,73 +234,173 @@
|
|||
ELSE
|
||||
add = 0
|
||||
ENDIF
|
||||
!
|
||||
!
|
||||
dyn_tmp(:, :) = czero
|
||||
!
|
||||
! DO mm = 1, mmax
|
||||
! DO mm = 1, mmax
|
||||
DO mm = mm_start, mm_stop + add
|
||||
IF (add == 1 .AND. mm == mm_stop + add) CYCLE
|
||||
!
|
||||
!
|
||||
m1 = -nr1x + FLOOR(1.0d0 * (mm - 1) / ((2 * nr3x + 1) * (2 * nr2x + 1)))
|
||||
m2 = -nr2x + MOD(FLOOR(1.0d0 * (mm - 1) / (2 * nr3x + 1)), (2 * nr2x + 1))
|
||||
m3 = -nr3x + MOD(1.0d0 * (mm - 1), 1.0d0 * (2 * nr3x + 1))
|
||||
m3 = -nr3x + MOD(1.0d0 * (mm - 1), 1.0d0 * (2 * nr3x + 1))
|
||||
!
|
||||
g1 = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1,3)
|
||||
g2 = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2,3)
|
||||
g3 = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3,3)
|
||||
! Special case of q = 0
|
||||
gg(1) = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1,3)
|
||||
gg(2) = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2,3)
|
||||
gg(3) = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3,3)
|
||||
!
|
||||
geg = (g1 * (epsil(1, 1) * g1 + epsil(1, 2) * g2 + epsil(1, 3) * g3) + &
|
||||
g2 * (epsil(2, 1) * g1 + epsil(2, 2) * g2 + epsil(2, 3) * g3) + &
|
||||
g3 * (epsil(3, 1) * g1 + epsil(3, 2) * g2 + epsil(3, 3) * g3))
|
||||
IF (system_2d) THEN
|
||||
geg = gg(1)**2 + gg(2)**2 + gg(3)**2
|
||||
grg = zero
|
||||
IF (gg(1)**2 + gg(2)**2 > eps8) THEN
|
||||
grg = gg(1) * reff(1, 1) * gg(1) + gg(1) * reff(1, 2) * gg(2) + gg(2) * reff(2, 1) * gg(1) + gg(2) * reff(2, 2) * gg(2)
|
||||
grg = grg / (gg(1)**2 + gg(2)**2)
|
||||
ENDIF
|
||||
ELSE
|
||||
!
|
||||
geg = (gg(1) * (epsil(1, 1) * gg(1) + epsil(1, 2) * gg(2) + epsil(1, 3) * gg(3)) + &
|
||||
gg(2) * (epsil(2, 1) * gg(1) + epsil(2, 2) * gg(2) + epsil(2, 3) * gg(3)) + &
|
||||
gg(3) * (epsil(3, 1) * gg(1) + epsil(3, 2) * gg(2) + epsil(3, 3) * gg(3)))
|
||||
ENDIF
|
||||
!
|
||||
IF (geg > 0.0d0 .AND. geg / (alph * 4.0d0) < gmax) THEN
|
||||
!
|
||||
facgd = fac * EXP(-geg / (alph * 4.0d0)) / geg
|
||||
IF (system_2d) THEN
|
||||
facgd = fac * (twopi / alat) * EXP(-geg / (alph * 4.0d0)) / SQRT(geg) / (1.0 + grg * SQRT(geg))
|
||||
ELSE
|
||||
facgd = fac * EXP(-geg / (alph * 4.0d0)) / geg
|
||||
ENDIF
|
||||
!
|
||||
DO na = 1, nat
|
||||
zag(:) = g1 * zeu(1, :, na) + g2 * zeu(2, :, na) + g3 * zeu(3, :, na)
|
||||
fnat(:) = 0.d0
|
||||
DO nb = 1, nat
|
||||
arg = 2.d0 * pi * (g1 * (tau(1, na) - tau(1, nb)) + &
|
||||
g2 * (tau(2, na) - tau(2, nb)) + &
|
||||
g3 * (tau(3, na) - tau(3, nb)))
|
||||
zcg(:) = g1 * zeu(1, :, nb) + g2 * zeu(2, :, nb) + g3 * zeu(3, :, nb)
|
||||
fnat(:) = fnat(:) + zcg(:) * COS(arg)
|
||||
zag(:) = zero
|
||||
DO i = 1, 3
|
||||
DO ipol = 1, 3
|
||||
zag(i) = zag(i) + gg(ipol) * zeu(ipol, i, na)
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
qag(:) = zero
|
||||
DO i = 1, 3
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
qag(i) = qag(i) + gg(ipol) * gg(jpol) * Qmat(na, i, ipol, jpol)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
fnat(:) = zero
|
||||
qnat(:) = zero
|
||||
DO nb = 1, nat
|
||||
arg = 2.d0 * pi * (gg(1) * (tau(1, na) - tau(1, nb)) + &
|
||||
gg(2) * (tau(2, na) - tau(2, nb)) + &
|
||||
gg(3) * (tau(3, na) - tau(3, nb)))
|
||||
! Dipole-dipole
|
||||
zcg(:) = zero
|
||||
DO j = 1, 3 ! Cartesian direction alpha
|
||||
DO jpol = 1, 3 !
|
||||
zcg(j) = zcg(j) + gg(jpol) * zeu(jpol, j, nb)
|
||||
ENDDO
|
||||
fnat(j) = fnat(j) + zcg(j) * CMPLX(COS(arg), SIN(arg), KIND = DP)
|
||||
ENDDO
|
||||
!
|
||||
qcg(:) = zero
|
||||
DO j = 1, 3 ! Cartesian direction alpha
|
||||
DO jpol = 1, 3
|
||||
DO kpol = 1, 3
|
||||
qcg(j) = qcg(j) + gg(jpol) * gg(kpol) * Qmat(nb, j, jpol, kpol)
|
||||
ENDDO
|
||||
ENDDO
|
||||
qnat(j) = qnat(j) + qcg(j) * CMPLX(COS(arg), SIN(arg), KIND = DP)
|
||||
ENDDO
|
||||
!
|
||||
ENDDO ! nb
|
||||
DO j = 1, 3
|
||||
DO i = 1, 3
|
||||
! Dipole-dipole
|
||||
Qdd = zag(i) * fnat(j)
|
||||
! Dipole-quad
|
||||
Qdq = 0.5d0 * (zag(i) * qnat(j) - fnat(i) * qag(i))
|
||||
! Quad-quad
|
||||
Qqq = 0.25d0 * qag(i) * qnat(j)
|
||||
!
|
||||
dyn_tmp((na - 1) * 3 + i, (na - 1) * 3 + j) = dyn_tmp((na - 1) * 3 + i, (na - 1) * 3 + j) &
|
||||
- facgd * zag(i) * fnat(j)
|
||||
- facgd * (Qdd + ci * Qdq + Qqq)
|
||||
ENDDO ! i
|
||||
ENDDO ! j
|
||||
ENDDO ! nat
|
||||
ENDIF ! geg
|
||||
!
|
||||
g1 = g1 + q(1)
|
||||
g2 = g2 + q(2)
|
||||
g3 = g3 + q(3)
|
||||
! Case q =/ 0
|
||||
gg(1) = gg(1) + q(1)
|
||||
gg(2) = gg(2) + q(2)
|
||||
gg(3) = gg(3) + q(3)
|
||||
!
|
||||
geg = (g1 * (epsil(1, 1) * g1 + epsil(1, 2) * g2 + epsil(1, 3) * g3) + &
|
||||
g2 * (epsil(2, 1) * g1 + epsil(2, 2) * g2 + epsil(2, 3) * g3) + &
|
||||
g3 * (epsil(3, 1) * g1 + epsil(3, 2) * g2 + epsil(3, 3) * g3))
|
||||
IF (system_2d) THEN
|
||||
geg = gg(1)**2 + gg(2)**2 + gg(3)**2
|
||||
grg = zero
|
||||
IF (gg(1)**2 + gg(2)**2 > eps8) THEN
|
||||
grg = gg(1) * reff(1, 1) * gg(1) + gg(1) * reff(1, 2) * gg(2) + gg(2) * reff(2, 1) * gg(1) + gg(2) * reff(2, 2) * gg(2)
|
||||
grg = grg / (gg(1)**2 + gg(2)**2)
|
||||
ENDIF
|
||||
ELSE
|
||||
geg = (gg(1) * (epsil(1, 1) * gg(1) + epsil(1, 2) * gg(2) + epsil(1, 3) * gg(3)) + &
|
||||
gg(2) * (epsil(2, 1) * gg(1) + epsil(2, 2) * gg(2) + epsil(2, 3) * gg(3)) + &
|
||||
gg(3) * (epsil(3, 1) * gg(1) + epsil(3, 2) * gg(2) + epsil(3, 3) * gg(3)))
|
||||
ENDIF
|
||||
!
|
||||
IF (geg > 0.0d0 .AND. geg / (alph * 4.0d0) < gmax) THEN
|
||||
!
|
||||
facgd = fac * EXP(-geg / (alph * 4.0d0)) / geg
|
||||
IF (system_2d) THEN
|
||||
facgd = fac * (twopi / alat) * EXP(-geg / (alph * 4.0d0)) / (SQRT(geg) * (1.0 + grg * SQRT(geg)))
|
||||
ELSE
|
||||
facgd = fac * EXP(-geg / (alph * 4.0d0)) / geg
|
||||
ENDIF
|
||||
!
|
||||
DO nb = 1, nat
|
||||
zbg(:) = g1 * zeu(1, :, nb) + g2 * zeu(2, :, nb) + g3 * zeu(3, :, nb)
|
||||
DO na = 1, nat
|
||||
zag(:) = g1 * zeu(1, :, na) + g2 * zeu(2, :, na) + g3 * zeu(3, :, na)
|
||||
arg = 2.d0 * pi * (g1 * (tau(1, na) - tau(1 ,nb)) + &
|
||||
g2 * (tau(2, na) - tau(2, nb)) + &
|
||||
g3 * (tau(3, na) - tau(3, nb)) )
|
||||
DO nb = 1, nat ! kappa
|
||||
DO na = 1, nat ! kappa'
|
||||
arg = 2.d0 * pi * (gg(1) * (tau(1, na) - tau(1 ,nb)) + &
|
||||
gg(2) * (tau(2, na) - tau(2, nb)) + &
|
||||
gg(3) * (tau(3, na) - tau(3, nb)) )
|
||||
!
|
||||
facg = facgd * CMPLX(COS(arg), SIN(arg), DP)
|
||||
DO j = 1, 3
|
||||
DO i = 1, 3
|
||||
!
|
||||
DO j = 1, 3 ! Cartesian direction alpha
|
||||
DO i = 1, 3 ! Carestian direction beta
|
||||
! Dipole - dipole term
|
||||
Qdd = zero
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
Qdd = Qdd + gg(ipol) * zeu(ipol, j, nb) * gg(jpol) * zeu(jpol, i, na)
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! Dipole - quadrupole term
|
||||
Qdq = zero
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
DO kpol = 1, 3
|
||||
Qdq = Qdq + 0.5 * (gg(ipol) * zeu(ipol, j, nb) * gg(jpol) * gg(kpol) * Qmat(na, i, jpol, kpol) &
|
||||
- gg(ipol) * gg(jpol) * Qmat(nb, j, ipol, jpol) * gg(kpol) * zeu(kpol, i, na))
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! Quadrupole - quadrupole term
|
||||
Qqq = zero
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
DO kpol = 1, 3
|
||||
DO lpol = 1, 3
|
||||
Qqq = Qqq + 0.25 * gg(ipol) * gg(jpol) * Qmat(nb, j, ipol, jpol) * &
|
||||
gg(kpol) * gg(lpol) * Qmat(na, i, kpol, lpol)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
dyn_tmp((na - 1) * 3 + i, (nb - 1) * 3 + j) = dyn_tmp((na - 1) * 3 + i, (nb - 1) * 3 + j) &
|
||||
+ facg * zag(i) * zbg(j)
|
||||
+ facg * (Qdd + ci * Qdq + Qqq)
|
||||
ENDDO ! i
|
||||
ENDDO ! j
|
||||
ENDDO ! na
|
||||
|
@ -304,7 +430,7 @@
|
|||
!! e^{-i(q+G)\tau_\kappa} with respect to Eq. (4) of PRL 115, 176401 (2015).
|
||||
!! The full equation can be found in Eq. (S4) of the supplemental materials of PRL 115, 176401 (2015).
|
||||
!! In practical calculations the G-vector sum is restricted to small |q + G| via the cutoff
|
||||
!! function e^{-({\bf q}+{\bf G})^2/4\alpha}. See footnote 7 of RMP 89, 015003 (2017).
|
||||
!! function e^{-({\bf q}+{\bf G})^2/4\alpha}. See footnote 7 of RMP 89, 015003 (2017).
|
||||
!!
|
||||
!!
|
||||
!! The final implemented formula is:
|
||||
|
@ -319,8 +445,10 @@
|
|||
USE kinds, ONLY : dp
|
||||
USE cell_base, ONLY : bg, omega, alat
|
||||
USE ions_base, ONLY : tau, nat
|
||||
USE constants_epw, ONLY : twopi, fpi, e2, ci, czero, eps12
|
||||
USE epwcom, ONLY : shortrange
|
||||
USE constants_epw, ONLY : twopi, fpi, e2, ci, czero, eps12, zero, eps8
|
||||
USE epwcom, ONLY : shortrange, lpolar, system_2d
|
||||
USE elph2, ONLY : area, Qmat
|
||||
USE io_global, ONLY : stdout
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -336,7 +464,7 @@
|
|||
!! q-vector from the full coarse or fine grid.
|
||||
REAL(KIND = DP), INTENT(in) :: epsil(3, 3)
|
||||
!! dielectric constant tensor
|
||||
REAL(KIND = DP), INTENT(in) :: zeu(3, 3, nat)
|
||||
REAL(KIND = DP), INTENT(inout) :: zeu(3, 3, nat)
|
||||
!! effective charges tensor
|
||||
REAL(KIND = DP), INTENT(in) :: signe
|
||||
!! signe=+/-1.0 ==> add/subtract long range term
|
||||
|
@ -350,68 +478,131 @@
|
|||
! Local variables
|
||||
INTEGER :: na
|
||||
!! Atom index 1
|
||||
INTEGER :: ipol
|
||||
!! Polarison
|
||||
INTEGER :: ipol, jpol, kpol
|
||||
!! Polarison direction
|
||||
INTEGER :: m1, m2, m3
|
||||
!! Loop over q-points
|
||||
INTEGER :: nr1x, nr2x, nr3x
|
||||
!! Minimum supercell size to include all vector such that G^2 < geg
|
||||
REAL(KIND = DP) :: qeq
|
||||
!! <q+G| epsil | q+G>
|
||||
REAL(KIND = DP) :: arg
|
||||
!!
|
||||
!! Argument of the cos,sin for the Euler formula
|
||||
REAL(KIND = DP) :: zaq
|
||||
!!
|
||||
REAL(KIND = DP) :: g1, g2, g3
|
||||
!!
|
||||
!! Z^* \cdot (q+g)
|
||||
REAL(KIND = DP) :: gg(3)
|
||||
!! G-vector
|
||||
REAL(KIND = DP) :: gmax
|
||||
!!
|
||||
!! Max G-vector
|
||||
REAL(KIND = DP) :: alph
|
||||
!!
|
||||
!! Ewald factor (arbitrary, here chosen to be 1)
|
||||
REAL(KIND = DP) :: geg
|
||||
!!
|
||||
!! <q+G| epsil | q+G>
|
||||
REAL(KIND = DP) :: Qval, Qqq
|
||||
!! In the case of Si, its a single value
|
||||
REAL(KIND = DP) :: reff(2, 2)
|
||||
!! Effective screening length for 2D materials
|
||||
REAL(KIND = DP) :: grg
|
||||
!! G-vector * reff * G-vector
|
||||
COMPLEX(KIND = DP) :: fac
|
||||
!!
|
||||
!! Prefactor
|
||||
COMPLEX(KIND = DP) :: facqd
|
||||
!!
|
||||
!! Exp function
|
||||
COMPLEX(KIND = DP) :: facq
|
||||
!!
|
||||
!! Prefactor
|
||||
COMPLEX(KIND = DP) :: epmatl(nmodes)
|
||||
!! Long-range part of the el-ph matrix elements
|
||||
!
|
||||
IF(ABS(ABS(signe) - 1.0) > eps12) CALL errore('rgd_blk_epw', 'Erong value for signe ', 1)
|
||||
! If non-polar materials with quadrupoles
|
||||
IF (.NOT. lpolar) THEN
|
||||
zeu(:, :, :) = zero
|
||||
ENDIF
|
||||
!
|
||||
IF(ABS(ABS(signe) - 1.0) > eps12) CALL errore('rgd_blk_epw', 'Wrong value for signe ', 1)
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
! (e^2 * 2\pi * ci) / Area
|
||||
fac = (signe * e2 * twopi * ci) / area
|
||||
! Effective screening length
|
||||
! reff = (epsil - 1) * c/2
|
||||
reff(:, :) = zero
|
||||
reff(:, :) = epsil(1:2, 1:2) * 0.5d0 * twopi / bg(3, 3) ! (eps)*c/2 in 2pi/a units
|
||||
reff(1, 1) = reff(1, 1) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
reff(2, 2) = reff(2, 2) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
ELSE
|
||||
! (e^2 * 4\pi * i) / Volume
|
||||
fac = (signe * e2 * fpi * ci) / omega
|
||||
ENDIF
|
||||
!
|
||||
gmax = 14.d0
|
||||
alph = 1.0d0
|
||||
geg = gmax * alph * 4.0d0
|
||||
fac = signe * e2 * fpi / omega * ci
|
||||
!
|
||||
! Estimate of nr1x,nr2x,nr3x generating all vectors up to G^2 < geg
|
||||
! Only for dimensions where periodicity is present.
|
||||
IF (nqc1 == 1) THEN
|
||||
nr1x = 0
|
||||
ELSE
|
||||
nr1x = INT(SQRT(geg) / SQRT(bg(1, 1)**2 + bg(2, 1)**2 + bg(3, 1)**2)) + 1
|
||||
ENDIF
|
||||
IF (nqc2 == 1) THEN
|
||||
nr2x = 0
|
||||
ELSE
|
||||
nr2x = INT(SQRT(geg) / SQRT(bg(1, 2)**2 + bg(2, 2)**2 + bg(3, 2)**2)) + 1
|
||||
ENDIF
|
||||
IF (nqc3 == 1) THEN
|
||||
nr3x = 0
|
||||
ELSE
|
||||
nr3x = INT(SQRT(geg) / SQRT(bg(1, 3)**2 + bg(2, 3)**2 + bg(3, 3)**2)) + 1
|
||||
ENDIF
|
||||
!
|
||||
epmatl(:) = czero
|
||||
!DO m1 = -nrx1, nrx1
|
||||
DO m1 = -nqc1, nqc1
|
||||
DO m2 = -nqc2, nqc2
|
||||
DO m3 = -nqc3, nqc3
|
||||
!
|
||||
g1 = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1, 3) + q(1)
|
||||
g2 = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2, 3) + q(2)
|
||||
g3 = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3, 3) + q(3)
|
||||
!
|
||||
qeq = (g1 * (epsil(1, 1) * g1 + epsil(1, 2) * g2 + epsil(1, 3) * g3) + &
|
||||
g2 * (epsil(2, 1) * g1 + epsil(2, 2) * g2 + epsil(2, 3) * g3) + &
|
||||
g3 * (epsil(3, 1) * g1 + epsil(3, 2) * g2 + epsil(3, 3) * g3)) !*twopi/alat
|
||||
DO m1 = -nr1x, nr1x
|
||||
DO m2 = -nr2x, nr2x
|
||||
DO m3 = -nr3x, nr3x
|
||||
gg(1) = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1, 3) + q(1)
|
||||
gg(2) = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2, 3) + q(2)
|
||||
gg(3) = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3, 3) + q(3)
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
qeq = gg(1)**2 + gg(2)**2 + gg(3)**2
|
||||
grg = zero
|
||||
IF (gg(1)**2 + gg(2)**2 > eps8) THEN
|
||||
grg = gg(1) * reff(1, 1) * gg(1) + gg(1) * reff(1, 2) * gg(2) + &
|
||||
gg(2) * reff(2, 1) * gg(1) + gg(2) * reff(2, 2) * gg(2)
|
||||
grg = grg / (gg(1)**2 + gg(2)**2)
|
||||
ENDIF
|
||||
ELSE
|
||||
qeq = (gg(1) * (epsil(1, 1) * gg(1) + epsil(1, 2) * gg(2) + epsil(1, 3) * gg(3)) + &
|
||||
gg(2) * (epsil(2, 1) * gg(1) + epsil(2, 2) * gg(2) + epsil(2, 3) * gg(3)) + &
|
||||
gg(3) * (epsil(3, 1) * gg(1) + epsil(3, 2) * gg(2) + epsil(3, 3) * gg(3))) !*twopi/alat
|
||||
ENDIF
|
||||
|
||||
IF (qeq > 0.0d0 .AND. qeq / (alph * 4.0d0) < gmax) THEN
|
||||
!
|
||||
qeq = qeq * twopi / alat
|
||||
facqd = fac * EXP(-qeq / (alph * 4.0d0)) / qeq !/(two*wq)
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
facqd = fac * (twopi / alat) * EXP(-qeq / (alph * 4.0d0)) / (SQRT(qeq) * (1.0 + grg * SQRT(qeq)))
|
||||
ELSE
|
||||
facqd = fac * EXP(-qeq / (alph * 4.0d0)) / qeq !/(two*wq)
|
||||
ENDIF
|
||||
!
|
||||
DO na = 1, nat
|
||||
arg = - twopi * (g1 * tau(1, na) + g2 * tau(2, na) + g3 * tau(3, na))
|
||||
arg = - twopi * (gg(1) * tau(1, na) + gg(2) * tau(2, na) + gg(3) * tau(3, na))
|
||||
facq = facqd * CMPLX(COS(arg), SIN(arg), KIND = DP)
|
||||
DO ipol = 1, 3
|
||||
zaq = g1 * zeu(1, ipol, na) + g2 * zeu(2, ipol, na) + g3 * zeu(3, ipol, na)
|
||||
zaq = gg(1) * zeu(1, ipol, na) + gg(2) * zeu(2, ipol, na) + gg(3) * zeu(3, ipol, na)
|
||||
!
|
||||
epmat = epmat + facq * zaq * uq(3 * (na - 1) + ipol, :) * bmat
|
||||
epmatl = epmatl + facq * zaq * uq(3 * (na - 1) + ipol, :) * bmat
|
||||
Qqq = zero
|
||||
DO jpol = 1, 3
|
||||
DO kpol = 1, 3
|
||||
Qqq = Qqq + 0.5 * gg(jpol) * gg(kpol) * Qmat(na, ipol, jpol, kpol)
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
epmat = epmat + facq * (zaq - ci * Qqq) * uq(3 * (na - 1) + ipol, :) * bmat
|
||||
epmatl = epmatl + facq * (zaq - ci * Qqq) * uq(3 * (na - 1) + ipol, :) * bmat
|
||||
!
|
||||
ENDDO !ipol
|
||||
ENDDO !nat
|
||||
|
@ -452,7 +643,7 @@
|
|||
!! e^{-i(q+G)\tau_\kappa} with respect to Eq. (4) of PRL 115, 176401 (2015).
|
||||
!! The full equation can be found in Eq. (S4) of the supplemental materials of PRL 115, 176401 (2015).
|
||||
!! In practical calculations the G-vector sum is restricted to small |q + G| via the cutoff
|
||||
!! function e^{-({\bf q}+{\bf G})^2/4\alpha}. See footnote 7 of RMP 89, 015003 (2017).
|
||||
!! function e^{-({\bf q}+{\bf G})^2/4\alpha}. See footnote 7 of RMP 89, 015003 (2017).
|
||||
!!
|
||||
!! The final implemented formula is:
|
||||
!!
|
||||
|
@ -468,8 +659,9 @@
|
|||
USE kinds, ONLY : DP
|
||||
USE cell_base, ONLY : bg, omega, alat
|
||||
USE ions_base, ONLY : tau, nat
|
||||
USE constants_epw, ONLY : twopi, fpi, e2, ci, czero, eps12
|
||||
USE epwcom, ONLY : shortrange, nbndsub
|
||||
USE constants_epw, ONLY : twopi, fpi, e2, ci, czero, eps12, zero, eps8
|
||||
USE epwcom, ONLY : shortrange, nbndsub, lpolar, system_2d
|
||||
USE elph2, ONLY : area, Qmat
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -485,7 +677,7 @@
|
|||
!! q-vector from the full coarse or fine grid.
|
||||
REAL (KIND = DP), INTENT(in) :: epsil(3, 3)
|
||||
!! dielectric constant tensor
|
||||
REAL (KIND = DP), INTENT(in) :: zeu(3, 3, nat)
|
||||
REAL (KIND = DP), INTENT(inout) :: zeu(3, 3, nat)
|
||||
!! effective charges tensor
|
||||
REAL (KIND = DP), INTENT(in) :: signe
|
||||
!! signe=+/-1.0 ==> add/subtract long range term
|
||||
|
@ -499,26 +691,34 @@
|
|||
! Local variables
|
||||
INTEGER :: na
|
||||
!! Atom index 1
|
||||
INTEGER :: ipol
|
||||
INTEGER :: ipol, jpol, kpol
|
||||
!! Polarison
|
||||
INTEGER :: m1, m2, m3
|
||||
!! Loop over q-points
|
||||
INTEGER :: imode
|
||||
!! Mode index
|
||||
INTEGER :: nr1x, nr2x, nr3x
|
||||
!! Minimum supercell size to include all vector such that G^2 < geg
|
||||
REAL(KIND = DP) :: qeq
|
||||
!! <q+G| epsil | q+G>
|
||||
REAL(KIND = DP) :: arg
|
||||
!!
|
||||
!! Argument of the cos,sin for the Euler formula
|
||||
REAL(KIND = DP) :: zaq
|
||||
!!
|
||||
REAL(KIND = DP) :: g1, g2, g3
|
||||
!!
|
||||
!! Z^* \cdot (q+g)
|
||||
REAL(KIND = DP) :: gg(3)
|
||||
!! G-vector
|
||||
REAL(KIND = DP) :: gmax
|
||||
!!
|
||||
!! Max G-vector
|
||||
REAL(KIND = DP) :: alph
|
||||
!!
|
||||
!! Ewald factor (arbitrary, here chosen to be 1)
|
||||
REAL(KIND = DP) :: geg
|
||||
!!
|
||||
!! <G| epsil | G>
|
||||
REAL(KIND = DP) :: reff(2, 2)
|
||||
!! Effective screening length for 2D materials
|
||||
REAL(KIND = DP) :: grg
|
||||
!! G-vector * reff * G-vector
|
||||
REAL(KIND = DP) :: Qval, Qqq, tmp10
|
||||
!! In the case of Si, its a single value
|
||||
COMPLEX(KIND = DP) :: fac
|
||||
!!
|
||||
COMPLEX(KIND = DP) :: facqd
|
||||
|
@ -528,41 +728,101 @@
|
|||
COMPLEX(KIND = DP) :: epmatl(nbndsub, nbndsub, nmodes)
|
||||
!! Long-range part of the matrix element
|
||||
!
|
||||
! Impose zero Born effective charge in case of non-polar materials with quadrupoles
|
||||
IF (.NOT. lpolar) THEN
|
||||
zeu(:, :, :) = zero
|
||||
ENDIF
|
||||
!
|
||||
IF (ABS(ABS(signe) - 1.0) > eps12) CALL errore ('rgd_blk_epw_fine', 'Wrong value for signe ', 1)
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
! (e^2 * 2\pi * ci) / Area
|
||||
fac = (signe * e2 * twopi * ci) / area
|
||||
! Effective screening length
|
||||
! reff = (epsil - 1) * c/2
|
||||
reff(:, :) = zero
|
||||
reff(:, :) = epsil(1:2, 1:2) * 0.5d0 * twopi / bg(3, 3) ! (eps)*c/2 in 2pi/a units
|
||||
reff(1, 1) = reff(1, 1) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
reff(2, 2) = reff(2, 2) - 0.5d0 * twopi / bg(3, 3) ! (-1)*c/2 in 2pi/a units
|
||||
ELSE
|
||||
! (e^2 * 4\pi * i) / Volume
|
||||
fac = (signe * e2 * fpi * ci) / omega
|
||||
ENDIF
|
||||
!
|
||||
gmax = 14.d0
|
||||
alph = 1.0d0
|
||||
geg = gmax * alph * 4.0d0
|
||||
fac = signe * e2 * fpi / omega * ci
|
||||
!
|
||||
! Estimate of nr1x, nr2x, nr3x generating all vectors up to G^2 < geg
|
||||
! Only for dimensions where periodicity is present.
|
||||
IF (nqc1 == 1) THEN
|
||||
nr1x = 0
|
||||
ELSE
|
||||
nr1x = INT(SQRT(geg) / SQRT(bg(1, 1)**2 + bg(2, 1)**2 + bg(3, 1)**2)) + 1
|
||||
ENDIF
|
||||
IF (nqc2 == 1) THEN
|
||||
nr2x = 0
|
||||
ELSE
|
||||
nr2x = INT(SQRT(geg) / SQRT(bg(1, 2)**2 + bg(2, 2)**2 + bg(3, 2)**2)) + 1
|
||||
ENDIF
|
||||
IF (nqc3 == 1) THEN
|
||||
nr3x = 0
|
||||
ELSE
|
||||
nr3x = INT(SQRT(geg) / SQRT(bg(1, 3)**2 + bg(2, 3)**2 + bg(3, 3)**2)) + 1
|
||||
ENDIF
|
||||
!
|
||||
epmatl(:, :, :) = czero
|
||||
!
|
||||
DO m1 = -nqc1, nqc1
|
||||
DO m2 = -nqc2, nqc2
|
||||
DO m3 = -nqc3, nqc3
|
||||
DO m1 = -nr1x, nr1x
|
||||
DO m2 = -nr2x, nr2x
|
||||
DO m3 = -nr3x, nr3x
|
||||
!
|
||||
g1 = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1, 3) + q(1)
|
||||
g2 = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2, 3) + q(2)
|
||||
g3 = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3, 3) + q(3)
|
||||
gg(1) = m1 * bg(1, 1) + m2 * bg(1, 2) + m3 * bg(1, 3) + q(1)
|
||||
gg(2) = m1 * bg(2, 1) + m2 * bg(2, 2) + m3 * bg(2, 3) + q(2)
|
||||
gg(3) = m1 * bg(3, 1) + m2 * bg(3, 2) + m3 * bg(3, 3) + q(3)
|
||||
!
|
||||
qeq = (g1 * (epsil(1, 1) * g1 + epsil(1, 2) * g2 + epsil(1, 3) * g3) + &
|
||||
g2 * (epsil(2, 1) * g1 + epsil(2, 2) * g2 + epsil(2, 3) * g3) + &
|
||||
g3 * (epsil(3, 1) * g1 + epsil(3, 2) * g2 + epsil(3, 3) * g3)) !*twopi/alat
|
||||
IF (system_2d) THEN
|
||||
qeq = gg(1)**2 + gg(2)**2 + gg(3)**2
|
||||
grg = zero
|
||||
IF (gg(1)**2 + gg(2)**2 > eps8) THEN
|
||||
grg = gg(1) * reff(1, 1) * gg(1) + gg(1) * reff(1, 2) * gg(2) + &
|
||||
gg(2) * reff(2, 1) * gg(1) + gg(2) * reff(2, 2) * gg(2)
|
||||
grg = grg / (gg(1)**2 + gg(2)**2)
|
||||
ENDIF
|
||||
ELSE
|
||||
!
|
||||
qeq = (gg(1) * (epsil(1, 1) * gg(1) + epsil(1, 2) * gg(2) + epsil(1, 3) * gg(3)) + &
|
||||
gg(2) * (epsil(2, 1) * gg(1) + epsil(2, 2) * gg(2) + epsil(2, 3) * gg(3)) + &
|
||||
gg(3) * (epsil(3, 1) * gg(1) + epsil(3, 2) * gg(2) + epsil(3, 3) * gg(3))) !*twopi/alat
|
||||
ENDIF
|
||||
!
|
||||
IF (qeq > 0.0d0 .AND. qeq / (alph * 4.0d0) < gmax) THEN
|
||||
!
|
||||
qeq = qeq * twopi / alat
|
||||
facqd = fac * EXP(-qeq / (alph * 4.0d0)) / qeq !/(two*wq)
|
||||
!
|
||||
IF (system_2d) THEN
|
||||
facqd = fac * (twopi / alat) * EXP(-qeq / (alph * 4.0d0)) / (SQRT(qeq) * (1.0 + grg * SQRT(qeq)))
|
||||
ELSE
|
||||
facqd = fac * EXP(-qeq / (alph * 4.0d0)) / qeq !/(two*wq)
|
||||
ENDIF
|
||||
!
|
||||
DO na = 1, nat
|
||||
arg = -twopi * (g1 * tau(1, na) + g2 * tau(2, na) + g3 * tau(3, na))
|
||||
arg = - twopi * (gg(1) * tau(1, na) + gg(2) * tau(2, na) + gg(3) * tau(3, na))
|
||||
facq = facqd * CMPLX(COS(arg), SIN(arg), kind=DP)
|
||||
DO ipol = 1, 3
|
||||
zaq = g1 * zeu(1, ipol, na) + g2 * zeu(2, ipol, na) + g3 * zeu(3, ipol, na)
|
||||
zaq = gg(1) * zeu(1, ipol, na) + gg(2) * zeu(2, ipol, na) + gg(3) * zeu(3, ipol, na)
|
||||
!
|
||||
Qqq = zero
|
||||
DO jpol = 1, 3
|
||||
DO kpol = 1, 3
|
||||
Qqq = Qqq + 0.5 * gg(jpol) * gg(kpol) * Qmat(na, ipol, jpol, kpol)
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
DO imode = 1, nmodes
|
||||
CALL ZAXPY(nbndsub**2, facq * zaq * uq(3 * (na - 1) + ipol, imode), bmat(:, :), 1, epmat(:, :, imode), 1)
|
||||
CALL ZAXPY(nbndsub**2, facq * zaq * uq(3 * (na - 1) + ipol, imode), bmat(:, :), 1, epmatl(:, :, imode), 1)
|
||||
CALL ZAXPY(nbndsub**2, facq * (zaq - ci * Qqq) * uq(3 * (na - 1) + ipol, imode),&
|
||||
bmat(:, :), 1, epmat(:, :, imode), 1)
|
||||
CALL ZAXPY(nbndsub**2, facq * (zaq - ci * Qqq) * uq(3 * (na - 1) + ipol, imode), &
|
||||
bmat(:, :), 1, epmatl(:, :, imode), 1)
|
||||
ENDDO
|
||||
!
|
||||
ENDDO !ipol
|
||||
|
@ -599,7 +859,7 @@
|
|||
USE cell_base, ONLY : at, bg, omega, alat
|
||||
USE constants_epw, ONLY : twopi, ha2ev, cone, ci, eps5, eps10
|
||||
USE constants, ONLY : pi
|
||||
USE epwcom, ONLY : meff, fermi_diff, nel, smear_rpa
|
||||
USE epwcom, ONLY : meff, fermi_diff, nel, smear_rpa, system_2d
|
||||
USE io_global, ONLY : stdout
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
@ -641,7 +901,11 @@
|
|||
COMPLEX(KIND = DP) :: u
|
||||
!! Complex frequency argument
|
||||
!
|
||||
n = nel / omega
|
||||
IF (system_2d) THEN
|
||||
n = (at(3, 3) * alat) * nel / omega
|
||||
ELSE
|
||||
n = nel / omega
|
||||
ENDIF
|
||||
EF = fermi_diff / ha2ev
|
||||
kF = (3.d0 * pi**2 * n)**(1.d0 / 3.d0)
|
||||
eps_ave = (epsil(1, 1) + epsil(2, 2) + epsil(3, 3)) / 3.d0
|
||||
|
@ -1031,7 +1295,7 @@
|
|||
!! q-vector from the full coarse or fine grid.
|
||||
REAL(KIND = DP), INTENT(in) :: epsil(3, 3)
|
||||
!! dielectric constant tensor
|
||||
REAL(KIND = DP), INTENT(in) :: zeu(3, 3, nat)
|
||||
REAL(KIND = DP), INTENT(inout) :: zeu(3, 3, nat)
|
||||
!! effective charges tensor
|
||||
REAL(KIND = DP), INTENT(in) :: signe
|
||||
!! signe=+/-1.0 ==> add/subtract long range term
|
||||
|
|
|
@ -763,7 +763,11 @@
|
|||
IF (int_mob .OR. (ncarrier < -1E5)) THEN
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(/5x,a)') REPEAT('=',67)
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-3] Hole mobility [cm^2/Vs]")')
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-2] Hole mobility [cm^2/Vs]")')
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-3] Hole mobility [cm^2/Vs]")')
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',67)
|
||||
ENDIF
|
||||
!
|
||||
|
@ -823,7 +827,11 @@
|
|||
mobility_zz = (sigma_eig(3) * electron_si * (bohr2ang * ang2cm)**2) / (carrier_density * hbarJ)
|
||||
mobility = (mobility_xx + mobility_yy + mobility_zz) / 3
|
||||
! carrier_density in cm^-1
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
IF (system_2d) THEN
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-2.0d0)
|
||||
ELSE
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x, 1f8.3, 1f12.4, 1E19.6, 1E19.6, a)') etemp * ryd2ev / kelvin2eV, &
|
||||
ef0(itemp) * ryd2ev, carrier_density_prt, mobility_xx, ' x-axis'
|
||||
WRITE(stdout, '(45x, 1E18.6, a)') mobility_yy, ' y-axis'
|
||||
|
@ -836,7 +844,11 @@
|
|||
IF (int_mob .OR. (ncarrier > 1E5)) THEN
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(/5x,a)') REPEAT('=',67)
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Electron density [cm^-3] Electron mobility [cm^2/Vs]")')
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Electron density [cm^-2] Electron mobility [cm^2/Vs]")')
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Electron density [cm^-3] Electron mobility [cm^2/Vs]")')
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',67)
|
||||
ENDIF
|
||||
!
|
||||
|
@ -898,7 +910,11 @@
|
|||
mobility_zz = (sigma_eig(3) * electron_si * (bohr2ang * ang2cm)**2) / (carrier_density * hbarJ)
|
||||
mobility = (mobility_xx + mobility_yy + mobility_zz) / 3
|
||||
! carrier_density in cm^-1
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
IF (system_2d) THEN
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-2.0d0)
|
||||
ELSE
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x, 1f8.3, 1f12.4, 1E19.6, 1E19.6, a)') etemp * ryd2ev / kelvin2eV, &
|
||||
ef0(itemp) * ryd2ev, carrier_density_prt, mobility_xx, ' x-axis'
|
||||
WRITE(stdout, '(45x, 1E18.6, a)') mobility_yy, ' y-axis'
|
||||
|
@ -1079,7 +1095,11 @@
|
|||
conv_factor1 = electron_si / (hbar * bohr2ang * Ang2m)
|
||||
!
|
||||
WRITE(stdout, '(/5x,a)') REPEAT('=',67)
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-3] Hole mobility [cm^2/Vs]")')
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-2] Hole mobility [cm^2/Vs]")')
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Hole density [cm^-3] Hole mobility [cm^2/Vs]")')
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',67)
|
||||
!
|
||||
DO itemp = 1, nstemp
|
||||
|
@ -1132,7 +1152,11 @@
|
|||
mobility_zz = (sigma_eig(3) * electron_si * (bohr2ang * ang2cm)**2) / (carrier_density * hbarJ)
|
||||
mobility = (mobility_xx + mobility_yy + mobility_zz) / 3
|
||||
! carrier_density in cm^-1
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
IF (system_2d) THEN
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-2.0d0)
|
||||
ELSE
|
||||
carrier_density_prt = carrier_density * inv_cell * (bohr2ang * ang2cm)**(-3)
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x, 1f8.3, 1f12.4, 1E19.6, 1E19.6, a)') etemp * ryd2ev / kelvin2eV, &
|
||||
ef0(itemp) * ryd2ev, carrier_density_prt, mobility_xx, ' x-axis'
|
||||
WRITE(stdout, '(45x, 1E18.6, a)') mobility_yy, ' y-axis'
|
||||
|
@ -1360,7 +1384,11 @@
|
|||
!
|
||||
conv_factor1 = electron_si / ( hbar * bohr2ang * Ang2m )
|
||||
WRITE(stdout, '(/5x,a)') REPEAT('=',67)
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Elec density [cm^-3] Elec mobility [cm^2/Vs]")')
|
||||
IF (system_2d) THEN
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Elec density [cm^-2] Elec mobility [cm^2/Vs]")')
|
||||
ELSE
|
||||
WRITE(stdout, '(5x,"Temp [K] Fermi [eV] Elec density [cm^-3] Elec mobility [cm^2/Vs]")')
|
||||
ENDIF
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',67)
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
|
|
|
@ -30,24 +30,33 @@
|
|||
USE io_global, ONLY : stdout
|
||||
USE cell_base, ONLY : at, bg
|
||||
USE epwcom, ONLY : mob_maxiter, nstemp, broyden_beta, &
|
||||
mp_mesh_k, nkf1, nkf2, nkf3
|
||||
USE elph2, ONLY : nkqf, wkf, xkf, nkqtotf, nbndfst, &
|
||||
nktotf, map_rebal, xqf, gtemp, &
|
||||
ixkqf_tr, s_bztoibz_full
|
||||
USE constants_epw, ONLY : zero, one, two, pi, kelvin2eV, ryd2ev, eps10, &
|
||||
bohr2ang, ang2cm, hbarJ, eps6, eps8, &
|
||||
eps2, eps4, eps20, eps80, eps160, hbar, cm2m, byte2Mb
|
||||
mp_mesh_k, nkf1, nkf2, nkf3, bfieldx, bfieldy,&
|
||||
bfieldz, etf_mem
|
||||
USE elph2, ONLY : nkqf, xkf, nkqtotf, nbndfst, &
|
||||
nktotf, xqf, gtemp, ixkqf_tr,&
|
||||
s_bztoibz_full, f_in_b, f_serta_b, df_in_b, &
|
||||
f_out_b, kpt_bz2bztau, &
|
||||
kpt_bztau2bz, vkk_all_b, etf_all_b, &
|
||||
wkf_all_b, inv_tau_b, nkpt_bztau_max, &
|
||||
ind_map, nsym_sp
|
||||
USE constants_epw, ONLY : zero, one, two, pi, kelvin2eV, ryd2ev, eps10, &
|
||||
bohr2ang, ang2cm, hbarJ, eps6, eps8, byte2Mb, &
|
||||
eps2, eps4, eps20, eps80, eps160, hbar, cm2m
|
||||
USE constants, ONLY : electronvolt_si
|
||||
USE mp, ONLY : mp_barrier, mp_sum, mp_bcast
|
||||
USE mp_global, ONLY : world_comm
|
||||
USE symm_base, ONLY : s, nrot
|
||||
USE printing, ONLY : print_mob, print_mob_sym
|
||||
USE printing, ONLY : print_mob, print_mob_sym, print_mob_b, print_hall
|
||||
USE io_transport, ONLY : fin_write, fin_read
|
||||
USE io_files, ONLY : diropn
|
||||
USE control_flags, ONLY : iverbosity
|
||||
USE wigner, ONLY : backtoWS
|
||||
USE grid, ONLY : k_avg, special_points, kpoint_grid_epw, symm_mapping, &
|
||||
kpmq_map
|
||||
loadkmesh_fullBZ, kpmq_map
|
||||
USE poolgathering, ONLY : poolgather2
|
||||
USE bfield, ONLY : select_k, unfold_k, unfold_all, create_all, &
|
||||
create_indkq, k_derivative_cart, neighbk, &
|
||||
k_derivative_crys, size_indkq
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -77,6 +86,10 @@
|
|||
!! inv_tau (either inv_tau_all or inv_tau_allcb)
|
||||
!
|
||||
! Local variables
|
||||
LOGICAL :: cart_der
|
||||
!! Can we perform Cartesian derivative
|
||||
LOGICAL :: lsp(nind)
|
||||
!! At exit, is .true. if the k-point corresponding to the index "ind" is a special point
|
||||
INTEGER(KIND = 8) :: ind
|
||||
!! Index for sparse matrix
|
||||
INTEGER :: iter
|
||||
|
@ -107,13 +120,25 @@
|
|||
!! Error status
|
||||
INTEGER :: nrws
|
||||
!! Maximum number of WS vectors
|
||||
INTEGER :: ind1
|
||||
!! Index on the IBZ of k
|
||||
INTEGER :: ind2
|
||||
!! Index on the IBZ of k+q
|
||||
INTEGER :: nb
|
||||
!! Symmetry index
|
||||
INTEGER :: nkpt_max
|
||||
!! Maximum nb of kpoint which have non-zero inv_tau on full BZ corresponding to the ind managed by the current cpu.
|
||||
INTEGER :: nsymk(nind)
|
||||
!! For a given k-point corresponding to the index "ind", give the number of equivalent kpt by symmetry
|
||||
INTEGER, PARAMETER :: nrwsx = 200
|
||||
!! Variable for WS folding
|
||||
INTEGER, ALLOCATABLE :: xkf_sp(:, :)
|
||||
!! Special k-points
|
||||
INTEGER, ALLOCATABLE :: map_neigh(:, :, :)
|
||||
!! Map of the 6 k-point neighbor for k-derivative by finite difference.
|
||||
REAL(KIND = DP) :: ekk
|
||||
!! Energy relative to Fermi level: $$\varepsilon_{n\mathbf{k}}-\varepsilon_F$$
|
||||
REAL(KIND = DP) :: carrier_density
|
||||
REAL(KIND = DP) :: carrier_density(nstemp)
|
||||
!! Carrier density [nb of carrier per unit cell]
|
||||
REAL(KIND = DP) :: xkf_all(3, nkqtotf)
|
||||
!! Collect k-point coordinate (and k+q) from all pools in parallel case
|
||||
|
@ -139,14 +164,24 @@
|
|||
!! K-point index for printing
|
||||
REAL(KIND = DP) :: rws(4, nrwsx)
|
||||
!! Real WS vectors
|
||||
REAL(KIND = DP) :: b_abs
|
||||
!! Absolute magnetic field (Tesla)
|
||||
REAL(KIND = DP) :: vec_min(3)
|
||||
!! Norm of the smallest vector in the x, y and z direction
|
||||
REAL(KIND = DP) :: vb(3)
|
||||
!! v_nk(i) cross B(j)
|
||||
REAL(KIND = DP) :: sigma_serta(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor
|
||||
!! SERTA conductivity tensor without Magnetic field.
|
||||
REAL(KIND = DP) :: sigma_bte(3, 3, nstemp)
|
||||
!! BTE conductivity tensor
|
||||
!! BTE conductivity tensor without Magnetic field.
|
||||
REAL(KIND = DP) :: sigmab_serta(3, 3, nstemp)
|
||||
!! SERTA conductivity tensor with Magnetic field.
|
||||
REAL(KIND = DP) :: sigmab_bte(3, 3, nstemp)
|
||||
!! BTE conductivity tensor with Magnetic field.
|
||||
REAL(KIND = DP), EXTERNAL :: w0gauss
|
||||
!! The derivative of wgauss: an approximation to the delta function
|
||||
!
|
||||
carrier_density = zero
|
||||
carrier_density(:) = zero
|
||||
xkf_all(:, :) = zero
|
||||
#if defined(__MPI)
|
||||
CALL poolgather2(3, nkqtotf, nkqf, xkf, xkf_all)
|
||||
|
@ -216,7 +251,7 @@
|
|||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x,"BTE in the self-energy relaxation time approximation (SERTA)")')
|
||||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
! Store conductivity
|
||||
! Store conductivity without B-field
|
||||
sigma_serta(:, :, :) = zero
|
||||
max_mob(:) = zero
|
||||
! K-point symmetry.
|
||||
|
@ -354,7 +389,238 @@
|
|||
IF (mp_mesh_k) THEN
|
||||
CALL print_mob_sym(f_in, bztoibz_mat, vkk_all, etf_all, wkf_all, ef0, sigma_bte, max_mob, xkf_all(:, 1:nkqtotf:2))
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
!
|
||||
! ------------------
|
||||
! - Magnetic field -
|
||||
! ------------------
|
||||
! Possibly add the contribution from an external B-field.
|
||||
! We need to use the full BZ because the magnetic field breaks some crystal symmetries.
|
||||
! Therefore we consider no crystal symmetry and reconstruct all.
|
||||
!
|
||||
b_abs = ABS(bfieldx) + ABS(bfieldy) + ABS(bfieldz)
|
||||
IF (b_abs > eps80) THEN
|
||||
!
|
||||
WRITE(stdout, '(5x,a)') ' '
|
||||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x,"BTE in the SERTA with B-field")')
|
||||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
!
|
||||
! Generate a grid of k-points on the full BZ without symmetries
|
||||
! The variable xkf_bz gets allocated here
|
||||
IF (etf_mem < 3) CALL loadkmesh_fullBZ()
|
||||
!
|
||||
! Select the k-point that have non-zero inv_tau scattering rate
|
||||
! In this routine the nkpt_ibztau and kpt_ibztau2ibz are allocated
|
||||
CALL select_k(inv_tau)
|
||||
!
|
||||
IF (mp_mesh_k) THEN
|
||||
! Since the external B-field breaks some crystal symmetries, we need to unfold
|
||||
! every quantities in the full BZ. We cannot use k-point symmetries.
|
||||
! In this routine the kpt_bz2bztau and kpt_bztau2bz are allocated
|
||||
! and the nkpt_bztau_max is defined.
|
||||
CALL unfold_k(bztoibz_mat)
|
||||
!
|
||||
! Unfold the etf, vkk, xkf, inv_tau and f_serta to full BZ composed of non-zero inv_tau points
|
||||
! This routines allocate etf_all_b, vkk_all_b, wkf_all_b, f_serta_b, f_in_b, f_out_b, inv_tau_b
|
||||
CALL unfold_all(etf_all, vkk_all, inv_tau, f_serta)
|
||||
!
|
||||
! Precompute the maximum size of the ind1 and ind2 pairs
|
||||
! This routines computes nkpt_max.
|
||||
CALL size_indkq(nind, nb_sp, xkf_sp, bztoibz_mat, sparse_q, sparse_k, sparse_i, sparse_j, sparse_t, &
|
||||
inv_tau, nkpt_max)
|
||||
!
|
||||
! For a given ind, save the index k and k+q (ind1 and ind2) that are related by crystal symmetry.
|
||||
! In the case of special k-points, count them in nb_sp_map(nkpt_bzfstd) where nkpt_bzfstd is the number of
|
||||
! k-points with non-zero inv_tau for the ind range consider by this specific core.
|
||||
! This routines allocates nsym_sp and ind_map.
|
||||
lsp(:) = .FALSE.
|
||||
nsymk(:) = 0
|
||||
CALL create_indkq(nind, nkpt_max, nb_sp, xkf_sp, bztoibz_mat, sparse_q, sparse_k, sparse_i, sparse_j, &
|
||||
sparse_t, inv_tau, nsymk, lsp)
|
||||
!
|
||||
ELSE ! Homogeneous mesh without k-point symmetry
|
||||
!
|
||||
! This routines allocate etf_all_b, vkk_all_b, wkf_all_b, f_serta_b, f_in_b, f_out_b, inv_tau_b
|
||||
CALL create_all(etf_all, vkk_all, inv_tau, f_serta)
|
||||
!
|
||||
ENDIF ! mp_mesh_k
|
||||
!
|
||||
! f_in_b is equal to f_serta_b for the first iteration
|
||||
f_in_b = f_serta_b
|
||||
!
|
||||
iter = 0
|
||||
error(:) = 1000
|
||||
! The tolerence is more strict for B-field IBTE
|
||||
DO WHILE(MAXVAL(error) > eps20)
|
||||
IF (iter == 1) THEN
|
||||
WRITE(stdout, '(5x,a)') ' '
|
||||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x,"Start solving iterative Boltzmann Transport Equation with B-field")')
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x,"Iteration number:", i10)') iter
|
||||
ENDIF
|
||||
IF (iter > 1) THEN
|
||||
WRITE(stdout, '(5x,a)') ' '
|
||||
WRITE(stdout, '(5x,"Iteration number:", i10)') iter
|
||||
ENDIF ! iter >0
|
||||
IF (iter > mob_maxiter) THEN
|
||||
WRITE(stdout, '(5x,a)') REPEAT('=',93)
|
||||
WRITE(stdout, '(5x,"The iteration reached the maximum but did not converge.")')
|
||||
WRITE(stdout, '(5x,a/)') REPEAT('=',93)
|
||||
EXIT
|
||||
ENDIF
|
||||
!
|
||||
f_out_b(:, :, :, :) = zero
|
||||
!
|
||||
! iter == 0 corresponds to SERTA with B-field
|
||||
IF (iter > 0) THEN
|
||||
ikk = 0
|
||||
DO ind = 1, nind
|
||||
iq = sparse_q(ind)
|
||||
ik = sparse_k(ind)
|
||||
ibnd = sparse_i(ind)
|
||||
jbnd = sparse_j(ind)
|
||||
itemp = sparse_t(ind)
|
||||
!
|
||||
IF (mp_mesh_k) THEN
|
||||
IF (lsp(ind)) THEN
|
||||
! The k-point is a special k-point for which some symmetries send it to himself
|
||||
DO nb = 1, nsymk(ind)
|
||||
ikk = ikk + 1
|
||||
ind1 = ind_map(1, ikk)
|
||||
ind2 = ind_map(2, ikk)
|
||||
f_out_b(:, ibnd, ind1, itemp) = f_out_b(:, ibnd, ind1, itemp) &
|
||||
+ trans_prob(ind) * f_in_b(:, jbnd, ind2, itemp) / DBLE(nsym_sp(ikk))
|
||||
|
||||
ENDDO ! nb
|
||||
ELSE ! not a special point
|
||||
DO nb = 1, nsymk(ind)
|
||||
ikk = ikk + 1
|
||||
ind1 = ind_map(1, ikk)
|
||||
ind2 = ind_map(2, ikk)
|
||||
f_out_b(:, ibnd, ind1, itemp) = f_out_b(:, ibnd, ind1, itemp) &
|
||||
+ trans_prob(ind) * f_in_b(:, jbnd, ind2, itemp)
|
||||
|
||||
ENDDO ! nb
|
||||
ENDIF ! Logical special point
|
||||
ELSE ! mp_mesh_k
|
||||
!
|
||||
CALL kpmq_map(xkf_all(:, 2 * ik - 1), xqf(:, iq), +1, nkq_abs)
|
||||
f_out_b(:, ibnd, ik, itemp) = f_out_b(:, ibnd, ik, itemp) &
|
||||
+ trans_prob(ind) * f_in_b(:, jbnd, nkq_abs, itemp)
|
||||
ENDIF ! mp_mesh_k
|
||||
ENDDO ! ind
|
||||
CALL mp_sum(F_out_b, world_comm)
|
||||
ENDIF ! iter > 0
|
||||
!
|
||||
! Multiply with the scattering rate inv_tau_b
|
||||
DO itemp = 1, nstemp
|
||||
DO ik = 1, nkpt_bztau_max
|
||||
DO ibnd = 1, nbndfst
|
||||
IF (ABS(inv_tau_b(ibnd, ik, itemp)) > eps160) THEN
|
||||
f_out_b(:, ibnd, ik, itemp) = f_serta_b(:, ibnd, ik, itemp) + &
|
||||
f_out_b(:, ibnd, ik, itemp) / (inv_tau_b(ibnd, ik, itemp))
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
IF (iter == 0) THEN
|
||||
! Computing the derivative of the population takes time. Hence compute the mapping between neighbour k-points
|
||||
! only once and store it here.
|
||||
! We also check if we can do the derivative in Cartesian unit (more accurate) or if we have to do in crystal unit.
|
||||
! In some tilded system with too coarse grids, increment points along the pure Cartesian direction
|
||||
! (x,0,0), (0,y,0) and (0,0,z) cannot be found and one has to use crystal derivative
|
||||
ALLOCATE(map_neigh(6, nkpt_bztau_max, nstemp), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error allocating map_neigh', 1)
|
||||
map_neigh(:, :, :) = 0
|
||||
cart_der = .TRUE.
|
||||
CALL neighbk(map_neigh, cart_der, vec_min)
|
||||
ENDIF
|
||||
!
|
||||
! Computes df_in/dk using finite difference
|
||||
IF (cart_der) THEN
|
||||
CALL k_derivative_cart(map_neigh, f_in_b, vec_min, df_in_b)
|
||||
ELSE
|
||||
CALL k_derivative_crys(map_neigh, f_in_b, df_in_b)
|
||||
ENDIF
|
||||
!
|
||||
! Now add the finite magnetic field part
|
||||
DO itemp = 1, nstemp
|
||||
etemp = gtemp(itemp)
|
||||
DO ikbz = 1, nkpt_bztau_max
|
||||
DO ibnd = 1, nbndfst
|
||||
IF (ABS(inv_tau_b(ibnd, ikbz, itemp)) > eps160) THEN
|
||||
vb(1) = vkk_all_b(2, ibnd, ikbz, itemp) * bfieldz - vkk_all_b(3, ibnd, ikbz, itemp) * bfieldy
|
||||
vb(2) = vkk_all_b(3, ibnd, ikbz, itemp) * bfieldx - vkk_all_b(1, ibnd, ikbz, itemp) * bfieldz
|
||||
vb(3) = vkk_all_b(1, ibnd, ikbz, itemp) * bfieldy - vkk_all_b(2, ibnd, ikbz, itemp) * bfieldx
|
||||
f_out_b(1, ibnd, ikbz, itemp) = DOT_PRODUCT(vb(:), df_in_b(:, 1, ibnd, ikbz, itemp)) &
|
||||
/ (inv_tau_b(ibnd, ikbz, itemp)) + f_out_b(1, ibnd, ikbz, itemp)
|
||||
f_out_b(2, ibnd, ikbz, itemp) = DOT_PRODUCT(vb(:), df_in_b(:, 2, ibnd, ikbz, itemp)) &
|
||||
/ (inv_tau_b(ibnd, ikbz, itemp)) + f_out_b(2, ibnd, ikbz, itemp)
|
||||
f_out_b(3, ibnd, ikbz, itemp) = DOT_PRODUCT(vb(:), df_in_b(:, 3, ibnd, ikbz, itemp)) &
|
||||
/ (inv_tau_b(ibnd, ikbz, itemp)) + f_out_b(3, ibnd, ikbz, itemp)
|
||||
ENDIF ! inv_tau_b
|
||||
ENDDO ! ibnd
|
||||
ENDDO ! ik
|
||||
ENDDO ! itemp
|
||||
!
|
||||
IF (iter == 0) THEN
|
||||
CALL print_mob_b(f_out_b, vkk_all_b, etf_all_b, wkf_all_b, ef0, &
|
||||
carrier_density, sigmab_serta, max_mob)
|
||||
ELSE
|
||||
CALL print_mob_b(f_out_b, vkk_all_b, etf_all_b, wkf_all_b, ef0, &
|
||||
carrier_density, sigmab_bte, max_mob)
|
||||
ENDIF
|
||||
!
|
||||
! Computes the error
|
||||
DO itemp = 1, nstemp
|
||||
error(itemp) = ABS(max_mob(itemp) - av_mob_old(itemp))
|
||||
ENDDO
|
||||
av_mob_old = max_mob
|
||||
WRITE(stdout, '(a)')
|
||||
WRITE(stdout, '(50x, 1E16.6, a)') MAXVAL(error), ' Max error'
|
||||
!
|
||||
! Save F_in
|
||||
! Linear mixing
|
||||
f_in_b = (1.0 - broyden_beta) * f_in_b + broyden_beta * f_out_b
|
||||
f_out_b = zero
|
||||
!
|
||||
iter = iter + 1
|
||||
!
|
||||
ENDDO ! end of while loop
|
||||
!
|
||||
! Once we are converged print Hall factor
|
||||
WRITE(stdout, '(/5x, a)') REPEAT('=', 93)
|
||||
WRITE(stdout, '(5x, a)') 'Summary and Hall factor'
|
||||
WRITE(stdout, '(5x, a)') REPEAT('=', 93)
|
||||
!
|
||||
CALL print_hall(carrier_density, sigma_serta, sigma_bte, sigmab_serta, sigmab_bte)
|
||||
!
|
||||
IF (mp_mesh_k) THEN
|
||||
DEALLOCATE(kpt_bz2bztau, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating kpt_bz2bztau', 1)
|
||||
DEALLOCATE(kpt_bztau2bz, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating kpt_bztau2bz', 1)
|
||||
ENDIF ! mp_mesh_k
|
||||
DEALLOCATE(vkk_all_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating vkk_all_b', 1)
|
||||
DEALLOCATE(etf_all_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating etf_all_b', 1)
|
||||
DEALLOCATE(wkf_all_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating wkf_all_b', 1)
|
||||
DEALLOCATE(f_serta_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating f_serta_b', 1)
|
||||
DEALLOCATE(f_in_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating f_in_b', 1)
|
||||
DEALLOCATE(f_out_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating f_out_b', 1)
|
||||
DEALLOCATE(inv_tau_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating inv_tau_b', 1)
|
||||
DEALLOCATE(df_in_b, STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('ibte', 'Error deallocating df_in_b', 1)
|
||||
ENDIF ! B_abs
|
||||
!
|
||||
! Deallocate
|
||||
IF (mp_mesh_k) THEN
|
||||
|
|
|
@ -634,72 +634,113 @@
|
|||
ENDIF
|
||||
icbm = ivbm + 1 ! Nb of bands
|
||||
!
|
||||
! If we only Wannierze valence bands.
|
||||
IF (icbm > nbndsub) icbm = 0
|
||||
!
|
||||
! Initialization value. Should be large enough ...
|
||||
evbm = -10000d0
|
||||
ecbm = 10000d0 ! In Ry
|
||||
!
|
||||
DO ik = 1, nkf
|
||||
ikk = 2 * ik - 1
|
||||
DO ibnd = 1, nbndsub
|
||||
IF (ibnd < ivbm + 1) THEN
|
||||
IF (etf(ibnd, ikk) > evbm) THEN
|
||||
evbm = etf (ibnd, ikk)
|
||||
! We Wannerize both the CB and VB
|
||||
IF (ivbm > 0 .AND. icbm > 0) THEN
|
||||
DO ik = 1, nkf
|
||||
ikk = 2 * ik - 1
|
||||
DO ibnd = 1, nbndsub
|
||||
IF (ibnd < ivbm + 1) THEN
|
||||
IF (etf(ibnd, ikk) > evbm) THEN
|
||||
evbm = etf(ibnd, ikk)
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
! Find cbm index
|
||||
IF (ibnd > ivbm) THEN
|
||||
! Find cbm index
|
||||
IF (ibnd > ivbm) THEN
|
||||
IF (etf(ibnd, ikk) < ecbm) THEN
|
||||
ecbm = etf(ibnd, ikk)
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
! Find max and min across pools
|
||||
CALL mp_max(evbm, inter_pool_comm)
|
||||
CALL mp_min(ecbm, inter_pool_comm)
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(5x, "Valence band maximum = ", f10.6, " eV")') evbm * ryd2ev
|
||||
WRITE(stdout, '(5x, "Conduction band minimum = ", f10.6, " eV")') ecbm * ryd2ev
|
||||
ENDIF
|
||||
ENDIF ! ivbm > 0 .AND. icbm > 0
|
||||
!
|
||||
! We only Wannierze the valence bands
|
||||
IF (icbm == 0) THEN
|
||||
DO ik = 1, nkf
|
||||
ikk = 2 * ik - 1
|
||||
DO ibnd = 1, nbndsub
|
||||
IF (etf(ibnd, ikk) > evbm) THEN
|
||||
evbm = etf(ibnd, ikk)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
! Find max across pools
|
||||
CALL mp_max(evbm, inter_pool_comm)
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(5x, "Valence band maximum = ", f10.6, " eV")') evbm * ryd2ev
|
||||
ENDIF
|
||||
ENDIF ! icbm == 0
|
||||
!
|
||||
! If we only Wannierized the conduction bands
|
||||
IF (ivbm == 0) THEN
|
||||
DO ik = 1, nkf
|
||||
ikk = 2 * ik - 1
|
||||
DO ibnd = 1, nbndsub
|
||||
IF (etf(ibnd, ikk) < ecbm) THEN
|
||||
ecbm = etf(ibnd, ikk)
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! Find max and min across pools
|
||||
!
|
||||
CALL mp_max(evbm, inter_pool_comm)
|
||||
CALL mp_min(ecbm, inter_pool_comm)
|
||||
!
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(5x, "Valence band maximum = ", f10.6, " eV")') evbm * ryd2ev
|
||||
WRITE(stdout, '(5x, "Conduction band minimum = ", f10.6, " eV")') ecbm * ryd2ev
|
||||
ENDIF
|
||||
! Find min across pools
|
||||
CALL mp_min(ecbm, inter_pool_comm)
|
||||
IF (itemp == 1) THEN
|
||||
WRITE(stdout, '(5x, "Conduction band minimum = ", f10.6, " eV")') ecbm * ryd2ev
|
||||
ENDIF
|
||||
ENDIF ! ivbm == 0
|
||||
!
|
||||
! Store e^(e_nk/kbT) on each core
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndsub
|
||||
ikk = 2 * ik - 1
|
||||
! Because the number are so large. It does lead to instabilities
|
||||
! Therefore we rescale everything to the VBM
|
||||
IF (ABS(etemp) < eps80) THEN
|
||||
CALL errore('fermicarrier', 'etemp cannot be 0', 1)
|
||||
ELSE
|
||||
arg = (etf(ibnd, ikk) - evbm) / etemp
|
||||
ENDIF
|
||||
!
|
||||
IF (arg < - maxarg) THEN
|
||||
ks_exp(ibnd, ik) = zero
|
||||
ELSE
|
||||
ks_exp(ibnd, ik) = EXP(arg)
|
||||
ENDIF
|
||||
IF (ivbm > 0) THEN
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndsub
|
||||
ikk = 2 * ik - 1
|
||||
! Because the number are so large. It does lead to instabilities
|
||||
! Therefore we rescale everything to the VBM
|
||||
IF (ABS(etemp) < eps80) THEN
|
||||
CALL errore('fermicarrier', 'etemp cannot be 0', 1)
|
||||
ELSE
|
||||
arg = (etf(ibnd, ikk) - evbm) / etemp
|
||||
ENDIF
|
||||
!
|
||||
IF (arg < - maxarg) THEN
|
||||
ks_exp(ibnd, ik) = zero
|
||||
ELSE
|
||||
ks_exp(ibnd, ik) = EXP(arg)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDIF ! ivbm > 0
|
||||
!
|
||||
! Store e^(e_nk/kbT) on each core for the electrons (CBM only)
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndsub
|
||||
ikk = 2 * ik - 1
|
||||
! Because the number are so large. It does lead to instabilities
|
||||
! Therefore we rescale everything to the CBM
|
||||
arg = (etf(ibnd, ikk) - ecbm) / etemp
|
||||
!
|
||||
IF (arg > maxarg) THEN
|
||||
ks_expcb(ibnd, ik) = 1.0d200
|
||||
ELSE
|
||||
ks_expcb(ibnd, ik) = EXP(arg)
|
||||
ENDIF
|
||||
IF (icbm > 0) THEN
|
||||
DO ik = 1, nkf
|
||||
DO ibnd = 1, nbndsub
|
||||
ikk = 2 * ik - 1
|
||||
! Because the number are so large. It does lead to instabilities
|
||||
! Therefore we rescale everything to the CBM
|
||||
arg = (etf(ibnd, ikk) - ecbm) / etemp
|
||||
!
|
||||
IF (arg > maxarg) THEN
|
||||
ks_expcb(ibnd, ik) = 1.0d200
|
||||
ELSE
|
||||
ks_expcb(ibnd, ik) = EXP(arg)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDIF ! icbm > 0
|
||||
!
|
||||
! Case 1 : Intrinsic mobilities (electron and hole concentration are the same)
|
||||
! Starting bounds energy for the biscection method. The energies are rescaled to the VBM
|
||||
|
@ -769,7 +810,11 @@
|
|||
!
|
||||
! Case 2 :
|
||||
! Hole doped mobilities (Carrier concentration should be larger than 1E5 cm^-3)
|
||||
factor = inv_cell * (bohr2ang * ang2cm)**(-3.d0)
|
||||
IF (system_2d) THEN
|
||||
factor = inv_cell * (bohr2ang * ang2cm)**(-2.d0)
|
||||
ELSE
|
||||
factor = inv_cell * (bohr2ang * ang2cm)**(-3.d0)
|
||||
ENDIF
|
||||
eup = 1d-160 ! e^(-large) = 0.0 (small)
|
||||
elw = 1.0d0 ! e^0 = 1
|
||||
IF (ncarrier < -1E5 .OR. (int_mob .AND. carrier)) THEN
|
||||
|
@ -992,20 +1037,18 @@
|
|||
ENDDO
|
||||
ENDDO
|
||||
IF (wfcelec) then
|
||||
DO ik = 1, nkqf
|
||||
DO ibnd = 1, nbndsub
|
||||
ebnd = etf(ibnd, ik)
|
||||
!
|
||||
IF (ebnd < fsthick + ef .and. ebnd > ef) THEN
|
||||
!IF (ABS(ebnd - ef) < fsthick) THEN
|
||||
ibndmin = MIN(ibnd, ibndmin)
|
||||
ibndmax = MAX(ibnd, ibndmax)
|
||||
ebndmin = MIN(ebnd, ebndmin)
|
||||
ebndmax = MAX(ebnd, ebndmax)
|
||||
ENDIF
|
||||
!
|
||||
ENDDO
|
||||
DO ik = 1, nkqf
|
||||
DO ibnd = 1, nbndsub
|
||||
ebnd = etf(ibnd, ik)
|
||||
!
|
||||
IF (ebnd < fsthick + ef .AND. ebnd > ef) THEN
|
||||
ibndmin = MIN(ibnd, ibndmin)
|
||||
ibndmax = MAX(ibnd, ibndmax)
|
||||
ebndmin = MIN(ebnd, ebndmin)
|
||||
ebndmax = MAX(ebnd, ebndmax)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
tmp = DBLE(ibndmin)
|
||||
|
|
|
@ -300,7 +300,7 @@
|
|||
USE kinds, ONLY : DP
|
||||
USE cell_base, ONLY : at, bg
|
||||
USE ions_base, ONLY : amass, tau, nat, ityp
|
||||
USE elph2, ONLY : rdw, epsi, zstar
|
||||
USE elph2, ONLY : rdw, epsi, zstar, qrpl
|
||||
USE epwcom, ONLY : lpolar, lphase, use_ws, nqc1, nqc2, nqc3
|
||||
USE constants_epw, ONLY : twopi, ci, czero, zero, one, eps12
|
||||
USE rigid, ONLY : cdiagh2
|
||||
|
@ -394,7 +394,7 @@
|
|||
CALL cryst_to_cart(1, xq, bg, 1)
|
||||
!
|
||||
! add the long-range term to D(q)
|
||||
IF (lpolar) THEN
|
||||
IF (lpolar .OR. qrpl) THEN
|
||||
! xq has to be in 2pi/a
|
||||
CALL rgd_blk(nqc1, nqc2, nqc3, nat, chf, xq, tau, epsi, zstar, +1.d0)
|
||||
!
|
||||
|
@ -476,11 +476,12 @@
|
|||
USE kinds, ONLY : DP
|
||||
USE cell_base, ONLY : at, bg
|
||||
USE ions_base, ONLY : amass, tau, nat, ityp
|
||||
USE elph2, ONLY : ifc, epsi, zstar, wscache
|
||||
USE epwcom, ONLY : lpolar, nqc1, nqc2, nqc3
|
||||
USE elph2, ONLY : ifc, epsi, zstar, wscache, qrpl
|
||||
USE epwcom, ONLY : lpolar, nqc1, nqc2, nqc3, lphase
|
||||
USE io_global, ONLY : stdout
|
||||
USE rigid_epw, ONLY : rgd_blk
|
||||
USE constants_epw, ONLY : twopi, czero, zero, one, eps8
|
||||
USE low_lvl, ONLY : utility_zdotu
|
||||
USE constants_epw, ONLY : twopi, czero, zero, one, eps8, eps12
|
||||
!
|
||||
IMPLICIT NONE
|
||||
!
|
||||
|
@ -650,7 +651,7 @@
|
|||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
IF (lpolar) THEN
|
||||
IF (lpolar .OR. qrpl) THEN
|
||||
! xq has to be in 2pi/a
|
||||
CALL rgd_blk(nqc1, nqc2, nqc3, nat, chf, xq, tau, epsi, zstar, +1.d0)
|
||||
!
|
||||
|
@ -685,6 +686,26 @@
|
|||
CALL zhpevx('V', 'A', 'U', nmodes, champ , zero, zero, &
|
||||
0, 0, -one, neig, w, cz, nmodes, cwork, rwork, iwork, ifail, info)
|
||||
!
|
||||
! clean noise
|
||||
DO jmode = 1,nmodes
|
||||
DO imode = 1,nmodes
|
||||
IF (ABS(cz(imode, jmode)) < eps12) cz(imode, jmode) = czero
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! DS - Impose phase
|
||||
IF (lphase) THEN
|
||||
DO jmode = 1,nmodes
|
||||
INNER : DO imode = 1,nmodes
|
||||
IF (ABS(cz(imode, jmode)) > eps12) THEN
|
||||
cz(:, jmode) = cz(:, jmode) * CONJG(cz(imode,jmode))
|
||||
cz(:, jmode) = cz(:, jmode) / SQRT(utility_zdotu(CONJG(cz(:, jmode)),cz(:, jmode)))
|
||||
EXIT INNER
|
||||
ENDIF
|
||||
END DO INNER
|
||||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
! cuf(nmodes, nmodes) is rotation matrix (eigenmodes e_k)
|
||||
!
|
||||
cuf = cz
|
||||
|
@ -707,7 +728,7 @@
|
|||
USE kinds, ONLY : DP
|
||||
USE cell_base, ONLY : at, bg
|
||||
USE ions_base, ONLY : tau, nat
|
||||
USE elph2, ONLY : ifc, epsi, zstar, wscache
|
||||
USE elph2, ONLY : ifc, epsi, zstar, wscache, qrpl
|
||||
USE epwcom, ONLY : lpolar, nqc1, nqc2, nqc3
|
||||
USE constants_epw, ONLY : twopi, czero, zero, eps8
|
||||
USE io_global, ONLY : stdout
|
||||
|
@ -840,7 +861,7 @@
|
|||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
IF (lpolar) THEN
|
||||
IF (lpolar .OR. qrpl) THEN
|
||||
! xq has to be in 2pi/a
|
||||
CALL rgd_blk(nqc1, nqc2, nqc3, nat, chf, xq, tau, epsi, zstar, +1.d0)
|
||||
!
|
||||
|
@ -1723,7 +1744,7 @@
|
|||
!! Is equal to the number of Wannier function if use_ws == .TRUE. Is equal to 1 otherwise.
|
||||
INTEGER, INTENT(in) :: nat
|
||||
!! Is equal to the number of atoms if use_ws == .TRUE. or 1 otherwise
|
||||
INTEGER, INTENT(in) :: ndegen_g(nrr_g, nat, dims, dims)
|
||||
INTEGER, INTENT(in) :: ndegen_g(dims, nrr_g, nat)
|
||||
!! Number of degeneracy of WS points
|
||||
INTEGER, INTENT(in) :: nbnd
|
||||
!! Number of bands
|
||||
|
@ -1774,7 +1795,7 @@
|
|||
!! Exponential for the FT
|
||||
COMPLEX(KIND = DP) :: eptmp(nbnd, nbnd, nrr_k, nmodes)
|
||||
!! Temporary matrix to store el-ph
|
||||
COMPLEX(KIND = DP) :: cfac(nat, nrr_g, dims, dims)
|
||||
COMPLEX(KIND = DP) :: cfac(dims, nat, nrr_g)
|
||||
!! Factor for the FT
|
||||
COMPLEX(KIND = DP), ALLOCATABLE :: epmatw(:, :, :, :)
|
||||
!! El-ph matrix elements
|
||||
|
@ -1812,7 +1833,7 @@
|
|||
ENDIF
|
||||
!
|
||||
eptmp(:, :, :, :) = czero
|
||||
cfac(:, :, :, :) = czero
|
||||
cfac(:, :, :) = czero
|
||||
!
|
||||
IF (use_ws) THEN
|
||||
DO irn = ir_start, ir_stop
|
||||
|
@ -1822,11 +1843,9 @@
|
|||
! note xxq is assumed to be already in cryst coord
|
||||
!
|
||||
rdotk = twopi * DOT_PRODUCT(xxq, DBLE(irvec_g(:, ir)))
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
IF (ndegen_g(ir, na, iw, iw2) > 0) &
|
||||
cfac(na, ir, iw, iw2) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, na, iw, iw2))
|
||||
ENDDO
|
||||
DO iw = 1, dims
|
||||
IF (ndegen_g(iw, ir, na) > 0) &
|
||||
cfac(iw, na, ir) = EXP(ci * rdotk) / DBLE(ndegen_g(iw, ir, na))
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
|
@ -1838,7 +1857,7 @@
|
|||
!
|
||||
rdotk = twopi * DOT_PRODUCT(xxq, DBLE(irvec_g(:, ir)))
|
||||
! Note that ndegen is always > 0 if use_ws == false
|
||||
cfac(1, ir, 1, 1) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, 1, 1, 1))
|
||||
cfac(1, 1, ir) = EXP(ci * rdotk) / DBLE(ndegen_g(1, ir, 1))
|
||||
ENDDO
|
||||
!
|
||||
ENDIF
|
||||
|
@ -1850,11 +1869,9 @@
|
|||
ir = (irn - 1) / nat + 1
|
||||
na = MOD(irn - 1, nat) + 1
|
||||
!
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3, cfac(na, ir, iw, iw2), epmatwp(iw, iw2, :, 3 * (na - 1) + 1:3 * na, ir), 1, &
|
||||
eptmp(iw, iw2, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3, cfac(iw, na, ir), epmatwp(iw, iw2, :, 3 * (na - 1) + 1:3 * na, ir), 1, &
|
||||
eptmp(iw, iw2, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
ENDDO
|
||||
ELSE ! use_ws
|
||||
|
@ -1862,7 +1879,7 @@
|
|||
ir = (irn - 1) / nmodes + 1
|
||||
imode = MOD(irn-1, nmodes) + 1
|
||||
!
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, ir, 1, 1), epmatwp(:, :, :, imode, ir), 1, eptmp(:, :, :, imode), 1)
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, 1, ir), epmatwp(:, :, :, imode, ir), 1, eptmp(:, :, :, imode), 1)
|
||||
ENDDO
|
||||
ENDIF
|
||||
!CALL zgemv( 'n', nbnd * nbnd * nrr_k * 3, ir_stop - ir_start + 1, cone, &
|
||||
|
@ -1919,20 +1936,16 @@
|
|||
IF (ierr /= 0) CALL errore('ephwan2blochp', 'error in MPI_FILE_READ_AT', 1)
|
||||
IF (add == 1 .AND. irn == ir_stop + add) CYCLE
|
||||
!
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3, cfac(na, ir, iw, iw2), epmatw(iw, iw2, :, :), 1, &
|
||||
eptmp(iw, iw2, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3 * nbnd, cfac(iw, na, ir), epmatw(iw, :, :, :), 1, &
|
||||
eptmp(iw, :, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
#else
|
||||
CALL rwepmatw(epmatw, nbnd, nrr_k, nmodes, ir, iunepmatwp, -1)
|
||||
!
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3, cfac(na, ir, iw, iw2), epmatw(iw, iw2, :, 3 * (na - 1) + 1:3 * na), 1, &
|
||||
eptmp(iw, iw2, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k * 3 * nbnd, cfac(iw, na, ir), epmatw(iw, :, :, 3 * (na - 1) + 1:3 * na), 1, &
|
||||
eptmp(iw, :, :, 3 * (na - 1) + 1:3 * na), 1)
|
||||
ENDDO
|
||||
#endif
|
||||
ENDDO ! irn
|
||||
|
@ -1976,13 +1989,13 @@
|
|||
IF (ierr /= 0) CALL errore('ephwan2blochp', 'error in MPI_FILE_READ_AT', 1)
|
||||
IF (add == 1 .AND. irn == ir_stop + add) CYCLE
|
||||
!
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, ir, 1, 1), epmatw(:, :, :, 1), 1, &
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, 1, ir), epmatw(:, :, :, 1), 1, &
|
||||
eptmp(:, :, :, imode), 1)
|
||||
!
|
||||
#else
|
||||
CALL rwepmatw(epmatw, nbnd, nrr_k, nmodes, ir, iunepmatwp, -1)
|
||||
!
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, ir, 1, 1), &
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, 1, ir), &
|
||||
epmatw(:, :, :, imode), 1, eptmp(:, :, :, imode), 1)
|
||||
#endif
|
||||
ENDDO ! irn
|
||||
|
@ -2232,7 +2245,7 @@
|
|||
!! Is equal to the number of atoms if use_ws == .TRUE. or 1 otherwise.
|
||||
INTEGER, INTENT(in) :: irvec_g(3, nrr_g)
|
||||
!! Coordinates of WS points
|
||||
INTEGER, INTENT(in) :: ndegen_g(nrr_g, nat, dims, dims)
|
||||
INTEGER, INTENT(in) :: ndegen_g(nrr_g, nat, dims)
|
||||
!! Number of degeneracy of WS points
|
||||
INTEGER, INTENT(in) :: nbnd
|
||||
!! Number of bands
|
||||
|
@ -2276,7 +2289,7 @@
|
|||
!
|
||||
REAL(KIND = DP) :: rdotk
|
||||
!! Exponential for the FT
|
||||
COMPLEX(KIND = DP) :: cfac(nrr_g, dims, dims)
|
||||
COMPLEX(KIND = DP) :: cfac(nat, nrr_g, dims)
|
||||
!! Factor for the FT
|
||||
COMPLEX(KIND = DP), ALLOCATABLE :: epmatw(:, :, :)
|
||||
!! El-ph matrix elements
|
||||
|
@ -2308,11 +2321,9 @@
|
|||
! note xxq is assumed to be already in cryst coord
|
||||
rdotk = twopi * DOT_PRODUCT(xxq, DBLE(irvec_g(:, ir)))
|
||||
na = (imode - 1) / 3 + 1
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
IF (ndegen_g(ir, na, iw, iw2) > 0) &
|
||||
cfac(ir, iw, iw2) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, na, iw, iw2))
|
||||
ENDDO
|
||||
DO iw = 1, dims
|
||||
IF (ndegen_g(ir, na, iw) > 0) &
|
||||
cfac(na, ir, iw) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, na, iw))
|
||||
ENDDO
|
||||
ENDDO
|
||||
ELSE
|
||||
|
@ -2320,7 +2331,7 @@
|
|||
!
|
||||
! note xxq is assumed to be already in cryst coord
|
||||
rdotk = twopi * DOT_PRODUCT(xxq, DBLE(irvec_g(:, ir)))
|
||||
cfac(ir, 1, 1) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, 1, 1, 1))
|
||||
cfac(1, ir, 1) = EXP(ci * rdotk) / DBLE(ndegen_g(ir, 1, 1))
|
||||
ENDDO
|
||||
ENDIF
|
||||
!
|
||||
|
@ -2365,13 +2376,12 @@
|
|||
#endif
|
||||
!
|
||||
IF (use_ws) THEN
|
||||
DO iw2 = 1, dims
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nrr_k, cfac(ir, iw, iw2), epmatw(iw, iw2, :), 1, epmatf(iw, iw2, :), 1)
|
||||
ENDDO
|
||||
na = (imode - 1) / 3 + 1
|
||||
DO iw = 1, dims
|
||||
CALL ZAXPY(nbnd * nrr_k, cfac(na, ir, iw), epmatw(iw, :, :), 1, epmatf(iw, :, :), 1)
|
||||
ENDDO
|
||||
ELSE
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(ir, 1, 1), epmatw, 1, epmatf, 1)
|
||||
CALL ZAXPY(nbnd * nbnd * nrr_k, cfac(1, ir, 1), epmatw, 1, epmatf, 1)
|
||||
ENDIF
|
||||
!
|
||||
ENDDO
|
||||
|
|
|
@ -23,12 +23,14 @@
|
|||
w_centers, dims, tau, dims2)
|
||||
!-----------------------------------------------------------------
|
||||
!!
|
||||
!! June 2018 - SP - CV
|
||||
!! Aug 2020 - SP : Optimal WS set for g (wigner_seitzgk and wigner_seitzgq)
|
||||
!! June 2018 - SP - CV : Optimal WS set for el and ph (wigner_seitzk and wigner_seitzq)
|
||||
!!
|
||||
!! This routine wrap the call to three Wigner-Seitz routines:
|
||||
!! wigner_seitzk : Contruct a grid of points that fall inside of (and eventually
|
||||
!! on the surface of) the Wigner-Seitz supercell centered on the
|
||||
!! origin of the Bravais lattice. Use for electronic properties.
|
||||
!! wigner_seitzk : Creates a set of WS vectors for each pair of Wannier centers r_n - r_m
|
||||
!! On exiting, ndegen_k contains the degeneracies of each pairs
|
||||
!! of wannier centers while irvec_k contains the minimal communal sets of WS vectors.
|
||||
!! Used for electronic properties
|
||||
!! wigner_seitzq : Creates a set of WS vectors for each pair of atoms tau(nb)-tau(na)
|
||||
!! On exiting, ndegen_q contains the degeneracies of each pairs
|
||||
!! of atoms while irvec_q contains the minimal communal sets of WS vectors.
|
||||
|
@ -38,7 +40,7 @@
|
|||
!! while irvec_g contains the minimal communal sets of WS vectors.
|
||||
!! Used for electron-phonon properties.
|
||||
!!
|
||||
!! Note 1: ndegen_k is always > 0 while ndegen_q and ndegen_g might contains 0 weigths.
|
||||
!! Note 1: ndegen_k, ndegen_q and ndegen_g might contains 0 weigths.
|
||||
!! Note 2: No sorting of vectors is needed anymore
|
||||
!! Note 3: The dimension 20*nkc1*nkc2*nkc3 should be safe enough.
|
||||
!! Note 4: The Wigner-Seitz construction in EPW was done by constructing a cell
|
||||
|
@ -76,20 +78,21 @@
|
|||
INTEGER, INTENT(in) :: dims2
|
||||
!! Number of atoms
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: irvec_k(:, :)
|
||||
!! INTEGER components of the ir-th Wigner-Seitz grid point in the basis
|
||||
!! Integer components of the ir-th Wigner-Seitz grid point in the basis
|
||||
!! of the lattice vectors for electrons
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: irvec_q(:, :)
|
||||
!! INTEGER components of the ir-th Wigner-Seitz grid point for phonons
|
||||
!! Integer components of the ir-th Wigner-Seitz grid point for phonons
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: irvec_g(:, :)
|
||||
!! INTEGER components of the ir-th Wigner-Seitz grid point for electron-phonon
|
||||
!! Integer components of the ir-th Wigner-Seitz grid point for electron-phonon
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: ndegen_k(:, :, :)
|
||||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
!! Wigner-Seitz number of degenerescence (weights) for the electrons grid that depend on
|
||||
!! Wannier centers $R + r_n - r_m$
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: ndegen_q(:, :, :)
|
||||
!! Wigner-Seitz weights for the phonon grid that depend on
|
||||
!! atomic positions $R + \tau(nb) - \tau(na)$
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: ndegen_g(:, :, :, :)
|
||||
INTEGER, ALLOCATABLE, INTENT(out) :: ndegen_g(:, :, :)
|
||||
!! Wigner-Seitz weights for the electron-phonon grid that depend on
|
||||
!! atomic positions $R - \tau(na)$
|
||||
!! atomic positions $R + \tau(na) - r_m$
|
||||
REAL(KIND = DP), ALLOCATABLE, INTENT(out) :: wslen_k(:)
|
||||
!! real-space length for electrons, in units of alat
|
||||
REAL(KIND = DP), ALLOCATABLE, INTENT(out) :: wslen_q(:)
|
||||
|
@ -104,6 +107,8 @@
|
|||
! Work Variables
|
||||
INTEGER :: ir
|
||||
!! Index for WS vectors
|
||||
INTEGER :: na
|
||||
!! Atom index
|
||||
INTEGER :: nrr_k
|
||||
!! maximum number of WS vectors for the electrons
|
||||
INTEGER :: nrr_q
|
||||
|
@ -113,18 +118,18 @@
|
|||
INTEGER :: ierr
|
||||
!! Error status
|
||||
INTEGER :: irvec_kk (3, 20 * nkc1 * nkc2 * nkc3)
|
||||
!! local INTEGER components of the ir-th Wigner-Seitz grid point
|
||||
!! local integer components of the ir-th Wigner-Seitz grid point
|
||||
!! in the basis of the lattice vectors for electrons
|
||||
INTEGER :: irvec_qq(3, 20 * nqc1 * nqc2 * nqc3)
|
||||
!! local INTEGER components of the ir-th Wigner-Seitz grid point for phonons
|
||||
!! local integer components of the ir-th Wigner-Seitz grid point for phonons
|
||||
INTEGER :: irvec_gg(3, 20 * nqc1 * nqc2 * nqc3)
|
||||
!! local INTEGER components of the ir-th Wigner-Seitz grid point for electron-phonons
|
||||
!! local integer components of the ir-th Wigner-Seitz grid point for electron-phonons
|
||||
!! We use nkc1 instead of nqc1 because the k-grid is always larger or equal to q-grid.
|
||||
INTEGER :: ndegen_kk(20 * nkc1 * nkc2 * nkc3, dims, dims)
|
||||
!! local Wigner-Seitz number of degenerescence (weights) for the electrons grid
|
||||
INTEGER :: ndegen_qq(20 * nqc1 * nqc2 * nqc3, dims2, dims2)
|
||||
!! local Wigner-Seitz number of degenerescence (weights) for the phonons grid
|
||||
INTEGER :: ndegen_gg(20 * nqc1 * nqc2 * nqc3, dims2, dims, dims)
|
||||
INTEGER :: ndegen_gg(20 * nqc1 * nqc2 * nqc3, dims2, dims)
|
||||
!! local Wigner-Seitz number of degenerescence (weights) for the electron-phonons grid
|
||||
REAL(KIND = DP) :: wslen_kk(20 * nkc1 * nkc2 * nkc3)
|
||||
!! local real-space length for electrons, in units of alat
|
||||
|
@ -154,7 +159,7 @@
|
|||
IF (ierr /= 0) CALL errore('wigner_seitz_wrap', 'Error allocating ndegen_k', 1)
|
||||
ALLOCATE(ndegen_q(nrr_q, dims2, dims2), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('wigner_seitz_wrap', 'Error allocating ndegen_q', 1)
|
||||
ALLOCATE(ndegen_g(nrr_g, dims2, dims, dims), STAT = ierr)
|
||||
ALLOCATE(ndegen_g(dims, nrr_g, dims2), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('wigner_seitz_wrap', 'Error allocating ndegen_g', 1)
|
||||
ALLOCATE(wslen_k(nrr_k), STAT = ierr)
|
||||
IF (ierr /= 0) CALL errore('wigner_seitz_wrap', 'Error allocating wslen_k', 1)
|
||||
|
@ -175,9 +180,11 @@
|
|||
wslen_q(ir) = wslen_qq(ir)
|
||||
ENDDO
|
||||
DO ir = 1, nrr_g
|
||||
ndegen_g(ir, :, :, :) = ndegen_gg(ir, :, :, :)
|
||||
irvec_g(:, ir) = irvec_gg(:, ir)
|
||||
wslen_g(ir) = wslen_gg(ir)
|
||||
DO na = 1, dims2
|
||||
ndegen_g(:, ir, na) = ndegen_gg(ir, na, :)
|
||||
ENDDO
|
||||
irvec_g(:, ir) = irvec_gg(:, ir)
|
||||
wslen_g(ir) = wslen_gg(ir)
|
||||
ENDDO
|
||||
!
|
||||
!-----------------------------------------------------------------------------
|
||||
|
@ -410,12 +417,11 @@
|
|||
SUBROUTINE wigner_seitzg(nc1, nc2, nc3, irvec, ndegen, wslen, nrr, w_centers, tau, dims, dims2)
|
||||
!-----------------------------------------------------------------
|
||||
!!
|
||||
!! SP - Aug 2020
|
||||
!! Calculates a grid of points that fall inside of (and eventually
|
||||
!! on the surface of) the Wigner-Seitz supercell centered on
|
||||
!! each atoms.
|
||||
!! on the surface of) the Wigner-Seitz supercell centered on each atom - wannier center pairs.
|
||||
!! Follows Eq. 66 of PRB 55, 10355 (1997).
|
||||
!! We are part of the WS if $R_b - \tau_{\kappa}$ is inside the
|
||||
!! supercell.
|
||||
!! We are part of the WS if $R_b + \tau_{\kappa} - r_n$ is inside the supercell.
|
||||
!!
|
||||
!-----------------------------------------------------------------
|
||||
USE kinds, ONLY : DP
|
||||
|
@ -426,21 +432,21 @@
|
|||
IMPLICIT NONE
|
||||
!
|
||||
INTEGER, INTENT(in) :: nc1
|
||||
!! size of the uniform k mesh
|
||||
!! size of the uniform q mesh
|
||||
INTEGER, INTENT(in) :: nc2
|
||||
!! size of the uniform k mesh
|
||||
!! size of the uniform q mesh
|
||||
INTEGER, INTENT(in) :: nc3
|
||||
!! size of the uniform k mesh
|
||||
!! size of the uniform q mesh
|
||||
INTEGER, INTENT(in) :: dims
|
||||
!! Dims is either nbndsub or 1 depending on use_ws
|
||||
!! dims is either nbndsub or 1 depending on use_ws
|
||||
INTEGER, INTENT(in) :: dims2
|
||||
!! Number of atoms
|
||||
!! dims2 is either the number of atoms or 1 depending on use_ws
|
||||
INTEGER, INTENT(out) :: irvec(3, 20 * nc1 * nc2 * nc3)
|
||||
!! INTEGER components of the ir-th Wigner-Seitz grid point in the basis of the lattice vectors
|
||||
INTEGER, INTENT(out) :: ndegen(20 * nc1 * nc2 * nc3, dims2, dims, dims)
|
||||
!! Integer components of the ir-th Wigner-Seitz grid point in the basis of the lattice vectors
|
||||
INTEGER, INTENT(out) :: ndegen(20 * nc1 * nc2 * nc3, dims2, dims)
|
||||
!! Number of degeneracies
|
||||
INTEGER, INTENT(out) :: nrr
|
||||
!! number of Wigner-Seitz grid points
|
||||
!! Number of Wigner-Seitz grid points
|
||||
REAL(KIND = DP), INTENT(in) :: w_centers(3, dims)
|
||||
!! Wannier centers
|
||||
REAL(KIND = DP), INTENT(in) :: tau(3, dims2)
|
||||
|
@ -471,12 +477,12 @@
|
|||
!! The metric tensor
|
||||
INTEGER :: ierr
|
||||
!! Error status
|
||||
INTEGER :: nrr_tmp(dims2, dims, dims)
|
||||
INTEGER :: nrr_tmp(dims2, dims)
|
||||
!! Temporary array that contains the max number of WS vectors
|
||||
!! for a pair of atoms.
|
||||
INTEGER :: irvec_tmp(3, 20 * nc1 * nc2 * nc3, dims2, dims, dims)
|
||||
INTEGER :: irvec_tmp(3, 20 * nc1 * nc2 * nc3, dims2, dims)
|
||||
!! Temporary WS vectors for each atoms
|
||||
INTEGER :: ndegen_tmp(20 * nc1 * nc2 * nc3, dims2, dims, dims)
|
||||
INTEGER :: ndegen_tmp(20 * nc1 * nc2 * nc3, dims2, dims)
|
||||
!! Temporary WS vectors weigths for each atoms
|
||||
REAL(KIND = DP) :: adot(3, 3)
|
||||
!! Dot product between lattice vector
|
||||
|
@ -509,129 +515,118 @@
|
|||
! primitive supercell. In the end nrr contains the total number of grids
|
||||
! points that have been found in the Wigner-Seitz cell
|
||||
!
|
||||
nrr_tmp(:, :, :) = 0
|
||||
nrr_tmp(:, :) = 0
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO na = 1, dims2
|
||||
DO n1 = -2 * nc1, 2 * nc1
|
||||
DO n2 = -2 * nc2, 2 * nc2
|
||||
DO n3 = -2 * nc3, 2 * nc3
|
||||
!
|
||||
! Loop over the 5^3 = 125 points R. R=0 corresponds to i1=i2=i3=2, or icnt=63
|
||||
!
|
||||
i = 0
|
||||
dist(:) = 0.d0
|
||||
DO i1 = -2, 2
|
||||
DO i2 = -2, 2
|
||||
DO i3 = -2, 2
|
||||
i = i + 1
|
||||
!
|
||||
! Calculate distance squared |r-R|^2
|
||||
!
|
||||
!ndiff(1) = n1 - i1*nc1 + ( tau(1,na) + w_centers(1,iw2) + w_centers(1,iw) ) / 3.d0
|
||||
!ndiff(2) = n2 - i2*nc2 + ( tau(2,na) + w_centers(2,iw2) + w_centers(2,iw) ) / 3.d0
|
||||
!ndiff(3) = n3 - i3*nc3 + ( tau(3,na) + w_centers(3,iw2) + w_centers(3,iw) ) / 3.d0
|
||||
ndiff(1) = n1 - i1 * nc1 + tau(1, na) - (w_centers(1, iw2) + w_centers(1, iw)) / 2.d0
|
||||
ndiff(2) = n2 - i2 * nc2 + tau(2, na) - (w_centers(2, iw2) + w_centers(2, iw)) / 2.d0
|
||||
ndiff(3) = n3 - i3 * nc3 + tau(3, na) - (w_centers(3, iw2) + w_centers(3, iw)) / 2.d0
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
dist(i) = dist(i) + DBLE(ndiff(ipol)) * adot(ipol, jpol) * DBLE(ndiff(jpol))
|
||||
ENDDO
|
||||
DO na = 1, dims2
|
||||
DO n1 = -2 * nc1, 2 * nc1
|
||||
DO n2 = -2 * nc2, 2 * nc2
|
||||
DO n3 = -2 * nc3, 2 * nc3
|
||||
!
|
||||
! Loop over the 5^3 = 125 points R. R=0 corresponds to i1=i2=i3=2, or icnt=63
|
||||
i = 0
|
||||
dist(:) = 0.d0
|
||||
DO i1 = -2, 2
|
||||
DO i2 = -2, 2
|
||||
DO i3 = -2, 2
|
||||
i = i + 1
|
||||
!
|
||||
! Calculate distance squared |r-R|^2
|
||||
ndiff(1) = n1 - i1 * nc1 + tau(1, na) - w_centers(1, iw)
|
||||
ndiff(2) = n2 - i2 * nc2 + tau(2, na) - w_centers(2, iw)
|
||||
ndiff(3) = n3 - i3 * nc3 + tau(3, na) - w_centers(3, iw)
|
||||
!ndiff(1) = n1 - i1 * nc1 - tau(1, na) - w_centers(1, iw)
|
||||
!ndiff(2) = n2 - i2 * nc2 - tau(2, na) - w_centers(2, iw)
|
||||
!ndiff(3) = n3 - i3 * nc3 - tau(3, na) - w_centers(3, iw)
|
||||
DO ipol = 1, 3
|
||||
DO jpol = 1, 3
|
||||
dist(i) = dist(i) + DBLE(ndiff(ipol)) * adot(ipol, jpol) * DBLE(ndiff(jpol))
|
||||
ENDDO
|
||||
!
|
||||
ENDDO
|
||||
!
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
! Sort the 125 vectors R by increasing value of |r-R|^2
|
||||
ind(1) = 0 ! required for hpsort_eps (see the subroutine)
|
||||
CALL hpsort_eps_epw(125, dist, ind, eps6)
|
||||
!
|
||||
! Find all the vectors R with the (same) smallest |r-R|^2;
|
||||
! if R=0 is one of them, then the current point r belongs to
|
||||
! Wignez-Seitz cell => set found to true
|
||||
!
|
||||
found = .FALSE.
|
||||
i = 1
|
||||
mindist = dist(1)
|
||||
DO WHILE (ABS(dist(i) - mindist) < eps6 .AND. i < 125)
|
||||
IF (ind(i) == 63) found = .TRUE.
|
||||
i = i + 1
|
||||
ENDDO
|
||||
!
|
||||
IF (found) THEN
|
||||
nrr_tmp(na, iw, iw2) = nrr_tmp(na, iw, iw2) + 1
|
||||
ndegen_tmp(nrr_tmp(na, iw, iw2), na, iw, iw2) = i - 1
|
||||
irvec_tmp (:, nrr_tmp(na, iw, iw2), na, iw, iw2) = (/n1, n2, n3/)
|
||||
ENDIF
|
||||
ENDDO ! n3
|
||||
ENDDO ! n2
|
||||
ENDDO ! n3
|
||||
ENDDO ! na
|
||||
ENDDO ! iw2
|
||||
ENDDO
|
||||
!
|
||||
! Sort the 125 vectors R by increasing value of |r-R|^2
|
||||
ind(1) = 0 ! required for hpsort_eps (see the subroutine)
|
||||
CALL hpsort_eps_epw(125, dist, ind, eps6)
|
||||
!
|
||||
! Find all the vectors R with the (same) smallest |r-R|^2;
|
||||
! if R=0 is one of them, then the current point r belongs to
|
||||
! Wignez-Seitz cell => set found to true
|
||||
found = .FALSE.
|
||||
i = 1
|
||||
mindist = dist(1)
|
||||
DO WHILE (ABS(dist(i) - mindist) < eps6 .AND. i < 125)
|
||||
IF (ind(i) == 63) found = .TRUE.
|
||||
i = i + 1
|
||||
ENDDO
|
||||
!
|
||||
IF (found) THEN
|
||||
nrr_tmp(na, iw) = nrr_tmp(na, iw) + 1
|
||||
ndegen_tmp(nrr_tmp(na, iw), na, iw) = i - 1
|
||||
irvec_tmp(:, nrr_tmp(na, iw), na, iw) = (/n1, n2, n3/)
|
||||
ENDIF
|
||||
ENDDO ! n3
|
||||
ENDDO ! n2
|
||||
ENDDO ! n3
|
||||
ENDDO ! na
|
||||
ENDDO ! iw
|
||||
!
|
||||
! Now creates a global set of WS vectors from all the atoms pair.
|
||||
! Also remove the duplicated ones.
|
||||
nrr = nrr_tmp(1, 1, 1)
|
||||
irvec(:, :) = irvec_tmp(:, :, 1, 1, 1)
|
||||
nrr = nrr_tmp(1, 1)
|
||||
irvec(:, :) = irvec_tmp(:, :, 1, 1)
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO na = 1, dims2
|
||||
DO ir = 1, nrr_tmp(na, iw, iw2)
|
||||
found = .FALSE.
|
||||
DO irtot = 1, nrr
|
||||
IF (ALL(irvec_tmp(:, ir, na, iw, iw2) == irvec(:, irtot))) THEN
|
||||
found = .TRUE.
|
||||
ENDIF
|
||||
ENDDO !nrr
|
||||
IF (.NOT. found) THEN
|
||||
nrr = nrr + 1
|
||||
irvec(:, nrr) = irvec_tmp(:, ir, na, iw, iw2)
|
||||
DO na = 1, dims2
|
||||
DO ir = 1, nrr_tmp(na, iw)
|
||||
found = .FALSE.
|
||||
DO irtot = 1, nrr
|
||||
IF (ALL(irvec_tmp(:, ir, na, iw) == irvec(:, irtot))) THEN
|
||||
found = .TRUE.
|
||||
ENDIF
|
||||
ENDDO ! ir
|
||||
ENDDO ! na
|
||||
ENDDO ! iw2
|
||||
ENDDO !nrr
|
||||
IF (.NOT. found) THEN
|
||||
nrr = nrr + 1
|
||||
irvec(:, nrr) = irvec_tmp(:, ir, na, iw)
|
||||
ENDIF
|
||||
ENDDO ! ir
|
||||
ENDDO ! na
|
||||
ENDDO ! iw
|
||||
!
|
||||
! Creates a pair of atoms-dependent degeneracy array but with a number of WS
|
||||
! vectors per pair that is equal to the global set. Populate with zero weights
|
||||
! the one that are not part of that pair set.
|
||||
ndegen(:, :, :, :) = 0
|
||||
ndegen(:, :, :) = 0
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO na = 1, dims2
|
||||
DO ir = 1, nrr_tmp(na, iw, iw2)
|
||||
DO irtot = 1, nrr
|
||||
IF (ALL(irvec(:, irtot) == irvec_tmp(:, ir, na, iw, iw2))) THEN
|
||||
ndegen(irtot, na, iw, iw2) = ndegen_tmp(ir, na, iw, iw2)
|
||||
ENDIF
|
||||
ENDDO
|
||||
DO na = 1, dims2
|
||||
DO ir = 1, nrr_tmp(na, iw)
|
||||
DO irtot = 1, nrr
|
||||
IF (ALL(irvec(:, irtot) == irvec_tmp(:, ir, na, iw))) THEN
|
||||
ndegen(irtot, na, iw) = ndegen_tmp(ir, na, iw)
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
DO iw = 1, dims
|
||||
DO iw2 = 1, dims
|
||||
DO na = 1, dims2
|
||||
tot = 0.d0
|
||||
tot2 = 0.d0
|
||||
DO i = 1, nrr
|
||||
IF (ndegen(i, na, iw, iw2) > 0) THEN
|
||||
tot2 = tot2 + 1.d0 / DBLE(ndegen(i, na, iw, iw2))
|
||||
ENDIF
|
||||
ENDDO
|
||||
DO i = 1, nrr_tmp(na, iw, iw2)
|
||||
tot = tot + 1.d0 / DBLE(ndegen_tmp(i, na, iw, iw2))
|
||||
ENDDO
|
||||
!
|
||||
IF (ABS(tot - DBLE(nc1 * nc2 * nc3)) > eps6) CALL errore &
|
||||
('wigner_seitzg', ' weights do not add up to nqc1*nqc2*nqc3', 1)
|
||||
IF (ABS(tot - tot2) > eps6) CALL errore &
|
||||
('wigner_seitzg', ' weigths of pair of atoms is not equal to global weights', 1)
|
||||
DO na = 1, dims2
|
||||
tot = 0.d0
|
||||
tot2 = 0.d0
|
||||
DO i = 1, nrr
|
||||
IF (ndegen(i, na, iw) > 0) THEN
|
||||
tot2 = tot2 + 1.d0 / DBLE(ndegen(i, na, iw))
|
||||
ENDIF
|
||||
ENDDO
|
||||
DO i = 1, nrr_tmp(na, iw)
|
||||
tot = tot + 1.d0 / DBLE(ndegen_tmp(i, na, iw))
|
||||
ENDDO
|
||||
!
|
||||
IF (ABS(tot - DBLE(nc1 * nc2 * nc3)) > eps6) CALL errore &
|
||||
('wigner_seitzg', ' weights do not add up to nqc1*nqc2*nqc3', 1)
|
||||
IF (ABS(tot - tot2) > eps6) CALL errore &
|
||||
('wigner_seitzg', ' weigths of pair of atoms is not equal to global weights', 1)
|
||||
ENDDO
|
||||
ENDDO
|
||||
!
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,7 @@ default :
|
|||
@echo ' '
|
||||
@echo 'where <target> identifies an action'
|
||||
@echo ' run-tests : run-tests-serial (default)'
|
||||
@echo ' run-tests-serial : run all tests in SERIAL'
|
||||
@echo ' run-tests-serial : run all tests in SERIAL'
|
||||
@echo ' run-tests-XX-serial : run tests for XX={pw,cp,ph,epw,hp,tddfpt} only, as above'
|
||||
@echo ' run-tests-parallel : run all tests in PARALLEL (4 MPI)'
|
||||
@echo ' run-tests-XX-parallel : run tests for XX={pw,cp,ph,epw,hp,tddfpt} only, as above'
|
||||
|
@ -47,11 +47,11 @@ run-tests-parallel : run-tests-pw-parallel run-tests-cp-parallel run-tests-ph-pa
|
|||
|
||||
|
||||
run-tests-cp-serial : prolog pseudo
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
env QE_USE_MPI=0 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=cp_all
|
||||
|
||||
run-tests-cp-parallel : prolog pseudo
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
env QE_USE_MPI=1 ${TESTCODE_DIR}/bin/testcode.py --verbose --category=cp_all
|
||||
|
||||
run-tests-pw-serial : prolog pseudo
|
||||
|
@ -118,7 +118,7 @@ run-tests-xsd-pw-serial : prolog pseudo
|
|||
done ; cd ..
|
||||
|
||||
create-reference-cp : pseudo prolog
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
@if ! test -d $(ESPRESSO_TMPDIR); then mkdir $(ESPRESSO_TMPDIR); fi
|
||||
env QE_USE_MPI=0 ${TESTCODE_DIR}/bin/testcode.py --category=cp_all make-benchmarks
|
||||
|
||||
create-reference-pw : pseudo prolog
|
||||
|
@ -180,7 +180,7 @@ clean:
|
|||
hp_*/*HubbardV* hp_*/*mix* hp_*/*parameters.out
|
||||
# Cleaning EPW final files
|
||||
@rm -rf epw_*/_ph0 epw_*/*.save epw_*/*.wfc* epw_*/*.dyn* \
|
||||
epw_*/*.qdos_* epw_*/*.P epw_*/*.wout epw_*/*.fmt epw_*/*.pade* \
|
||||
epw_*/*.qdos_* epw_*/*.P epw_*/*.wout epw_*/crystal.fmt epw_*/*.pade* \
|
||||
epw_*/*.epmat_wanep epw_*/*.kgmap epw_*/*.nnkp epw_*/*.epmatwp* \
|
||||
epw_*/*.acon_iso_* epw_*/*.a2f* epw_*/*.phdos* epw_*/*.lambda \
|
||||
epw_*/*.kmap epw_*/*.lambda_k_pairs epw_*/*.ukk epw_*/*.imag_aniso* \
|
||||
|
@ -195,8 +195,11 @@ clean:
|
|||
epw_*/*.Fin_restart* epw_*/*.Fin_restartcb* epw_*/*.acon_iso_* \
|
||||
epw_*/*.bvec epw_*/*.fc epw_*/*.xml epw_*/*.labelinfo.dat \
|
||||
epw_*/Fepmatkq1 epw_*/Fepmatkqcb1 epw_*/Fsparse epw_*/Fsparsecb \
|
||||
epw_*/inv_taucb_tmp epw_*/inv_tau_tmp epw_*/*.cube epw_*/EPW.bib
|
||||
|
||||
epw_*/inv_taucb_tmp epw_*/inv_tau_tmp epw_*/*.cube epw_*/EPW.bib \
|
||||
epw_*/*_hr.dat epw_*/*_wsvec.dat epw_*/epwdata.fmt epw_*/IBTEvel_sup.fmt \
|
||||
epw_*/inv_taucb.fmt epw_*/inv_tau.fmt epw_*/restart.fmt epw_*/vmedata.fmt \
|
||||
epw_*/selecq.fmt
|
||||
|
||||
# Special cases for EPW
|
||||
@rm -rf epw_base/save epw_super/save epw_pl/save/ epw_polar/save/ \
|
||||
epw_trev/save epw_trev_uspp/save epw_trev_paw/save \
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
165 crystal
|
||||
0.5 0.0 0.0 0.00151975683891
|
||||
0.488372093023 0.0 0.0 0.00151975683891
|
||||
0.476744186047 0.0 0.0 0.00151975683891
|
||||
0.46511627907 0.0 0.0 0.00151975683891
|
||||
0.453488372093 0.0 0.0 0.00151975683891
|
||||
0.441860465116 0.0 0.0 0.00151975683891
|
||||
0.43023255814 0.0 0.0 0.00151975683891
|
||||
0.418604651163 0.0 0.0 0.00151975683891
|
||||
0.406976744186 0.0 0.0 0.00151975683891
|
||||
0.395348837209 0.0 0.0 0.00151975683891
|
||||
0.383720930233 0.0 0.0 0.00151975683891
|
||||
0.372093023256 0.0 0.0 0.00151975683891
|
||||
0.360465116279 0.0 0.0 0.00151975683891
|
||||
0.348837209302 0.0 0.0 0.00151975683891
|
||||
0.337209302326 0.0 0.0 0.00151975683891
|
||||
0.325581395349 0.0 0.0 0.00151975683891
|
||||
0.313953488372 0.0 0.0 0.00151975683891
|
||||
0.302325581395 0.0 0.0 0.00151975683891
|
||||
0.290697674419 0.0 0.0 0.00151975683891
|
||||
0.279069767442 0.0 0.0 0.00151975683891
|
||||
0.267441860465 0.0 0.0 0.00151975683891
|
||||
0.255813953488 0.0 0.0 0.00151975683891
|
||||
0.244186046512 0.0 0.0 0.00151975683891
|
||||
0.232558139535 0.0 0.0 0.00151975683891
|
||||
0.220930232558 0.0 0.0 0.00151975683891
|
||||
0.209302325581 0.0 0.0 0.00151975683891
|
||||
0.197674418605 0.0 0.0 0.00151975683891
|
||||
0.186046511628 0.0 0.0 0.00151975683891
|
||||
0.174418604651 0.0 0.0 0.00151975683891
|
||||
0.162790697674 0.0 0.0 0.00151975683891
|
||||
0.151162790698 0.0 0.0 0.00151975683891
|
||||
0.139534883721 0.0 0.0 0.00151975683891
|
||||
0.127906976744 0.0 0.0 0.00151975683891
|
||||
0.116279069767 0.0 0.0 0.00151975683891
|
||||
0.104651162791 0.0 0.0 0.00151975683891
|
||||
0.093023255814 0.0 0.0 0.00151975683891
|
||||
0.0813953488372 0.0 0.0 0.00151975683891
|
||||
0.0697674418605 0.0 0.0 0.00151975683891
|
||||
0.0581395348837 0.0 0.0 0.00151975683891
|
||||
0.046511627907 0.0 0.0 0.00151975683891
|
||||
0.0348837209302 0.0 0.0 0.00151975683891
|
||||
0.0232558139535 0.0 0.0 0.00151975683891
|
||||
0.0116279069767 0.0 0.0 0.00151975683891
|
||||
0.0 0.0 0.0 0.00151975683891
|
||||
0.01 0.01 0.0 0.00151975683891
|
||||
0.02 0.02 0.0 0.00151975683891
|
||||
0.03 0.03 0.0 0.00151975683891
|
||||
0.04 0.04 0.0 0.00151975683891
|
||||
0.05 0.05 0.0 0.00151975683891
|
||||
0.06 0.06 0.0 0.00151975683891
|
||||
0.07 0.07 0.0 0.00151975683891
|
||||
0.08 0.08 0.0 0.00151975683891
|
||||
0.09 0.09 0.0 0.00151975683891
|
||||
0.1 0.1 0.0 0.00151975683891
|
||||
0.11 0.11 0.0 0.00151975683891
|
||||
0.12 0.12 0.0 0.00151975683891
|
||||
0.13 0.13 0.0 0.00151975683891
|
||||
0.14 0.14 0.0 0.00151975683891
|
||||
0.15 0.15 0.0 0.00151975683891
|
||||
0.16 0.16 0.0 0.00151975683891
|
||||
0.17 0.17 0.0 0.00151975683891
|
||||
0.18 0.18 0.0 0.00151975683891
|
||||
0.19 0.19 0.0 0.00151975683891
|
||||
0.2 0.2 0.0 0.00151975683891
|
||||
0.21 0.21 0.0 0.00151975683891
|
||||
0.22 0.22 0.0 0.00151975683891
|
||||
0.23 0.23 0.0 0.00151975683891
|
||||
0.24 0.24 0.0 0.00151975683891
|
||||
0.25 0.25 0.0 0.00151975683891
|
||||
0.26 0.26 0.0 0.00151975683891
|
||||
0.27 0.27 0.0 0.00151975683891
|
||||
0.28 0.28 0.0 0.00151975683891
|
||||
0.29 0.29 0.0 0.00151975683891
|
||||
0.3 0.3 0.0 0.00151975683891
|
||||
0.31 0.31 0.0 0.00151975683891
|
||||
0.32 0.32 0.0 0.00151975683891
|
||||
0.33 0.33 0.0 0.00151975683891
|
||||
0.34 0.34 0.0 0.00151975683891
|
||||
0.35 0.35 0.0 0.00151975683891
|
||||
0.36 0.36 0.0 0.00151975683891
|
||||
0.37 0.37 0.0 0.00151975683891
|
||||
0.38 0.38 0.0 0.00151975683891
|
||||
0.39 0.39 0.0 0.00151975683891
|
||||
0.4 0.4 0.0 0.00151975683891
|
||||
0.41 0.41 0.0 0.00151975683891
|
||||
0.42 0.42 0.0 0.00151975683891
|
||||
0.43 0.43 0.0 0.00151975683891
|
||||
0.44 0.44 0.0 0.00151975683891
|
||||
0.45 0.45 0.0 0.00151975683891
|
||||
0.46 0.46 0.0 0.00151975683891
|
||||
0.47 0.47 0.0 0.00151975683891
|
||||
0.48 0.48 0.0 0.00151975683891
|
||||
0.49 0.49 0.0 0.00151975683891
|
||||
0.5 0.5 0.0 0.00151975683891
|
||||
0.506944444444 0.506944444444 0.0138888888889 0.00151975683891
|
||||
0.513888888889 0.513888888889 0.0277777777778 0.00151975683891
|
||||
0.520833333333 0.520833333333 0.0416666666667 0.00151975683891
|
||||
0.527777777778 0.527777777778 0.0555555555556 0.00151975683891
|
||||
0.534722222222 0.534722222222 0.0694444444444 0.00151975683891
|
||||
0.541666666667 0.541666666667 0.0833333333333 0.00151975683891
|
||||
0.548611111111 0.548611111111 0.0972222222222 0.00151975683891
|
||||
0.555555555556 0.555555555556 0.111111111111 0.00151975683891
|
||||
0.5625 0.5625 0.125 0.00151975683891
|
||||
0.569444444444 0.569444444444 0.138888888889 0.00151975683891
|
||||
0.576388888889 0.576388888889 0.152777777778 0.00151975683891
|
||||
0.583333333333 0.583333333333 0.166666666667 0.00151975683891
|
||||
0.590277777778 0.590277777778 0.180555555556 0.00151975683891
|
||||
0.597222222222 0.597222222222 0.194444444444 0.00151975683891
|
||||
0.604166666667 0.604166666667 0.208333333333 0.00151975683891
|
||||
0.611111111111 0.611111111111 0.222222222222 0.00151975683891
|
||||
0.618055555556 0.618055555556 0.236111111111 0.00151975683891
|
||||
0.625 0.625 0.25 0.00151975683891
|
||||
0.739386792453 0.369693396226 0.369693396226 0.00151975683891
|
||||
0.725235849057 0.362617924528 0.362617924528 0.00151975683891
|
||||
0.71108490566 0.35554245283 0.35554245283 0.00151975683891
|
||||
0.696933962264 0.348466981132 0.348466981132 0.00151975683891
|
||||
0.682783018868 0.341391509434 0.341391509434 0.00151975683891
|
||||
0.668632075472 0.334316037736 0.334316037736 0.00151975683891
|
||||
0.654481132075 0.327240566038 0.327240566038 0.00151975683891
|
||||
0.640330188679 0.32016509434 0.32016509434 0.00151975683891
|
||||
0.626179245283 0.313089622642 0.313089622642 0.00151975683891
|
||||
0.612028301887 0.306014150943 0.306014150943 0.00151975683891
|
||||
0.597877358491 0.298938679245 0.298938679245 0.00151975683891
|
||||
0.583726415094 0.291863207547 0.291863207547 0.00151975683891
|
||||
0.569575471698 0.284787735849 0.284787735849 0.00151975683891
|
||||
0.555424528302 0.277712264151 0.277712264151 0.00151975683891
|
||||
0.541273584906 0.270636792453 0.270636792453 0.00151975683891
|
||||
0.527122641509 0.263561320755 0.263561320755 0.00151975683891
|
||||
0.512971698113 0.256485849057 0.256485849057 0.00151975683891
|
||||
0.498820754717 0.249410377358 0.249410377358 0.00151975683891
|
||||
0.484669811321 0.24233490566 0.24233490566 0.00151975683891
|
||||
0.470518867925 0.235259433962 0.235259433962 0.00151975683891
|
||||
0.456367924528 0.228183962264 0.228183962264 0.00151975683891
|
||||
0.442216981132 0.221108490566 0.221108490566 0.00151975683891
|
||||
0.428066037736 0.214033018868 0.214033018868 0.00151975683891
|
||||
0.41391509434 0.20695754717 0.20695754717 0.00151975683891
|
||||
0.399764150943 0.199882075472 0.199882075472 0.00151975683891
|
||||
0.385613207547 0.192806603774 0.192806603774 0.00151975683891
|
||||
0.371462264151 0.185731132075 0.185731132075 0.00151975683891
|
||||
0.357311320755 0.178655660377 0.178655660377 0.00151975683891
|
||||
0.343160377358 0.171580188679 0.171580188679 0.00151975683891
|
||||
0.329009433962 0.164504716981 0.164504716981 0.00151975683891
|
||||
0.314858490566 0.157429245283 0.157429245283 0.00151975683891
|
||||
0.30070754717 0.150353773585 0.150353773585 0.00151975683891
|
||||
0.286556603774 0.143278301887 0.143278301887 0.00151975683891
|
||||
0.272405660377 0.136202830189 0.136202830189 0.00151975683891
|
||||
0.258254716981 0.129127358491 0.129127358491 0.00151975683891
|
||||
0.244103773585 0.122051886792 0.122051886792 0.00151975683891
|
||||
0.229952830189 0.114976415094 0.114976415094 0.00151975683891
|
||||
0.215801886792 0.107900943396 0.107900943396 0.00151975683891
|
||||
0.201650943396 0.100825471698 0.100825471698 0.00151975683891
|
||||
0.1875 0.09375 0.09375 0.00151975683891
|
||||
0.173349056604 0.0866745283019 0.0866745283019 0.00151975683891
|
||||
0.159198113208 0.0795990566038 0.0795990566038 0.00151975683891
|
||||
0.145047169811 0.0725235849057 0.0725235849057 0.00151975683891
|
||||
0.130896226415 0.0654481132075 0.0654481132075 0.00151975683891
|
||||
0.116745283019 0.0583726415094 0.0583726415094 0.00151975683891
|
||||
0.102594339623 0.0512971698113 0.0512971698113 0.00151975683891
|
||||
0.0884433962264 0.0442216981132 0.0442216981132 0.00151975683891
|
||||
0.0742924528302 0.0371462264151 0.0371462264151 0.00151975683891
|
||||
0.060141509434 0.030070754717 0.030070754717 0.00151975683891
|
||||
0.0459905660377 0.0229952830189 0.0229952830189 0.00151975683891
|
||||
0.0318396226415 0.0159198113208 0.0159198113208 0.00151975683891
|
||||
0.0176886792453 0.00884433962264 0.00884433962264 0.00151975683891
|
||||
0.00353773584906 0.00176886792453 0.00176886792453 0.00151975683891
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,574 @@
|
|||
|
||||
``:oss/
|
||||
`.+s+. .+ys--yh+ `./ss+.
|
||||
-sh//yy+` +yy +yy -+h+-oyy
|
||||
-yh- .oyy/.-sh. .syo-.:sy- /yh
|
||||
`.-.` `yh+ -oyyyo. `/syys: oys `.`
|
||||
`/+ssys+-` `sh+ ` oys` .:osyo`
|
||||
-yh- ./syyooyo` .sys+/oyo--yh/
|
||||
`yy+ .-:-. `-/+/:` -sh-
|
||||
/yh. oys
|
||||
``..---hho---------` .---------..` `.-----.` -hd+---.
|
||||
`./osmNMMMMMMMMMMMMMMMs. +NNMMMMMMMMNNmh+. yNMMMMMNm- oNMMMMMNmo++:`
|
||||
+sy--/sdMMMhyyyyyyyNMMh- .oyNMMmyyyyyhNMMm+` -yMMMdyyo:` .oyyNMMNhs+syy`
|
||||
-yy/ /MMM+.`-+/``mMMy- `mMMh:`````.dMMN:` `MMMy-`-dhhy```mMMy:``+hs
|
||||
-yy+` /MMMo:-mMM+`-oo/. mMMh: `dMMN/` dMMm:`dMMMMy..MMMo-.+yo`
|
||||
.sys`/MMMMNNMMMs- mMMmyooooymMMNo: oMMM/sMMMMMM++MMN//oh:
|
||||
`sh+/MMMhyyMMMs- `-` mMMMMMMMMMNmy+-` -MMMhMMMsmMMmdMMd/yy+
|
||||
`-/+++oyy-/MMM+.`/hh/.`mNm:` mMMd+/////:-.` NMMMMMd/:NMMMMMy:/yyo/:.`
|
||||
+os+//:-..-oMMMo:--:::-/MMMo. .-mMMd+---` hMMMMN+. oMMMMMo. `-+osyso:`
|
||||
syo `mNMMMMMNNNNNNNNMMMo.oNNMMMMMNNNN:` +MMMMs:` dMMMN/` ``:syo
|
||||
/yh` :syyyyyyyyyyyyyyyy+.`+syyyyyyyyo:` .oyys:` .oyys:` +yh
|
||||
-yh- ```````````````` ````````` `` `` oys
|
||||
-+h/------------------------::::::::://////++++++++++++++++++++++///////::::/yd:
|
||||
shdddddddddddddddddddddddddddddhhhhhhhhyyyyyssssssssssssssssyyyyyyyhhhhhhhddddh`
|
||||
|
||||
S. Ponce, E. R. Margine, C. Verdi, and F. Giustino,
|
||||
Comput. Phys. Commun. 209, 116 (2016)
|
||||
|
||||
|
||||
Program EPW v.5.3.1 starts on 3May2021 at 11:49:15
|
||||
|
||||
This program is part of the open-source Quantum ESPRESSO suite
|
||||
for quantum simulation of materials; please cite
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
|
||||
"P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020);
|
||||
URL http://www.quantum-espresso.org",
|
||||
in publications or presentations arising from this work. More details at
|
||||
http://www.quantum-espresso.org/quote
|
||||
|
||||
Parallel version (MPI), running on 1 processors
|
||||
|
||||
MPI processes distributed on 1 nodes
|
||||
Reading input from epw2.in
|
||||
|
||||
WARNING: The specified dis_win_min is ignored.
|
||||
You should instead use bands_skipped = 'exclude_bands = ...'
|
||||
to control the lower bound of band manifold.
|
||||
|
||||
Reading supplied temperature list.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
RESTART - RESTART - RESTART - RESTART
|
||||
Restart is done without reading PWSCF save file.
|
||||
Be aware that some consistency checks are therefore not done.
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
--
|
||||
|
||||
bravais-lattice index = 0
|
||||
lattice parameter (a_0) = 0.0000 a.u.
|
||||
unit-cell volume = 0.0000 (a.u.)^3
|
||||
number of atoms/cell = 0
|
||||
number of atomic types = 0
|
||||
kinetic-energy cut-off = 0.0000 Ry
|
||||
charge density cut-off = 0.0000 Ry
|
||||
Exchange-correlation= not set
|
||||
( -1 -1 -1 -1 -1 -1 -1)
|
||||
|
||||
|
||||
celldm(1)= 0.00000 celldm(2)= 0.00000 celldm(3)= 0.00000
|
||||
celldm(4)= 0.00000 celldm(5)= 0.00000 celldm(6)= 0.00000
|
||||
|
||||
crystal axes: (cart. coord. in units of a_0)
|
||||
a(1) = ( 0.0000 0.0000 0.0000 )
|
||||
a(2) = ( 0.0000 0.0000 0.0000 )
|
||||
a(3) = ( 0.0000 0.0000 0.0000 )
|
||||
|
||||
reciprocal axes: (cart. coord. in units 2 pi/a_0)
|
||||
b(1) = ( 0.0000 0.0000 0.0000 )
|
||||
b(2) = ( 0.0000 0.0000 0.0000 )
|
||||
b(3) = ( 0.0000 0.0000 0.0000 )
|
||||
|
||||
|
||||
Atoms inside the unit cell:
|
||||
|
||||
Cartesian axes
|
||||
|
||||
site n. atom mass positions (a_0 units)
|
||||
|
||||
|
||||
No symmetry!
|
||||
|
||||
G cutoff = 0.0000 ( 0 G-vectors) FFT grid: ( 0, 0, 0)
|
||||
number of k points= 0
|
||||
cart. coord. in units 2pi/a_0
|
||||
EPW : 0.00s CPU 0.00s WALL
|
||||
|
||||
EPW : 0.00s CPU 0.00s WALL
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Using bn.ukk from disk
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------
|
||||
Quadrupole tensor is correctly read:
|
||||
------------------------------------
|
||||
atom dir Qxx Qyy Qzz Qyz Qxz Qxy
|
||||
1 x 0.00000 0.00000 0.00000 3.17968 0.00000 0.00000
|
||||
1 y 0.00000 0.00000 0.00000 0.00000 3.17968 0.00000
|
||||
1 z 0.00000 0.00000 0.00000 0.00000 0.00000 3.17968
|
||||
2 x 0.00000 0.00000 0.00000 -0.57889 0.00000 0.00000
|
||||
2 y 0.00000 0.00000 0.00000 0.00000 -0.57889 0.00000
|
||||
2 z 0.00000 0.00000 0.00000 0.00000 0.00000 -0.57889
|
||||
|
||||
Symmetries of Bravais lattice: 48
|
||||
Symmetries of crystal: 24
|
||||
|
||||
Do not need to read .epb files; read .fmt files
|
||||
|
||||
|
||||
Computes the analytic long-range interaction for polar materials [lpolar]
|
||||
|
||||
Use zone-centred Wigner-Seitz cells
|
||||
Number of WS vectors for electrons 19
|
||||
Number of WS vectors for phonons 19
|
||||
Number of WS vectors for electron-phonon 19
|
||||
Maximum number of cores for efficient parallelization 114
|
||||
Results may improve by using use_ws == .TRUE.
|
||||
|
||||
Reading Hamiltonian, Dynamical matrix and EP vertex in Wann rep from file
|
||||
|
||||
|
||||
Finished reading Wann rep data from file
|
||||
|
||||
===================================================================
|
||||
Memory usage: VmHWM = 13Mb
|
||||
VmPeak = 329Mb
|
||||
===================================================================
|
||||
|
||||
Number of k-points inside fsthick * 1.2 in the full BZ: 712
|
||||
Size of k point mesh for interpolation: 62
|
||||
Max number of k points per pool: 62
|
||||
|
||||
Fermi energy coarse grid = 11.817696 eV
|
||||
|
||||
===================================================================
|
||||
|
||||
Fermi energy is read from the input file: Ef = 11.246840 eV
|
||||
|
||||
===================================================================
|
||||
|
||||
Skipping the first 1 bands:
|
||||
|
||||
The Fermi level will be determined with 6.00000 electrons
|
||||
|
||||
ibndmin = 1 ebndmin = 10.847 eV
|
||||
ibndmax = 3 ebndmax = 11.624 eV
|
||||
|
||||
|
||||
Number of ep-matrix elements per pool : 1674 ~= 13.08 Kb (@ 8 bytes/ DP)
|
||||
|
||||
A selecq.fmt file was found but re-created because selecqread == .FALSE.
|
||||
Number selected, total 1000 2069
|
||||
Number selected, total 2000 7884
|
||||
We only need to compute 2102 q-points
|
||||
|
||||
Valence band maximum = 11.767174 eV
|
||||
|
||||
Temperature 300.000 K
|
||||
Mobility VB Fermi level = 12.223613 eV
|
||||
|
||||
===================================================================
|
||||
Scattering rate for IBTE
|
||||
===================================================================
|
||||
|
||||
Restart and restart_step inputs deactivated (restart point at every q-points).
|
||||
No intermediate mobility will be shown.
|
||||
|
||||
Fermi Surface thickness = 0.400000 eV
|
||||
This is computed with respect to the fine Fermi level 11.246840 eV
|
||||
Only states between 10.846840 eV and 11.646840 eV will be included
|
||||
|
||||
Save matrix elements larger than threshold: 0.173611111111E-24
|
||||
|
||||
Progression iq (fine) = 1000/ 2102
|
||||
Adaptative smearing = Min: 37.131619 meV
|
||||
Max: 202.335453 meV
|
||||
Progression iq (fine) = 2000/ 2102
|
||||
Adaptative smearing = Min: 1.414214 meV
|
||||
Max: 385.317621 meV
|
||||
300.000 12.2236 0.999995E+13
|
||||
|
||||
epmatkqread automatically changed to .TRUE. as all scattering have been computed.
|
||||
|
||||
===================================================================
|
||||
Memory usage: VmHWM = 17Mb
|
||||
VmPeak = 351Mb
|
||||
===================================================================
|
||||
|
||||
Number of elements per core 16863
|
||||
Symmetry mapping finished
|
||||
|
||||
=============================================================================================
|
||||
BTE in the self-energy relaxation time approximation (SERTA)
|
||||
=============================================================================================
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.28241E-26 0.190006E+03 0.142001E-21 -0.476477E-14
|
||||
0.710006E-22 0.190006E+03 0.248502E-21
|
||||
0.476477E-14 -0.355003E-22 0.190006E+03
|
||||
|
||||
=============================================================================================
|
||||
Start solving iterative Boltzmann Transport Equation
|
||||
=============================================================================================
|
||||
|
||||
Iteration number: 1
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.83935E-27 0.224743E+03 0.301753E-21 -0.887508E-23
|
||||
-0.710006E-22 0.224743E+03 -0.142001E-21
|
||||
-0.476477E-14 -0.142001E-21 0.224743E+03
|
||||
|
||||
0.224743E+03 Max error
|
||||
Iteration number: 2
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.40311E-27 0.238057E+03 -0.142001E-21 0.476477E-14
|
||||
-0.284002E-21 0.238057E+03 -0.213002E-21
|
||||
0.476477E-14 -0.142001E-21 0.238057E+03
|
||||
|
||||
0.133140E+02 Max error
|
||||
Iteration number: 3
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.40469E-27 0.241243E+03 0.710006E-22 -0.476466E-14
|
||||
-0.284002E-21 0.241243E+03 0.426004E-21
|
||||
-0.476477E-14 -0.142001E-21 0.241243E+03
|
||||
|
||||
0.318573E+01 Max error
|
||||
Iteration number: 4
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.40390E-27 0.242328E+03 0.710006E-22 -0.729531E-19
|
||||
-0.284002E-21 0.242328E+03 0.426004E-21
|
||||
-0.723851E-19 -0.142001E-21 0.242328E+03
|
||||
|
||||
0.108553E+01 Max error
|
||||
Iteration number: 5
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.00000E+00 0.242610E+03 0.710006E-22 -0.476477E-14
|
||||
0.284002E-21 0.242610E+03 0.426004E-21
|
||||
0.355003E-21 -0.142001E-21 0.242610E+03
|
||||
|
||||
0.281773E+00 Max error
|
||||
Iteration number: 6
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.72512E-26 0.242700E+03 0.497004E-21 0.109696E-18
|
||||
0.284002E-21 0.242700E+03 -0.426004E-21
|
||||
0.733791E-19 -0.426004E-21 0.242700E+03
|
||||
|
||||
0.900611E-01 Max error
|
||||
Iteration number: 7
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.40390E-27 0.242725E+03 0.000000E+00 0.476473E-14
|
||||
0.426004E-21 0.242725E+03 -0.284002E-21
|
||||
0.476484E-14 -0.568005E-21 0.242725E+03
|
||||
|
||||
0.245165E-01 Max error
|
||||
Iteration number: 8
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.36288E-27 0.242732E+03 0.710006E-22 0.720301E-19
|
||||
-0.426004E-21 0.242732E+03 0.142001E-21
|
||||
0.719946E-19 -0.142001E-21 0.242732E+03
|
||||
|
||||
0.754890E-02 Max error
|
||||
Iteration number: 9
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.42835E-27 0.242734E+03 0.710006E-22 -0.476466E-14
|
||||
0.142001E-21 0.242734E+03 -0.142001E-21
|
||||
-0.476477E-14 0.426004E-21 0.242734E+03
|
||||
|
||||
0.211380E-02 Max error
|
||||
Iteration number: 10
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.89110E-26 0.242735E+03 0.142001E-21 -0.142001E-21
|
||||
0.142001E-21 0.242735E+03 -0.142001E-21
|
||||
-0.142001E-21 -0.426004E-21 0.242735E+03
|
||||
|
||||
0.636705E-03 Max error
|
||||
Iteration number: 11
|
||||
=============================================================================================
|
||||
The iteration reached the maximum but did not converge.
|
||||
=============================================================================================
|
||||
|
||||
|
||||
=============================================================================================
|
||||
BTE in the SERTA with B-field
|
||||
=============================================================================================
|
||||
Number of contributing elements for the master core 809424
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.21176E-21 0.190006E+03 -0.629483E-03 -0.506257E-14
|
||||
0.629483E-03 0.190006E+03 0.476466E-14
|
||||
-0.506257E-14 -0.476477E-14 0.190006E+03
|
||||
|
||||
0.527286E+02 Max error
|
||||
|
||||
=============================================================================================
|
||||
Start solving iterative Boltzmann Transport Equation with B-field
|
||||
=============================================================================================
|
||||
|
||||
Iteration number: 1
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.52940E-21 0.224743E+03 -0.723855E-03 0.476484E-14
|
||||
0.723855E-03 0.224743E+03 0.238234E-14
|
||||
0.714708E-14 0.238239E-14 0.224743E+03
|
||||
|
||||
0.347366E+02 Max error
|
||||
|
||||
Iteration number: 2
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.37060E-21 0.238057E+03 -0.993023E-03 0.416925E-14
|
||||
0.993023E-03 0.238057E+03 0.714716E-14
|
||||
0.238253E-14 -0.238224E-14 0.238057E+03
|
||||
|
||||
0.133140E+02 Max error
|
||||
|
||||
Iteration number: 3
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.37058E-21 0.241243E+03 -0.105297E-02 0.714712E-14
|
||||
0.105297E-02 0.241243E+03 0.119119E-13
|
||||
0.190591E-13 -0.728466E-19 0.241243E+03
|
||||
|
||||
0.318573E+01 Max error
|
||||
|
||||
Iteration number: 4
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.10589E-21 0.242328E+03 -0.108626E-02 0.107208E-13
|
||||
0.108626E-02 0.242328E+03 0.833837E-14
|
||||
-0.119126E-14 0.238264E-14 0.242328E+03
|
||||
|
||||
0.108553E+01 Max error
|
||||
|
||||
Iteration number: 5
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.21176E-21 0.242610E+03 -0.109601E-02 0.214415E-13
|
||||
0.109601E-02 0.242610E+03 -0.119113E-14
|
||||
0.142942E-13 0.476477E-14 0.242610E+03
|
||||
|
||||
0.281773E+00 Max error
|
||||
|
||||
Iteration number: 6
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 0.42353E-21 0.242700E+03 -0.109975E-02 -0.595593E-14
|
||||
0.109975E-02 0.242700E+03 -0.595607E-14
|
||||
-0.238231E-14 0.238209E-14 0.242700E+03
|
||||
|
||||
0.900611E-01 Max error
|
||||
|
||||
Iteration number: 7
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.10588E-21 0.242725E+03 -0.110094E-02 -0.476477E-14
|
||||
0.110094E-02 0.242725E+03 0.107207E-13
|
||||
-0.595633E-14 -0.476477E-14 0.242725E+03
|
||||
|
||||
0.245165E-01 Max error
|
||||
|
||||
Iteration number: 8
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.68824E-21 0.242732E+03 -0.110134E-02 0.238242E-14
|
||||
0.110134E-02 0.242732E+03 -0.595596E-14
|
||||
0.107207E-13 0.756866E-19 0.242732E+03
|
||||
|
||||
0.754890E-02 Max error
|
||||
|
||||
Iteration number: 9
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.52938E-22 0.242734E+03 -0.110147E-02 -0.119120E-13
|
||||
0.110147E-02 0.242734E+03 0.595596E-14
|
||||
0.714716E-14 -0.714715E-14 0.242734E+03
|
||||
|
||||
0.211380E-02 Max error
|
||||
|
||||
Iteration number: 10
|
||||
|
||||
=============================================================================================
|
||||
Temp Fermi Hole density Population SR Hole mobility
|
||||
[K] [eV] [cm^-3] [h per cell] [cm^2/Vs]
|
||||
=============================================================================================
|
||||
|
||||
300.000 12.2236 0.99999E+13 -0.12176E-20 0.242735E+03 -0.110151E-02 -0.166766E-13
|
||||
0.110151E-02 0.242735E+03 0.714719E-14
|
||||
-0.119119E-13 0.119117E-13 0.242735E+03
|
||||
|
||||
0.636705E-03 Max error
|
||||
|
||||
Iteration number: 11
|
||||
=============================================================================================
|
||||
The iteration reached the maximum but did not converge.
|
||||
=============================================================================================
|
||||
|
||||
|
||||
=============================================================================================
|
||||
Summary and Hall factor
|
||||
=============================================================================================
|
||||
|
||||
=============================================================================================
|
||||
BTE in the self-energy relaxation time approximation (SERTA)
|
||||
=============================================================================================
|
||||
|
||||
Temperature: 300.0000 K
|
||||
Conductivity tensor without magnetic field | with magnetic field [Siemens/m]
|
||||
0.30442E-01 0.11375E-25 0.76340E-18 | 0.30442E-01 0.10085E-06 -0.81111E-18
|
||||
0.22751E-25 0.30442E-01 -0.56877E-26 | -0.10085E-06 0.30442E-01 -0.76340E-18
|
||||
-0.76340E-18 0.39814E-25 0.30442E-01 | -0.81111E-18 0.76338E-18 0.30442E-01
|
||||
Mobility tensor without magnetic field | with magnetic field [cm^2/Vs]
|
||||
0.19001E+03 0.71001E-22 0.47648E-14 | 0.19001E+03 0.62948E-03 -0.50626E-14
|
||||
0.14200E-21 0.19001E+03 -0.35500E-22 | -0.62948E-03 0.19001E+03 -0.47648E-14
|
||||
-0.47648E-14 0.24850E-21 0.19001E+03 | -0.50626E-14 0.47647E-14 0.19001E+03
|
||||
Hall factor
|
||||
0.139752E+06 0.462992E+00 -0.107327E-10
|
||||
-0.462992E+00 0.139752E+06 -0.350454E-11
|
||||
0.328551E-11 0.350448E-11 0.139752E+06
|
||||
|
||||
=============================================================================================
|
||||
BTE
|
||||
=============================================================================================
|
||||
|
||||
Temperature: 300.0000 K
|
||||
Conductivity tensor without magnetic field | with magnetic field [Siemens/m]
|
||||
0.38890E-01 0.22751E-25 -0.22751E-25 | 0.38890E-01 0.17648E-06 -0.19085E-17
|
||||
0.22751E-25 0.38890E-01 -0.68253E-25 | -0.17648E-06 0.38890E-01 0.19085E-17
|
||||
-0.22751E-25 -0.22751E-25 0.38890E-01 | -0.26719E-17 0.11451E-17 0.38890E-01
|
||||
Mobility tensor without magnetic field | with magnetic field [cm^2/Vs]
|
||||
0.24274E+03 0.14200E-21 -0.14200E-21 | 0.24274E+03 0.11015E-02 -0.11912E-13
|
||||
0.14200E-21 0.24274E+03 -0.42600E-21 | -0.11015E-02 0.24274E+03 0.11912E-13
|
||||
-0.14200E-21 -0.14200E-21 0.24274E+03 | -0.16677E-13 0.71472E-14 0.24274E+03
|
||||
Hall factor
|
||||
0.109394E+06 0.496422E+00 -0.536838E-11
|
||||
-0.496422E+00 0.109394E+06 0.536828E-11
|
||||
-0.751570E-11 0.322104E-11 0.109394E+06
|
||||
|
||||
Unfolding on the coarse grid
|
||||
elphon_wrap : 0.00s CPU 0.00s WALL ( 1 calls)
|
||||
|
||||
INITIALIZATION:
|
||||
|
||||
|
||||
|
||||
|
||||
Electron-Phonon interpolation
|
||||
ephwann : 3.13s CPU 3.46s WALL ( 1 calls)
|
||||
ep-interp : 2.42s CPU 2.74s WALL ( 2102 calls)
|
||||
|
||||
DynW2B : 0.31s CPU 0.35s WALL ( 2102 calls)
|
||||
HamW2B : 0.43s CPU 0.49s WALL ( 138448 calls)
|
||||
ephW2Bp : 0.35s CPU 0.40s WALL ( 2102 calls)
|
||||
ephW2B : 0.05s CPU 0.05s WALL ( 15768 calls)
|
||||
print_ibte : 0.21s CPU 0.24s WALL ( 2102 calls)
|
||||
vmewan2bloch : 0.25s CPU 0.28s WALL ( 33638 calls)
|
||||
vmewan2bloch : 0.25s CPU 0.28s WALL ( 33638 calls)
|
||||
|
||||
|
||||
Total program execution
|
||||
EPW : 3.13s CPU 3.47s WALL
|
||||
|
||||
===============================================================================
|
||||
The functionality-dependent EPW.bib file was created with suggested citations.
|
||||
Please consider citing the papers listed in EPW.bib.
|
||||
===============================================================================
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
|
||||
Program PWSCF v.6.7GPU starts on 29Apr2021 at 9: 3:31
|
||||
|
||||
This program is part of the open-source Quantum ESPRESSO suite
|
||||
for quantum simulation of materials; please cite
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
|
||||
"P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020);
|
||||
URL http://www.quantum-espresso.org",
|
||||
in publications or presentations arising from this work. More details at
|
||||
http://www.quantum-espresso.org/quote
|
||||
|
||||
Parallel version (MPI), running on 1 processors
|
||||
|
||||
MPI processes distributed on 1 nodes
|
||||
Waiting for input...
|
||||
Reading input from standard input
|
||||
|
||||
Current dimensions of program PWSCF are:
|
||||
Max number of different atomic species (ntypx) = 10
|
||||
Max number of k-points (npk) = 40000
|
||||
Max angular momentum in pseudopotentials (lmaxx) = 3
|
||||
|
||||
Atomic positions and unit cell read from directory:
|
||||
./bn.save/
|
||||
Atomic positions from file used, from input discarded
|
||||
|
||||
|
||||
Subspace diagonalization in iterative solution of the eigenvalue problem:
|
||||
a serial algorithm will be used
|
||||
|
||||
|
||||
G-vector sticks info
|
||||
--------------------
|
||||
sticks: dense smooth PW G-vecs: dense smooth PW
|
||||
Sum 253 253 85 2733 2733 531
|
||||
|
||||
Using Slab Decomposition
|
||||
|
||||
|
||||
|
||||
bravais-lattice index = 2
|
||||
lattice parameter (alat) = 6.8327 a.u.
|
||||
unit-cell volume = 79.7469 (a.u.)^3
|
||||
number of atoms/cell = 2
|
||||
number of atomic types = 2
|
||||
number of electrons = 8.00
|
||||
number of Kohn-Sham states= 20
|
||||
kinetic-energy cutoff = 40.0000 Ry
|
||||
charge density cutoff = 160.0000 Ry
|
||||
Exchange-correlation= PBE
|
||||
( 1 4 3 4 0 0 0)
|
||||
|
||||
celldm(1)= 6.832682 celldm(2)= 0.000000 celldm(3)= 0.000000
|
||||
celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000
|
||||
|
||||
crystal axes: (cart. coord. in units of alat)
|
||||
a(1) = ( -0.500000 0.000000 0.500000 )
|
||||
a(2) = ( 0.000000 0.500000 0.500000 )
|
||||
a(3) = ( -0.500000 0.500000 0.000000 )
|
||||
|
||||
reciprocal axes: (cart. coord. in units 2 pi/alat)
|
||||
b(1) = ( -1.000000 -1.000000 1.000000 )
|
||||
b(2) = ( 1.000000 1.000000 1.000000 )
|
||||
b(3) = ( -1.000000 1.000000 -1.000000 )
|
||||
|
||||
|
||||
PseudoPot. # 1 for B read from file:
|
||||
../../pp/B-PBE.upf
|
||||
MD5 check sum: 8d3529416d991d290d09c9d3752026a1
|
||||
Pseudo is Norm-conserving + core correction, Zval = 3.0
|
||||
Generated using ONCVPSP code by D. R. Hamann
|
||||
Using radial grid of 1534 points, 4 beta functions with:
|
||||
l(1) = 0
|
||||
l(2) = 0
|
||||
l(3) = 1
|
||||
l(4) = 1
|
||||
|
||||
PseudoPot. # 2 for N read from file:
|
||||
../../pp/N-PBE.upf
|
||||
MD5 check sum: ff7f9f91e4136e6855b4906c31c1cc72
|
||||
Pseudo is Norm-conserving + core correction, Zval = 5.0
|
||||
Generated using ONCVPSP code by D. R. Hamann
|
||||
Using radial grid of 1058 points, 4 beta functions with:
|
||||
l(1) = 0
|
||||
l(2) = 0
|
||||
l(3) = 1
|
||||
l(4) = 1
|
||||
|
||||
atomic species valence mass pseudopotential
|
||||
B 3.00 10.81100 B ( 1.00)
|
||||
N 5.00 14.00670 N ( 1.00)
|
||||
|
||||
24 Sym. Ops. (no inversion) found
|
||||
|
||||
|
||||
|
||||
Cartesian axes
|
||||
|
||||
site n. atom positions (alat units)
|
||||
1 B tau( 1) = ( 0.0000000 0.0000000 0.0000000 )
|
||||
2 N tau( 2) = ( 0.2500000 0.2500000 0.2500000 )
|
||||
|
||||
number of k points= 8
|
||||
cart. coord. in units 2pi/alat
|
||||
k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 0.2500000
|
||||
k( 2) = ( -0.5000000 0.5000000 -0.5000000), wk = 0.2500000
|
||||
k( 3) = ( 0.5000000 0.5000000 0.5000000), wk = 0.2500000
|
||||
k( 4) = ( 0.0000000 1.0000000 0.0000000), wk = 0.2500000
|
||||
k( 5) = ( -0.5000000 -0.5000000 0.5000000), wk = 0.2500000
|
||||
k( 6) = ( -1.0000000 0.0000000 0.0000000), wk = 0.2500000
|
||||
k( 7) = ( 0.0000000 0.0000000 1.0000000), wk = 0.2500000
|
||||
k( 8) = ( -0.5000000 0.5000000 0.5000000), wk = 0.2500000
|
||||
|
||||
Dense grid: 2733 G-vectors FFT dimensions: ( 20, 20, 20)
|
||||
|
||||
Estimated max dynamical RAM per process > 1.98 MB
|
||||
|
||||
Check: negative core charge= -0.000052
|
||||
|
||||
The potential is recalculated from file :
|
||||
./bn.save/charge-density
|
||||
|
||||
Starting wfcs are 8 randomized atomic wfcs + 12 random wfcs
|
||||
|
||||
Band Structure Calculation
|
||||
CG style diagonalization
|
||||
|
||||
ethr = 1.00E-13, avg # of iterations = 39.4
|
||||
|
||||
total cpu time spent up to now is 0.8 secs
|
||||
|
||||
End of band structure calculation
|
||||
|
||||
k = 0.0000 0.0000 0.0000 ( 331 PWs) bands (ev):
|
||||
|
||||
-8.7727 11.8177 11.8177 11.8177 20.3061 20.3061 20.3061 21.9449
|
||||
36.0075 39.3689 39.3689 39.7853 39.7853 39.7853 47.0068 59.2398
|
||||
59.2398 59.2398 80.1252 80.1252
|
||||
|
||||
k =-0.5000 0.5000-0.5000 ( 344 PWs) bands (ev):
|
||||
|
||||
-4.4798 0.7493 9.7532 9.7532 21.6351 22.2587 22.2587 27.0486
|
||||
35.0206 38.3130 38.5789 38.5789 46.7004 46.7004 57.7021 64.2025
|
||||
64.2025 68.9250 69.5817 69.5817
|
||||
|
||||
k = 0.5000 0.5000 0.5000 ( 344 PWs) bands (ev):
|
||||
|
||||
-4.4798 0.7493 9.7532 9.7532 21.6351 22.2587 22.2587 27.0486
|
||||
35.0206 38.3130 38.5789 38.5789 46.7004 46.7004 57.7021 64.2025
|
||||
64.2025 68.9250 69.5817 69.5817
|
||||
|
||||
k = 0.0000 1.0000 0.0000 ( 342 PWs) bands (ev):
|
||||
|
||||
-3.0785 2.5509 6.6853 6.6853 15.8936 20.6374 29.8835 29.8835
|
||||
32.7562 38.7469 45.2560 45.2560 50.4836 51.0584 58.8338 60.8001
|
||||
60.8001 61.3776 61.9120 61.9120
|
||||
|
||||
k =-0.5000-0.5000 0.5000 ( 344 PWs) bands (ev):
|
||||
|
||||
-4.4798 0.7493 9.7532 9.7532 21.6351 22.2587 22.2587 27.0486
|
||||
35.0206 38.3130 38.5789 38.5789 46.7004 46.7004 57.7021 64.2025
|
||||
64.2025 68.9250 69.5817 69.5817
|
||||
|
||||
k =-1.0000 0.0000 0.0000 ( 342 PWs) bands (ev):
|
||||
|
||||
-3.0785 2.5509 6.6853 6.6853 15.8936 20.6374 29.8835 29.8835
|
||||
32.7562 38.7469 45.2560 45.2560 50.4836 51.0584 58.8338 60.8001
|
||||
60.8001 61.3776 61.9120 61.9120
|
||||
|
||||
k = 0.0000 0.0000 1.0000 ( 342 PWs) bands (ev):
|
||||
|
||||
-3.0785 2.5509 6.6853 6.6853 15.8936 20.6374 29.8835 29.8835
|
||||
32.7562 38.7469 45.2560 45.2560 50.4836 51.0584 58.8338 60.8001
|
||||
60.8001 61.3776 61.9120 61.9120
|
||||
|
||||
k =-0.5000 0.5000 0.5000 ( 344 PWs) bands (ev):
|
||||
|
||||
-4.4798 0.7493 9.7532 9.7532 21.6351 22.2587 22.2587 27.0486
|
||||
35.0206 38.3130 38.5789 38.5789 46.7004 46.7004 57.7021 64.2025
|
||||
64.2025 68.9250 69.5817 69.5817
|
||||
|
||||
highest occupied, lowest unoccupied level (ev): 11.8177 15.8936
|
||||
|
||||
Writing output data file ./bn.save/
|
||||
|
||||
init_run : 0.07s CPU 0.08s WALL ( 1 calls)
|
||||
electrons : 0.60s CPU 0.66s WALL ( 1 calls)
|
||||
|
||||
Called by init_run:
|
||||
wfcinit : 0.00s CPU 0.00s WALL ( 1 calls)
|
||||
potinit : 0.00s CPU 0.00s WALL ( 1 calls)
|
||||
hinit0 : 0.07s CPU 0.07s WALL ( 1 calls)
|
||||
|
||||
Called by electrons:
|
||||
c_bands : 0.60s CPU 0.66s WALL ( 1 calls)
|
||||
v_of_rho : 0.00s CPU 0.00s WALL ( 1 calls)
|
||||
|
||||
Called by c_bands:
|
||||
init_us_2 : 0.00s CPU 0.00s WALL ( 8 calls)
|
||||
ccgdiagg : 0.55s CPU 0.60s WALL ( 29 calls)
|
||||
wfcrot : 0.05s CPU 0.06s WALL ( 29 calls)
|
||||
|
||||
Called by *cgdiagg:
|
||||
h_psi : 0.39s CPU 0.43s WALL ( 5752 calls)
|
||||
|
||||
Called by h_psi:
|
||||
h_psi:calbec : 0.05s CPU 0.06s WALL ( 5752 calls)
|
||||
vloc_psi : 0.28s CPU 0.31s WALL ( 5752 calls)
|
||||
add_vuspsi : 0.04s CPU 0.05s WALL ( 5752 calls)
|
||||
hs_1psi : 0.38s CPU 0.42s WALL ( 5723 calls)
|
||||
s_1psi : 0.05s CPU 0.06s WALL ( 5723 calls)
|
||||
|
||||
General routines
|
||||
calbec : 0.08s CPU 0.09s WALL ( 11475 calls)
|
||||
fft : 0.00s CPU 0.00s WALL ( 11 calls)
|
||||
fftw : 0.21s CPU 0.24s WALL ( 12606 calls)
|
||||
davcio : 0.00s CPU 0.00s WALL ( 16 calls)
|
||||
|
||||
Parallel routines
|
||||
|
||||
PWSCF : 0.76s CPU 0.84s WALL
|
||||
|
||||
|
||||
This run was terminated on: 9: 3:32 29Apr2021
|
||||
|
||||
=------------------------------------------------------------------------------=
|
||||
JOB DONE.
|
||||
=------------------------------------------------------------------------------=
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,579 @@
|
|||
|
||||
Program PWSCF v.6.7GPU starts on 29Apr2021 at 9: 2:42
|
||||
|
||||
This program is part of the open-source Quantum ESPRESSO suite
|
||||
for quantum simulation of materials; please cite
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
|
||||
"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
|
||||
"P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020);
|
||||
URL http://www.quantum-espresso.org",
|
||||
in publications or presentations arising from this work. More details at
|
||||
http://www.quantum-espresso.org/quote
|
||||
|
||||
Parallel version (MPI), running on 1 processors
|
||||
|
||||
MPI processes distributed on 1 nodes
|
||||
Waiting for input...
|
||||
Reading input from standard input
|
||||
|
||||
Current dimensions of program PWSCF are:
|
||||
Max number of different atomic species (ntypx) = 10
|
||||
Max number of k-points (npk) = 40000
|
||||
Max angular momentum in pseudopotentials (lmaxx) = 3
|
||||
|
||||
Subspace diagonalization in iterative solution of the eigenvalue problem:
|
||||
a serial algorithm will be used
|
||||
|
||||
|
||||
G-vector sticks info
|
||||
--------------------
|
||||
sticks: dense smooth PW G-vecs: dense smooth PW
|
||||
Sum 253 253 85 2733 2733 531
|
||||
|
||||
Using Slab Decomposition
|
||||
|
||||
|
||||
|
||||
bravais-lattice index = 2
|
||||
lattice parameter (alat) = 6.8327 a.u.
|
||||
unit-cell volume = 79.7469 (a.u.)^3
|
||||
number of atoms/cell = 2
|
||||
number of atomic types = 2
|
||||
number of electrons = 8.00
|
||||
number of Kohn-Sham states= 4
|
||||
kinetic-energy cutoff = 40.0000 Ry
|
||||
charge density cutoff = 160.0000 Ry
|
||||
scf convergence threshold = 1.0E-13
|
||||
mixing beta = 0.7000
|
||||
number of iterations used = 8 plain mixing
|
||||
Exchange-correlation= PBE
|
||||
( 1 4 3 4 0 0 0)
|
||||
|
||||
celldm(1)= 6.832682 celldm(2)= 0.000000 celldm(3)= 0.000000
|
||||
celldm(4)= 0.000000 celldm(5)= 0.000000 celldm(6)= 0.000000
|
||||
|
||||
crystal axes: (cart. coord. in units of alat)
|
||||
a(1) = ( -0.500000 0.000000 0.500000 )
|
||||
a(2) = ( 0.000000 0.500000 0.500000 )
|
||||
a(3) = ( -0.500000 0.500000 0.000000 )
|
||||
|
||||
reciprocal axes: (cart. coord. in units 2 pi/alat)
|
||||
b(1) = ( -1.000000 -1.000000 1.000000 )
|
||||
b(2) = ( 1.000000 1.000000 1.000000 )
|
||||
b(3) = ( -1.000000 1.000000 -1.000000 )
|
||||
|
||||
|
||||
PseudoPot. # 1 for B read from file:
|
||||
../../pseudo/B-PBE.upf
|
||||
MD5 check sum: 8d3529416d991d290d09c9d3752026a1
|
||||
Pseudo is Norm-conserving + core correction, Zval = 3.0
|
||||
Generated using ONCVPSP code by D. R. Hamann
|
||||
Using radial grid of 1534 points, 4 beta functions with:
|
||||
l(1) = 0
|
||||
l(2) = 0
|
||||
l(3) = 1
|
||||
l(4) = 1
|
||||
|
||||
PseudoPot. # 2 for N read from file:
|
||||
../../pseudo/N-PBE.upf
|
||||
MD5 check sum: ff7f9f91e4136e6855b4906c31c1cc72
|
||||
Pseudo is Norm-conserving + core correction, Zval = 5.0
|
||||
Generated using ONCVPSP code by D. R. Hamann
|
||||
Using radial grid of 1058 points, 4 beta functions with:
|
||||
l(1) = 0
|
||||
l(2) = 0
|
||||
l(3) = 1
|
||||
l(4) = 1
|
||||
|
||||
atomic species valence mass pseudopotential
|
||||
B 3.00 10.81100 B ( 1.00)
|
||||
N 5.00 14.00670 N ( 1.00)
|
||||
|
||||
24 Sym. Ops. (no inversion) found
|
||||
|
||||
|
||||
|
||||
Cartesian axes
|
||||
|
||||
site n. atom positions (alat units)
|
||||
1 B tau( 1) = ( 0.0000000 0.0000000 0.0000000 )
|
||||
2 N tau( 2) = ( 0.2500000 0.2500000 0.2500000 )
|
||||
|
||||
number of k points= 3
|
||||
cart. coord. in units 2pi/alat
|
||||
k( 1) = ( 0.0000000 0.0000000 0.0000000), wk = 0.2500000
|
||||
k( 2) = ( 0.5000000 -0.5000000 0.5000000), wk = 1.0000000
|
||||
k( 3) = ( 0.0000000 -1.0000000 0.0000000), wk = 0.7500000
|
||||
|
||||
Dense grid: 2733 G-vectors FFT dimensions: ( 20, 20, 20)
|
||||
|
||||
Estimated max dynamical RAM per process > 2.60 MB
|
||||
|
||||
Check: negative core charge= -0.000052
|
||||
|
||||
Initial potential from superposition of free atoms
|
||||
|
||||
starting charge 7.99974, renormalised to 8.00000
|
||||
Starting wfcs are 8 randomized atomic wfcs
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
Self-consistent Calculation
|
||||
|
||||
iteration # 1 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-02, avg # of iterations = 2.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.45035741 Ry
|
||||
estimated scf accuracy < 0.27022046 Ry
|
||||
|
||||
iteration # 2 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 3.38E-03, avg # of iterations = 2.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52107443 Ry
|
||||
estimated scf accuracy < 0.04885587 Ry
|
||||
|
||||
iteration # 3 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 6.11E-04, avg # of iterations = 1.7
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52214326 Ry
|
||||
estimated scf accuracy < 0.00487555 Ry
|
||||
|
||||
iteration # 4 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 6.09E-05, avg # of iterations = 3.3
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52573030 Ry
|
||||
estimated scf accuracy < 0.00667314 Ry
|
||||
|
||||
iteration # 5 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 6.09E-05, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52429160 Ry
|
||||
estimated scf accuracy < 0.00249804 Ry
|
||||
|
||||
iteration # 6 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 3.12E-05, avg # of iterations = 2.7
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52544035 Ry
|
||||
estimated scf accuracy < 0.00068901 Ry
|
||||
|
||||
iteration # 7 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.61E-06, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52524259 Ry
|
||||
estimated scf accuracy < 0.00032180 Ry
|
||||
|
||||
iteration # 8 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.02E-06, avg # of iterations = 2.3
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536489 Ry
|
||||
estimated scf accuracy < 0.00006314 Ry
|
||||
|
||||
iteration # 9 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 7.89E-07, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536752 Ry
|
||||
estimated scf accuracy < 0.00001145 Ry
|
||||
|
||||
iteration # 10 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.43E-07, avg # of iterations = 2.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536613 Ry
|
||||
estimated scf accuracy < 0.00000632 Ry
|
||||
|
||||
iteration # 11 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 7.90E-08, avg # of iterations = 2.7
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536753 Ry
|
||||
estimated scf accuracy < 0.00000015 Ry
|
||||
|
||||
iteration # 12 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.88E-09, avg # of iterations = 5.3
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536810 Ry
|
||||
estimated scf accuracy < 0.00000083 Ry
|
||||
|
||||
iteration # 13 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.88E-09, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.2 secs
|
||||
|
||||
total energy = -26.52536770 Ry
|
||||
estimated scf accuracy < 0.00000104 Ry
|
||||
|
||||
iteration # 14 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.88E-09, avg # of iterations = 3.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 0.00000015 Ry
|
||||
|
||||
iteration # 15 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.88E-09, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 0.00000007 Ry
|
||||
|
||||
iteration # 16 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 9.23E-10, avg # of iterations = 1.7
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 0.00000003 Ry
|
||||
|
||||
iteration # 17 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.36E-10, avg # of iterations = 1.3
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 0.00000003 Ry
|
||||
|
||||
iteration # 18 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.33E-10, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536773 Ry
|
||||
estimated scf accuracy < 0.00000004 Ry
|
||||
|
||||
iteration # 19 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.33E-10, avg # of iterations = 3.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 0.00000004 Ry
|
||||
|
||||
iteration # 20 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.33E-10, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536779 Ry
|
||||
estimated scf accuracy < 0.00000002 Ry
|
||||
|
||||
iteration # 21 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 2.06E-10, avg # of iterations = 3.3
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536772 Ry
|
||||
estimated scf accuracy < 0.00000018 Ry
|
||||
|
||||
iteration # 22 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 2.06E-10, avg # of iterations = 4.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 3.7E-09 Ry
|
||||
|
||||
iteration # 23 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.68E-11, avg # of iterations = 1.7
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 4.2E-09 Ry
|
||||
|
||||
iteration # 24 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 4.68E-11, avg # of iterations = 3.0
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 7.2E-11 Ry
|
||||
|
||||
iteration # 25 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 3.7
|
||||
|
||||
total cpu time spent up to now is 0.3 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 4.4E-10 Ry
|
||||
|
||||
iteration # 26 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 9.7
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536773 Ry
|
||||
estimated scf accuracy < 0.00000006 Ry
|
||||
|
||||
iteration # 27 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 9.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 3.1E-10 Ry
|
||||
|
||||
iteration # 28 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 3.7
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536775 Ry
|
||||
estimated scf accuracy < 1.2E-09 Ry
|
||||
|
||||
iteration # 29 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.1E-09 Ry
|
||||
|
||||
iteration # 30 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 2.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 5.4E-10 Ry
|
||||
|
||||
iteration # 31 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 8.97E-13, avg # of iterations = 3.3
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.7E-11 Ry
|
||||
|
||||
iteration # 32 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 2.15E-13, avg # of iterations = 4.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 4.2E-11 Ry
|
||||
|
||||
iteration # 33 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 2.15E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.6E-11 Ry
|
||||
|
||||
iteration # 34 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.98E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.0E-11 Ry
|
||||
|
||||
iteration # 35 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.26E-13, avg # of iterations = 2.7
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.3E-12 Ry
|
||||
|
||||
iteration # 36 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 3.0E-13 Ry
|
||||
|
||||
iteration # 37 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 3.0E-12 Ry
|
||||
|
||||
iteration # 38 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.4 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 2.6E-12 Ry
|
||||
|
||||
iteration # 39 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.5 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 2.2E-12 Ry
|
||||
|
||||
iteration # 40 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.3
|
||||
|
||||
total cpu time spent up to now is 0.5 secs
|
||||
|
||||
total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 1.4E-13 Ry
|
||||
|
||||
iteration # 41 ecut= 40.00 Ry beta= 0.70
|
||||
Davidson diagonalization with overlap
|
||||
ethr = 1.00E-13, avg # of iterations = 1.0
|
||||
|
||||
total cpu time spent up to now is 0.5 secs
|
||||
|
||||
End of self-consistent calculation
|
||||
|
||||
k = 0.0000 0.0000 0.0000 ( 331 PWs) bands (ev):
|
||||
|
||||
-8.7727 11.8177 11.8177 11.8177
|
||||
|
||||
k = 0.5000-0.5000 0.5000 ( 344 PWs) bands (ev):
|
||||
|
||||
-4.4798 0.7493 9.7532 9.7532
|
||||
|
||||
k = 0.0000-1.0000 0.0000 ( 342 PWs) bands (ev):
|
||||
|
||||
-3.0785 2.5509 6.6853 6.6853
|
||||
|
||||
highest occupied level (ev): 11.8177
|
||||
|
||||
! total energy = -26.52536774 Ry
|
||||
estimated scf accuracy < 4.5E-14 Ry
|
||||
|
||||
The total energy is the sum of the following terms:
|
||||
one-electron contribution = 4.84956004 Ry
|
||||
hartree contribution = 3.75561433 Ry
|
||||
xc contribution = -8.79485382 Ry
|
||||
ewald contribution = -26.33568830 Ry
|
||||
|
||||
convergence has been achieved in 41 iterations
|
||||
|
||||
Forces acting on atoms (cartesian axes, Ry/au):
|
||||
|
||||
atom 1 type 1 force = -0.00000000 -0.00000000 0.00000000
|
||||
atom 2 type 2 force = 0.00000000 0.00000000 -0.00000000
|
||||
|
||||
Total force = 0.000000 Total SCF correction = 0.000000
|
||||
|
||||
|
||||
Computing stress (Cartesian axis) and pressure
|
||||
|
||||
total stress (Ry/bohr**3) (kbar) P= -361.84
|
||||
-0.00245973 0.00000000 0.00000000 -361.84 0.00 0.00
|
||||
0.00000000 -0.00245973 -0.00000000 0.00 -361.84 -0.00
|
||||
0.00000000 -0.00000000 -0.00245973 0.00 -0.00 -361.84
|
||||
|
||||
|
||||
Writing output data file ./bn.save/
|
||||
|
||||
init_run : 0.08s CPU 0.08s WALL ( 1 calls)
|
||||
electrons : 0.30s CPU 0.31s WALL ( 1 calls)
|
||||
forces : 0.01s CPU 0.01s WALL ( 1 calls)
|
||||
stress : 0.02s CPU 0.02s WALL ( 1 calls)
|
||||
|
||||
Called by init_run:
|
||||
wfcinit : 0.00s CPU 0.00s WALL ( 1 calls)
|
||||
potinit : 0.01s CPU 0.01s WALL ( 1 calls)
|
||||
hinit0 : 0.07s CPU 0.07s WALL ( 1 calls)
|
||||
|
||||
Called by electrons:
|
||||
c_bands : 0.14s CPU 0.15s WALL ( 41 calls)
|
||||
sum_band : 0.03s CPU 0.03s WALL ( 41 calls)
|
||||
v_of_rho : 0.12s CPU 0.13s WALL ( 42 calls)
|
||||
mix_rho : 0.01s CPU 0.01s WALL ( 41 calls)
|
||||
|
||||
Called by c_bands:
|
||||
init_us_2 : 0.02s CPU 0.02s WALL ( 255 calls)
|
||||
cegterg : 0.12s CPU 0.13s WALL ( 123 calls)
|
||||
|
||||
Called by *egterg:
|
||||
cdiaghg : 0.01s CPU 0.01s WALL ( 421 calls)
|
||||
h_psi : 0.09s CPU 0.10s WALL ( 424 calls)
|
||||
g_psi : 0.00s CPU 0.00s WALL ( 298 calls)
|
||||
|
||||
Called by h_psi:
|
||||
h_psi:calbec : 0.01s CPU 0.01s WALL ( 424 calls)
|
||||
vloc_psi : 0.07s CPU 0.07s WALL ( 424 calls)
|
||||
add_vuspsi : 0.01s CPU 0.01s WALL ( 424 calls)
|
||||
|
||||
General routines
|
||||
calbec : 0.01s CPU 0.01s WALL ( 439 calls)
|
||||
fft : 0.01s CPU 0.01s WALL ( 444 calls)
|
||||
ffts : 0.00s CPU 0.00s WALL ( 41 calls)
|
||||
fftw : 0.06s CPU 0.07s WALL ( 3570 calls)
|
||||
|
||||
Parallel routines
|
||||
|
||||
PWSCF : 0.47s CPU 0.50s WALL
|
||||
|
||||
|
||||
This run was terminated on: 9: 2:43 29Apr2021
|
||||
|
||||
=------------------------------------------------------------------------------=
|
||||
JOB DONE.
|
||||
=------------------------------------------------------------------------------=
|
|
@ -0,0 +1,75 @@
|
|||
--
|
||||
&inputepw
|
||||
prefix = 'bn'
|
||||
amass(1)=10.811,
|
||||
amass(2)=14.0067,
|
||||
outdir = './'
|
||||
|
||||
elph = .true.
|
||||
kmaps = .false.
|
||||
epbwrite = .true.
|
||||
epbread = .false.
|
||||
epwwrite = .true.
|
||||
epwread = .false.
|
||||
etf_mem = 1
|
||||
|
||||
lpolar = .true.
|
||||
vme = .true.
|
||||
|
||||
use_ws = .false.
|
||||
|
||||
nbndsub = 3
|
||||
bands_skipped = 'exclude_bands = 1, 5-20'
|
||||
|
||||
wannierize = .true.
|
||||
num_iter = 50000
|
||||
iprint = 2
|
||||
dis_win_max = 12.0
|
||||
dis_win_min = -1.0
|
||||
|
||||
proj(1) = 'N:p'
|
||||
|
||||
wdata(1) = 'bands_plot = .true.'
|
||||
wdata(2) = 'begin kpoint_path'
|
||||
wdata(3) = ' G 0.000 0.000 0.000 X 0.500 0.000 0.500'
|
||||
wdata(4) = ' X 0.500 0.000 0.500 U 0.625 0.250 0.625'
|
||||
wdata(5) = ' K 0.375 0.375 0.750 G 0.000 0.000 0.000 '
|
||||
wdata(6) = ' G 0.000 0.000 0.000 L 0.500 0.500 0.500 '
|
||||
wdata(7) = ' L 0.500 0.500 0.500 W 0.500 0.250 0.750 '
|
||||
wdata(8) = ' W 0.500 0.250 0.750 X 0.500 0.000 0.500 '
|
||||
wdata(9) = 'end kpoint_path'
|
||||
wdata(10) = 'bands_plot_format = gnuplot'
|
||||
wdata(11) = 'guiding_centres = .true.'
|
||||
wdata(12) = 'dis_num_iter = 5000'
|
||||
wdata(13) = 'num_print_cycles = 10'
|
||||
wdata(12) = 'dis_mix_ratio = 1.0'
|
||||
wdata(13) = 'conv_tol = 1E-12'
|
||||
wdata(14) = 'conv_window = 4'
|
||||
wdata(15) = 'use_ws_distance = T'
|
||||
|
||||
elecselfen = .false.
|
||||
phonselfen = .false.
|
||||
a2f = .false.
|
||||
|
||||
fsthick = 100
|
||||
nstemp = 1
|
||||
temps = 1
|
||||
degaussw = 0.001
|
||||
|
||||
dvscf_dir = './save'
|
||||
|
||||
prtgkk = .true.
|
||||
|
||||
filqf = './LGXKG4.txt'
|
||||
nkf1 = 1
|
||||
nkf2 = 1
|
||||
nkf3 = 1
|
||||
|
||||
|
||||
nk1 = 2
|
||||
nk2 = 2
|
||||
nk3 = 2
|
||||
nq1 = 2
|
||||
nq2 = 2
|
||||
nq3 = 2
|
||||
/
|
|
@ -0,0 +1,108 @@
|
|||
--
|
||||
&inputepw
|
||||
prefix = 'bn'
|
||||
amass(1)=10.811,
|
||||
amass(2)=14.0067,
|
||||
outdir = './'
|
||||
|
||||
elph = .true.
|
||||
kmaps = .true.
|
||||
epbwrite = .false.
|
||||
epbread = .false.
|
||||
epwwrite = .false.
|
||||
epwread = .true.
|
||||
etf_mem = 3
|
||||
|
||||
lpolar = .true.
|
||||
vme = .true.
|
||||
mp_mesh_k = .true.
|
||||
|
||||
use_ws = .false.
|
||||
|
||||
lifc = .false.
|
||||
asr_typ = 'simple'
|
||||
lphase = .true.
|
||||
|
||||
nbndsub = 3
|
||||
bands_skipped = 'exclude_bands = 1, 5-20'
|
||||
|
||||
scattering = .true.
|
||||
scattering_serta = .true.
|
||||
int_mob = .false.
|
||||
carrier = .true.
|
||||
ncarrier = -1E13
|
||||
iterative_bte = .true.
|
||||
epmatkqread = .false.
|
||||
mob_maxiter = 10 ! Need to be increased for real calculations
|
||||
broyden_beta= 1.0
|
||||
bfieldx = 0.0d0
|
||||
bfieldy = 0.0d0
|
||||
bfieldz = 1.0d-10
|
||||
|
||||
nstemp = 1
|
||||
temps = 300
|
||||
|
||||
restart = .true.
|
||||
restart_step = 1000
|
||||
selecqread = .false.
|
||||
|
||||
wannierize = .false.
|
||||
num_iter = 50000
|
||||
iprint = 2
|
||||
dis_win_max = 12.0
|
||||
dis_win_min = -1.0
|
||||
|
||||
proj(1) = 'N:p'
|
||||
|
||||
wdata(1) = 'bands_plot = .true.'
|
||||
wdata(2) = 'begin kpoint_path'
|
||||
wdata(3) = ' G 0.000 0.000 0.000 X 0.500 0.000 0.500'
|
||||
wdata(4) = ' X 0.500 0.000 0.500 U 0.625 0.250 0.625'
|
||||
wdata(5) = ' K 0.375 0.375 0.750 G 0.000 0.000 0.000 '
|
||||
wdata(6) = ' G 0.000 0.000 0.000 L 0.500 0.500 0.500 '
|
||||
wdata(7) = ' L 0.500 0.500 0.500 W 0.500 0.250 0.750 '
|
||||
wdata(8) = ' W 0.500 0.250 0.750 X 0.500 0.000 0.500 '
|
||||
wdata(9) = 'end kpoint_path'
|
||||
wdata(10) = 'bands_plot_format = gnuplot'
|
||||
wdata(11) = 'guiding_centres = .true.'
|
||||
wdata(12) = 'dis_num_iter = 5000'
|
||||
wdata(13) = 'num_print_cycles = 10'
|
||||
wdata(12) = 'dis_mix_ratio = 1.0'
|
||||
wdata(13) = 'conv_tol = 1E-12'
|
||||
wdata(14) = 'conv_window = 4'
|
||||
wdata(15) = 'use_ws_distance = T'
|
||||
|
||||
elecselfen = .false.
|
||||
phonselfen = .false.
|
||||
a2f = .false.
|
||||
|
||||
fsthick = 0.4 ! 0.3 eV
|
||||
degaussw = 0.0
|
||||
|
||||
efermi_read = .true
|
||||
fermi_energy = 11.246840
|
||||
|
||||
dvscf_dir = './save'
|
||||
|
||||
nkf1 = 20
|
||||
nkf2 = 20
|
||||
nkf3 = 20
|
||||
nqf1 = 20
|
||||
nqf2 = 20
|
||||
nqf3 = 20
|
||||
|
||||
nk1 = 2
|
||||
nk2 = 2
|
||||
nk3 = 2
|
||||
nq1 = 2
|
||||
nq2 = 2
|
||||
nq3 = 2
|
||||
|
||||
! Note: for reference, if you use ecutwfc = 100, nk1=nk2=nk3 = 10, nq1=nq2=nq3 = 5
|
||||
! and nkf1=nkf2=nkf3=nqf1=nqf2=nqf3 = 60 and mob_maxiter = 300, you should get:
|
||||
! SERTA mobility = 0.26719E+03 and SERTA Hall factor = 0.486742
|
||||
! BTE mobility = 0.33361E+03 and BTE Hall factor = 0.602855
|
||||
! and with SOC and the same parameters, you should get:
|
||||
! SERTA mobility = 0.25971E+03 and SERTA Hall factor = 0.414480
|
||||
! BTE mobility = 0.32871E+03 and BTE Hall factor = 0.553747
|
||||
/
|
|
@ -0,0 +1,39 @@
|
|||
&control
|
||||
calculation = 'nscf'
|
||||
prefix = 'bn'
|
||||
restart_mode = 'from_scratch'
|
||||
wf_collect = .true.
|
||||
pseudo_dir = '../../pseudo'
|
||||
outdir = './'
|
||||
tprnfor = .true.
|
||||
tstress = .true.
|
||||
/
|
||||
&system
|
||||
ibrav = 2
|
||||
celldm(1) = 6.832682257 ! 3.6157 Ang exp
|
||||
nat = 2
|
||||
ntyp = 2
|
||||
ecutwfc = 40
|
||||
nbnd = 20
|
||||
/
|
||||
&electrons
|
||||
diagonalization = 'cg'
|
||||
mixing_beta = 0.7
|
||||
conv_thr = 1.0d-12
|
||||
/
|
||||
ATOMIC_SPECIES
|
||||
B 10.811 B-PBE.upf
|
||||
N 14.0067 N-PBE.upf
|
||||
ATOMIC_POSITIONS {crystal}
|
||||
B 0.00 0.00 0.00
|
||||
N -0.25 0.75 -0.25
|
||||
K_POINTS crystal
|
||||
8
|
||||
0.00000000 0.00000000 0.00000000 1.250000e-01
|
||||
0.00000000 0.00000000 0.50000000 1.250000e-01
|
||||
0.00000000 0.50000000 0.00000000 1.250000e-01
|
||||
0.00000000 0.50000000 0.50000000 1.250000e-01
|
||||
0.50000000 0.00000000 0.00000000 1.250000e-01
|
||||
0.50000000 0.00000000 0.50000000 1.250000e-01
|
||||
0.50000000 0.50000000 0.00000000 1.250000e-01
|
||||
0.50000000 0.50000000 0.50000000 1.250000e-01
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
&inputph
|
||||
recover=.false.
|
||||
tr2_ph=1.0d-17,
|
||||
prefix='bn',
|
||||
amass(1)=10.811,
|
||||
amass(2)=14.0067,
|
||||
outdir='./',
|
||||
fildyn='bn.dyn.xml',
|
||||
fildvscf='dvscf'
|
||||
ldisp=.true.,
|
||||
epsil=.true.,
|
||||
nq1=2, nq2=2, nq3=2
|
||||
/
|
|
@ -0,0 +1 @@
|
|||
bn
|
|
@ -0,0 +1,7 @@
|
|||
atom dir Qxx Qyy Qzz Qyz Qxz Qxy
|
||||
1 1 0.000000 0.000000 0.000000 3.179676 0.000000 0.000000
|
||||
1 2 0.000000 0.000000 0.000000 0.000000 3.179676 0.000000
|
||||
1 3 0.000000 0.000000 0.000000 0.000000 0.000000 3.179676
|
||||
2 1 0.000000 0.000000 0.000000 -0.578887 0.000000 0.000000
|
||||
2 2 0.000000 0.000000 0.000000 0.000000 -0.578887 0.000000
|
||||
2 3 0.000000 0.000000 0.000000 0.000000 0.000000 -0.578887
|
|
@ -0,0 +1,30 @@
|
|||
&control
|
||||
calculation = 'scf'
|
||||
prefix = 'bn'
|
||||
restart_mode = 'from_scratch'
|
||||
wf_collect = .true.
|
||||
pseudo_dir = '../../pseudo'
|
||||
outdir = './'
|
||||
tprnfor = .true.
|
||||
tstress = .true.
|
||||
/
|
||||
&system
|
||||
ibrav = 2
|
||||
celldm(1) = 6.832682257
|
||||
nat = 2
|
||||
ntyp = 2
|
||||
ecutwfc = 40
|
||||
/
|
||||
&electrons
|
||||
diagonalization = 'david'
|
||||
mixing_beta = 0.7
|
||||
conv_thr = 1.0d-13
|
||||
/
|
||||
ATOMIC_SPECIES
|
||||
B 10.811 B-PBE.upf
|
||||
N 14.0067 N-PBE.upf
|
||||
ATOMIC_POSITIONS {crystal}
|
||||
B 0.00 0.00 0.00
|
||||
N -0.25 0.75 -0.25
|
||||
K_POINTS automatic
|
||||
2 2 2 0 0 0
|
|
@ -27,11 +27,7 @@ inputs_args = ('metal.in' ,''), ('metal-2.in' ,''), ('metal-fermi_dirac.in' ,'')
|
|||
|
||||
[pw_noncolin/]
|
||||
program = PW
|
||||
inputs_args = ('noncolin.in' ,''), ('noncolin-1.in' ,''), ('noncolin-2.in' ,''), ('noncolin-cg.in' ,''), ('noncolin-constrain_angle.in' ,''), ('noncolin-constrain_atomic.in' ,''), ('noncolin-constrain_total.in' ,''), ('noncolin-hyb.in' ,''), ('noncolin-pbe.in','')
|
||||
|
||||
[pw_electric/]
|
||||
program = PW
|
||||
inputs_args = ('electric.in' ,''), ('electric-1.in' ,''), ('electric-2.in' ,'')
|
||||
inputs_args = ('noncolin.in' ,''), ('noncolin-1.in' ,''), ('noncolin-2.in' ,''), ('noncolin-cg.in' ,''), ('noncolin-constrain_angle.in' ,''), ('noncolin-constrain_atomic.in' ,''), ('noncolin-constrain_total.in' ,''), ('noncolin-hyb.in' ,''), ('noncolin-pbe.in','')
|
||||
|
||||
[pw_pawatom/]
|
||||
program = PW
|
||||
|
@ -157,6 +153,10 @@ inputs_args = ('scf.in', '1'), ('ph.in', '2'), ('q2r.in', '4'), ('scf.in', '1'),
|
|||
program = EPW
|
||||
inputs_args = ('scf.in', '1'), ('ph.in', '2'), ('scf.in', '1'), ('nscf.in', '1'), ('epw1.in', '3'), ('epw2.in', '3'), ('epw3.in', '5')
|
||||
|
||||
[epw_hall/]
|
||||
program = EPW
|
||||
inputs_args = ('scf.in', '1'), ('ph.in', '2'), ('scf.in', '1'), ('nscf.in', '1'), ('epw1.in', '3'), ('epw2.in', '3')
|
||||
|
||||
####[epw_scdm/]
|
||||
####program = EPW
|
||||
####inputs_args = ('scf.in', '1'), ('ph.in', '2'), ('scf.in', '1'), ('nscf.in', '1'), ('epw1.in', '3'), ('epw2.in', '3')
|
||||
|
@ -231,13 +231,13 @@ program = ZG
|
|||
program = HP
|
||||
|
||||
[categories]
|
||||
pw_all = pw_*??
|
||||
pw_all = pw_*??
|
||||
cp_all = cp_*??
|
||||
ph_all = ph_*??
|
||||
pp_all = pp_*??
|
||||
epw_all = epw_*??
|
||||
hp_all = hp_*??
|
||||
epw_partial = epw_base epw_trev epw_trev_uspp epw_metal epw_soc epw_super epw_polar epw_pl epw_mob
|
||||
epw_partial = epw_base epw_trev epw_trev_uspp epw_metal epw_soc epw_super epw_polar epw_pl epw_mob epw_hall
|
||||
zg_all = zg_*??
|
||||
tddfpt_all = tddfpt_*??
|
||||
_default_ = pw_*?? cp_*?? ph_*?? epw_*?? tddfpt_*?? hp_*??
|
||||
|
|
Loading…
Reference in New Issue