Indices of k+G for all k-points (igk_k) moved from module "realus" to a less

illogical place: module "klist" containing information on k-points. Number 
of plane waves npw_k merged into pre-existing variable ngk. 
Important notes:
- in PWscf only the real-space calculation of <beta|psi> used those variables.
  It should still work but I haven't tested it
- in all other QE packages, only TDDFPT was using those variables. I made them
  pointing to the new ones. It seems to work, but please check
- any other code using those variables should be updated accordingly
- the file with indices (unit iunigk) is still written and it is still used, 
  but it is going to disappear soon: there is no longer any valid reason 
  not to store indices in memory


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12101 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
giannozz 2016-02-05 16:56:27 +00:00
parent 9588c81f2e
commit f10901cc4a
26 changed files with 74 additions and 106 deletions

View File

@ -25,7 +25,7 @@ subroutine allocate_nlpot
USE cell_base, ONLY : tpiba2
USE cellmd, ONLY : cell_factor
USE gvect, ONLY : ngm, gcutm, g
USE klist, ONLY : xk, wk, ngk, nks, qnorm
USE klist, ONLY : xk, wk, ngk, nks, qnorm, igk_k
USE lsda_mod, ONLY : nspin
USE ldaU, ONLY : Hubbard_lmax
USE scf, ONLY : rho
@ -45,11 +45,7 @@ subroutine allocate_nlpot
!
implicit none
!
! a few local variables
!
integer :: nwfcm
integer,allocatable :: ngkq(:)
! counters on atom type, atoms, beta functions
!
! calculate number of PWs for all kpoints
!
@ -62,6 +58,7 @@ subroutine allocate_nlpot
!
! igk relates the index of PW k+G to index in the list of G vector
!
allocate ( igk_k( npwx,nks ) )
allocate (igk( npwx ), g2kin ( npwx ) )
!
! Note: computation of the number of beta functions for

View File

@ -26,7 +26,7 @@ SUBROUTINE clean_pw( lflag )
USE gvecs, ONLY : nls, nlsm
USE fixed_occ, ONLY : f_inp
USE ktetra, ONLY : tetra
USE klist, ONLY : ngk
USE klist, ONLY : ngk, igk_k
USE gvect, ONLY : ig_l2g
USE vlocal, ONLY : strf, vloc
USE wvfct, ONLY : igk, g2kin, et, wg, btype
@ -143,6 +143,7 @@ SUBROUTINE clean_pw( lflag )
! ... arrays allocated in allocate_nlpot.f90 ( and never deallocated )
!
IF ( ALLOCATED( ngk ) ) DEALLOCATE( ngk )
IF ( ALLOCATED( igk_k ) ) DEALLOCATE( igk_k )
IF ( ALLOCATED( igk ) ) DEALLOCATE( igk )
IF ( ALLOCATED( g2kin ) ) DEALLOCATE( g2kin )
IF ( ALLOCATED( qrad ) ) DEALLOCATE( qrad )

View File

@ -13,15 +13,16 @@ SUBROUTINE hinit0()
! ... atomic position independent initialization for nonlocal PP,
! ... structure factors, local potential, core charge
!
USE kinds, ONLY : dp
USE ions_base, ONLY : nat, nsp, ityp, tau
USE basis, ONLY : startingconfig
USE cell_base, ONLY : at, bg, omega, tpiba2
USE cellmd, ONLY : omega_old, at_old, lmovecell
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, ngk, igk_k
USE wvfct, ONLY : npw, npwx, igk
USE fft_base, ONLY : dfftp
USE gvect, ONLY : ngm, ig_l2g, g, eigts1, eigts2, eigts3
USE vlocal, ONLY : strf
USE wvfct, ONLY : npw, g2kin, igk
USE gvecw, ONLY : gcutw
USE io_files, ONLY : iunigk
USE realus, ONLY : generate_qpointlist,betapointlist,init_realspace_vars,real_space
@ -31,8 +32,8 @@ SUBROUTINE hinit0()
!
IMPLICIT NONE
!
INTEGER :: ik
! counter on k points
INTEGER :: ik ! counter on k points
REAL(dp), ALLOCATABLE :: gk(:) ! work space
!
! ... calculate the Fourier coefficients of the local part of the PP
!
@ -49,17 +50,22 @@ SUBROUTINE hinit0()
! ... The following loop must NOT be called more than once in a run
! ... or else there will be problems with variable-cell calculations
!
ALLOCATE ( gk(npwx) )
igk_k(:,:) = 0
DO ik = 1, nks
!
! ... g2kin is used here as work space
!
CALL gk_sort( xk(1,ik), ngm, g, gcutw, npw, igk, g2kin )
CALL gk_sort( xk(1,ik), ngm, g, gcutw, ngk(ik), igk_k(1,ik), gk )
!
! ... if there is only one k-point npw and igk stay in memory
!
npw = ngk(ik)
igk(:) = igk_k(:,ik)
IF ( nks > 1 ) WRITE( iunigk ) igk
!
END DO
DEALLOCATE ( gk )
!
IF ( lmovecell .AND. startingconfig == 'file' ) THEN
!

