...
 
Commits (62)
Problems fixed in development branch :
* PPACF wasn't working any longer in v.6.4 and 6.4.1 for nspin=2 and
for hybrid functionals (fixed by Yang Jiao, Chalmers)
* option "write_unkg" of pw2wannier90.f90 wasn't working as expected
* The input parameters (for restarting DFPT+U calculations) read_dns_bare
and d2ns_type were missing in the PH input namelist, and moreover they
were not broadcasted.
Incompatible changes in development branch :
* fractional translations "ftau" in FFT grid units no longer existing as
......
......@@ -25,7 +25,8 @@
USE kinds, ONLY : DP
USE uspp_param, ONLY : upf, nh
USE uspp, ONLY : vkb, okvan
USE lsda_mod, ONLY : lsda, current_spin, isk
USE lsda_mod, ONLY : lsda, current_spin
USE klist_epw, ONLY : isk_loc
USE ions_base, ONLY : ntyp => nsp, nat, ityp
USE wvfct, ONLY : npwx
USE lrus, ONLY : int3, int3_nc, becp1
......@@ -76,7 +77,7 @@
!
CALL start_clock('adddvscf2')
!
IF (lsda) current_spin = isk(ik)
IF (lsda) current_spin = isk_loc(ik)
!
ijkb0 = 0
DO nt = 1, ntyp
......
......@@ -113,8 +113,10 @@
USE control_lr, ONLY : nbnd_occ
USE becmod, ONLY : becp, deallocate_bec_type
USE elph2, ONLY : el_ph_mat, epf17, epsi, etf,&
etq, et_all, wf, wkf, wqf, &
xkq, xk_all, zstar, xkf, xqf, epmatwp, eps_rpa
etq, wf, wkf, wqf, &
xkq, zstar, xkf, xqf, epmatwp, eps_rpa
USE klist_epw, ONLY : xk_all, xk_loc, xk_cryst, et_all, et_loc, &
isk_loc, isk_all
USE epwcom, ONLY : epbread, epwread
USE modes, ONLY : npert, u, name_rap_mode, num_rap_mode
USE qpoint, ONLY : eigqts, igkq
......@@ -141,10 +143,8 @@
IF(ALLOCATED(wkf)) DEALLOCATE (wkf)
IF(ALLOCATED(xqf)) DEALLOCATE (xqf)
IF(ALLOCATED(wqf)) DEALLOCATE (wqf)
IF(ALLOCATED(xk_all)) DEALLOCATE (xk_all)
IF(ALLOCATED(et_all)) DEALLOCATE (et_all)
IF(ALLOCATED(eps_rpa)) DEALLOCATE (eps_rpa)
IF(ALLOCATED(eps_rpa)) DEALLOCATE (eps_rpa)
!
ELSE
!
......@@ -212,8 +212,13 @@
IF(ALLOCATED(wkf)) DEALLOCATE (wkf)
IF(ALLOCATED(xqf)) DEALLOCATE (xqf)
IF(ALLOCATED(wqf)) DEALLOCATE (wqf)
IF(ALLOCATED(xk_all)) DEALLOCATE (xk_all)
IF(ALLOCATED(xk_all)) DEALLOCATE (xk_all)
IF(ALLOCATED(xk_loc)) DEALLOCATE (xk_loc)
IF(ALLOCATED(xk_cryst)) DEALLOCATE (xk_cryst)
IF(ALLOCATED(et_all)) DEALLOCATE (et_all)
IF(ALLOCATED(et_loc)) DEALLOCATE (et_loc)
IF(ALLOCATED(isk_loc)) DEALLOCATE (isk_loc)
IF(ALLOCATED(isk_all)) DEALLOCATE (isk_all)
IF(ALLOCATED(eps_rpa)) DEALLOCATE (eps_rpa)
ENDIF ! epwread .and. .not. epbread
!
......
......@@ -364,7 +364,7 @@
USE cell_base, ONLY : at, bg
USE start_k, ONLY : nk1, nk2, nk3
USE pwcom, ONLY : nkstot
USE epwcom, ONLY : xk_cryst
USE klist_epw, ONLY : xk_cryst
USE io_global, ONLY : stdout, meta_ionode
USE io_files, ONLY : prefix
USE io_epw, ONLY : iukgmap
......
......@@ -33,7 +33,7 @@
USE fft_interfaces, ONLY : fwfft, invfft
USE gvect, ONLY : eigts1, eigts2, eigts3, mill, g, ngm
USE gvecs, ONLY : ngms, doublegrid
USE lsda_mod, ONLY : lsda, isk
USE lsda_mod, ONLY : lsda
USE scf, ONLY : rho, rho_core
USE noncollin_module, ONLY : nspin_lsda, nspin_gga, npol
use uspp_param, ONLY : upf
......@@ -44,6 +44,7 @@
USE eqv, ONLY : dvpsi, dmuxc, vlocq
USE qpoint, ONLY : eigqts, npwq
USE klist, ONLY : ngk
USE klist_epw, ONLY : isk_loc
USE gc_lr, ONLY : grho, dvxc_rr, dvxc_sr, dvxc_ss, dvxc_s
USE funct, ONLY : dft_is_gradient, dft_is_nonlocc
USE elph2, ONLY : igkq, igk, lower_band, upper_band
......@@ -175,13 +176,13 @@
aux(ir) = drhoc(ir) * dmuxc(ir,1,1)
ENDDO
ELSE
is = isk(ik)
DO ir = 1, dfftp%nnr
aux(ir) = drhoc(ir) * 0.5d0 * ( dmuxc(ir,is,1) + dmuxc(ir,is,2) )
is = isk_loc(ik)
DO ir=1, dfftp%nnr
aux(ir) = drhoc(ir) * 0.5d0 * (dmuxc(ir, is, 1) + dmuxc(ir, is, 2))
ENDDO
ENDIF
!
fac = 1.d0 / dble(nspin_lsda)
fac = 1.d0 / DBLE(nspin_lsda)
DO is = 1, nspin_lsda
rho%of_r(:,is) = rho%of_r(:,is) + fac * rho_core
ENDDO
......
......@@ -25,7 +25,7 @@
USE cell_base, ONLY : tpiba
USE gvect, ONLY : g
USE ions_base, ONLY : nat, ityp, ntyp => nsp
USE lsda_mod, ONLY : lsda, current_spin, isk, nspin
USE lsda_mod, ONLY : lsda, current_spin, nspin
USE spin_orb, ONLY : lspinorb
USE wvfct, ONLY : npwx, et
USE uspp, ONLY : okvan, nkb, vkb
......@@ -37,6 +37,7 @@
USE elph2, ONLY : igkq, lower_band, upper_band
USE noncollin_module, ONLY : noncolin, npol
USE constants_epw, ONLY : czero, cone, eps12
USE klist_epw, ONLY : isk_loc
!
IMPLICIT NONE
!
......@@ -102,7 +103,7 @@
ALLOCATE( deff(nhm, nhm, nat) )
ENDIF
ALLOCATE( aux(npwx) )
IF (lsda) current_spin = isk(ik)
IF (lsda) current_spin = isk_loc(ik)
!
! we first compute the coefficients of the vectors
!
......
......@@ -37,8 +37,6 @@
eps_rpa(:) ! screening
REAL(KIND=DP), ALLOCATABLE ::&
a_all(:,:), &! electronic spectral function du to electron-phonon interaction
xk_all(:,:), &! full k point grid, coarse (3, nkstot)
et_all(:,:), &! full eigenvalue list, coarse (nbnd, nkstot)
et_ks(:,:), &! lda eigenvalues
et_mb(:,:), &! gw eigenvalues
xkq(:,:), &! local k+q grid, coarse (3, nks)
......
......@@ -64,7 +64,8 @@
USE wavefunctions, ONLY : evc
USE io_files, ONLY : diropn, seqopn
USE wvfct, ONLY : npwx
USE pwcom, ONLY : current_spin, isk, lsda, nbnd, xk, nks
USE pwcom, ONLY : current_spin, lsda, nbnd, nks
USE klist_epw, ONLY : xk_loc, xk_all, isk_loc, et_all
USE cell_base, ONLY : tpiba
USE gvect, ONLY : ngm, g
USE uspp, ONLY : vkb
......@@ -77,7 +78,7 @@
USE lrus, ONLY : becp1
USE becmod, ONLY : calbec
USE elph2, ONLY : shift, gmap, el_ph_mat, umat, umatq, igk_k_all, &
umat_all, xk_all, et_all, xkq, etq, igkq, igk, &
umat_all, xkq, etq, igkq, igk, &
ngk_all, lower_band, upper_band
USE fft_base, ONLY : dffts
USE constants_epw, ONLY : czero, cone, ci, zero
......@@ -218,7 +219,7 @@
!
DO ik = 1, nks
!
IF (lsda) current_spin = isk(ik)
IF (lsda) current_spin = isk_loc(ik)
elphmat(:,:,:) = czero
!DBSP
! b = zero
......@@ -233,7 +234,7 @@
! (we need to make sure that xk(:,ikq) is really k+q for the KB projectors
! below and also that the eigenvalues are taken correctly in ephwann)
!
CALL ktokpmq( xk(:,ik), xq, +1, ipool, nkq, nkq_abs )
CALL ktokpmq( xk_loc(:,ik), xq, +1, ipool, nkq, nkq_abs )
!
! we define xkq(:,ik) and etq(:,ik) for the current xq
!
......@@ -277,8 +278,8 @@
! With this option, different compilers and different machines
! should always give the same wavefunctions.
!
CALL ktokpmq( xk(:,ik), zero_vect, +1, ipool, nkk, nkk_abs )
CALL ktokpmq( xkq(:,ik), zero_vect, +1, ipool, nkk, nkq_abs )
CALL ktokpmq(xk_loc(:,ik), zero_vect, +1, ipool, nkk, nkk_abs)
CALL ktokpmq(xkq(:,ik), zero_vect, +1, ipool, nkk, nkq_abs)
!
IF ( .not. ALLOCATED(umat) ) ALLOCATE( umat(nbnd,nbnd,nks) )
IF ( .not. ALLOCATED(umatq) ) ALLOCATE( umatq(nbnd,nbnd,nks) )
......@@ -341,7 +342,7 @@
! Since in QE a normal rotation s is defined as S^-1 we have here
! sxk = S(k).
!
CALL rotate_cart( xk(:,ik), s(:,:,isym), sxk )
CALL rotate_cart( xk_loc(:,ik), s(:,:,isym), sxk )
!
! here we generate vkb on the igk() set and for k ...
CALL init_us_2( npw, igk, sxk, vkb )
......
......@@ -35,7 +35,7 @@
USE ions_base, ONLY : nat, nsp, tau, ityp
USE control_flags, ONLY : iverbosity
USE io_epw, ONLY : iuepb, iuqpeig
USE pwcom, ONLY : et, xk, nks, nbnd, nkstot
USE pwcom, ONLY : nks, nbnd, nkstot
USE cell_base, ONLY : at, bg
USE symm_base, ONLY : irt, s, nsym, ft, sname, invs, s_axis_to_cart, &
sr, nrot, copy_sym, set_sym_bl, find_sym, &
......@@ -47,9 +47,10 @@
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, lpolar
USE elph2, ONLY : epmatq, dynq, sumr, et_all, xk_all, et_mb, et_ks, &
USE elph2, ONLY : epmatq, dynq, sumr, et_mb, et_ks, &
zstar, epsi, cu, cuq, lwin, lwinq, bmat, igk_k_all, &
ngk_all, exband
USE klist_epw, ONLY : xk_all, et_loc, et_all
USE constants_epw, ONLY : ryd2ev, zero, czero
USE fft_base, ONLY : dfftp
USE control_ph, ONLY : u_from_file
......@@ -136,7 +137,7 @@
!! The corresponding weigths
REAL(kind=DP) :: sxq(3, 48)
!! List of vectors in the star of q
REAL(kind=DP) :: et_tmp(nbnd,nkstot)
REAL(kind=DP) :: et_tmp(nbnd, nkstot)
!! Temporary array containing the eigenvalues (KS or GW) when read from files
REAL(kind=DP) :: xq0(3)
!! Current coarse q-point coords.
......@@ -260,28 +261,27 @@
CALL mp_bcast(et_tmp, meta_ionode_id, world_comm)
!
CALL fkbounds(nkstot, ik_start, ik_stop)
et_ks(:,:) = et(:,1:nks)
et(:,1:nks) = et_tmp(:,ik_start:ik_stop)
et_mb(:,:) = et(:,1:nks)
et_ks(:,:) = et_loc(:,:)
et_loc(:,:) = et_tmp(:,ik_start:ik_stop)
et_mb(:,:) = et_loc(:,:)
ENDIF
!
! Do not recompute dipole matrix elements
IF ( epwread .and. .not. epbread ) THEN
IF ( epwread .AND. .NOT. epbread ) THEN
CONTINUE
ELSE
! compute coarse grid dipole matrix elements. Very fast
IF (.not. vme) CALL compute_pmn_para
IF (.NOT. vme) CALL compute_pmn_para
ENDIF
!
! gather electronic eigenvalues for subsequent shuffle
!
ALLOCATE( xk_all(3,nkstot), et_all(nbnd,nkstot) )
xk_all(:,:) = zero
et_all(:,:) = zero
CALL poolgather( 3, nkstot, nks, xk(:,1:nks), xk_all)
CALL poolgather(nbnd, nkstot, nks, et(1:nbnd,1:nks), et_all)
IF (eig_read) THEN
et_all(:,:) = zero
CALL poolgather(nbnd, nkstot, nks, et_loc(1:nbnd,1:nks), et_all)
ENDIF
!
IF (.not.kmaps) THEN
IF (.NOT. kmaps) THEN
CALL start_clock('kmaps')
CALL createkmap_pw2
CALL stop_clock('kmaps')
......@@ -695,7 +695,7 @@
IF (.not. exst) CALL errore( 'elphon_shuffle_wrap', 'epb files not found ', 1)
OPEN(iuepb, file = tempfile, form = 'unformatted')
WRITE(stdout,'(/5x,"Reading epmatq from .epb files"/)')
READ(iuepb) nqc, xqc, et, dynq, epmatq, zstar, epsi
READ(iuepb) nqc, xqc, et_loc, dynq, epmatq, zstar, epsi
CLOSE(iuepb)
WRITE(stdout,'(/5x,"The .epb files have been correctly read"/)')
ENDIF
......@@ -703,7 +703,7 @@
IF (epbwrite) THEN
OPEN(iuepb, file = tempfile, form = 'unformatted')
WRITE(stdout,'(/5x,"Writing epmatq on .epb files"/)')
WRITE(iuepb) nqc, xqc, et, dynq, epmatq, zstar, epsi
WRITE(iuepb) nqc, xqc, et_loc, dynq, epmatq, zstar, epsi
CLOSE(iuepb)
WRITE(stdout,'(/5x,"The .epb files have been correctly written"/)')
ENDIF
......
......@@ -22,7 +22,8 @@
!-----------------------------------------------------------------------
!
USE kinds, ONLY : DP, i4b
USE pwcom, ONLY : nbnd, nks, nkstot, isk, et, xk, ef, nelec
USE pwcom, ONLY : nbnd, nks, nkstot, ef, nelec
USE klist_epw, ONLY : et_loc, xk_loc, isk_dummy
USE cell_base, ONLY : at, bg, omega, alat
USE start_k, ONLY : nk1, nk2, nk3
USE ions_base, ONLY : nat, amass, ityp, tau
......@@ -311,9 +312,9 @@
IF(ALLOCATED(w2)) DEALLOCATE( w2 )
!
! We need some crystal info
IF (mpime.eq.ionode_id) THEN
IF (mpime == ionode_id) THEN
!
OPEN(unit=crystal,file='crystal.fmt',status='old',iostat=ios)
OPEN (UNIT = crystal, FILE = 'crystal.fmt', STATUS = 'old', IOSTAT = ios)
READ (crystal,*) nat
READ (crystal,*) nmodes
READ (crystal,*) nelec
......@@ -321,54 +322,39 @@
READ (crystal,*) bg
READ (crystal,*) omega
READ (crystal,*) alat
ALLOCATE( tau( 3, nat ) )
ALLOCATE (tau(3, nat))
READ (crystal,*) tau
READ (crystal,*) amass
ALLOCATE( ityp( nat ) )
ALLOCATE (ityp(nat))
READ (crystal,*) ityp
READ (crystal,*) isk
READ (crystal,*) noncolin
READ (crystal,*) w_centers
!
ENDIF
CALL mp_bcast (nat , ionode_id, inter_pool_comm)
CALL mp_bcast (nat , root_pool, intra_pool_comm)
CALL mp_bcast (nat , ionode_id, world_comm)
IF (mpime /= ionode_id) ALLOCATE( ityp( nat ) )
CALL mp_bcast (nmodes , ionode_id, inter_pool_comm)
CALL mp_bcast (nmodes , root_pool, intra_pool_comm)
CALL mp_bcast (nelec , ionode_id, inter_pool_comm)
CALL mp_bcast (nelec , root_pool, intra_pool_comm)
CALL mp_bcast (at , ionode_id, inter_pool_comm)
CALL mp_bcast (at , root_pool, intra_pool_comm)
CALL mp_bcast (bg , ionode_id, inter_pool_comm)
CALL mp_bcast (bg , root_pool, intra_pool_comm)
CALL mp_bcast (omega , ionode_id, inter_pool_comm)
CALL mp_bcast (omega , root_pool, intra_pool_comm)
CALL mp_bcast (alat , ionode_id, inter_pool_comm)
CALL mp_bcast (alat , root_pool, intra_pool_comm)
CALL mp_bcast (nmodes , ionode_id, world_comm)
CALL mp_bcast (nelec , ionode_id, world_comm)
CALL mp_bcast (at , ionode_id, world_comm)
CALL mp_bcast (bg , ionode_id, world_comm)
CALL mp_bcast (omega , ionode_id, world_comm)
CALL mp_bcast (alat , ionode_id, world_comm)
IF (mpime /= ionode_id) ALLOCATE( tau( 3, nat ) )
CALL mp_bcast (tau , ionode_id, inter_pool_comm)
CALL mp_bcast (tau , root_pool, intra_pool_comm)
CALL mp_bcast (amass , ionode_id, inter_pool_comm)
CALL mp_bcast (amass , root_pool, intra_pool_comm)
CALL mp_bcast (ityp , ionode_id, inter_pool_comm)
CALL mp_bcast (ityp , root_pool, intra_pool_comm)
CALL mp_bcast (isk , ionode_id, inter_pool_comm)
CALL mp_bcast (isk , root_pool, intra_pool_comm)
CALL mp_bcast (noncolin, ionode_id, inter_pool_comm)
CALL mp_bcast (noncolin, root_pool, intra_pool_comm)
CALL mp_bcast (w_centers, ionode_id, inter_pool_comm)
CALL mp_bcast (w_centers, root_pool, intra_pool_comm)
IF (mpime.eq.ionode_id) THEN
CALL mp_bcast (tau , ionode_id, world_comm)
CALL mp_bcast (amass , ionode_id, world_comm)
CALL mp_bcast (ityp , ionode_id, world_comm)
CALL mp_bcast (noncolin , ionode_id, world_comm)
CALL mp_bcast (w_centers, ionode_id, world_comm)
IF (mpime == ionode_id) THEN
CLOSE(crystal)
ENDIF
CALL mp_barrier(inter_pool_comm)
!
ELSE
continue
CONTINUE
ENDIF
!
ALLOCATE( w2( 3*nat) )
ALLOCATE (w2(3 * nat))
!
IF (lpolar) THEN
WRITE(stdout, '(/,5x,a)' ) 'Computes the analytic long-range interaction for polar materials [lpolar]'
......@@ -380,7 +366,7 @@
!
! For this we need the Wannier centers
! w_centers is allocated inside loadumat
IF (.not. epwread) THEN
IF (.NOT. epwread) THEN
xxq = 0.d0
CALL loadumat( nbnd, nbndsub, nks, nkstot, xxq, cu, cuq, lwin, lwinq, exband, w_centers )
ENDIF
......@@ -474,35 +460,35 @@
!
! SP : Let the user chose. If false use files on disk
IF (etf_mem == 0) THEN
ALLOCATE(epmatwe ( nbndsub, nbndsub, nrr_k, nmodes, nqc))
ALLOCATE (epmatwe ( nbndsub, nbndsub, nrr_k, nmodes, nqc))
ALLOCATE (epmatwp ( nbndsub, nbndsub, nrr_k, nmodes, nrr_g))
ELSE
ALLOCATE(epmatwe_mem ( nbndsub, nbndsub, nrr_k, nmodes))
ALLOCATE (epmatwe_mem ( nbndsub, nbndsub, nrr_k, nmodes))
epmatwe_mem(:,:,:,:) = czero
ENDIF
!
! Hamiltonian
!
CALL hambloch2wan &
( nbnd, nbndsub, nks, nkstot, et, xk, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw )
( nbnd, nbndsub, nks, nkstot, et_loc, xk_loc, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw )
!
! Kohn-Sham eigenvalues
!
IF (eig_read) THEN
WRITE (stdout,'(5x,a)') "Interpolating MB and KS eigenvalues"
CALL hambloch2wan &
( nbnd, nbndsub, nks, nkstot, et_ks, xk, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw_ks )
( nbnd, nbndsub, nks, nkstot, et_ks, xk_loc, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw_ks )
ENDIF
!
IF (vme) THEN
! Transform of position matrix elements
! PRB 74 195118 (2006)
CALL vmebloch2wan &
( nbnd, nbndsub, nks, nkstot, xk, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
( nbnd, nbndsub, nks, nkstot, xk_loc, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
ELSE
! Dipole
CALL dmebloch2wan &
( nbnd, nbndsub, nks, nkstot, dmec, xk, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
( nbnd, nbndsub, nks, nkstot, dmec, xk_loc, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
ENDIF
!
! Dynamical Matrix
......@@ -525,11 +511,11 @@
!
IF (etf_mem == 0) THEN
CALL ephbloch2wane &
( nbnd, nbndsub, nks, nkstot, xk, cu, cuq, &
( nbnd, nbndsub, nks, nkstot, xk_loc, cu, cuq, &
epmatq(:,:,:,imode,iq), nrr_k, irvec_k, wslen_k, epmatwe(:,:,:,imode,iq) )
ELSE
CALL ephbloch2wane &
( nbnd, nbndsub, nks, nkstot, xk, cu, cuq, &
( nbnd, nbndsub, nks, nkstot, xk_loc, cu, cuq, &
epmatq(:,:,:,imode,iq), nrr_k, irvec_k, wslen_k, epmatwe_mem(:,:,:,imode) )
!
ENDIF
......@@ -602,20 +588,22 @@
CALL loadqmesh_serial
CALL loadkmesh_para
!
ALLOCATE ( epmatwef( nbndsub, nbndsub, nrr_k, nmodes), &
wf( nmodes, nqf ), &
etf( nbndsub, nkqf), &
etf_ks( nbndsub, nkqf), &
epmatf( nbndsub, nbndsub, nmodes), &
cufkk( nbndsub, nbndsub), &
cufkq( nbndsub, nbndsub), &
uf( nmodes, nmodes), &
bmatf( nbndsub, nbndsub), &
eps_rpa( nmodes) )
ALLOCATE (epmatwef(nbndsub, nbndsub, nrr_k, nmodes))
ALLOCATE (wf(nmodes, nqf))
ALLOCATE (etf(nbndsub, nkqf))
ALLOCATE (etf_ks(nbndsub, nkqf))
ALLOCATE (epmatf(nbndsub, nbndsub, nmodes))
ALLOCATE (cufkk(nbndsub, nbndsub))
ALLOCATE (cufkq(nbndsub, nbndsub))
ALLOCATE (uf(nmodes, nmodes))
ALLOCATE (bmatf(nbndsub, nbndsub))
ALLOCATE (eps_rpa(nmodes))
ALLOCATE (isk_dummy(nkqf))
!
! Need to be initialized
etf_ks(:,:) = zero
etf_ks(:,:) = zero
epmatf(:,:,:) = czero
isk_dummy(:) = 0 ! Isk dummy variable
!
! allocate velocity and dipole matrix elements after getting grid size
!
......@@ -754,7 +742,7 @@
!
! since wkf(:,ikq) = 0 these bands do not bring any contribution to Fermi level
!
efnew = efermig(etf, nbndsub, nkqf, nelec, wkf, degaussw, ngaussw, 0, isk)
efnew = efermig(etf, nbndsub, nkqf, nelec, wkf, degaussw, ngaussw, 0, isk_dummy)
!
WRITE(stdout, '(/5x,a,f10.6,a)') &
'Fermi energy is calculated from the fine k-mesh: Ef = ', efnew * ryd2ev, ' eV'
......@@ -1657,7 +1645,7 @@
!
USE kinds, ONLY : DP
USE epwcom, ONLY : nbndsub, vme, eig_read, etf_mem
USE pwcom, ONLY : ef, nelec, isk
USE pwcom, ONLY : ef, nelec
USE elph2, ONLY : chw, rdw, cdmew, cvmew, chw_ks, &
zstar, epsi, epmatwp
USE ions_base, ONLY : amass, ityp, nat, tau
......@@ -1719,7 +1707,6 @@
WRITE (crystal,*) tau
WRITE (crystal,*) amass
WRITE (crystal,*) ityp
WRITE (crystal,*) isk
WRITE (crystal,*) noncolin
WRITE (crystal,*) w_centers
!
......@@ -2145,14 +2132,14 @@
! counter on the band energy
!
sumkg_seq = 0.d0
DO ik = 1, nks
DO ik=1, nks
sum1 = 0.d0
if (is /= 0) then
if (isk(ik).ne.is) cycle
end if
do ibnd = 1, nbnd
sum1 = sum1 + wgauss ( (e-et (ibnd, ik) ) / degauss, ngauss)
enddo
IF (is /= 0) THEN
IF (isk(ik) /= is) CYCLE
ENDIF
DO ibnd=1, nbnd
sum1 = sum1 + wgauss((e - et (ibnd, ik)) / degauss, ngauss)
ENDDO
sumkg_seq = sumkg_seq + wk (ik) * sum1
ENDDO
RETURN
......
......@@ -24,7 +24,8 @@
!-----------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE pwcom, ONLY : nbnd, nks, nkstot, isk, et, xk, ef, nelec
USE pwcom, ONLY : nbnd, nks, nkstot, ef, nelec
USE klist_epw, ONLY : isk_dummy, et_loc, xk_loc, et_all
USE cell_base, ONLY : at, bg, omega, alat
USE start_k, ONLY : nk1, nk2, nk3
USE ions_base, ONLY : nat, amass, ityp, tau
......@@ -308,7 +309,7 @@
IF(ALLOCATED(w2)) DEALLOCATE( w2 )
!
! We need some crystal info
IF (mpime.eq.ionode_id) THEN
IF (mpime == ionode_id) THEN
!
OPEN(unit=crystal,file='crystal.fmt',status='old',iostat=ios)
READ (crystal,*) nat
......@@ -323,40 +324,25 @@
READ (crystal,*) amass
ALLOCATE( ityp( nat ) )
READ (crystal,*) ityp
READ (crystal,*) isk
READ (crystal,*) noncolin
READ (crystal,*) w_centers
!
ENDIF
CALL mp_bcast (nat , ionode_id, inter_pool_comm)
CALL mp_bcast (nat , root_pool, intra_pool_comm)
CALL mp_bcast (nat , ionode_id, world_comm)
IF (mpime /= ionode_id) ALLOCATE( ityp( nat ) )
CALL mp_bcast (nmodes , ionode_id, inter_pool_comm)
CALL mp_bcast (nmodes , root_pool, intra_pool_comm)
CALL mp_bcast (nelec , ionode_id, inter_pool_comm)
CALL mp_bcast (nelec , root_pool, intra_pool_comm)
CALL mp_bcast (at , ionode_id, inter_pool_comm)
CALL mp_bcast (at , root_pool, intra_pool_comm)
CALL mp_bcast (bg , ionode_id, inter_pool_comm)
CALL mp_bcast (bg , root_pool, intra_pool_comm)
CALL mp_bcast (omega , ionode_id, inter_pool_comm)
CALL mp_bcast (omega , root_pool, intra_pool_comm)
CALL mp_bcast (alat , ionode_id, inter_pool_comm)
CALL mp_bcast (alat , root_pool, intra_pool_comm)
CALL mp_bcast (nmodes , ionode_id, world_comm)
CALL mp_bcast (nelec , ionode_id, world_comm)
CALL mp_bcast (at , ionode_id, world_comm)
CALL mp_bcast (bg , ionode_id, world_comm)
CALL mp_bcast (omega , ionode_id, world_comm)
CALL mp_bcast (alat , ionode_id, world_comm)
IF (mpime /= ionode_id) ALLOCATE( tau( 3, nat ) )
CALL mp_bcast (tau , ionode_id, inter_pool_comm)
CALL mp_bcast (tau , root_pool, intra_pool_comm)
CALL mp_bcast (amass , ionode_id, inter_pool_comm)
CALL mp_bcast (amass , root_pool, intra_pool_comm)
CALL mp_bcast (ityp , ionode_id, inter_pool_comm)
CALL mp_bcast (ityp , root_pool, intra_pool_comm)
CALL mp_bcast (isk , ionode_id, inter_pool_comm)
CALL mp_bcast (isk , root_pool, intra_pool_comm)
CALL mp_bcast (noncolin, ionode_id, inter_pool_comm)
CALL mp_bcast (noncolin, root_pool, intra_pool_comm)
CALL mp_bcast (w_centers, ionode_id, inter_pool_comm)
CALL mp_bcast (w_centers, root_pool, intra_pool_comm)
IF (mpime.eq.ionode_id) THEN
CALL mp_bcast (tau , ionode_id, world_comm)
CALL mp_bcast (amass , ionode_id, world_comm)
CALL mp_bcast (ityp , ionode_id, world_comm)
CALL mp_bcast (noncolin , ionode_id, world_comm)
CALL mp_bcast (w_centers, ionode_id, world_comm)
IF (mpime == ionode_id) THEN
CLOSE(crystal)
ENDIF
CALL mp_barrier(inter_pool_comm)
......@@ -469,48 +455,46 @@
! Hamiltonian
!
CALL hambloch2wan &
( nbnd, nbndsub, nks, nkstot, et, xk, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw )
( nbnd, nbndsub, nks, nkstot, et_loc, xk_loc, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw )
!
! Kohn-Sham eigenvalues
!
IF (eig_read) THEN
WRITE (stdout,'(5x,a)') "Interpolating MB and KS eigenvalues"
CALL hambloch2wan &
( nbnd, nbndsub, nks, nkstot, et_ks, xk, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw_ks )
( nbnd, nbndsub, nks, nkstot, et_ks, xk_loc, cu, lwin, exband, nrr_k, irvec_k, wslen_k, chw_ks )
ENDIF
!
IF (vme) THEN
! Transform of position matrix elements
! PRB 74 195118 (2006)
CALL vmebloch2wan &
( nbnd, nbndsub, nks, nkstot, xk, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
( nbnd, nbndsub, nks, nkstot, xk_loc, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
ELSE
! Dipole
CALL dmebloch2wan &
( nbnd, nbndsub, nks, nkstot, dmec, xk, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
( nbnd, nbndsub, nks, nkstot, dmec, xk_loc, cu, nrr_k, irvec_k, wslen_k, lwin, exband )
ENDIF
!
! Dynamical Matrix
!
IF (.not. lifc) CALL dynbloch2wan &
( nmodes, nqc, xqc, dynq, nrr_q, irvec_q, wslen_q )
IF (.not. lifc) CALL dynbloch2wan(nmodes, nqc, xqc, dynq, nrr_q, irvec_q, wslen_q)
!
!
! Electron-Phonon vertex (Bloch el and Bloch ph -> Wannier el and Bloch ph)
!
DO iq = 1, nqc
DO iq=1, nqc
!
xxq = xqc (:, iq)
xxq = xqc(:, iq)
!
! we need the cu again for the k+q points, we generate the map here
!
CALL loadumat ( nbnd, nbndsub, nks, nkstot, xxq, cu, cuq, lwin, lwinq, exband, w_centers )
CALL loadumat(nbnd, nbndsub, nks, nkstot, xxq, cu, cuq, lwin, lwinq, exband, w_centers)
!
DO imode = 1, nmodes
!
CALL ephbloch2wane &
( nbnd, nbndsub, nks, nkstot, xk, cu, cuq, &
epmatq (:,:,:,imode,iq), nrr_k, irvec_k, wslen_k, epmatwe_mem(:,:,:,imode) )
CALL ephbloch2wane(nbnd, nbndsub, nks, nkstot, xk_loc, cu, cuq, &
epmatq (:,:,:,imode,iq), nrr_k, irvec_k, wslen_k, epmatwe_mem(:,:,:,imode))
!
ENDDO
! Only the master node writes
......@@ -569,20 +553,22 @@
CALL loadqmesh_serial
CALL loadkmesh_para
!
ALLOCATE ( epmatwef( nbndsub, nbndsub, nrr_k), &
wf( nmodes, nqf ), &
etf( nbndsub, nkqf), &
etf_ks( nbndsub, nkqf), &
epmatf( nbndsub, nbndsub), &
cufkk( nbndsub, nbndsub), &
cufkq( nbndsub, nbndsub), &
uf( nmodes, nmodes), &
bmatf( nbndsub, nbndsub), &
eps_rpa( nmodes) )
ALLOCATE (epmatwef(nbndsub, nbndsub, nrr_k))
ALLOCATE (wf(nmodes, nqf))
ALLOCATE (etf(nbndsub, nkqf))
ALLOCATE (etf_ks(nbndsub, nkqf))
ALLOCATE (epmatf(nbndsub, nbndsub))
ALLOCATE (cufkk(nbndsub, nbndsub))
ALLOCATE (cufkq(nbndsub, nbndsub))
ALLOCATE (uf(nmodes, nmodes))
ALLOCATE (bmatf(nbndsub, nbndsub))
ALLOCATE (eps_rpa(nmodes))
ALLOCATE (isk_dummy(nkqf))
!
! Need to be initialized
etf_ks(:,:) = zero
epmatf(:,:) = czero
etf_ks(:,:) = zero
epmatf(:,:) = czero
isk_dummy(:) = 0 ! Isk dummy variable
! allocate velocity and dipole matrix elements after getting grid size
!
IF (vme) THEN
......@@ -696,7 +682,7 @@
!
! since wkf(:,ikq) = 0 these bands do not bring any contribution to Fermi level
!
efnew = efermig(etf, nbndsub, nkqf, nelec, wkf, degaussw, ngaussw, 0, isk)
efnew = efermig(etf, nbndsub, nkqf, nelec, wkf, degaussw, ngaussw, 0, isk_dummy)
!
WRITE(stdout, '(/5x,a,f10.6,a)') &
'Fermi energy is calculated from the fine k-mesh: Ef = ', efnew * ryd2ev, ' eV'
......
......@@ -17,9 +17,6 @@
!! This is the main EPW driver which sets the phases on the wavefunctions,
!! calls [[wann_run]] and [[elphon_shuffle_wrap]]
!!
!! @Note
!! 8/14/08 lnscf is unnecessary, as is nqs, iq_start
!!
USE io_global, ONLY : stdout, ionode
USE mp, ONLY : mp_bcast, mp_barrier
USE mp_world, ONLY : mpime
......@@ -31,57 +28,55 @@
USE environment, ONLY : environment_start
USE elph2, ONLY : elph
USE close_epw, ONLY : close_final, deallocate_epw
! Flag to perform an electron-phonon calculation. If .true.
! the code will enter in [[elphon_shuffle_wrap]]
!
IMPLICIT NONE
!
CHARACTER (LEN=12) :: code = 'EPW'
CHARACTER(LEN=12) :: code = 'EPW'
!! Name of the program
!
version_number = '5.1.0'
!
CALL init_clocks( .TRUE. )
CALL init_clocks(.TRUE.)
!
CALL start_clock( 'EPW' )
CALL start_clock('EPW')
!
gamma_only = .FALSE.
!
CALL mp_startup(start_images=.true.)
CALL mp_startup(start_images = .TRUE.)
!
! Display the logo
IF (mpime.eq.ionode_id) then
WRITE(stdout,'(a)') " "
WRITE(stdout,'(a)') " ``:oss/ "
WRITE(stdout,'(a)') " `.+s+. .+ys--yh+ `./ss+. "
WRITE(stdout,'(a)') " -sh//yy+` +yy +yy -+h+-oyy "
WRITE(stdout,'(a)') " -yh- .oyy/.-sh. .syo-.:sy- /yh "
WRITE(stdout,'(a)') " `.-.` `yh+ -oyyyo. `/syys: oys `.` "
WRITE(stdout,'(a)') " `/+ssys+-` `sh+ ` oys` .:osyo` "
WRITE(stdout,'(a)') " -yh- ./syyooyo` .sys+/oyo--yh/ "
WRITE(stdout,'(a)') " `yy+ .-:-. `-/+/:` -sh- "
WRITE(stdout,'(a)') " /yh. oys "
WRITE(stdout,'(a)') " ``..---hho---------` .---------..` `.-----.` -hd+---. "
WRITE(stdout,'(a)') " `./osmNMMMMMMMMMMMMMMMs. +NNMMMMMMMMNNmh+. yNMMMMMNm- oNMMMMMNmo++:` "
WRITE(stdout,'(a)') " +sy--/sdMMMhyyyyyyyNMMh- .oyNMMmyyyyyhNMMm+` -yMMMdyyo:` .oyyNMMNhs+syy` "
WRITE(stdout,'(a)') " -yy/ /MMM+.`-+/``mMMy- `mMMh:`````.dMMN:` `MMMy-`-dhhy```mMMy:``+hs "
WRITE(stdout,'(a)') " -yy+` /MMMo:-mMM+`-oo/. mMMh: `dMMN/` dMMm:`dMMMMy..MMMo-.+yo` "
WRITE(stdout,'(a)') " .sys`/MMMMNNMMMs- mMMmyooooymMMNo: oMMM/sMMMMMM++MMN//oh: "
WRITE(stdout,'(a)') " `sh+/MMMhyyMMMs- `-` mMMMMMMMMMNmy+-` -MMMhMMMsmMMmdMMd/yy+ "
WRITE(stdout,'(a)') " `-/+++oyy-/MMM+.`/hh/.`mNm:` mMMd+/////:-.` NMMMMMd/:NMMMMMy:/yyo/:.` "
WRITE(stdout,'(a)') " +os+//:-..-oMMMo:--:::-/MMMo. .-mMMd+---` hMMMMN+. oMMMMMo. `-+osyso:` "
WRITE(stdout,'(a)') " syo `mNMMMMMNNNNNNNNMMMo.oNNMMMMMNNNN:` +MMMMs:` dMMMN/` ``:syo "
WRITE(stdout,'(a)') " /yh` :syyyyyyyyyyyyyyyy+.`+syyyyyyyyo:` .oyys:` .oyys:` +yh "
WRITE(stdout,'(a)') " -yh- ```````````````` ````````` `` `` oys "
WRITE(stdout,'(a)') " -+h/------------------------::::::::://////++++++++++++++++++++++///////::::/yd: "
WRITE(stdout,'(a)') " shdddddddddddddddddddddddddddddhhhhhhhhyyyyyssssssssssssssssyyyyyyyhhhhhhhddddh` "
WRITE(stdout,'(a)') " "
WRITE(stdout,'(a)') " S. Ponce, E. R. Margine, C. Verdi, and F. Giustino, "
WRITE(stdout,'(a)') " Comput. Phys. Commun. 209, 116 (2016) "
WRITE(stdout,'(a)') " "
IF (mpime == ionode_id) then
WRITE(stdout, '(a)') " "
WRITE(stdout, '(a)') " ``:oss/ "
WRITE(stdout, '(a)') " `.+s+. .+ys--yh+ `./ss+. "
WRITE(stdout, '(a)') " -sh//yy+` +yy +yy -+h+-oyy "
WRITE(stdout, '(a)') " -yh- .oyy/.-sh. .syo-.:sy- /yh "
WRITE(stdout, '(a)') " `.-.` `yh+ -oyyyo. `/syys: oys `.` "
WRITE(stdout, '(a)') " `/+ssys+-` `sh+ ` oys` .:osyo` "
WRITE(stdout, '(a)') " -yh- ./syyooyo` .sys+/oyo--yh/ "
WRITE(stdout, '(a)') " `yy+ .-:-. `-/+/:` -sh- "
WRITE(stdout, '(a)') " /yh. oys "
WRITE(stdout, '(a)') " ``..---hho---------` .---------..` `.-----.` -hd+---. "
WRITE(stdout, '(a)') " `./osmNMMMMMMMMMMMMMMMs. +NNMMMMMMMMNNmh+. yNMMMMMNm- oNMMMMMNmo++:` "
WRITE(stdout, '(a)') " +sy--/sdMMMhyyyyyyyNMMh- .oyNMMmyyyyyhNMMm+` -yMMMdyyo:` .oyyNMMNhs+syy` "
WRITE(stdout, '(a)') " -yy/ /MMM+.`-+/``mMMy- `mMMh:`````.dMMN:` `MMMy-`-dhhy```mMMy:``+hs "
WRITE(stdout, '(a)') " -yy+` /MMMo:-mMM+`-oo/. mMMh: `dMMN/` dMMm:`dMMMMy..MMMo-.+yo` "
WRITE(stdout, '(a)') " .sys`/MMMMNNMMMs- mMMmyooooymMMNo: oMMM/sMMMMMM++MMN//oh: "
WRITE(stdout, '(a)') " `sh+/MMMhyyMMMs- `-` mMMMMMMMMMNmy+-` -MMMhMMMsmMMmdMMd/yy+ "
WRITE(stdout, '(a)') " `-/+++oyy-/MMM+.`/hh/.`mNm:` mMMd+/////:-.` NMMMMMd/:NMMMMMy:/yyo/:.` "
WRITE(stdout, '(a)') " +os+//:-..-oMMMo:--:::-/MMMo. .-mMMd+---` hMMMMN+. oMMMMMo. `-+osyso:` "
WRITE(stdout, '(a)') " syo `mNMMMMMNNNNNNNNMMMo.oNNMMMMMNNNN:` +MMMMs:` dMMMN/` ``:syo "
WRITE(stdout, '(a)') " /yh` :syyyyyyyyyyyyyyyy+.`+syyyyyyyyo:` .oyys:` .oyys:` +yh "
WRITE(stdout, '(a)') " -yh- ```````````````` ````````` `` `` oys "
WRITE(stdout, '(a)') " -+h/------------------------::::::::://////++++++++++++++++++++++///////::::/yd: "
WRITE(stdout, '(a)') " shdddddddddddddddddddddddddddddhhhhhhhhyyyyyssssssssssssssssyyyyyyyhhhhhhhddddh` "
WRITE(stdout, '(a)') " "
WRITE(stdout, '(a)') " S. Ponce, E. R. Margine, C. Verdi, and F. Giustino, "
WRITE(stdout, '(a)') " Comput. Phys. Commun. 209, 116 (2016) "
WRITE(stdout, '(a)') " "
ENDIF
!
CALL environment_start ( code )
CALL environment_start(code)
!
! Read in the input file
!
......@@ -89,7 +84,7 @@
!
CALL allocate_epwq
!
IF ( epwread .AND. .NOT. epbread ) THEN
IF (epwread .AND. .NOT. epbread) THEN
WRITE(stdout,'(a)') " "
WRITE(stdout,'(a)') " ------------------------------------------------------------------------ "
WRITE(stdout,'(a)') " RESTART - RESTART - RESTART - RESTART "
......@@ -106,24 +101,24 @@
!
CALL epw_summary
!
IF ( ep_coupling ) THEN
IF (ep_coupling) THEN
!
! In case of restart with arbitrary number of cores.
IF ( epwread .AND. .NOT. epbread ) THEN
IF (epwread .AND. .NOT. epbread) THEN
CONTINUE
ELSE
CALL openfilepw
ENDIF
!
CALL print_clock( 'EPW' )
CALL print_clock('EPW' )
!
IF ( epwread .AND. .NOT. epbread ) THEN
IF (epwread .AND. .NOT. epbread) THEN
CONTINUE
ELSE
CALL epw_init(.true.)
CALL epw_init(.TRUE.)
ENDIF
!
CALL print_clock( 'EPW' )
CALL print_clock('EPW')
!
! Generates the perturbation matrix which fixes the gauge of
! the calculated wavefunctions
......@@ -143,7 +138,7 @@
trim(filukk) , ' from disk', repeat('-',67)
ENDIF
!
IF ( elph ) THEN
IF (elph) THEN
!
! CALL dvanqq2()
!
......@@ -153,7 +148,7 @@
!
! ... cleanup of the variables
!
CALL clean_pw( .FALSE. )
CALL clean_pw(.FALSE.)
CALL deallocate_epw
!
! ... Close the files
......@@ -162,11 +157,11 @@
!
ENDIF
!
IF ( cumulant .and. ionode ) THEN
IF (cumulant .AND. ionode) THEN
CALL spectral_cumulant()
ENDIF
!
IF ( eliashberg ) THEN
IF (eliashberg) THEN
CALL eliashberg_eqs()
ENDIF
!
......
......@@ -24,8 +24,8 @@
USE phus, ONLY : alphap
USE lrus, ONLY : becp1
USE uspp, ONLY : vkb
USE pwcom, ONLY : npwx, nbnd, nks, lsda, current_spin, &
isk, xk
USE pwcom, ONLY : npwx, nbnd, nks, lsda, current_spin
USE klist_epw, ONLY : xk_loc, isk_loc
USE constants, ONLY : tpi
USE constants_epw, ONLY : zero, czero, cone
USE cell_base, ONLY : tpiba2, tpiba, bg, omega
......@@ -106,14 +106,14 @@
!
ALLOCATE( aux1( npwx*npol, nbnd ) )
!
DO ik = 1, nks
DO ik=1, nks
!
!
IF ( lsda ) current_spin = isk( ik )
IF (lsda) current_spin = isk_loc(ik)
!
! ... d) The functions vkb(k+G)
!
CALL init_us_2( ngk(ik), igk_k(1,ik), xk(1,ik), vkb )
CALL init_us_2( ngk(ik), igk_k(1,ik), xk_loc(1,ik), vkb )
!
! ... read the wavefunctions at k
!
......@@ -132,12 +132,12 @@
DO ibnd = 1, nbnd
DO ig = 1, ngk(ik)
aux1(ig,ibnd) = evc(ig,ibnd) * tpiba * cone * &
( xk(ipol,ik) + g(ipol,igk_k(ig,ik)) )
( xk_loc(ipol,ik) + g(ipol,igk_k(ig,ik)) )
ENDDO
IF (noncolin) THEN
DO ig = 1, ngk(ik)
aux1(ig+npwx,ibnd) = evc(ig+npwx,ibnd) * tpiba *cone *&
( xk(ipol,ik) + g(ipol,igk_k(ig,ik)) )
( xk_loc(ipol,ik) + g(ipol,igk_k(ig,ik)) )
ENDDO
ENDIF
ENDDO
......
......@@ -20,10 +20,11 @@
!! SP: Image parallelization added
!!
USE ions_base, ONLY : nat, ntyp => nsp
USE cell_base, ONLY : at
USE mp, ONLY : mp_bcast
USE wvfct, ONLY : nbnd
USE klist, ONLY : nks
USE lsda_mod, ONLY : lsda
USE wvfct, ONLY : nbnd, et
USE klist, ONLY : nks, xk, nkstot
USE lsda_mod, ONLY : lsda, isk
USE fixed_occ, ONLY : tfixed_occ
USE qpoint, ONLY : xq
USE disp, ONLY : nq1, nq2, nq3
......@@ -58,6 +59,7 @@
restart_filq, prtgkk, nel, meff, epsiHEG, lphase, &
omegamin, omegamax, omegastep, n_r, lindabs, &
mob_maxiter, use_ws, epmatkqread, selecqread
USE klist_epw, ONLY : xk_all, xk_loc, xk_cryst, isk_all, isk_loc, et_all, et_loc
USE elph2, ONLY : elph
USE start_k, ONLY : nk1, nk2, nk3
USE constants_epw, ONLY : ryd2mev, ryd2ev, ev2cmm1, kelvin2eV, zero
......@@ -68,7 +70,7 @@
USE partial, ONLY : atomo, nat_todo
USE constants, ONLY : AMU_RY
USE mp_global, ONLY : my_pool_id, me_pool
USE io_global, ONLY : meta_ionode, meta_ionode_id
USE io_global, ONLY : meta_ionode, meta_ionode_id, ionode_id
USE io_epw, ONLY : iunkf, iunqf
#if defined(__NAG)
USE F90_UNIX_ENV, ONLY : iargc, getarg
......@@ -89,6 +91,8 @@
!! auxilary variable for saving the modenum
INTEGER :: i
!! Counter for loops
INTEGER :: ik
!! Counter on k-points
INTEGER :: nk1tmp
!! temp vars for saving kgrid info
INTEGER :: nk2tmp
......@@ -185,13 +189,13 @@
!
! added by @ RM
!
! ephwrite : if true write el-phonon matrix elements on the fine mesh to file
! 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)
! band_plot : if true write files to plot band structure and phonon dispersion
! degaussq : smearing for sum over q in e-ph coupling (units of meV)
! delta_qsmear : change in energy for each additional smearing in the a2f (units of meV)
! nqsmear : number of smearings used to calculate a2f
! nqstep : number of bins for frequency used to calculate a2f
! band_plot : if true write files to plot band structure and phonon dispersion
! degaussq : smearing for sum over q in e-ph coupling (units of meV)
! delta_qsmear: change in energy for each additional smearing in the a2f (units of meV)
! nqsmear : number of smearings used to calculate a2f
! nqstep : number of bins for frequency used to calculate a2f
! nswfc : nr. of grid points between (0,wsfc) in Eliashberg equations
! nswc : nr. of grid points between (wsfc,wscut)
! pwc : power used to define nswc for non-uniform grid real-axis calculations
......@@ -292,6 +296,7 @@
! omegastep : Photon energy step in evaluating phonon-assisted absorption spectra (in eV)
! n_r : constant refractive index
! lindabs : do phonon-assisted absorption
!
nk1tmp = 0
nk2tmp = 0
nk3tmp = 0
......@@ -307,13 +312,13 @@
!
ENDIF
!
CALL mp_bcast(ios, meta_ionode_id, world_comm )
CALL errore( 'epw_readin', 'reading title ', ABS( ios ) )
CALL mp_bcast(title, meta_ionode_id, world_comm )
CALL mp_bcast(ios, meta_ionode_id, world_comm)
CALL errore('epw_readin', 'reading title ', ABS( ios ))
CALL mp_bcast(title, meta_ionode_id, world_comm)
!
! Rewind the input if the title is actually the beginning of inputph namelist
!
IF( imatches("&inputepw", title) ) THEN
IF(imatches("&inputepw", title)) THEN
WRITE(*, '(6x,a)') "Title line not specified: using 'default'."
title='default'
IF (meta_ionode) REWIND(5, iostat=ios)
......@@ -611,8 +616,8 @@
!
! thickness and smearing width of the Fermi surface
! from eV to Ryd
fsthick = fsthick / ryd2ev
degaussw = degaussw / ryd2ev
fsthick = fsthick / ryd2ev
degaussw = degaussw / ryd2ev
delta_smear = delta_smear / ryd2ev
!
! smearing of phonon in a2f
......@@ -686,18 +691,60 @@