View File

@ -759,6 +759,7 @@ hinit0.o : ../../Modules/gvecw.o
hinit0.o : ../../Modules/io_files.o
hinit0.o : ../../Modules/io_global.o
hinit0.o : ../../Modules/ions_base.o
hinit0.o : ../../Modules/kind.o
hinit0.o : ../../Modules/recvec.o
hinit0.o : atomic_wfc_mod.o
hinit0.o : ldaU.o
@ -1475,7 +1476,6 @@ realus.o : ../../Modules/constants.o
realus.o : ../../Modules/control_flags.o
realus.o : ../../Modules/fft_base.o
realus.o : ../../Modules/funct.o
realus.o : ../../Modules/gvecw.o
realus.o : ../../Modules/io_global.o
realus.o : ../../Modules/ions_base.o
realus.o : ../../Modules/kind.o

View File

@ -31,7 +31,9 @@ MODULE klist
REAL(DP) :: &
qnorm= 0.0_dp ! |q|, used in phonon+US calculations only
INTEGER, ALLOCATABLE :: &
ngk(:) ! number of plane waves for each k point
igk_k(:,:),& ! The g<->k correspondance for each k point
ngk(:) ! number of plane waves for each k point
!
INTEGER :: &
nks, &! number of k points in this pool
nkstot, &! total number of k points

View File

@ -35,12 +35,6 @@ MODULE realus
! init_realspace_vars sets this to 3; qpointlist adds 5; betapointlist adds 7
! so the value should be 15 if the real space routine is initialised properly
INTEGER, ALLOCATABLE :: &
igk_k(:,:),& ! The g<->k correspondance for each k point
npw_k(:) ! number of plane waves at each k point
! They are (used many times, it is much better to hold them in memory
! FIXME: npw_k is redundant. it is already there
!
COMPLEX(DP), ALLOCATABLE :: tg_psic(:)
COMPLEX(DP), ALLOCATABLE :: psic_temp(:),tg_psic_temp(:) !Copies of psic and tg_psic
COMPLEX(DP), ALLOCATABLE :: tg_vrs(:) !task groups linear V memory
@ -71,7 +65,7 @@ MODULE realus
addusforce_r, real_space_dq, deallocate_realsp
! variables for real-space beta, followed by routines
PUBLIC :: real_space, initialisation_level, real_space_debug, &
npw_k, igk_k, tg_psic, betasave, maxbox_beta, box_beta
tg_psic, betasave, maxbox_beta, box_beta
PUBLIC :: betapointlist, init_realspace_vars, v_loc_psir
PUBLIC :: invfft_orbital_gamma, fwfft_orbital_gamma, s_psir_gamma, &
calbec_rs_gamma, add_vuspsir_gamma, invfft_orbital_k, &
@ -112,10 +106,6 @@ MODULE realus
!---------------------------------------------------------------------------
!This subroutine should be called to allocate/reset real space related variables.
!---------------------------------------------------------------------------
USE wvfct, ONLY : npwx,npw, igk, g2kin
USE klist, ONLY : nks, xk
USE gvect, ONLY : ngm, g
USE gvecw, ONLY : gcutw
USE control_flags, ONLY : tqr
USE fft_base, ONLY : dffts
USE io_global, ONLY : stdout
@ -127,12 +117,8 @@ MODULE realus
!print *, "<<<<<init_realspace_vars>>>>>>>"
IF ( allocated( igk_k ) ) DEALLOCATE( igk_k )
IF ( allocated( npw_k ) ) DEALLOCATE( npw_k )
ALLOCATE(igk_k(npwx,nks))
ALLOCATE(npw_k(nks))
!real space, allocation for task group fft work arrays
IF( dffts%have_task_groups ) THEN
!
IF (allocated( tg_psic ) ) DEALLOCATE( tg_psic )
@ -142,14 +128,6 @@ MODULE realus
!
ENDIF
!
DO ik=1,nks
!
CALL gk_sort( xk(1,ik), ngm, g, gcutw, npw, igk, g2kin )
npw_k(ik) = npw
igk_k(:,ik) = igk(:)
!
ENDDO
initialisation_level = initialisation_level + 7
IF (real_space_debug > 20 .and. real_space_debug < 30) THEN
real_space=.false.
@ -1916,6 +1894,7 @@ MODULE realus
USE wavefunctions_module, &
ONLY : psic
USE gvecs, ONLY : nls,nlsm,doublegrid
USE klist, ONLY : ngk, igk_k
USE kinds, ONLY : DP
USE fft_base, ONLY : dffts
USE fft_parallel, ONLY : tg_gather
@ -1956,14 +1935,14 @@ MODULE realus
DO idx = 1, 2*dffts%nogrp, 2
IF( idx + ibnd - 1 < last ) THEN
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
tg_psic(nls (igk_k(j,1))+ioff) = orbital(j,idx+ibnd-1) +&
(0.0d0,1.d0) * orbital(j,idx+ibnd)
tg_psic(nlsm(igk_k(j,1))+ioff) =conjg(orbital(j,idx+ibnd-1) -&
(0.0d0,1.d0) * orbital(j,idx+ibnd) )
ENDDO
ELSEIF( idx + ibnd - 1 == last ) THEN
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
tg_psic(nls (igk_k(j,1))+ioff) = orbital(j,idx+ibnd-1)
tg_psic(nlsm(igk_k(j,1))+ioff) = conjg( orbital(j,idx+ibnd-1))
ENDDO
@ -1990,12 +1969,12 @@ MODULE realus
IF (ibnd < last) THEN
! two ffts at the same time
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
psic (nls (igk_k(j,1))) = orbital(j, ibnd) + (0.0d0,1.d0)*orbital(j, ibnd+1)
psic (nlsm(igk_k(j,1))) = conjg(orbital(j, ibnd) - (0.0d0,1.d0)*orbital(j, ibnd+1))
ENDDO
ELSE
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
psic (nls (igk_k(j,1))) = orbital(j, ibnd)
psic (nlsm(igk_k(j,1))) = conjg(orbital(j, ibnd))
ENDDO
@ -2037,6 +2016,7 @@ MODULE realus
!
USE wavefunctions_module, &
ONLY : psic
USE klist, ONLY : ngk, igk_k
USE gvecs, ONLY : nls,nlsm,doublegrid
USE kinds, ONLY : DP
USE fft_base, ONLY : dffts
@ -2075,7 +2055,7 @@ MODULE realus
DO idx = 1, 2*dffts%nogrp, 2
!
IF( idx + ibnd - 1 < last ) THEN
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
fp= ( tg_psic( nls(igk_k(j,1)) + ioff ) + &
tg_psic( nlsm(igk_k(j,1)) + ioff ) ) * 0.5d0
fm= ( tg_psic( nls(igk_k(j,1)) + ioff ) - &
@ -2084,7 +2064,7 @@ MODULE realus
orbital (j, ibnd+idx ) = cmplx(aimag(fp),- dble(fm),kind=DP)
ENDDO
ELSEIF( idx + ibnd - 1 == last ) THEN
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
orbital (j, ibnd+idx-1) = tg_psic( nls(igk_k(j,1)) + ioff )
ENDDO
ENDIF
@ -2107,14 +2087,14 @@ MODULE realus
IF (ibnd < last) THEN
! two ffts at the same time
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
fp = (psic (nls(igk_k(j,1))) + psic (nlsm(igk_k(j,1))))*0.5d0
fm = (psic (nls(igk_k(j,1))) - psic (nlsm(igk_k(j,1))))*0.5d0
orbital( j, ibnd) = cmplx( dble(fp), aimag(fm),kind=DP)
orbital( j, ibnd+1) = cmplx(aimag(fp),- dble(fm),kind=DP)
ENDDO
ELSE
DO j = 1, npw_k(1)
DO j = 1, ngk(1)
orbital(j, ibnd) = psic (nls(igk_k(j,1)))
ENDDO
ENDIF
@ -2147,6 +2127,7 @@ MODULE realus
!
USE kinds, ONLY : DP
USE wavefunctions_module, ONLY : psic
USE klist, ONLY : ngk, igk_k
USE gvecs, ONLY : nls, nlsm, doublegrid
USE fft_base, ONLY : dffts
USE fft_interfaces, ONLY : invfft
@ -2199,7 +2180,7 @@ MODULE realus
!
psic(1:dffts%nnr) = ( 0.D0, 0.D0 )
!
psic(nls(igk_k(1:npw_k(ik), ik))) = orbital(1:npw_k(ik),ibnd)
psic(nls(igk_k(1:ngk(ik), ik))) = orbital(1:ngk(ik),ibnd)
!
CALL invfft ('Wave', psic, dffts)
IF (present(conserved)) THEN
@ -2229,6 +2210,7 @@ MODULE realus
! ik: kpoint index of the bands
!
USE wavefunctions_module, ONLY : psic
USE klist, ONLY : ngk, igk_k
USE gvecs, ONLY : nls, nlsm, doublegrid
USE kinds, ONLY : DP
USE fft_base, ONLY : dffts
@ -2277,7 +2259,7 @@ MODULE realus
!
CALL fwfft ('Wave', psic, dffts)
!
orbital(1:npw_k(ik),ibnd) = psic(nls(igk_k(1:npw_k(ik),ik)))
orbital(1:ngk(ik),ibnd) = psic(nls(igk_k(1:ngk(ik),ik)))
!
IF (present(conserved)) THEN
IF (conserved .eqv. .true.) THEN

View File

@ -24,7 +24,7 @@ SUBROUTINE lr_alloc_init()
USE io_global, ONLY : stdout
USE charg_resp, ONLY : w_T, w_T_beta_store, w_T_gamma_store, &
& w_T_zeta_store, w_T_npol,chi
USE realus, ONLY : igk_k, npw_k, tg_psic
USE realus, ONLY : tg_psic
USE noncollin_module, ONLY : nspin_mag, npol, noncolin
USE wavefunctions_module, ONLY : evc
USE becmod, ONLY : allocate_bec_type, bec_type, becp

View File

@ -33,7 +33,7 @@ SUBROUTINE lr_apply_liouvillian( evc1, evc1_new, sevc1_new, interaction )
USE gvect, ONLY : nl, ngm, gstart, g, gg
USE io_global, ONLY : stdout
USE kinds, ONLY : dp
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, npw_k => ngk, igk_k
USE lr_variables, ONLY : evc0, revc0, rho_1, rho_1c, &
& ltammd, size_evc, no_hxc, lr_exx, &
& scissor, davidson, lr_verbosity
@ -49,8 +49,7 @@ SUBROUTINE lr_apply_liouvillian( evc1, evc1_new, sevc1_new, interaction )
& calbec_rs_gamma, newq_r, &
& add_vuspsir_gamma, v_loc_psir, &
& s_psir_gamma, real_space_debug, &
& betasave, box_beta, maxbox_beta, &
& igk_k,npw_k
& betasave, box_beta, maxbox_beta
USE dfunct, ONLY : newq
USE control_flags, ONLY : tqr
USE mp, ONLY : mp_sum, mp_barrier
@ -538,7 +537,7 @@ CONTAINS
! Kinetic energy
! It has been already computed in commutator_Hx_psi.
!
!do ig = 1,npw_k(1)
!do ig = 1,ngk(1)
! !
! g2kin(ig) = ((xk(1,1) + g(1,igk_k(ig,1)))**2 &
! +(xk(2,1) + g(2,igk_k(ig,1)))**2 &

View File

@ -30,7 +30,7 @@ SUBROUTINE lr_calc_dens( evc1, response_calc )
USE fft_interfaces, ONLY : invfft
USE io_global, ONLY : stdout
USE kinds, ONLY : dp
USE klist, ONLY : nks,xk,wk
USE klist, ONLY : nks, xk, wk, npw_k => ngk, igk_k
USE lr_variables, ONLY : evc0,revc0,rho_1,lr_verbosity,&
& charge_response, itermax,&
& cube_save, LR_iteration,&
@ -49,7 +49,7 @@ SUBROUTINE lr_calc_dens( evc1, response_calc )
USE mp, ONLY : mp_sum
USE mp_global, ONLY : inter_pool_comm, intra_bgrp_comm,&
inter_bgrp_comm
USE realus, ONLY : igk_k,npw_k, addusdens_r
USE realus, ONLY : addusdens_r
USE charg_resp, ONLY : w_T, lr_dump_rho_tot_cube,&
& lr_dump_rho_tot_xyzd, &
& lr_dump_rho_tot_xcrys,&

View File

@ -639,9 +639,9 @@ CONTAINS
USE uspp_param, ONLY : upf, nh
USE becmod, ONLY : becp,calbec
USE ions_base, ONLY : ityp,nat,ntyp=>nsp
USE realus, ONLY : npw_k,real_space_debug,invfft_orbital_gamma,calbec_rs_gamma
USE realus, ONLY : real_space_debug,invfft_orbital_gamma,calbec_rs_gamma
USE gvect, ONLY : gstart
USE klist, ONLY : nks
USE klist, ONLY : nks, npw_k => ngk
USE lr_variables, ONLY : lr_verbosity, itermax, LR_iteration, LR_polarization, &
project,evc0_virt,F,nbnd_total,n_ipol, becp1_virt
@ -785,9 +785,9 @@ CONTAINS
USE uspp_param, ONLY : upf, nh
USE becmod, ONLY : becp,calbec
USE ions_base, ONLY : ityp,nat,ntyp=>nsp
USE realus, ONLY : npw_k,real_space_debug,invfft_orbital_gamma,calbec_rs_gamma
USE realus, ONLY : real_space_debug,invfft_orbital_gamma,calbec_rs_gamma
USE gvect, ONLY : gstart
USE klist, ONLY : nks
USE klist, ONLY : nks, npw_k => ngk
USE lr_variables, ONLY : lr_verbosity, itermax, LR_iteration, LR_polarization, &
project,evc0_virt,R,nbnd_total,n_ipol, becp1_virt,d0psi

View File

@ -17,7 +17,8 @@ SUBROUTINE lr_dealloc()
USE lr_variables
USE uspp, ONLY : nkb
USE control_flags, ONLY : gamma_only
USE realus, ONLY : igk_k, npw_k, tg_psic
USE realus, ONLY : tg_psic
USE klist, ONLY : npw_k => ngk, igk_k
USE io_global, ONLY : stdout
USE charg_resp, ONLY : w_T_beta_store, w_T_gamma_store, w_T,&
& w_T_zeta_store, chi, rho_1_tot, rho_1_tot_im

View File

@ -19,8 +19,7 @@ FUNCTION lr_dot(x,y)
!
USE kinds, ONLY : dp
USE io_global, ONLY : stdout
USE klist, ONLY : nks, xk, wk
USE realus, ONLY : npw_k
USE klist, ONLY : nks, xk, wk, npw_k => ngk
USE lsda_mod, ONLY : nspin
USE wvfct, ONLY : npwx,nbnd,wg,npw,igk,g2kin
USE gvecw, ONLY : gcutw
@ -159,13 +158,6 @@ CONTAINS
!
CALL gk_sort( xk(1,ikq), ngm, g, gcutw, npwq, igkq, g2kin)
!
! IF (nksq > 1) THEN
! read (iunigk, err = 100, iostat = ios) npw, igk
!100 call errore ('lr_dot', 'reading igk', abs (ios) )
! read (iunigk, err = 200, iostat = ios) npwq, igkq
!200 call errore ('lr_dot', 'reading igkq', abs (ios) )
! ENDIF
!
DO ibnd = 1, nbnd_occ(ikk)
!
IF (noncolin) THEN

View File

@ -22,7 +22,7 @@ SUBROUTINE lr_dvpsi_e(ik,ipol,dvpsi)
USE cell_base, ONLY : tpiba, at
USE ions_base, ONLY : ntyp => nsp
USE io_global, ONLY : stdout
USE klist, ONLY : xk
USE klist, ONLY : xk, npw_k => ngk
USE wvfct, ONLY : npw, npwx, nbnd, igk, g2kin, et
USE wavefunctions_module, ONLY : evc
USE noncollin_module, ONLY : noncolin, npol
@ -33,7 +33,6 @@ SUBROUTINE lr_dvpsi_e(ik,ipol,dvpsi)
USE phus, ONLY : dpqq
USE control_flags, ONLY : gamma_only
USE control_lr, ONLY : nbnd_occ
USE realus, ONLY : npw_k
USE lr_variables, ONLY : lr_verbosity
USE io_global, ONLY : stdout
USE qpoint, ONLY : igkq
@ -205,7 +204,7 @@ CONTAINS
USE gvect, ONLY : gstart
USE wvfct, ONLY : npw, npwx, nbnd, g2kin
USE wavefunctions_module, ONLY : evc
USE realus, ONLY : npw_k
USE klist, ONLY : npw_k => ngk
USE mp, ONLY : mp_sum
USE mp_global, ONLY : intra_bgrp_comm

View File

@ -36,7 +36,7 @@ MODULE lr_exx_kernel
USE klist, ONLY : xk, wk, nks
USE lr_variables, ONLY : gamma_only, lr_verbosity
USE realus, ONLY : invfft_orbital_gamma, fwfft_orbital_gamma,&
& invfft_orbital_k, fwfft_orbital_k, igk_k, npw_k
& invfft_orbital_k, fwfft_orbital_k
USE wavefunctions_module, ONLY : psic
USE cell_base, ONLY : omega
USE exx, ONLY : exxalfa, g2_convolution, exx_fft

View File

@ -22,10 +22,10 @@ SUBROUTINE lr_init_nfo()
!
USE kinds, ONLY : DP
USE ions_base, ONLY : nat, tau
USE klist, ONLY : nks,degauss,lgauss,ngauss,xk,wk,nelec, &
& two_fermi_energies, nelup, neldw
USE klist, ONLY : nks,degauss,lgauss,ngauss,xk,wk, npw_k=>ngk,&
igk_k,nelec, two_fermi_energies, nelup, neldw
USE wvfct, ONLY : nbnd, et, igk, npw, g2kin
USE realus, ONLY : npw_k, igk_k, real_space
USE realus, ONLY : real_space
USE lr_variables, ONLY : lr_verbosity, eels, lr_periodic, nwordd0psi, &
& nwordrestart, restart, size_evc
USE io_global, ONLY : stdout
@ -69,8 +69,8 @@ SUBROUTINE lr_init_nfo()
!
IF (.NOT.eels) THEN
!
IF ( .not. allocated( igk_k ) ) ALLOCATE(igk_k(npwx,nks))
IF ( .not. allocated( npw_k ) ) ALLOCATE(npw_k(nks))
IF ( .not. allocated( igk_k ) ) ALLOCATE(igk_k(npwx,nks))
IF ( .not. allocated( npw_k ) ) ALLOCATE(npw_k(nks))
!
CALL seqopn( iunigk, 'igk', 'UNFORMATTED', exst )
!

View File

@ -54,7 +54,7 @@ SUBROUTINE one_lanczos_step()
USE becmod, ONLY : bec_type, becp, calbec
USE realus, ONLY : real_space, invfft_orbital_gamma, initialisation_level, &
fwfft_orbital_gamma, calbec_rs_gamma, add_vuspsir_gamma, &
v_loc_psir, s_psir_gamma, igk_k, npw_k, real_space_debug
v_loc_psir, s_psir_gamma, real_space_debug
USE charg_resp, ONLY : w_T_beta_store, w_T, lr_calc_F
USE lr_us, ONLY : lr_apply_s
USE noncollin_module, ONLY : npol

View File

@ -19,9 +19,8 @@ SUBROUTINE lr_normalise (evc1, norm)
USE gvect, ONLY : gstart
USE cell_base, ONLY : omega
USE io_global, ONLY : stdout
USE klist, ONLY : nks,xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
USE lsda_mod, ONLY : nspin
USE realus, ONLY : igk_k, npw_k
USE uspp, ONLY : vkb, nkb, okvan
USE wvfct, ONLY : nbnd, npwx, npw, wg
USE control_flags, ONLY : gamma_only

View File

@ -30,7 +30,7 @@ SUBROUTINE lr_ortho(dvpsi, evq, ikk, ikq, sevc, inverse)
!
USE kinds, ONLY : DP
use gvect, only : gstart
USE klist, ONLY : lgauss, degauss, ngauss
USE klist, ONLY : npw_k=>ngk, lgauss, degauss, ngauss
USE noncollin_module, ONLY : noncolin, npol
USE wvfct, ONLY : npwx, nbnd, et
USE ener, ONLY : ef
@ -39,7 +39,6 @@ SUBROUTINE lr_ortho(dvpsi, evq, ikk, ikq, sevc, inverse)
USE mp_global, ONLY : intra_bgrp_comm
USE mp, ONLY : mp_sum
use lr_variables, ONLY : lr_verbosity
use realus, ONLY : npw_k
use control_flags, only : gamma_only
USE io_global, ONLY : stdout
!

View File

@ -17,7 +17,7 @@ SUBROUTINE lr_read_wf()
!
USE kinds, ONLY : dp
USE io_global, ONLY : stdout
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
USE gvect, ONLY : ngm, g
USE io_files, ONLY : nwordwfc, iunwfc, prefix, diropn,&
& tmp_dir, wfc_dir
@ -37,8 +37,7 @@ SUBROUTINE lr_read_wf()
& initialisation_level,&
& fwfft_orbital_gamma, calbec_rs_gamma,&
& add_vuspsir_gamma, v_loc_psir,&
& s_psir_gamma, real_space_debug, &
& igk_k,npw_k
& s_psir_gamma, real_space_debug
USE buffers, ONLY : get_buffer
USE exx, ONLY : exx_grid_init, exx_div_check, exx_restart
USE funct, ONLY : dft_is_hybrid

View File

@ -17,7 +17,7 @@ SUBROUTINE lr_restart(iter_restart,rflag)
USE kinds, ONLY : DP
USE io_global, ONLY : stdout, ionode_id
USE control_flags, ONLY : gamma_only
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
USE cell_base, ONLY : tpiba2
USE gvect, ONLY : g
USE io_files, ONLY : tmp_dir, prefix, diropn, wfc_dir
@ -34,8 +34,7 @@ SUBROUTINE lr_restart(iter_restart,rflag)
USE mp_world, ONLY : world_comm
USE realus, ONLY : real_space, invfft_orbital_gamma, initialisation_level, &
fwfft_orbital_gamma, calbec_rs_gamma, add_vuspsir_gamma, &
v_loc_psir, s_psir_gamma,igk_k,npw_k, &
real_space_debug
v_loc_psir, s_psir_gamma, real_space_debug
USE fft_base, ONLY : dfftp
USE noncollin_module, ONLY : nspin_mag

View File

@ -265,8 +265,7 @@ CONTAINS
! Optical case : k-points version
!
USE becmod, ONLY : bec_type,becp,calbec
USE realus, ONLY : igk_k,npw_k
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
!
IMPLICIT NONE
!

View File

@ -24,11 +24,10 @@ SUBROUTINE lr_solve_e
USE gvect, ONLY : gstart
USE io_global, ONLY : stdout
USE io_files, ONLY : diropn, tmp_dir, wfc_dir
USE klist, ONLY : nks, xk, degauss
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k, degauss
USE lr_variables, ONLY : nwordd0psi, iund0psi,LR_polarization, test_case_no, &
& n_ipol, evc0, d0psi, d0psi2, evc1, lr_verbosity, &
& d0psi_rs, eels
USE realus, ONLY : igk_k,npw_k
USE lsda_mod, ONLY : lsda, isk, current_spin
USE uspp, ONLY : vkb
USE wvfct, ONLY : igk, nbnd, npwx, npw, et, current_k

View File

@ -23,7 +23,7 @@ SUBROUTINE lr_apply_s(vect, svect)
USE io_global, ONLY : stdout
USE uspp, ONLY : okvan, vkb, nkb
USE wvfct, ONLY : npwx, npw, nbnd
USE klist, ONLY : nks,xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
USE becmod, ONLY : becp, calbec
USE noncollin_module, ONLY : npol
USE lr_variables, ONLY : eels, lr_verbosity
@ -70,10 +70,9 @@ SUBROUTINE lr_apply_s_optical()
! Optical case
!
USE control_flags, ONLY : gamma_only
USE realus, ONLY : real_space, invfft_orbital_gamma, &
USE realus, ONLY : real_space, invfft_orbital_gamma, &
& fwfft_orbital_gamma, calbec_rs_gamma, &
& v_loc_psir, igk_k,npw_k, real_space_debug, &
& s_psir_gamma
& v_loc_psir, real_space_debug, s_psir_gamma
!
IMPLICIT NONE
!

View File

@ -181,7 +181,7 @@ SUBROUTINE check_vector_gamma (x)
!
USE mp_global, ONLY : inter_pool_comm, intra_bgrp_comm
USE mp, ONLY : mp_sum
USE realus, ONLY : npw_k
USE klist , ONLY : npw_k=>ngk
USE gvect, ONLY : gstart
USE io_global, ONLY : stdout
!
@ -217,7 +217,7 @@ SUBROUTINE check_vector_f (x)
!
USE mp_global, ONLY : inter_pool_comm, intra_bgrp_comm
USE mp, ONLY : mp_sum
USE realus, ONLY : npw_k
USE klist , ONLY : npw_k=>ngk
USE gvect, ONLY : gstart
USE io_global, ONLY : stdout
!
@ -251,7 +251,7 @@ SUBROUTINE check_all_bands_gamma (x,sx,nbnd1,nbnd2)
!
USE mp_global, ONLY : inter_pool_comm, intra_bgrp_comm
USE mp, ONLY : mp_sum
USE realus, ONLY : npw_k
USE klist , ONLY : npw_k=>ngk
USE io_global, ONLY : stdout
USE gvect, ONLY : gstart
!
@ -294,7 +294,6 @@ SUBROUTINE check_density_gamma (rx,nbnd)
!
USE mp_global, ONLY : inter_pool_comm, intra_bgrp_comm
USE mp, ONLY : mp_sum
USE realus, ONLY : npw_k
USE wvfct, ONLY : wg
USE fft_base, ONLY : dfftp
USE io_global, ONLY : stdout

View File

@ -224,6 +224,7 @@ lr_dealloc.o : ../../Modules/becmod.o
lr_dealloc.o : ../../Modules/control_flags.o
lr_dealloc.o : ../../Modules/io_global.o
lr_dealloc.o : ../../Modules/uspp.o
lr_dealloc.o : ../../PW/src/pwcom.o
lr_dealloc.o : ../../PW/src/realus.o
lr_dealloc.o : lr_charg_resp.o
lr_dealloc.o : lr_exx_kernel.o
@ -241,7 +242,6 @@ lr_dot.o : ../../Modules/mp_global.o
lr_dot.o : ../../Modules/noncol.o
lr_dot.o : ../../Modules/recvec.o
lr_dot.o : ../../PW/src/pwcom.o
lr_dot.o : ../../PW/src/realus.o
lr_dot.o : lr_variables.o
lr_dv_setup.o : ../../LR_Modules/lrcom.o
lr_dv_setup.o : ../../Modules/fft_base.o
@ -272,7 +272,6 @@ lr_dvpsi_e.o : ../../Modules/uspp.o
lr_dvpsi_e.o : ../../Modules/wavefunctions.o
lr_dvpsi_e.o : ../../PHonon/PH/phcom.o
lr_dvpsi_e.o : ../../PW/src/pwcom.o
lr_dvpsi_e.o : ../../PW/src/realus.o
lr_dvpsi_e.o : lr_variables.o
lr_dvpsi_eels.o : ../../LR_Modules/lrcom.o
lr_dvpsi_eels.o : ../../Modules/cell_base.o
@ -399,7 +398,6 @@ lr_ortho.o : ../../Modules/noncol.o
lr_ortho.o : ../../Modules/recvec.o
lr_ortho.o : ../../Modules/uspp.o
lr_ortho.o : ../../PW/src/pwcom.o
lr_ortho.o : ../../PW/src/realus.o
lr_ortho.o : lr_variables.o
lr_psym_eels.o : ../../FFTXlib/scatter_mod.o
lr_psym_eels.o : ../../LR_Modules/lrcom.o
@ -614,7 +612,6 @@ lr_variables.o : ../../Modules/mp.o
lr_variables.o : ../../Modules/mp_global.o
lr_variables.o : ../../Modules/recvec.o
lr_variables.o : ../../PW/src/pwcom.o
lr_variables.o : ../../PW/src/realus.o
lr_write_restart.o : ../../Modules/cell_base.o
lr_write_restart.o : ../../Modules/fft_base.o
lr_write_restart.o : ../../Modules/io_files.o

View File

@ -16,7 +16,7 @@ SUBROUTINE sd0psi()
! Modified by Osman Baris Malcioglu (2009)
! Modified by Iurii Timrov (EELS extension) (2013)
!
USE klist, ONLY : nks, xk
USE klist, ONLY : nks, xk, npw_k=>ngk, igk_k
USE lr_variables, ONLY : n_ipol, d0psi, lr_verbosity, eels
USE uspp, ONLY : vkb, nkb, okvan
USE wvfct, ONLY : nbnd, npwx
@ -55,7 +55,7 @@ SUBROUTINE lr_sd0psi_optical()
USE control_flags, ONLY : gamma_only
USE realus, ONLY : real_space, invfft_orbital_gamma, fwfft_orbital_gamma, &
& calbec_rs_gamma, v_loc_psir, s_psir_gamma, &
& igk_k, npw_k, real_space_debug
& real_space_debug
IMPLICIT NONE
!